-
Notifications
You must be signed in to change notification settings - Fork 91
IAM | Doc | User Inline Policy Documentation #9285
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
WalkthroughAdds a new design document describing IAM User Inline Policy behavior, operations, authorization flow, demo steps, and cache notes; also includes a demo-only SDK tweak reducing account policy cache expiry for testing. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client (signed/anonymous)
participant Endpoint as Endpoint
participant BucketPolicy as Bucket Policy Eval
participant IAMUserPolicy as IAM User Policy Eval
participant S3 as S3 Operation
rect rgb(245,249,255)
Client->>Endpoint: S3 request (signed or anonymous)
Endpoint->>BucketPolicy: Evaluate bucket policy (Allow/Deny/NotApplicable)
end
alt BucketPolicy DENY
BucketPolicy-->>Endpoint: DENY
Endpoint-->>Client: AccessDenied
else BucketPolicy ALLOW or NotApplicable
BucketPolicy-->>Endpoint: ALLOW/NotApplicable
alt Request is signed
Endpoint->>IAMUserPolicy: Evaluate IAM user inline policy (Allow/Deny/NotApplicable)
alt IAMUserPolicy DENY
IAMUserPolicy-->>Endpoint: DENY
Endpoint-->>Client: AccessDenied
else IAMUserPolicy ALLOW
IAMUserPolicy-->>Endpoint: ALLOW
Endpoint->>S3: Perform S3 operation
S3-->>Endpoint: Success
Endpoint-->>Client: Success
else IAMUserPolicy NotApplicable and BucketPolicy ALLOW
Endpoint->>S3: Perform S3 operation
S3-->>Endpoint: Success
Endpoint-->>Client: Success
end
else Request is anonymous
Endpoint->>S3: Perform S3 operation per bucket policy decision
S3-->>Endpoint: Success/AccessDenied
Endpoint-->>Client: Success/AccessDenied
end
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 4
🧹 Nitpick comments (1)
docs/design/IamUserInlinePolicy.md (1)
29-30: Improve clarity of sentence.The sentence structure is awkward: "When every S3 request has a step of authorization..." Consider rephrasing for clarity:
-When every S3 request has a step of authorization (`authorize_request` in `src/endpoint/s3/s3_rest.js`). +For every S3 request, authorization (`authorize_request` in `src/endpoint/s3/s3_rest.js`) is performed.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/design/IamUserInlinePolicy.md(1 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/design/IamUserInlinePolicy.md
[style] ~92-~92: Unless you want to emphasize “not”, use “cannot” which is more common.
Context: ...est_object2.txt (should work) 11. User can not create a bucket under the account: use...
(CAN_NOT_PREMIUM)
🪛 markdownlint-cli2 (0.18.1)
docs/design/IamUserInlinePolicy.md
49-49: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
50-50: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
52-52: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
54-54: Unordered list indentation
Expected: 0; Actual: 2
(MD007, ul-indent)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Build Noobaa Image
- GitHub Check: run-package-lock-validation
- GitHub Check: run-jest-unit-tests
🔇 Additional comments (1)
docs/design/IamUserInlinePolicy.md (1)
1-46: Overall documentation quality is good.The documentation clearly explains the IAM user policy feature, supported operations, and authorization flow. The structure is logical and the demo workflow is helpful. After addressing the critical code change issue and the minor grammar/formatting issues above, this will be a solid contribution.
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.
Actionable comments posted: 4
♻️ Duplicate comments (1)
docs/design/IamUserInlinePolicy.md (1)
90-90: Fix style and backtick placement issues.Line 90 contains two issues: (1) use "cannot" instead of "can not"; (2) fix the backtick placement for the account alias.
-11. User can not create a bucket under the account: u`ser-robert-s3 s3 mb s3://bucket-robert-2` (should throw `AccessDenied` error) +11. User cannot create a bucket under the account: `user-robert-s3 s3 mb s3://bucket-robert-2` (should throw `AccessDenied` error)
🧹 Nitpick comments (1)
docs/design/IamUserInlinePolicy.md (1)
29-29: Improve sentence clarity.Line 29 contains awkward phrasing that should be refactored for clarity: "When every S3 request has a step of authorization" is grammatically strained.
-When every S3 request has a step of authorization (`authorize_request` in `src/endpoint/s3/s3_rest.js`). +When an S3 request is made, there is a step of authorization (`authorize_request` in `src/endpoint/s3/s3_rest.js`).
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/design/IamUserInlinePolicy.md(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Build Noobaa Image
- GitHub Check: run-package-lock-validation
- GitHub Check: run-jest-unit-tests
6243a0f to
edcd4be
Compare
67dfd95 to
6ce6c08
Compare
Signed-off-by: shirady <57721533+shirady@users.noreply.github.com>
6ce6c08 to
7a6e62e
Compare
Describe the Problem
In NooBaa containerized deployment in the IAM service, we added the IAM user inline policy; now adding the document.
Explain the Changes
Issues:
Testing Instructions:
Summary by CodeRabbit