mongodb / go-client-mongodb-atlas

Go Client for MongoDB Atlas
https://www.mongodb.com/docs/atlas/reference/api-resources-spec/
Apache License 2.0
79 stars 34 forks source link

CLOUDP-169104: Fix encoding for AWS IAM usernames #452

Closed andmatei closed 1 year ago

andmatei commented 1 year ago

Description

As per the old docs:

AWS IAM usernames include characters which must be URL encoded. Replace all : characters with %3A. Replace all / characters with %2F.

https://www.mongodb.com/docs/atlas/reference/api/database-users-get-single-user/#example-request

Using url.PathEscape would only encode / characters, while url.QueryEscape encode both : and /

Link to any related issue(s): https://github.com/mongodb/mongodb-atlas-cli/issues/1817

Type of change:

Required Checklist:

andmatei commented 1 year ago

This will also be a problem with the autogenerated SDK - left more comments on the ticket