fix: on windows avoid ':' as part of the object name (#19907)

fixes #18865
avoid-colon
This commit is contained in:
Harshavardhana
2024-06-10 20:13:30 -07:00
committed by GitHub
parent 614981e566
commit 55aa431578
5 changed files with 16 additions and 14 deletions

View File

@@ -865,7 +865,7 @@ func (sts *stsAPIHandlers) AssumeRoleWithCertificate(w http.ResponseWriter, r *h
}
// Associate any service accounts to the certificate CN
parentUser := "tls:" + certificate.Subject.CommonName
parentUser := "tls" + getKeySeparator() + certificate.Subject.CommonName
claims[expClaim] = UTCNow().Add(expiry).Unix()
claims[subClaim] = certificate.Subject.CommonName
@@ -990,7 +990,7 @@ func (sts *stsAPIHandlers) AssumeRoleWithCustomToken(w http.ResponseWriter, r *h
expiry = requestedDuration
}
parentUser := "custom:" + res.Success.User
parentUser := "custom" + getKeySeparator() + res.Success.User
// metadata map
claims[expClaim] = UTCNow().Add(time.Duration(expiry) * time.Second).Unix()