Skip to content

Add distribution and action scoping to Cargo tokens - #63

Open
aKlimau wants to merge 1 commit into
pulp:mainfrom
aKlimau:add-token-skope
Open

aKlimau wants to merge 1 commit into
pulp:mainfrom
aKlimau:add-token-skope

Conversation

@aKlimau

@aKlimau aKlimau commented Sep 30, 2026

Copy link
Copy Markdown
Contributor

Two scope axes: distributions (M2M to RustDistribution) and actions (publish, yank; yank covers unyank).

The scope check runs in addition to the existing RBAC check on every publish and yank, so a token can never exceed its owner's permissions.

The scope check runs in addition to the existing RBAC check on every publish and yank, so a token can never exceed its owner's permissions.

Deleting the last scoped distribution revokes the token. The M2M cascades, so an emptied scope would otherwise read as "unrestricted" and silently widen the token. Partial loss leaves it valid for the distributions that remain.

Scopes are immutable. No update endpoint; revoke and re-create to change them.

closes pulp#48

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
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.

1 participant