feat(tee): raise explicit not-implemented error for the opaque provider#385
Merged
Merged
Conversation
The `opaque` (OPAQUE managed-runtime) provider was a silent no-op: detect() returned False, so in auto mode it was silently skipped, and an explicit `provider: opaque` selection surfaced only a generic "not available on this host". It is a recognized-but-unimplemented placeholder, so make that explicit. - Add AttestationProviderNotImplemented (subclass of AttestationProviderUnsupported, code ATTESTATION_PROVIDER_NOT_IMPLEMENTED, HTTP 501); the gateway still refuses to start. - OpaqueProvider.detect() and get_attestation_report() now raise it instead of returning False / a bare NotImplementedError. - Remove `opaque` from the auto-detect probe order so it is never auto-selected; the auto loop also defensively skips any provider that raises NotImplemented. - Explicit `provider: opaque` now raises the explicit error rather than the generic unsupported message. - Tests: opaque detect/report raise the new error; explicit selection raises it; opaque is not in the probe order. - Docs: README, SPEC §9, STATUS.md, attestation.md §1.1/§1.2, and the error-code registry updated to match (probe order tpm -> sev-snp -> tdx). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the docs pass in #383. The
opaque(OPAQUE managed-runtime) provider was a silent no-op:OpaqueProvider.detect()returnedFalse, so in auto mode it was silently skipped, and an explicitprovider: opaqueselection surfaced only a generic "not available on this host". It is a recognized-but-not-yet-implemented placeholder, so this makes that explicit.Changes
AttestationProviderNotImplemented(subclass ofAttestationProviderUnsupported, codeATTESTATION_PROVIDER_NOT_IMPLEMENTED, HTTP 501) — the gateway still refuses to start, but with a clear reason.OpaqueProvider.detect()andget_attestation_report()now raise it instead of returningFalse/ a bareNotImplementedError.opaquefrom the auto-detect probe order (tee/detect.py), so it is never auto-selected. The auto loop also defensively skips any provider that raises the not-implemented error.provider: opaquenow raises the explicit error rather than the generic unsupported message.Tests
opaquedetect()/get_attestation_report()raise the new error; explicit selection viadetect_providerraises it;opaqueis asserted absent from the probe order. Full tee suite (50 tests) passes locally; ruff + mypy clean.Docs
docs/SPEC.md§9,STATUS.md,docs/spec/attestation.md§1.1/§1.2, and the error-code registry updated to match (probe order is nowtpm -> sev-snp -> tdx).🤖 Generated with Claude Code