-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Access Denied when updating access token #20521
Comments
Tested and confirmed that users cannot update access-tokens that they have created. |
@nreisingercres Have you tried to update the session token by using mc? @ramondeklein Do you think this issue belongs to Console or should it be moved to MinIO repository? |
I just tried using |
I think it's caused by MinIO security checks. If we do want to allow this, then it should be fixed in MinIO. The console is only reporting the error that MinIO generates. |
you cannot just keep extending your own access forever, that is a security nightmare, a random service account should never get higher privileges in this manner. |
Since you don't have the access to update your own service account which is denied here the error is valid. |
Looks like this was intentionally changed 8 months ago pending some redesign minio/cmd/admin-handlers-users.go Lines 847 to 849 in ba70118
Given we currently allow a user to delete and recreate the access key anyway, it might make sense to have the permission check be deny only like how it is when creating a service account for oneself. @harshavardhana |
@donatello ^^ added this - can you chime in here? |
This was the PR that added this restriction #18928 - the reason is that service accounts being able to update their own permissions was a previous security issue. A common use case for service accounts is for an administrator to create a restricted service account and give only those credentials to an app or person - clearly that service account should not be able to escalate its permissions. Having to configure an explicit deny only statement in the policy to prevent this was not an effective way as it becomes an insecure by default setting. To cleanly allow a user to be able to update their owned service accounts requires adding some user level permissions (in contrast the existing In the meanwhile @nreisingercres - you can still remove and re-create the service account with the same settings with whatever updates you need. |
Closing this since remove and recreate is what is recommended here for now. // Cc @ravindk89 |
I'm not sure if this belongs here or in the main repo, but I see the issue in the console.
Expected Behavior
I should have access to update my own token.
Current Behavior
Access is denied when pressing update
Possible Solution
Give users permission to update their own access tokens
Steps to Reproduce (for bugs)
admin:UpdateServiceAccount
(I tested with the default readonly role)Context
I am trying to update an access token without recreating it.
Regression
I don't think so.
Your Environment
minio --version
):uname -a
):Linux minio 6.1.0-25-amd64 minio/console#1 SMP PREEMPT_DYNAMIC Debian 6.1.106-3 (2024-08-26) x86_64 x86_64 x86_64 GNU/Linux
The text was updated successfully, but these errors were encountered: