Skip to content

Conversation

Alevsk
Copy link
Contributor

@Alevsk Alevsk commented Oct 28, 2021

Hide/Show UI components based on the IAM policy of the current user

  • Buckets lists: hide/show manage button
  • Bucket admin page: left menu items enable/disable
  • Bucket admin page: bucket configuration buttons are enabled/disabled
  • Bucket admin page: hide/show create buttons
  • Bucket admin page: enable/disable requests to backend service
  • Object browser: hide/show bucket buttons for upload, delete, etc
  • Object browser: hide/show bucket configuration button
  • Object details: hide/show object buttons, ie: delete
  • Object details: hide/show object attributes, ie: legal hold,
    retention, tags, etc

Signed-off-by: Lenin Alevski alevsk.8772@gmail.com

Manage bucket button only shows when theres something to manage

Screen Shot 2021-11-01 at 13 40 26

mybucket-admin/

    {
      "Effect": "Allow",
      "Action": [
        "s3:*"
      ],
      "Resource": [
        "arn:aws:s3:::mybucket-admin/*"
      ]
    },

Screen Shot 2021-11-01 at 13 40 51

mybucket-encryption

    {
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket",
        "s3:GetObject",
        "s3:PutEncryptionConfiguration",
        "s3:GetEncryptionConfiguration"
      ],
      "Resource": [
        "arn:aws:s3:::mybucket-encryption/*"
      ]
    },

Screen Shot 2021-11-01 at 13 41 33

mybucket-readonly-admin

    {
      "Effect": "Allow",
      "Action": [
        "s3:GetBucketPolicy",
        "s3:ListBucket",
        "s3:GetObject",
        "s3:GetEncryptionConfiguration",
        "s3:GetReplicationConfiguration",
        "s3:GetBucketObjectLockConfiguration",
        "s3:GetBucketVersioning",
        "s3:GetObjectRetention",
        "s3:GetBucketNotification",
        "s3:GetLifecycleConfiguration"
      ],
      "Resource": [
        "arn:aws:s3:::mybucket-readonly-admin/*"
      ]
    },

Screen Shot 2021-11-01 at 13 41 48

mybucket-readonly-admin

    {
      "Effect": "Allow",
      "Action": [
        "admin:ListUserPolicies",
        "admin:ListUsers",
        "admin:ListGroups",
        "admin:GetPolicy"
      ],
      "Resource": [
        "arn:aws:s3:::mybucket-readonly-admin/*"
      ]
    },

Screen Shot 2021-11-01 at 13 41 23

@Alevsk Alevsk changed the title Permissions refactor [WIP] Permissions refactor Oct 29, 2021
@Alevsk Alevsk self-assigned this Oct 29, 2021
@Alevsk Alevsk added the WIP This PR is WIP and cannot be merged yet label Oct 29, 2021
@Alevsk Alevsk force-pushed the permissions-refactor branch 2 times, most recently from caf5fb7 to 4399acb Compare November 2, 2021 23:03
@Alevsk Alevsk requested a review from harshavardhana November 2, 2021 23:03
@Alevsk Alevsk changed the title [WIP] Permissions refactor Permissions refactor Nov 2, 2021
@Alevsk Alevsk removed the WIP This PR is WIP and cannot be merged yet label Nov 2, 2021
Hide/Show UI components based on the IAM policy of the current user

- Buckets lists: hide/show manage button
- Bucket admin page: left menu items enable/disable
- Bucket admin page: bucket configuration buttons are enabled/disabled
- Bucket admin page: hide/show create buttons
- Bucket admin page: enable/disable requests to backend service
- Object browser: hide/show bucket buttons for upload, delete, etc
- Object browser: hide/show bucket configuration button
- Object details: hide/show object buttons, ie: delete
- Object details: hide/show object attributes, ie: legal hold,
  retention, tags, etc

Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
@Alevsk Alevsk force-pushed the permissions-refactor branch from 4399acb to 6c8ff3b Compare November 2, 2021 23:40
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.

4 participants