Skip to content

fix(acp): reject unadvertised auth methods - #13533

Closed
zhao0112 wants to merge 1 commit into
NousResearch:mainfrom
zhao0112:fix/acp-auth-method-id
Closed

fix(acp): reject unadvertised auth methods#13533
zhao0112 wants to merge 1 commit into
NousResearch:mainfrom
zhao0112:fix/acp-auth-method-id

Conversation

@zhao0112

Copy link
Copy Markdown
Contributor

Summary

  • validate method_id against the runtime provider advertised during ACP initialization
  • keep authentication behavior unchanged when the requested method matches the configured provider
  • add a regression test covering a mismatched method_id

Fixes #13452

Root Cause

HermesACPAgent.initialize() advertises a single auth method derived from detect_provider(), but authenticate() previously ignored the requested method_id and returned success whenever any provider was configured. That allowed clients to authenticate with method ids the server never advertised.

Validation

  • PYTHONPATH=/Users/zzl/.hermes/hermes-agent-pr-13452 /Users/zzl/.hermes/hermes-agent-update-20260421/venv/bin/python -m pytest -o addopts= tests/acp/test_server.py -q
  • PYTHONPATH=/Users/zzl/.hermes/hermes-agent-pr-13452 /Users/zzl/.hermes/hermes-agent-update-20260421/venv/bin/python -m py_compile acp_adapter/server.py tests/acp/test_server.py
  • git diff --check

@alt-glitch alt-glitch added type/bug Something isn't working comp/acp Agent Communication Protocol adapter area/auth Authentication, OAuth, credential pools labels Apr 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #13468 (merged) — same fix validating method_id against the advertised provider in ACP authenticate().

1 similar comment
@alt-glitch

Copy link
Copy Markdown
Collaborator

Likely duplicate of #13468 (merged) — same fix validating method_id against the advertised provider in ACP authenticate().

@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the contribution @zhao0112! This fix was already shipped in #13468 (merged 2026-04-21), which applies the same correction — authenticate() now validates method_id case-insensitively against the advertised provider and returns None on mismatch.

This is an automated hermes-sweeper review.

Evidence:

Closing as duplicate — the underlying issue (#13452) is resolved.

@teknium1 teknium1 closed this Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/auth Authentication, OAuth, credential pools comp/acp Agent Communication Protocol adapter type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ACP authenticate() accepts unadvertised method_id values

3 participants