Skip to content

fix: tolerate http dev origins for the agent-token ps claim - #16

Merged
marcofanti merged 1 commit into
mainfrom
ps-claim-http-tolerance
Aug 7, 2026
Merged

fix: tolerate http dev origins for the agent-token ps claim#16
marcofanti merged 1 commit into
mainfrom
ps-claim-http-tolerance

Conversation

@marcofanti

Copy link
Copy Markdown
Owner

The draft-10 §5.2.4 ps-claim verification I added used validateServerIdentifier, which mandates HTTPS. That makes AgentTokens.verify reject every non-TLS dev/demo origin (http://ps.uma.lab:8765, http://localhost) — breaking agent-token verification in exactly the environment the demo and the library's own tests run in.

Fix: validate ps as a well-formed http(s) server URL (new Identifiers.validateServerUrl) rather than strict-HTTPS. Enforcing HTTPS-in-production is a deployment policy, not a reason to fail token verification. Malformed values (no scheme/host) are still rejected. parent_agent validation is unchanged.

Found while bumping aauth-java-person-server to 0.2.1: its full register→token flow 401'd because the AS mints agent tokens with ps: http://localhost.

🤖 Generated with Claude Code

@marcofanti
marcofanti merged commit f63ed90 into main Aug 7, 2026
1 check passed
@marcofanti
marcofanti deleted the ps-claim-http-tolerance branch August 7, 2026 00:57
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.

1 participant