terminus
terminus copied to clipboard
Start token generation workflow from the CLI
It would be great if we were able to initiate the token process from the CLI:
- User runs a command along the lines of
teminus auth token-generate
- That provides a URL for the dashboard which will take them to the token generation screen, and pre-load the "Machine Name"
- User adjusts the machine name as needed, clicks submit, gets a shiny new token.
- They then take the CLI copy/pasta back to their terminal.
IIRC we have the capability to handle this on the dashboard side if the URL is constructed right. If not, we can put this off until a later date, but if so it'd be great to have for demo purposes.
User runs a command along the lines of
teminus auth token-generate
As annoyingly long as this is this should be: terminus auth machine-token-generate
or terminus auth machinetoken-generate
. We also have the terminus machinetoken
command space to use: terminus machinetoken create
. Not sure which place is more appropriate.
IIRC we have the capability to handle this on the dashboard side if the URL is constructed right
Yup:
https://dashboard.getpantheon.com/machine-token/create?client=terminus&device=[[DEVICENAME]]
terminus auth machine-token-generate
+1 for specificity.
We tend to set our verbs first, though. terminus auth generate-machine-token
would be better in line with our other subcommands.
terminus auth generate-machine-token
+1 for grammar! :)
This request is largely satisfied by #790 - all we need is a way to get into that flow directly.
+1 this feature request
FYI used terminus auth login
this am and got a nicely constructed dashboard link that got me a token in a jiffy so I could authorize my home machine. Quite nice!
+1. This feature would facilitate automated rotation of machine tokens:
- Login using existing token.
- Create a new token with specified device name.
- Delete other active tokens - all, or searching by name.
- Log out and back in using the newly generated token.
It's already possible do rotate SSH keys via terminus, it would be great to be able to do the same. We can't rely on our users remembering to do it!
You could go further, and include automatic rotation of both machine tokens and ssh keys as terminus commands. But I'm happy to write a script, I just need terminus machine-token:create