Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add credentials.WithPolicy method to narrow down policy #2007

Merged
merged 3 commits into from
Oct 12, 2024

Conversation

ramondeklein
Copy link
Contributor

@ramondeklein ramondeklein commented Oct 10, 2024

The NewSTSWebIdentity allows fetching credentials that are narrowed down to the specified policy. This is useful when a client requires less rights then it actually has. The returned credentials will have the intersection of the requested policy and the assigned policies.

The credentials.NewSTSWebIdentity function is updated to use the options pattern (backward compatible). By adding the credentials.WithPolicy(...) method the credentials can be scoped.

To allow using the default Kubernetes service account that is assigned to the pod, the credentials.NewKubernetesIdentity function is added.

The `NewSTSWebIdentityWithPolicy` allows fetching credentials that are narrowed down to the specified policy. This is useful when a client requires less rights then it actually has. The returned credentials will have the intersection of the requested policy and the assigned policies.
@ramondeklein ramondeklein changed the title Add credentials.NewSTSWebIdentityWithPolicy method Add credentials.WithPolicy method to narrow down policy Oct 10, 2024
@harshavardhana harshavardhana merged commit a506e3d into minio:master Oct 12, 2024
5 checks passed
@ramondeklein ramondeklein deleted the allow-policy-scoping branch October 13, 2024 09:25
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