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

Avoid ListBuckets to keep Stat() ops on bucket simpler #2699

Merged
merged 1 commit into from
Feb 28, 2019

Conversation

harshavardhana
Copy link
Member

Due to multi-user feature on Minio and mc adoption in
many different restrictive environments, most users disable
access to ListBuckets() calls. We can avoid such network
operations as they only add marginal value.

@codecov
Copy link

codecov bot commented Feb 28, 2019

Codecov Report

Merging #2699 into master will decrease coverage by 0.02%.
The diff coverage is 14.7%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2699      +/-   ##
=========================================
- Coverage    9.69%   9.66%   -0.03%     
=========================================
  Files         128     128              
  Lines       12109   12093      -16     
=========================================
- Hits         1174    1169       -5     
+ Misses      10785   10772      -13     
- Partials      150     152       +2
Impacted Files Coverage Δ
cmd/client-s3.go 13.07% <14.7%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd5372f...c3c0e57. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 28, 2019

Codecov Report

Merging #2699 into master will decrease coverage by 0.14%.
The diff coverage is 14.7%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2699      +/-   ##
=========================================
- Coverage    9.69%   9.54%   -0.15%     
=========================================
  Files         128     126       -2     
  Lines       12109   12055      -54     
=========================================
- Hits         1174    1151      -23     
+ Misses      10785   10760      -25     
+ Partials      150     144       -6
Impacted Files Coverage Δ
cmd/client-s3.go 13.07% <14.7%> (-0.21%) ⬇️
cmd/client-fs.go 27.73% <0%> (-1.74%) ⬇️
cmd/client-url.go 66.66% <0%> (-1.45%) ⬇️
cmd/config.go 34.06% <0%> (-0.55%) ⬇️
cmd/fs-pathutils_nix.go
cmd/client-fs_linux.go

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd5372f...ab48077. Read the comment docs.

Due to multi-user feature on Minio and mc adoption in
many different restrictive environments, most users disable
access to ListBuckets() calls. We can avoid such network
operations as they only add marginal value.
Copy link
Contributor

@poornas poornas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with a getonly policy for multi-user, without ListBuckets access, works well. LGTM

Copy link
Collaborator

@kannappanr kannappanr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with the following policy that works on a bucket named bucket

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetBucketLocation",
        "s3:GetObject",
        "s3:ListBucket"
      ],
      "Resource": [
        "arn:aws:s3:::bucket/*"
      ]
    }
  ]
}

Failed with buckets not named bucket as expected.

@kannappanr kannappanr merged commit 19e14db into minio:master Feb 28, 2019
@harshavardhana harshavardhana deleted the fix-mc branch February 28, 2019 22:32
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.

3 participants