Canned policy not applied when using AssumeRoleWithClientGrants and JS SDK
See original GitHub issueExpected Behavior
When using the JS SDK to sign in a client with temp. credentials - token and policy provided by keycloak- the policy should be applied no matter if it is a default or a custom one.
Current Behavior
When using default policy e.g. readwrite
everything is ok (I can list the buckets) but when I set the policy to restricted
(a custom policy I created) I have a S3Error: Access Denied.
message.
Notice that the custom policy is correctly applied when using the OpenID button on the Minio browser.
Possible Solution
Steps to Reproduce (for bugs)
- Create a user with a custom policy in Keycloak
- Get the Token from Keycloak for the user
- Use the AssumeRoleWithClientGrants to get temp credentials
- Use the JS SDK the list the buckets
=>
S3Error: Access Denied.
Context
Regression
Your Environment
- Version used (
minio version
): docker minio/minio:edge - Environment name and version (e.g. nginx 1.9.1):
- Server type and version:
- Operating System and version (
uname -a
): windows - Link to your project:
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Canned Policy vs Custom Policy Archives
Here is all you need to know about Canned Policy vs Custom Policy . ... The website can be used with the CloudFront...
Read more >Implement AssumeRole API for Minio users (#7267)
GetUserPolicy - returns canned policy name associated with a user. func (sys *IAMSys) GetUserPolicy(accessKey string) (policyName string, err error) {.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
in minio-js that’s not allowed in minio-go it is allowed using the credential.Credentials structure look at the method minio.NewWithCredentials
@GuillaumeNachury please have a look at : https://github.com/minio/minio-js/pull/960