Atlas CLI to return the roles/actions/privileges assigned to a particular database user
I have done some testing and research and have been unable to get the Atlas CLI to return the roles/actions/privileges assigned to a particular database user. I am requesting that this functionality be added to the Atlas CLI, as it seems like a common requirement, and I believe the Atlas CLI should support.
Thank you for taking the time to raise this feedback. It's always appreciated as it helps us improve the product.
As my colleague mentioned in his comment, one of the ways to retrieve this information is by using "atlas dbusers describe <username> --output json".
At the same time we will look into ways how our Help and Documentation can be improved to make it easier to find this information.
Please keep the feedback coming.
Thanks,
Jakub
-
Gustavo commented
Hi, `atlas dbusers describe <usernmae>` will return the result of this API call https://www.mongodb.com/docs/atlas/reference/api-resources-spec/#operation/returnOneDatabaseUserFromOneProject which includes the roles array, it just happens if you are using the plain text output we won't show the roles since there's no easy way to list all roles in a tabular way, if you need access to the roles feel free to use json as an output to get the raw response or use any of the other special output formats like json path or go template for more fine grained control on how the information is presented