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

Assume Role with Minio-js #1077

Closed
ryansteakley opened this issue Nov 11, 2022 · 4 comments
Closed

Assume Role with Minio-js #1077

ryansteakley opened this issue Nov 11, 2022 · 4 comments

Comments

@ryansteakley
Copy link

I have seen #960 however there is no documentation on how to really use this feature that I can find?

How does a user use something like AWS assume role and create a minioclient? This goes in hand with the previous issue #841 where in the minio-go side they get the webidentitytoken etc... On minio-js side it is not clear how the js code gets this information when creating the client.

The current example

var Minio = require('minio')

var s3Client = new Minio.Client({
    endPoint:  's3.amazonaws.com',
    accessKey: 'YOUR-TEMP-ACCESSKEYID',
    secretKey: 'YOUR-TEMP-SECRETACCESSKEY',
    sessionToken: 'YOUR-TEMP-SESSIONTOKEN'
})

doesn't seem to explain how to provide the fields that were implemeneted in #960 i.e credentialsProvider

Is there documentation or any example of IAM for Service Account in minio-js?

@ryansteakley ryansteakley changed the title Assume Role with Minio-Js Assume Role with Minio-js Nov 11, 2022
@prakashsvmx
Copy link
Member

You could use example from

let AssumeRoleProvider

@prakashsvmx
Copy link
Member

Example is also provided in the PR. We will update an example soon.

@prakashsvmx
Copy link
Member

@ryansteakley
Copy link
Author

From examples since none seem to use webIdentityToken it is not clear what needs to be done here?
Do I need to pass the webIdentityToken and the roleARN into

let asRoleProvider = new AssumeRoleProvider({
    stsEndpoint: "s3.amazonaws.com",
    accessKey: 'miniojs',
    secretKey: 'miniojs123',
    webIdentityToken: '/var/secret/etc/',
    roleARN: "arn:aws:...."
})

For it work or will these be picked up automatically when using this AssumeRoleProvider?

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

No branches or pull requests

2 participants