Skip to content

fix(auth): revoke account scope matches the account UUID only, and rejected API keys still list as active #534

Closed

Description

@cristim

Summary

The revoke scope check matches the account UUID only, while History matches the external account id plus the account name. Separately, API keys rejected by the password_version check can still list as active.

Location (origin/main 496d9d7)

Failure scenario

A scoped user whose allow-list uses account names, or whose row has only an external AccountID, sees the row in History and gets 403 when revoking it.

Suggested fix

Look up the account with lookupCloudAccount and fall back to AccountID. For the key list, mark a key stale when key.PasswordVersion != user.PasswordVersion.

Context

Related: #386, #433.

Acceptance

A user who sees a purchase row in History can revoke it when scope allows, and stale-version keys no longer list as active.

Activity

  1. IAmJSD commented on Oct 20, 2026

    @IAmJSD
    Collaborator

    Claiming: working on this

  2. self-assigned this
    on Oct 20, 2026
  3. added a commit that references this issue on Oct 23, 2026
    5de9c81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions