Skip to content

feat(tee): SPIFFE/SPIRE Workload API client with graceful fallback - #228

Merged
imran-siddique merged 1 commit into
mainfrom
feat/spiffe-svid-client
Jun 7, 2026
Merged

feat(tee): SPIFFE/SPIRE Workload API client with graceful fallback#228
imran-siddique merged 1 commit into
mainfrom
feat/spiffe-svid-client

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

Summary

  • Adds src/cmcp_gateway/tee/spiffe.py: fetches X.509 SVIDs from a local SPIRE Workload API agent (pyspiffe) conditioned on TEE attestation; falls back to self-signed TLS with a WARNING log if SPIRE is unreachable or pyspiffe is not installed
  • Adds make_self_signed_tls_context(): generates an Ed25519 self-signed cert whose CN encodes the first 16 hex chars of the gateway signing key, binding network identity to the TEE measurement
  • Updates src/cmcp_gateway/startup.py: step 5b after catalog load; populates GatewayContext.spiffe (non-fatal — gateway still starts without SPIRE)

Test plan

  • pytest tests/unit/test_spiffe.py -v — 14 passed, 1 skipped (Windows: AF_UNIX check is a no-op there)
  • Full suite: pytest tests/unit/ -q — 363 passed, 1 skipped

Closes #96

🤖 Generated with Claude Code

Fetches X.509 SVIDs from a local SPIRE agent after TEE attestation.
Falls back to self-signed TLS with a WARNING log if SPIRE is unavailable
or pyspiffe is not installed. GatewayContext gains a `spiffe` field
populated during startup step 5b (non-fatal).

Closes #96

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imran-siddique
imran-siddique merged commit 61bb582 into main Jun 7, 2026
1 of 8 checks passed
imran-siddique added a commit that referenced this pull request Jun 7, 2026
)

Fetches X.509 SVIDs from a local SPIRE agent after TEE attestation.
Falls back to self-signed TLS with a WARNING log if SPIRE is unavailable
or pyspiffe is not installed. GatewayContext gains a `spiffe` field
populated during startup step 5b (non-fatal).

Closes #96

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
@imran-siddique
imran-siddique deleted the feat/spiffe-svid-client branch July 29, 2026 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[tee] SPIFFE/SPIRE integration — SVID issuance conditioned on TEE attestation

1 participant