PCI 1.2 / 3.5.2: Network segmentation and strict access control over cryptographic material. Each node only exposes the capabilities it was configured for.
PCI 3.6.1: Secure key distribution. The internal transport is NanoMsg over mTLS. The assembled key never travels over the network; only its encrypted components do.
sequenceDiagram
participant App as Application
participant GW as GATEWAY
participant Mesh as NNG Mesh (mTLS)
participant VA as VAULT A
participant VB as VAULT B
App->>GW: POST /api/keys/active (local mTLS)
GW->>GW: Fail-Fast: serve_crypto=ONLINE in state-map?
alt No nodes available
GW-->>App: HTTP 503 Resource unavailable
else Node available
GW->>Mesh: CryptoForwardRequest (SURVEYOR)
Mesh->>VA: Request to VAULT A
alt VAULT A plugin available
VA-->>Mesh: CryptoForwardResponse ✅
else VAULT A plugin offline → failover
Mesh->>VB: Request to VAULT B
VB-->>Mesh: CryptoForwardResponse ✅
end
Mesh-->>GW: Response
GW->>GW: Decrypt RSA-OAEP + XOR (RAM)
GW->>GW: SecureZero buffers
GW-->>App: Secure response
end
3. Cryptographic Segregation (Defense in Depth)
PCI 3.5.2: ArcanumVault never stores the final assembled key. The components are decrypted and combined exclusively in volatile RAM.
Envelope Encryption (Secrets Vault): DEK generated by KMS, encrypted with AES-256-GCM. Application secrets are never stored in cleartext.
SecureZero: Buffers wiped with runtime.KeepAlive to prevent removal by the optimizer.
Transport Encryption (RSA-OAEP): Additional layer over mTLS between plugins and the core.
4. Authentication and Middleware Stack (mTLS + 7 Layers)
PCI 4.1 / 6.5.10: TLS 1.3 minimum mandatory. Bidirectional identification on all connections.
graph LR
C["Client\n(cert OU=consumer)"]-->F1
subgraph "Middleware Stack — per Port"
F1["IP Filter CIDR"]-->F2["mTLS Verify CA"]
F2-->F3["Cert Pinning SHA-256"]
F3-->F4["RBAC by OU"]
F4-->F5["Rate Limiter\ntoken bucket"]
F5-->F6["Anti-Replay\nNonce+Timestamp"]
F6-->F7["HMAC-SHA256\nBody Integrity"]
F7-->H["Handler"]
end
H-->V["VaultResolver\n→ PluginChain"]
Port
Protocol
Purpose
Required OU
8080
HTTPS
Keys API (REST)
consumer, admin
8081
HTTPS
Administration / Hot-Reload
admin
9090
HTTPS
Prometheus Metrics
observer, platform, admin
50051
gRPC+TLS
gRPC API
consumer, admin
40000
NNG/mTLS
Internal Node Mesh
Mesh nodes
Unified Model — gRPC Access Control (Phase 1)
Zero-Trust by node identity: on top of the mTLS stack, the unified model adds authentication and authorization by NodeIdentity. The gRPC AuthN interceptor extracts the mTLS cert, computes its SHA-256 fingerprint and resolves it against node_identities (via IdentityStore); the AuthZ middleware validates each operation with CheckGrant against the declarative IdentityGrant matrix (Identity × Resource × Ops × Algorithms × Expires).
Component
Role
Detail
NodeIdentity + IdentityStore
gRPC AuthN
The interceptor resolves the mTLS cert by SHA-256 fingerprint and injects the identity into the context. bootstrap_token validated with bcrypt.
IdentityGrant + AuthZ middleware
Per-operation AuthZ
CheckGrant(op=admin / crypto_op) validates the operation, the resource, the allowed algorithms and the expiration. No grant → PermissionDenied.
AdminVaultService (AV-06)
Authenticated gRPC backoffice
9 RPCs (Upsert/Delete/List × Identities/Resources/Grants). Each RPC requires an op=admin grant over the _admin meta-resource. Replaces seeding via direct SQL.
5. Plugin Health Check and Mesh State (Circuit Breaker)
PCI 12.10.2: The system refuses service before delivering incorrect data. Nodes propagate their health state to the whole mesh every 5 seconds.
Parameter
Description
Default
keepalive_idle_seconds
Ping when there is no activity (active mode)
120s
reconnect_interval_seconds
Initial interval on connection loss
5s
reconnect_decay_multiplier
Exponential multiplication factor
2.0x
reconnect_max_interval_seconds
Maximum interval ceiling
300s
PUB/SUB broadcast every 5s includes: node_mode, serve_crypto, serve_metrics, serve_config and each plugin's state. Gateway nodes query this state-map for the smart fail-fast before broadcasting over the mesh.
6. Native Operating System Service
PCI 2.2.3: System security configuration. Hardening of the process on the host OS.
Dedicated table, independent from the legacy audit_logs. Every AuthN and AuthZ decision of the unified model is recorded asynchronously (fire-and-forget) in access_audit_logs with identity, fingerprint, service, method, operation, resource, result and latency. Every Upsert/Delete of the AdminVaultService is logged with the identity of the admin that executed it.