-
Notifications
You must be signed in to change notification settings - Fork 4
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
Preparing Polykey for Local Demo #504
Conversation
👇 Click on the image for a new way to code review
Legend |
So there is a bug with starting from no state where the password is only prompted once, it should be twice.
I think current sessions should be locked if we change the root password of the agent. That doesn't seem to be happening right now. |
Asciinemas
|
Starting the Polykey agent with an invalid password gives a valid but ugly response.
This should be a cleaner output with just the message along the lines of We should catch and re-throw the error here as a wrong password error since that makes more sense in this context. Also we should look at less verbose formatting of the errors. |
I think also it might be more intuitive to say "Please enter a password:" when the user is initiating PK cos "the" kinda makes it sound like it's something the user should already know. Also for No. 5 and 6 of #504 (comment), am I doing this correctly? Cos |
I think you're doing it correct. It's likely a bug, I'll have a look at the command. |
I've fixed It was reading the secreName field of the protobuf message for the secrets contents. We don't return anything in the name field since we provide the name when getting the secret. I just had to use the contents of the @CMCDragonkai suggested we return the secret name along side the contents but I'm going to defer that for now since it's not a super quick change and it's low priority. |
I forgot that PR #265 already exists for |
I should check that the output for formatter is used for the output for all of these commands, even for single line outputs. |
I think pretty much everything is covered except for the ENV command. Just one other thing though. when changing the password on the agent via starting the agent with recovery. any active client session is still valid. I think if the password changes then we should have to unlock it again with the new password. What behaviour do we want here? |
Yea if the password changes, the session tokens should be reset. |
Awesome! In the future we should have an org account under |
The Also binary data too. If the secret upload has binary data, we output the binary as is, as if the user were to run |
I'm noticing another error while the agent is running:
It occurs after some time while running the foreground agent. @tegefaulkes please investigate. It should:
Any time we are reducing, we should always have an initial value. |
Another thing we should have:
Better to do:
Similar to how numbers are printed out now. I think the output formatter may require some refactoring to make it recursive capable. |
The claim command isn't working for me, it fails after I do authenticate:
|
The reason for this is because of case insensitivity of the login (possible). But later when in the
Which is a case sensitive check. GitHub returns my username as This confusion stems from the fact that The command ends up telling us the username which is @tegefaulkes please fix this up by removing it from the command and GRPC message, we can still do a case sensitive check, but our error message can be better instead of saying the provider is not authenticated, it might be better to say something like the identity does not match the list of existing identities... which we could show too. |
Cool so @amydevs can refactor the diagrams to reduce the complexity, label the arrows, remove filesystem where it's not important. Then re-run the asciinema with the new changes and fixes we've applied. |
Last thing for me is the env command. |
When doing `polykey agent start` and providing a nodepath that needed to be created. Then we were only prompted once for the password. [ci skip]
…sodium decryption
…show the secret content verbatim, `pk secrets get` now returns just the secret content and `--env` is removed
Pretty simple check, we call `sessionManager.resetKey()` if the recovery code is provided. Either that's a new install or changing a password on an existing. either way it's a new session. [ci skip]
…ts in `ErrorProviderIdentity` that also shows the authenticated identities
c502b8e
to
6b2e53d
Compare
I'm doing |
@amydevs can you get this into Polykey docs too? |
Description
Working software trumps diagrams/presentations/talks. So we want a working demo with associated diagrams running right off staging branch atm.
The relevant commands that we need to see working are below.
For each of the commands we need:
Agent Start
This command needs:
~/.local/share/polykey
if it doesn't exist.Agent Stop
This command needs:
Agent Status
This command needs:
Vaults Create
This command needs:
myvault
.Secrets Create
This command needs:
./the-secret-file.txt
intomyvault
.Secrets Get
This command needs:
the-secret-file.txt
on the STDOUT of the CLI.Secrets Delete
The command needs:
myvault
.Secrets Env
This command needs:
pk secrets env
command for meeting Development Environment Usecase Polykey-CLI#31.Identities Authenticate
This command needs:
Identities Claim
This command needs:
Tasks
pk agent start
pk agent stop
pk agent status
pk vaults create
pk secrets create
pk secrets get
pk secrets delete
pk secrets env
pk identities authenticate
pk identities claim
Final checklist