You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AccountScope: let internal-ID callers match groups that store registered accounts' external IDs #1868
Found in the review of #1858 (CodeRabbit thread on the direct RI-exchange list scope).
AccountScope.Allows(id, name) (internal/auth/account_scope.go:190-202) matches a registered account by its internal ID, or by a unique name whose external ID equals the id. A group whose allowed_accounts holds only a registered account's external (provider) ID, kept verbatim by bindGroupAccounts (internal/api/handler_groups.go:167), therefore does not match handlers that pass the internal ID (RI exchange reshape handler_ri_exchange.go:1416, revoke handler_purchases_revoke.go:556, the direct-exchange list and resolve). It fails closed (the row reads as missing), so it is a usability gap, not a leak.
Expected: decide whether groups may store external IDs for registered accounts; if so, make Allows resolve an internal ID through its account's external ID (with the existing guard against an external ID that is also an internal ID), with tests for each handler; if not, reject or normalise external IDs when the group is saved.
Claimed by claude-platform under the owner rule. Decision (owner-decisions 28, recommended default): normalise external IDs to internal IDs when a group is saved, so the stored allowed_accounts holds internal IDs and AccountScope.Allows is unchanged. Existing groups are not rewritten; they keep failing closed as today. Implementation in progress.
Activity
cristim commentedon Nov 12, 2026
Claimed by claude-platform under the owner rule. Decision (owner-decisions 28, recommended default): normalise external IDs to internal IDs when a group is saved, so the stored allowed_accounts holds internal IDs and AccountScope.Allows is unchanged. Existing groups are not rewritten; they keep failing closed as today. Implementation in progress.
fix(api): store internal account IDs when a group is saved