Skip to content

MAP Protocol Conformance Certification

This document defines the formal certification levels for MAP Protocol implementations. Each level represents increasing degrees of compliance, security, and production readiness.


Certification Levels Overview

Level 1: Protocol Compliant ---> Basic schema + dispatch/approve flow
    |
    v
Level 2: Security Verified  ---> Level 1 + signing, replay protection, tenant isolation
    |
    v
Level 3: Production Ready    ---> Level 2 + reliability, chaos, DR, backpressure

Level 1: Protocol Compliant

Goal: The implementation passes basic schema validation and the core dispatch/approve flow.

Requirements

1.1 Schema Validation

All requests and responses must validate against the MAP JSON Schema definitions.

TestDescription
schema-validation.test.tsValidates DispatchRequest, ApprovalRequest, TaskEnvelope, ResultPackage, ExecutionReceipt against schemas
schema-negotiation.test.tsValidates schema version negotiation and compatibility

1.2 Core API Flow

The implementation must support the basic task lifecycle.

TestDescription
dispatch.test.tsTask dispatch creates a task and returns a result
approval.test.tsTasks requiring approval flow through the approval workflow
api-surface.test.tsAll required API endpoints are present and respond correctly

1.3 Error Code Taxonomy

The implementation must use the standard MAP error codes.

TestDescription
error-codes.test.tsAll 24 standard error codes are recognized; correct HTTP status codes returned

1.4 Required API Endpoints

MethodPathDescription
POST/dispatchSubmit a task for execution
POST/approveApprove a pending task
GET/tasks/{taskId}Retrieve a task by ID
GET/tasksList tasks (with optional filters)
GET/agentsList available agents
GET/healthHealth check endpoint

Evidence Required

  • [ ] Test output showing all Level 1 tests passing
  • [ ] Screenshot or log of successful dispatch -> result flow
  • [ ] Screenshot or log of successful approve -> result flow
  • [ ] Schema validation test results
  • [ ] Error code mapping verified

Level 2: Security Verified

Goal: The implementation passes all Level 1 requirements plus signing, replay protection, and tenant isolation.

Requirements

2.1 All Level 1 Requirements

Must pass all Level 1 tests first.

2.2 Request Signing

TestDescription
signing.test.tsVerifies JWS MAPSIG compact serialization, HMAC-SHA256, RSA-SHA256
Cross-SDK signature verificationPython ↔ TypeScript signatures produce identical results for same inputs

2.3 Replay Protection

TestDescription
idempotency.test.tsIdempotency keys prevent duplicate task creation
nonce-validation.test.tsNonces are validated and rejected on replay

2.4 Tenant Isolation

TestDescription
tenant-isolation.test.tsRequests scoped to one tenant cannot access another tenant's data
trust-chain.test.tsVerification of delegation token chains across tenants

2.5 Policy Enforcement

TestDescription
policy.test.tsPolicy rules are evaluated and enforced (allow/deny/require_approval)

2.6 Secure Transport

RequirementDescription
TLS 1.3All communication over HTTPS with minimum TLS 1.3
mTLS supportOptional mutual TLS for service-to-service authentication
API key validationServer-side validation of signing keys

Evidence Required

  • [ ] Test output showing all Level 2 tests passing
  • [ ] Cross-SDK signature compatibility report
  • [ ] Demonstration of nonce rejection on replay
  • [ ] Demonstration of tenant isolation (cross-tenant access denied)
  • [ ] Policy evaluation logs showing allow/deny decisions
  • [ ] TLS configuration verification

Level 3: Production Ready

Goal: The implementation passes all Level 2 requirements plus reliability testing, chaos engineering, disaster recovery drills, and backpressure handling.

Requirements

3.1 All Level 2 Requirements

Must pass all Level 2 tests first.

3.2 Reliability Testing

TestDescription
chaos-engineering.test.tsSystem behaves correctly under network partitions, latency injection, pod killing
dr-drill.test.tsDisaster recovery: backup/restore, failover within RTO
backpressure.test.tsRate limiting, circuit breaking, queue depth management

3.3 Performance Benchmarks

MetricTarget
Dispatch latency (p50)< 100ms
Dispatch latency (p99)< 500ms
Throughput (sustained)> 1000 dispatches/second
Concurrent connections> 10,000
SSE stream latency< 50ms first-event

3.4 Operational Readiness

RequirementDescription
Health checks/health returns accurate component status
MetricsPrometheus-compatible metrics endpoint
Structured loggingJSON-formatted logs with trace IDs
Graceful shutdownDrain in-flight requests before shutdown
Configuration managementEnvironment variables and config file support

3.5 Deployment Evidence

RequirementDescription
Staging environmentAt least 7 days of stable operation
Production environmentAt least 30 days of stable operation
Incident responseDocumented incident response procedure
Monitoring & alertingActive monitoring dashboards and alert rules
RunbookOperational runbook for common scenarios

Evidence Required

  • [ ] Test output showing all Level 3 tests passing
  • [ ] Performance benchmark report (p50, p99, throughput)
  • [ ] Chaos engineering test results
  • [ ] Disaster recovery drill report
  • [ ] 30-day production stability report
  • [ ] Incident response documentation
  • [ ] Monitoring dashboard screenshots
  • [ ] Operational runbook

Certification Process

Self-Certification

  1. Clone the MAP Protocol repository
  2. Run the conformance test suite from /conformance against your implementation
  3. Collect evidence as specified for each level
  4. Submit a certification request via GitHub Issue with the certification label
  5. Include:
    • Implementation name and version
    • SDK language and version
    • Target certification level
    • All required evidence (links to test output, screenshots, logs)

Review Process

  1. MAP maintainers review the submission
  2. Spot-check: random subset of tests re-run by maintainers
  3. If passed, the implementation is listed in CERTIFIED_IMPLEMENTATIONS.md
  4. Certification is valid for 12 months or until a new major protocol version

Recertification

  • Required when a new major protocol version is released
  • Required if the implementation changes its signing or security model
  • Recommended at least every 12 months

Test File Reference

Conformance Test Suite (/conformance/src/)

FileLevelDescription
dispatch.test.tsL1Task dispatch functionality
approval.test.tsL1Task approval workflow
api-surface.test.tsL1API surface compliance
error-codes.test.tsL1Error code taxonomy
schema-negotiation.test.tsL1Schema version negotiation
validation.test.tsL1Request/response validation
signing.test.tsL2Cryptographic signature verification
idempotency.test.tsL2Idempotent operations
tenant-isolation.test.tsL2Tenant data isolation
trust-chain.test.tsL2Trust chain verification
policy.test.tsL2Policy evaluation
async-queue.test.tsL2Async delivery queue
task-store.test.tsL2Task persistence
receipt-store.test.tsL2Receipt storage
chaos-engineering.test.tsL3Chaos engineering
dr-drill.test.tsL3Disaster recovery
backpressure.test.tsL3Backpressure handling

Certified Implementations

ImplementationLanguageLevelCertified DateExpires
(none yet)----

Certification is tracked in CERTIFIED_IMPLEMENTATIONS.md in the repository root.

Released under the Apache 2.0 License.