Skip to content

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

Open

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions