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

Start token generation workflow from the CLI #824

Open
joshkoenig opened this issue Jan 19, 2016 · 8 comments
Open

Start token generation workflow from the CLI #824

joshkoenig opened this issue Jan 19, 2016 · 8 comments

Comments

@joshkoenig
Copy link
Member

It would be great if we were able to initiate the token process from the CLI:

  1. User runs a command along the lines of teminus auth token-generate
  2. That provides a URL for the dashboard which will take them to the token generation screen, and pre-load the "Machine Name"
  3. User adjusts the machine name as needed, clicks submit, gets a shiny new token.
  4. 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.

@ronan
Copy link

ronan commented Jan 19, 2016

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]]

@joshkoenig
Copy link
Member Author

terminus auth machine-token-generate +1 for specificity.

@TeslaDethray
Copy link
Contributor

We tend to set our verbs first, though. terminus auth generate-machine-token would be better in line with our other subcommands.

@joshkoenig
Copy link
Member Author

terminus auth generate-machine-token +1 for grammar! :)

@joshkoenig
Copy link
Member Author

This request is largely satisfied by #790 - all we need is a way to get into that flow directly.

@kellybell
Copy link

+1 this feature request

@dustinleblanc
Copy link
Contributor

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!

@andy-lcm
Copy link

andy-lcm commented Mar 6, 2024

+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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants