-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Description
Summary
/relay/ping new-agent registration has two security/availability defects in atlas/beacon_chat.py:
- It calls
agent_id_from_pubkey(...)(undefined), causing a runtimeNameErroron signed registration attempts. - If Ed25519 verification support is unavailable (
PyNaClmissing), signed registration can be accepted without cryptographic verification.
Reproduction
- Start Atlas backend from a clean environment where
PyNaClis not installed. - Send a POST to
/relay/pingfor a new agent with JSON containingagent_id,pubkey_hex, andsignature. - Observe behavior in the new-agent path.
Expected
- Server derives
agent_idwith the correct helper and does not crash. - Server rejects new registrations when signature verification cannot be performed.
Actual
- NameError from undefined
agent_id_from_pubkeyin the registration path. - Verification-unavailable path may register agents without proven key ownership.
Proposed fix
- Use
agent_id_from_pubkey_hex(...)in/relay/ping. - Treat unavailable signature verification as an error for new registrations.
- Add regression tests for unsigned new-agent rejection and relay-token enforcement for existing agents.
Fix PR: #38
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels