metal-cli icon indicating copy to clipboard operation
metal-cli copied to clipboard

implement API key management

Open displague opened this issue 9 months ago • 0 comments

What problem are you facing?

It should be possible to list, create, and delete API keys:

metal ssh-keys list --project-id=...
metal ssh-keys create --project-id=...

How could the Equinix Metal CLI help solve this problem?

Introduce an api-keys (auth-tokens) action with an optional project-id argument for getting, creating, deleting API keys.

A --project-key argument could be considered as a way to use the default --project-id, in this way there would be a --user or --project (perhaps --type user*|project). If only --project-id triggers the distinction, the default project-id will get in the way (similar concerns for #153 )

Helpful actions like rotate could implement a delete/create with the nuances needed to perform that operation correctly.

Arguments like --use-in-config could be considered as ways to take advantage of the new or rotated key in the Metal CLI config. (this is out of place thought fodder, would need its own issue and should related to a metal config set of actions)

displague avatar May 02 '24 16:05 displague