Skip to content

Commit 8c6927c

Browse files
committed
fix: Missing line break on canonical request.
Fixes #2250. - This is not a 100% reproducible bug, but it happens enough without this change, and hasn't been observed with this change. - The Java implementation [includes this extra line break](https://github.com/googleapis/google-auth-library-java/blob/5e5fe411af88f00fd7fe09b1f4ca4d5d9417ecab/oauth2_http/java/com/google/auth/oauth2/AwsRequestSigner.java#L177). - From looking at the [signature spec](https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html) (see point 4), is still not entirely clear that this extra line break at the end of the canonical headers is actually specified in the requirements.
1 parent 13f5155 commit 8c6927c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Src/Support/Google.Apis.Auth/OAuth2/AwsExternalAccountCredential.AwsSignedSubjectToken.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ string GetHashedCanonicalRequest()
145145
canonicalRequest.Append(headerPair.Value);
146146
canonicalRequest.Append(newLine);
147147
}
148+
canonicalRequest.Append(newLine);
148149

149150
// Now the list of headers that will be signed.
150151
// See point 5 in https://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html

0 commit comments

Comments
 (0)