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

[FEATURE REQUEST] Consider masking API key on profile create <name> #1184

Open
matanlurey opened this issue Apr 18, 2024 · 2 comments
Open

Comments

@matanlurey
Copy link

I am not sure whether the current behavior is intentional or not, but I was walking through setting up a Fastly app for the first time, and went through this workflow:

$ fastly profile list

No profiles defined. To create a profile, run:
    fastly profile create <name>

$ fastly profile create hello-fastly

An API token is used to authenticate requests to the Fastly API. To create a token, visit
https://manage.fastly.com/account/personal/tokens

$ Fastly API token:

At this stage, when copying the API token in, there is no indication anything happened (no masked API key, or anything), so I made a mistake once or twice- it would be nice to show : * (assuming that's not a security issue I'm not aware of).

Thanks!

@Integralist
Copy link
Collaborator

Thanks @matanlurey

I'd agree with having some kind of indicator as just space is very ...unnerving 😄

Looks like it uses https://pkg.go.dev/golang.org/x/term#ReadPassword

I've not worked with that before and so I can't comment on how straightforward it would be to implement asterisks around it.

@matanlurey
Copy link
Author

matanlurey commented Apr 18, 2024

Yeah unfortunately a lot of the go ecosystem is quite, how do I say this ... minimalist :) It looks like there might be a reasonable path but I can't comment on how idiomatic this is.

Thanks for considering!

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

2 participants