minio / minio-js

MinIO Client SDK for Javascript
https://docs.min.io/docs/javascript-client-quickstart-guide.html
Apache License 2.0
920 stars 271 forks source link

AssumeRoleProvider #1278

Closed xkkkA closed 4 months ago

xkkkA commented 4 months ago

I am using nodejs to operate minio, and now I want to obtain STS temporary credentials to pass to the front-end. How should I obtain them? I see the AssumeRoleProvider function in the source code, but why is it not open for bitwise conversion? How to use it and how to use it

prakashsvmx commented 4 months ago

Currently the typescript migration is in progress. for older versions, please refer to examples in https://github.com/minio/minio-js/pull/960

xkkkA commented 4 months ago

Thank you for your reply. Currently, I am using JavaScript. After seeing your answer, I moved the dist folder in the source code to my project and introduced the AssumeRoleProvider, which can be used normally. Will this method continue to be used in the future? I am the latest version. Another small issue is that when I use the AssumeRoleProvider to obtain credentials, passing in the durationSeconds parameter seems to have no effect. The information it returns does not include the expiration time field image

prakashsvmx commented 4 months ago

minimum is 15 minutes as per s3 spec i guess. you can check server traces