-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: oss Provider #193
feat: oss Provider #193
Conversation
521badd
to
676a585
Compare
plugins/providers/oss/config.go
Outdated
AccountTypeRAMUser = "ram_user" | ||
AccountTypeRAMRole = "ram_role" | ||
resourceTypeBucket = "bucket" | ||
parameterRAMRoleKey = "ram_role" |
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.
since the value is similar, can't we just use AccountTypeRAMRole
?
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.
this field is not being used, I've removed it for now. thanks for pointing out!
func findStatementsWithMatchingActions(bucketPolicy Policy, resourceAccountID string, g domain.Grant) ([]PolicyStatement, []PolicyStatement) { | ||
var statements []PolicyStatement | ||
var matchingStatements []PolicyStatement | ||
for _, statement := range bucketPolicy.Statement { |
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.
Let's try to merge this loop with the one here to reduce the number of iterations. I think we can do the same for revoke flow.
if err != nil { | ||
var ossErr oss.ServiceError | ||
if errors.As(err, &ossErr) && ossErr.StatusCode == http.StatusNotFound { | ||
return fmt.Errorf("access not found for role: %s", g.Role) |
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.
this is the case where bucket policy is not found right? let's update the error message accordingly.
7401a2d
to
6454e9b
Compare
…erent clients(odps/rest/oss)
049e50f
to
8e443b9
Compare
…erent clients(odps/rest/oss)
8396a0f
to
d094e7f
Compare
8e443b9
to
038eeff
Compare
No description provided.