Skip to content

Commit

Permalink
[Disk Manager]: Add separate certificate for IAM (#1467)
Browse files Browse the repository at this point in the history
* [Disk Manager]: Add separate certificate for IAM

AuthConfig.CertFile is intended as a certificate for verifying TLS for access service, not for token signing.
Fix the semantic.

* Rename ServiceAccount.CertFile to TokenPrivateKeyFile

* RenameTokenPrivateKeyFile to TokenSigningCertFile for consistency with helm
  • Loading branch information
jkuradobery authored Jun 20, 2024
1 parent 3904d29 commit 4edd26c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions cloud/disk_manager/internal/pkg/auth/config/config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ message ServiceAccount {
required string Id = 1;
required string KeyId = 2;
required string Audience = 3;
required string TokenSigningCertFile = 4;
}

message AuthConfig {
Expand Down
2 changes: 1 addition & 1 deletion cloud/disk_manager/internal/pkg/auth/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func NewCredentials(
credentials.WithJWTSubjectToken(
credentials.WithSigningMethod(jwt.SigningMethodRS256),
credentials.WithKeyID(config.GetServiceAccount().GetKeyId()),
credentials.WithRSAPrivateKeyPEMFile(config.GetCertFile()),
credentials.WithRSAPrivateKeyPEMFile(config.GetServiceAccount().GetTokenSigningCertFile()),
credentials.WithIssuer(config.GetServiceAccount().GetId()),
credentials.WithSubject(config.GetServiceAccount().GetId()),
credentials.WithAudience(config.GetServiceAccount().GetAudience()),
Expand Down

0 comments on commit 4edd26c

Please sign in to comment.