-
Notifications
You must be signed in to change notification settings - Fork 446
fix ux for keys permissions #3280
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
Conversation
@prakashsvmx Will this work in the case where we have permissions to delete/create the key in console but not in kms policies? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Let's wait on @reivaj05 response
Console does not have access/control to kes policies i believe. And the UI elements rely only on IAM policy actions. @reivaj05 . Please share details if I am missing something. |
@prakashsvmx this is helpful as well but i believe the main issue is when you try to delete a key but the policy in kms doesn't have the permissions to do it, we already have a way to get all the allowed actions in Console/KMS/Status.tsx:111, we should use what you implemented and also the allowed apis we can call in KMS |
@reivaj05 , if would it not lead to dual configuration/ permission errors.? for example if user has IAM policy with
and kes config like:
? address: 0.0.0.0:7373 # Listen on all network interfaces on port 7373
admin:
identity: 29a5efb99fe00832132b36dd0d6ee3a41355b503631af145549cfd35b78ef123 # Result of kes identity new
policy:
my-app:
allow:
- /v1/key/*
- /v1/key/create/my-minio-key*
- /v1/key/generate/my-minio-key*
- /v1/key/decrypt/my-minio-key*
- /v1/key/import/my-minio-key*
- /v1/key/list/my-minio-key*
deny:
#- /v1/key/delete/my-minio-key*
- /v1/key/delete/sph-*
#- /v1/key/delete/my-minio-key*
identities:
- 5071bfc596449501154ad7421a5ef6860450d0ede2beb650b024c435c5bde539 # The client.crt identity
# - 29a5efb99fe00832132b36dd0d6ee3a41355b503631af145549cfd35b78ef123
tls:
key: private.key # The KES server TLS private key
cert: public.crt # The KES server TLS certificate
keystore:
fs:
path: ./keys # Choose a directory for the secret keys
log:
audit: on
log: on
error: on
|
@reivaj05 I also set the below for further testing:
but the api returns the below ...
{
"method": "DELETE",
"path": "/v1/key/delete/",
"timeout": 15
} so i am not sure about a reliable way to combine both IAM and KES policy. |
@prakashsvmx I thought the kms returned what you had in the config, you are right, it's going to be difficult to combine both if the response is only something lik Maybe we can merge this PR and we can discuss further for the other scenarios |
fix ux for kms permissions
Fixes #3279
Test the below with Encryption:
Import
Create Key
Delete Key.
The actions should be enabled or hidden based on the permissions.
Start MinIO and use play.min.io for testing with KES.
Deny Actions explicitly like: