Skip to content

This is a fix to set the field value before Validate() - #753

Merged
pjuarezd merged 1 commit into
minio:masterfrom
pjuarezd:assign-JWTSupplier-before-Validate
Mar 5, 2023
Merged

pjuarezd merged 1 commit into
minio:masterfrom
pjuarezd:assign-JWTSupplier-before-Validate

Conversation

@pjuarezd

@pjuarezd pjuarezd commented Mar 5, 2023

Copy link
Copy Markdown
Member

Validate() verifies the field JWTSupplier is not null before its assigned, causing a Parameter 'JWTSupplier JWT Token supplier cannot be null.' exception.

Breakins IAMAWSProvider.GetAccessCredentials

ClientProvider provider = new WebIdentityProvider()
.WithJWTSupplier(() =>
{
var tokenContents = File.ReadAllText(tokenFile);
return new JsonWebToken(tokenContents, 0);
})
.WithSTSEndpoint(url)
.WithDurationInSeconds(null)
.WithPolicy(null)
.WithRoleARN(Environment.GetEnvironmentVariable("AWS_ROLE_ARN"))
.WithRoleSessionName(Environment.GetEnvironmentVariable("AWS_ROLE_SESSION_NAME"));

This is a fix to set the field value before Validate().

…gned causing a `Parameter 'JWTSupplier JWT Token supplier cannot be null.'` exception.

Breaking IAMAWSProvider.GetAccessCredentials
See https://github.com/minio/minio-dotnet/blob/b332b78f47996ee40e2ed263b9374ad0e2663286/Minio/Credentials/IAMAWSProvider.cs#L93

This is a fix to set the field value before Validate().
@pjuarezd pjuarezd self-assigned this Mar 5, 2023
@pjuarezd
pjuarezd requested a review from ebozduman March 5, 2023 07:57
@pjuarezd
pjuarezd merged commit bc8104f into minio:master Mar 5, 2023
@pjuarezd
pjuarezd deleted the assign-JWTSupplier-before-Validate branch March 5, 2023 10:09
Urantij pushed a commit to Urantij/minio-dotnet that referenced this pull request Apr 19, 2023
…gned causing a `Parameter 'JWTSupplier JWT Token supplier cannot be null.'` exception. (minio#753)

Breaking IAMAWSProvider.GetAccessCredentials
See https://github.com/minio/minio-dotnet/blob/b332b78f47996ee40e2ed263b9374ad0e2663286/Minio/Credentials/IAMAWSProvider.cs#L93

This is a fix to set the field value before Validate().
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

Successfully merging this pull request may close these issues.

2 participants