Skip to content

Canonical did:web agent URL returns 502; resolver accepts a mismatched DID #56

Description

@EricGilerson

Summary

Observer Protocol registers and displays this agent identity:

did:web:observerprotocol.org:agents:f4eee9e41e5b08c22cb9319136bc40f5

However, its canonical did:web document URL returns HTTP 502:

https://observerprotocol.org/agents/f4eee9e41e5b08c22cb9319136bc40f5/did.json

The document is available through Observer-specific API routes, but that does not repair standard did:web resolution: the published DID hostname is observerprotocol.org, not api.observerprotocol.org.

Additionally, the API resolver accepts a DID with the wrong hostname and returns a DID document whose id does not match the requested DID.

Reproduction

For agent ID f4eee9e41e5b08c22cb9319136bc40f5:

  1. Request https://observerprotocol.org/agents/f4eee9e41e5b08c22cb9319136bc40f5/did.json.

    • Actual: HTTP 502.
    • Expected: HTTP 200 with a DID document whose id is did:web:observerprotocol.org:agents:f4eee9e41e5b08c22cb9319136bc40f5.
  2. Request https://api.observerprotocol.org/agents/f4eee9e41e5b08c22cb9319136bc40f5/did.json.

    • Actual: HTTP 200 and a document whose id is correctly did:web:observerprotocol.org:agents:f4eee9e41e5b08c22cb9319136bc40f5.
    • This confirms the document exists but is not being served at the canonical did:web location.
  3. Request the resolver with did:web:api.observerprotocol.org:agents:f4eee9e41e5b08c22cb9319136bc40f5.

    • Actual: HTTP 200, but the returned document identifies itself as did:web:observerprotocol.org:agents:f4eee9e41e5b08c22cb9319136bc40f5.
    • Expected: reject the request, or only return a document whose id exactly matches the requested DID.

Expected behavior

  • Serve each agent document at https://observerprotocol.org/agents/{agent_id}/did.json.
  • Preserve an exact match between the requested DID and document.id.

Impact

Observer-specific API consumers can use /resolve/{did} as a workaround, but independent standard did:web resolvers cannot resolve the published identity. The resolver hostname-mismatch behavior may also let clients that fail to validate document.id accept an incorrect identity.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions