fix: remove legacy MCP agent identity fallback#77
Merged
Conversation
Remove the "mcp-agent" fallback identity and SHA-256 hash derivation
from the MCP runtime. All agents must now have proper credentials.
- Remove legacy SHA-256 agent ID derivation from temper-mcp runtime
- Remove hostname and sha2 dependencies from temper-mcp
- Auto-register AgentType("operator") + AgentCredential for the global
TEMPER_API_KEY on platform bootstrap (idempotent)
- Remove deprecated X-Temper-Principal-Id and X-Temper-Agent-Type
header extraction from request context
- Clean up SecurityContext fallback: no self-declared identity trusted
- Enrich agent context from ResolvedIdentity for telemetry
- Add E2E tests for operator credential bootstrap and resolution
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9fd1d2d to
d9e3db5
Compare
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.
Summary
mcp-agentorcc-/cx-/mc-prefix IDsAgentType("operator")+AgentCredentialforTEMPER_API_KEYon platform boot, so the global API key resolves as a proper verified identityX-Temper-Principal-IdandX-Temper-Agent-Typeheader extraction from server request contextResolvedIdentityis the only trusted identity sourceTest plan
cargo test --workspace)e2e_bootstrap_operator_credential_resolves,e2e_bootstrap_operator_credential_idempotent,e2e_unregistered_api_key_does_not_resolvemcp_initialize_without_api_key_no_identityverified: truemcp-agent)Implements ADR-0033: Platform-Assigned Agent Identity.
🤖 Generated with Claude Code