Comments (6)
MinioClient minioClientConn = MinioClient.builder()
.endpoint(endpoint_url)
.credentials(accessKeyId, secretAccessKey)
.httpClient(okHttpClient)
.build();
You have to pass sessionToken as well
from minio.
Also, please either open a discussion or a GitHub issue—don't do both. Please do not spam everywhere.
from minio.
How do I pass a sessionToken to it using minio java? The .credentials in MinioClient.builder() only accepts accessKeyId and secretAccessKey. Do you have an sample code on it for the connection?
from minio.
and then this https://minio-java.min.io/io/minio/MinioClient.Builder.html#credentialsProvider-io.minio.credentials.Provider-
from minio.
Thanks for your help. I got it working but I wonder if it is the correct or proper way to connect?
//Get credentials from AssumeRoleWithCertificate using CertificateIdentityProvider
Provider certIdentityProvider = new CertificateIdentityProvider(endpoint_url, sslSocketFactory, x509TrustManager, null, null);
Credentials credentials = certIdentityProvider.fetch();
//Use credentials from AssumeRoleWithCertificate to connect using StaticProvider
String accessKeyId = credentials.accessKey();
String secretAccessKey = credentials.secretKey();
String sessionToken = credentials.sessionToken();
Provider staticProvider = new StaticProvider(accessKeyId, secretAccessKey, sessionToken);
MinioClient minioClientConn = MinioClient.builder()
.endpoint(endpoint_url)
.credentialsProvider(staticProvider)
.httpClient(okHttpClient)
.build();
from minio.
//Get credentials from AssumeRoleWithCertificate using CertificateIdentityProvider
Provider certIdentityProvider = new CertificateIdentityProvider(endpoint_url, sslSocketFactory, x509TrustManager, null, null);MinioClient minioClientConn = MinioClient.builder()
.endpoint(endpoint_url)
.credentialsProvider(certIdentityProvider)
.httpClient(okHttpClient)
.build();
from minio.
Related Issues (20)
- Can the time shared by Minio be set to permanent !!! HOT 1
- UseSignatureVersion4 does not work for us for upload HOT 4
- Avoid force-pushing Docker images HOT 1
- Improve documentation for WebIdentity orphaned keys reclaim HOT 6
- Error: could not read "/proc": stat /proc: no such file or directory (*fmt.wrapError) on the MacOS HOT 3
- no logs when running minio server in Linux HOT 1
- Issue With AssumeRoleWithCerificate HOT 1
- Minio server configured with a region fails when using AWS Java SDK HOT 1
- Trouble With AssumeRoleWithCertificate HOT 1
- GCS Tier OFFLINE after upgrade to RELEASE.2024-06-06T09-36-42Z HOT 12
- I am trying to configure 2 minio nodes to write to 4 drive mouts on an nfs server, but i when I start the service in both nodes, I get error below: HOT 5
- with mincache enabled `HEAD` request returns different `Content-Length` then matching `GET` on a KMS setup HOT 10
- MinIO Client bundled with docker container is not auto configured to use MINIO_ROOT_USER and MINIO_ROOT_PASSWORD HOT 2
- Free space not detected with mergerfs storage backend HOT 4
- Cant login in my minio dashboard HOT 1
- Minio Nginx Reverse Proxy is not working HOT 1
- Performance regression since RELEASE.2024-03-21T23-13-43Z with OIDC
- Not able to download data from MINIO
- Start with docker swarm got error connecting to ws://minio2:9000/minio/grid/v1: lookup minio2 on 127.0.0.11:53: no such host HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minio.