Skip to content

2. Architecture ​

Status: draft, matches the implementation.

2.1 Components ​

ComponentPackageResponsibility
Canonical encoding and cryptography@dip/cryptoDeterministic JSON, SHA-256, domain-separated Ed25519
Authority@dip/authorityDeclarations, trust roots, signed publication and revocation
Authorization@dip/authorizationRequest normalization and the two-outcome engine
Approval@dip/approvalApproval workflow, separate from authorization
Execution@dip/executionProtected boundary to connectors
Evidence@dip/evidenceSigned evidence envelope
Ledger@dip/ledgerAppend-only hash chain
Verifier@dip/verifierIndependent verification; depends only on @dip/crypto
Connectors@dip/connectorsAdapters for external systems
SDK@dip/sdkDeveloper client
REST APIapps/apiHTTP interface over the SDK
CLIapps/clidip command
Storage@dip/storagePostgreSQL event log, stores, backup

2.2 Dependencies ​

The verifier MUST depend only on the cryptography package. It MUST NOT import the engine, the ledger, the boundary or the registry. No component below the API MAY depend on the API.

2.3 Data flow ​

Request → normalization (digest) → authorization (ALLOW or DENY) → execution boundary (verifies ALLOW for the same digest, then calls a connector) → evidence (signed, chained) → ledger. Verification reads only the exported bundle and trust roots.

2.4 State ​

Authority, approval, execution and evidence state is journaled. The server replays the journal at startup and MUST refuse to start if the evidence chain does not verify. Persistence is described in infrastructure/postgres/README.md.

Released under the Apache License 2.0.