Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete user does not work for IAM based users #189

Closed
422158 opened this issue Mar 20, 2021 · 1 comment
Closed

Delete user does not work for IAM based users #189

422158 opened this issue Mar 20, 2021 · 1 comment

Comments

@422158
Copy link

422158 commented Mar 20, 2021

Describe the bug
Delete user method does not work due to missing url escaping.
Following code does not work because the delete method does not escapes the username, when sending delete request to Atlas mongo api.

groupID := xxxxxxxxxxxx
username := "arn:aws:iam::977946299200:role/complicated-stack-heyhou-eu-we-9e2e2c92c26e1fd5d571582267c271fe"
dbName := $external

resp, err := client.DatabaseUsers.Delete(context.Background(), dbName, groupID, username)

If i escape all the dangerous characters in the url, delete method completes succesfully.

groupID := xxxxxxxxxxxx
username := url.QueryEscape("arn:aws:iam::977946299200:role/complicated-stack-heyhou-eu-we-9e2e2c92c26e1fd5d571582267c271fe")
dbName := $external

resp, err := client.DatabaseUsers.Delete(context.Background(), dbName, groupID, username)

Expected behavior
Username should be escaped automatically.

Logs
If applicable, add logs to help explain your problem.

Desktop (please complete the following information):

  • OS: linux
  • Lib Version: 0.7.2

Additional context
Add any other context about the problem here.

@gssbzn
Copy link
Collaborator

gssbzn commented Apr 13, 2021

Resolved via #199

@gssbzn gssbzn closed this as completed Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants