From c573022198ae3e8b18b4140c6d6c08aff38986bf Mon Sep 17 00:00:00 2001 From: James Miller Date: Fri, 30 Aug 2024 21:11:51 -0700 Subject: [PATCH] use RawURLEncoding, it is the unpadded version --- internal/issuer/kms.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/issuer/kms.go b/internal/issuer/kms.go index 2192a2f..9d62f5e 100644 --- a/internal/issuer/kms.go +++ b/internal/issuer/kms.go @@ -56,7 +56,7 @@ func SignJWTWithKMS(ctx context.Context, kmsClient KMSAPI, token *jwt.Token, kms fullSignature = append(fullSignature, esig.R.Bytes()...) fullSignature = append(fullSignature, esig.S.Bytes()...) - sig := strings.TrimRight(base64.URLEncoding.EncodeToString(fullSignature), "=") + sig := base64.RawURLEncoding.EncodeToString(fullSignature) return strings.Join([]string{sstr, sig}, "."), nil }