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

UI - Create/Delete bucket button and create bucket form always enabled #3419

Open
vherrlein opened this issue Aug 3, 2024 · 0 comments
Open
Assignees

Comments

@vherrlein
Copy link

vherrlein commented Aug 3, 2024

Within the Administrator section under Buckets, even if the policy deny admin:* action on all resources, the create bucket button and create bucket form are always enabled / visible.

Expected Behavior

  • The create button should be disabled with a tooltip message.
  • If user tries to force going to /buckets/add-bucket route, an error message should be displayed

Current Behavior

  • The create button should be disabled with a tooltip message.
  • If user tries to force going to /buckets/add-bucket route, an error message should be displayed

Possible Solution

Maybe reviewing the following piece of code to implement relevant validations:

Steps to Reproduce (for bugs)

  1. Login to the console with a user having the consoleAdmin policy
  2. Create a bucket MyTest
  3. Create a user MyUser
  4. Create a policy with the following infos:
    • Name: MyTestPolicy
    • Policy:
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Deny",
            "Action": [
                "admin:*"
            ]
        },
        {
            "Effect": "Deny",
            "Action": [
                "s3:PutLifecycleConfiguration",
                "s3:ReplicateDelete",
                "s3:ReplicateObject",
                "s3:CreateBucket",
                "s3:DeleteBucket",
                "s3:PutBucketPolicy",
                "s3:PutEncryptionConfiguration",
                "s3:PutReplicationConfiguration",
                "s3:DeleteBucketPolicy",
                "s3:ForceDeleteBucket"
            ],
            "Resource": [
                "arn:aws:s3:::*"
            ]
        },
        {
            "Effect": "Allow",
            "Action": [
                "s3:*"
            ],
            "Resource": [
                "arn:aws:s3:::MyTest/*"
            ]
        }
    ]
}
  1. Assign the policy MyTestPolicy to the user MyTest
  2. Login to the console with th user MyTest
  3. Navigate to Adminnitrator > Buckets
  4. Tries to create a new bucket

Context

Regression

Your Environment

  • MinIO version used (minio --version): 2024-07-31T05:46:26Z
  • Server setup and configuration: Kubernetes 1.21, tenant deploy with the operator
  • Operating System and version (uname -a): N/A
@vherrlein vherrlein changed the title UI - Create bucket button and create bucket form always enabled UI - Create/Delete bucket button and create bucket form always enabled Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants