GODRIVER-3504ClosedWon't Do

Newlines in AWS web identity token file break AWS auth

h3. Detailed steps to reproduce the problem? Reported in https://github.com/mongodb/mongo-go-driver/pull/1965 Some cloud platforms include a newlines in AWS web token files (i.e. using {{AssumeRoleWithWebIdentity}}). Currently, the Go Driver doesn't query-encode the values when building the URL to call AWS STS (see [here|https://github.com/mongodb/mongo-go-driver/blob/e3670f707772984c5aac0002c272d466ba114ea8/internal/credproviders/assume_role_provider.go#L92]), so parsing the URL fails with

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification
rank-higher