Skip to content

Confine agent re-registration to the owner's tenant - #290

Open
jameshoweee wants to merge 1 commit into
sandbox-quantum:mainfrom
jameshoweee:security/register-overwrite-owner-guard
Open

Confine agent re-registration to the owner's tenant#290
jameshoweee wants to merge 1 commit into
sandbox-quantum:mainfrom
jameshoweee:security/register-overwrite-owner-guard

Conversation

@jameshoweee

Copy link
Copy Markdown

Agent names are global and any user can mint a registration token, so register_agent(overwrite=True) let anyone re-register another user's agent by name: the caller got a live API key for the victim's agent (owner_id left unchanged) and the victim's key was deleted. Cross-tenant takeover + DoS of the owner.

Fix: reject overwrite when the existing agent has a different owner, using the same "already exists" error so ownership isn't leaked. Same-owner re-register (connector restart, server rediscovery) is unchanged. Adds a regression test.

Agent names are global and any user can mint a registration token, so
register_agent(overwrite=True) let anyone re-register another user's agent by
name: the caller got a live API key for the victim's agent (owner_id unchanged)
and the victim's key was deleted (cross-tenant takeover + DoS).

Reject overwrite when the existing agent has a different owner. Same-owner
re-register is unchanged. Adds a regression test.
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown

All contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@jameshoweee

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@amaudruz

Copy link
Copy Markdown
Collaborator

recheck

1 similar comment
@amaudruz

Copy link
Copy Markdown
Collaborator

recheck

switch-cla-assistant Bot added a commit that referenced this pull request Aug 25, 2026
@jameshoweee

Copy link
Copy Markdown
Author

recheck

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.

2 participants