Skip to main content

Identity-Aware Kernel

The Identity-Aware Kernel (Gate) is the ingress every request passes through. It establishes the authenticated subject, attaches the verified identity claims, and binds the request to the project context that the downstream isolation and policy layers consume. Compromise of the kernel is the highest-value adversary objective: a successful forge here defeats every downstream control by impersonating an authorised subject.

The kernel's threat surface is fundamentally about identity assertion integrity — every claim Gate makes about a caller must be cryptographically attributable to Gate itself, and no software-layer compromise of any component anywhere in the stack should let an attacker mint a claim Gate would have signed. At baseline, the mitigation is platform-level cryptographic verification: Gate's identity is established via SPIFFE workload identity over mTLS, and tokens are signed with a platform-managed Ed25519 key. On the hardware-attested mode, this is extended to dual-layer hardware attestation: Gate's running code is itself hardware-attested as genuine, and the signing keys are physically trapped inside an HSM that no software exploit can access.

1. Scope​

This surface defends against:

Threat classExample
Forged JWTsAn attacker mints a valid-looking JWT claiming an arbitrary subject identity
Software-layer kernel compromiseAn attacker who compromises the Gate application code attempting to issue tokens under attacker control
Cross-project identity spoofingA token issued for project A used or modified to claim authority in project B
Persistent credential stuffingAn attacker who obtained a leaked credential using it repeatedly across the platform without detection
Gate impersonationA malicious or compromised service in the platform's internal network pretending to be Gate
Token replay after revocationA previously valid token continuing to authenticate after the issuing session was revoked
MFA bypassAn attacker with primary-credential access bypassing the second-factor check on an MFA-gated action

This surface does not address:

  • End-user password compromise at the customer side — credential stuffing of stolen end-user passwords is a customer-side concern. Gate's role is to enforce MFA and rate-limit; preventing the password compromise itself is upstream.
  • Customer-IdP compromise (federated identity) — if a customer's IdP is breached, Gate has no way to distinguish a legitimate from an impersonated user from that IdP. Customers using federation are responsible for their IdP's security posture.
  • Within-project authorisation decisions — what an authenticated subject can do is the RBAC + JSON-policy surface. Gate establishes who; downstream layers decide what.

2. Technical mitigation​

Baseline — Platform-Signed Workload Identity and Token Signing​

At baseline, Gate's identity is established through SPIFFE workload identity over mutual TLS: other platform services authenticate Gate by its cryptographically verified workload certificate, not by network address. Tokens Gate issues are signed with a platform-managed Ed25519 private key; the corresponding public key is published via per-project JWKS endpoints for offline verification. Gate's audit log entries are platform-signed (RSA-2048 + SHA-256). These controls close the primary threat classes — forged JWTs, impersonation, cross-project spoofing, and replay — without requiring any hardware TEE.

hardware-attested mode — Dual-Layer Hardware Attestation​

On the hardware-attested mode, the baseline is extended with two distinct hardware-rooted layers, each closing an additional attack vector.

Layer 1 — Workload Attestation​

Gate runs inside a Trusted Execution Environment (TEE) — Intel TDX or AMD SEV-SNP, depending on the cloud-provider substrate. At boot, the TEE produces an attestation document signed by the silicon's hardware root key, certifying:

AttributeWhat it certifies
Code measurement hashThe cryptographic hash of the exact Gate code image (kernel + userspace) loaded into the TEE
Vendor signatureThe hardware root key's chain back to the silicon vendor's published certificate (Intel DCAP, AMD VCEK chain)
Boot-time configurationTEE parameters in effect at boot (memory size, security flags, supported features)
NonceA fresh challenge value preventing replay

Downstream services — and customers performing offline verification — compute the expected measurement hash for the published Gate build, request a fresh attestation, and verify both the signature chain and the measurement match. A workload that does not match the expected measurement, that fails the signature chain, or that returns a stale/replayed attestation is rejected.

The threat this closes: a malicious service inside the platform's internal network, or a compromised Gate workload running modified code, cannot impersonate the real Gate. Other platform services authenticate Gate by attestation, not by network address; an attacker who controls the network cannot satisfy the attestation check.

Layer 2 — HSM-Backed Token Signing​

On the hardware-attested mode, the platform-managed Ed25519 signing key is replaced by a key that lives entirely inside an HSM (the TEE's HSM-backed key store, or a directly attached HSM, depending on cloud substrate). The keys:

PropertyEnforcement
Generated inside the HSMKey material is generated by the HSM's CSPRNG; no software ever observes the key in plaintext
Non-exportableThe HSM rejects export operations; the key never leaves the hardware boundary in any form
Sign-only accessGate's interface to the HSM exposes only the Sign operation; the key cannot be retrieved or re-imported elsewhere
Public-key publishingThe corresponding public key is published via per-project JWKS endpoints; downstream verifiers operate offline
Per-project key derivationPer-project signing keys are derived through the HSM's key-derivation function, scoping any single key's compromise to its project (cross-project identity spoofing requires cross-project key compromise, not a single forge)

A software-layer compromise of Gate's application code — full attacker control of the running process, root inside the TEE, complete arbitrary code execution — still cannot mint a forged token under any identity. The signing key is unreachable; the attacker can only invoke Sign for the inputs Gate's application logic produces. They cannot sign tokens with arbitrary claims; they cannot extract the key for offline forgery; they cannot escalate the key's permissions inside the HSM.

The threat this closes: catastrophic token forgery is impossible even in the worst-case software compromise. The attacker who owns Gate's process owns nothing more than the request stream Gate would have processed anyway — and every token they cause to be signed appears in the audit log under the actual authenticated subject's identity.

3. Verification flow​

A downstream verifier (a pillar handler, a customer's own service consuming an issued JWT, or an external auditor) verifies a Gate-issued token. The chain differs by tier.

BaselineHardware-attested modeJWT receivedGate-issued tokensignature verified againstGate's JWKS endpointpublished, per projectTLS certificate verified againstPublic CA chain+ Gate's SPIFFE workload identity (mTLS)JWT receivedGate-issued tokensignature verified againstGate's JWKS endpointpublished, per projectTLS certificate verified againstPublic CA chain+ Gate's hardware-attested identityattestation report verified againstTEE vendor root certificateIntel / AMD
On the hardware-attested mode the verification chain extends past the public CA chain to the TEE vendor root certificate, so every link has a hardware anchor.

On the hardware-attested mode, each link in the chain has a hardware anchor. A break anywhere — an invalid JWKS endpoint signature, a Gate workload whose attestation does not verify, or a TEE vendor root not in the verifier's trust store — fails the verification. No single software compromise breaks the chain.

4. Session and revocation discipline​

The kernel maintains an authoritative session table inside the TEE. Each session record carries:

  • The subject identity (usr_<base62> for platform users, eu_<base62> for end-users)
  • The session issuance time + expiration (short-TTL access tokens per the project's session policy)
  • MFA claim state (mfa: "verified" if a recent re-authentication occurred)
  • The project context the session was scoped to (cross-project tokens do not exist; sessions are project-scoped)
  • The revocation status

Access tokens are short-lived per the project's configured session policy; longer-lived refresh tokens require an explicit re-authentication or device-trust check. The threat this closes: a stolen access token has bounded life; persistent credential stuffing requires repeated MFA satisfaction.

When a session is revoked (admin action, password change, MFA reset), the session table is updated immediately and the change is propagated to downstream verifiers via short-TTL JWKS refresh + an explicit revocation list. A revoked token presented after propagation fails verification; the worst-case window is a few seconds.

Sensitive operations (custody downgrade, account deletion, key revocation) require a fresh mfa: "verified" claim — not just any valid session. The IRREVERSIBLE_ACTION_GATE policy family per API → Control checks the MFA claim before authorising the operation. An attacker with a stolen session cannot perform irreversible actions without also satisfying the MFA challenge.

5. Forensic attribution​

Every Gate-handled request produces an audit-log entry signed by Gate's platform key (RSA-2048 + SHA-256 at baseline; HSM-backed on the hardware-attested mode), recording:

  • The authenticated subject identity
  • The end-user identity (if the request acts on an end-user's behalf)
  • The project context
  • The MFA claim state at request time
  • The downstream pillar handler that received the request
  • The decision outcome (authenticated, rejected, MFA-required)

The signature on each audit entry is verifiable offline against Gate's published public key. An attacker who somehow caused a fraudulent entry to be written cannot match the signature; an entry whose signature verifies is provably from the real Gate service. On the hardware-attested mode, Gate's public key additionally chains back to hardware attestation, providing silicon-rooted proof of provenance.

This is the integration point with Kibo's audit ledger: Kibo stamps the hardware-attested Gate-verified identity onto every cryptographic operation, so that the ledger does not merely record "a Service Key invoked Decrypt" but "end-user eu_kQ3pZ9rL2sW8, acting in project proj_<id>, with MFA verified at time T, invoked Decrypt on resource R."

6. Composition with other surfaces​

The Identity-Aware Kernel sits at the top of the request flow and is depended on by every downstream surface:

  • Depended on by Isolation & Privilege — the project context that Layer 1 (Connection-Pool Routing) consumes is established at Gate. A forged or cross-project token would defeat the layers below; Gate's identity-verification discipline (SPIFFE at baseline; hardware attestation on the hardware-attested mode) closes that.
  • Depended on by Cryptographic Boundary — Kibo's encrypt/decrypt operations check that the calling subject was authenticated by Gate before touching plaintext key material. The Gate-verified identity flows into Kibo's audit ledger.
  • Depended on by Injection — the four-layer injection model assumes the caller's identity is authentic; a forged identity could not bypass injection detection (the layers are content-based, not identity-based), but it would cause an audit trail attributed to the wrong subject.
  • Depends on Infrastructure — Gate's workload identity integrity and the protection of its signing key both come from the infrastructure surface holding. At baseline this means the mTLS + SPIFFE mesh and the software vault; on the hardware-attested mode this additionally means TEE memory protection and the HSM key boundary.

7. What this surface does not cover​

  • What an authenticated subject can do — once Gate establishes the subject's identity, API → Security (RBAC) and API → Control (JSON policy) determine the authorised actions.
  • End-user account security at the customer side — password strength, breach detection, account-takeover defence at the IdP layer are customer-side concerns when federation is in use.
  • Network-layer DDoS — request volume mitigations live at the edge layer before Gate; see API → Security §3.