-
Notifications
You must be signed in to change notification settings - Fork 676
API for checking object management permissions #2086
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1071,3 +1071,15 @@ func (c *Client) CredContext() *credentials.CredContext { | |
Endpoint: c.endpointURL.String(), | ||
} | ||
} | ||
|
||
// GetCreds returns the access creds for the client | ||
func (c *Client) GetCreds() (string, string, error) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Credentials are always 3 entities, you should return the value() But what is the point of this function? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not needed with new changes. Will remove. |
||
if c.credsProvider == nil { | ||
return "", "", errors.New("no credentials provider") | ||
} | ||
value, err := c.credsProvider.GetWithContext(c.CredContext()) | ||
if err != nil { | ||
return "", "", err | ||
} | ||
return value.AccessKeyID, value.SecretAccessKey, nil | ||
} |
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.
And also why is this an S3 SDK API? This is specific to MinIO and must be in madmin-go
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 we are checking with replicated bucket target clients. We need to reach all targets of bucket replication and see target has got PutObject/DeleteObject etc. Is there a way to achieve it? I may be missing something here.
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.
You need to add a new API in admin API for that not here
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.
If you want to implement a proper S3 API then implement GetAccessBlock()
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 should be in madmin-go
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.
ok, will better move to madmin-go