-
Notifications
You must be signed in to change notification settings - Fork 298
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
svc: Assume access key creation permission to be available by default #3306
Conversation
The Console UI already allows "Access Key " creation, by assuming this permission. but looks like a policy should be associated with the user to make it work. e.g: a new user without any policy association results in |
b0efa52
to
0e07e77
Compare
@prakashsvmx the current implementation does not work all the time. The reason is that we evaluate the default actions during the user's login, however this is not correct. A policy is evaluated during the API request itself. The request that is sent to the server contains sometimes some information (http headers or path or other) that will be transformed to conditions before the policy evaluation, and the policy decision will depend on the passed conditions from the request itself. So we cannot assume anything during the user's login. But if we want to have a granular approach to this, I think we should move this API, policy.IsAllowedActions(), to Console code, it will be easier for us to tweak it when needed. |
0e07e77
to
9e3df37
Compare
@vadmeste we should only add this if there are "conditions" in the policy as part of the admin actions. we should not out-rightly add permissions for allow locally without consulting the server policy. |
Adding this policy will make the user not able to create a service account anymore: ``` { "Effect": "Deny", "Action": [ "admin:CreateServiceAccount" ], "Condition": { "NumericGreaterThanIfExists": {"svc:DurationSeconds": "1500"} } }, ``` The reason is that policy.IsAllowedActions() is called with conditions from the user login. Assume svc account creation to be possible for now until we come up with a better fix
9e3df37
to
a32449c
Compare
Adding this policy will make the user not able to create a service account anymore:
The reason is that policy.IsAllowedActions() is called with conditions from the user login.
Assume svc account creation to be possible for now until we come up with a better fix