feat(did-binding): DID binding for agent_identity (closes #17)#18
Merged
feat(did-binding): DID binding for agent_identity (closes #17)#18
Conversation
- New trust_layer/did_resolver.py: resolve did:web + did:key, SSRF guard, challenge-response (Path A), OATR delegation (Path B), bind_did_to_key - POST /v1/keys/bind-did + POST /v1/keys/bind-did/confirm endpoints - proxy.py: verified_did overrides X-Agent-Identity; identity_consistent always True when verified DID matches (no false positives) - config.py: OATR_MANIFEST_URL env var - 35 unit + integration tests, 422 total passing Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
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
trust_layer/did_resolver.py: DID resolution (did:web+did:key), SSRF protection, challenge-response binding (Path A), OATR delegation (Path B), key profile updatePOST /v1/keys/bind-did— initiate binding (Path A returns challenge, Path B withoatr_issuer_idbinds immediately via registry delegation)POST /v1/keys/bind-did/confirm— submit Ed25519 signature over challenge →verified_didstored in key profileproxy.py:verified_didsilently overrides anyX-Agent-Identityheader;identity_consistentis alwaysTruewhen verified DID matches (no false positives from historical mismatch)config.py:OATR_MANIFEST_URLenv var (default: FransDevelopment/open-agent-trust-registry manifest)Non-breaking
Clients without a bound DID are unaffected — all changes are behind the
verified_didkey in the key profile, which defaults to absent.Test plan
python3 -m pytest tests/test_did_binding.py -v→ 35 passedpython3 -m pytest tests/ -q→ 422 passed🤖 Generated with Claude Code