-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add CLI user commands #2153
Add CLI user commands #2153
Conversation
Bug Found: root client can't get their own scopes |
Potential bug found: I created a new user but when I search for that user, the search turns up empty |
@sanders41 do you think I should be using clients or users here? I'm thinking users is what we actually want, since clients are ephemeral API users created by actual users right? |
Right, I would use users |
running into a perplexing error:
Trying to create a new user via the API and I am getting this error about the password, but it doesn't happen when using the Swagger docs so it must be something with the way I'm sending the request.... |
@sanders41 I confirmed that that password specifically was causing the issue, if I make the same call with Any idea why? What is weird about |
I’m on my phone instead of computer at the moment so I can’t test this, but I think the issue, may be that the endpoint expects to receive the password as a base64 encoded string (see here). So I am thinking maybe it can decode |
Ah I see......that'd do it |
New login flow:No options provided
Username provided only
Password provided only
|
…re the password input
…nctions in core/user.py
Closes #2136
Code Changes
fides user login
CLI command (usesuser
endpoint, notclient
endpoint).fides_credentials
file in the user directoryfides user create
command for creating a userfides user permissions
command for showing the scopes of the current userlogin
andcreate
, for example)Relevant Links:
Steps to Confirm
fides db reset -y
to clear the database of any existing usersfides user login -u root_user -p Testpassword1!
and verify a credentials file is written with the correct infofides user login
and verify that you're prompted for the username and password, and that the password is hiddenfides user login -u fidesadmin -p wrongpassword
and verify the error messagefides user create newuser HolyCow1*1
and confirm that a new user is createdfides user login -u newuser -p HolyCow1*1
and confirm that the login is successful and the credentials file is updatedfides user permissions
and verify that the permissions are correct (all permissions)FIDES_CREDENTIALS_PATH
env var and confirm that is respected as the path for the credentials filePre-Merge Checklist
CHANGELOG.md
Description Of Changes
This PR adds a
user
command group to the CLI that allows the CLI to authenticate with the webserver and store theusername
,password
,access_token
andid
in a local.fides_credentials
file