-
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
Feature request: Authenticate with environment variable(s) #47
Comments
We are currently discussing some related improvements around setting and storing credentials. I'll add this to that discussion for consideration. |
Thank you! On a related note, I have just run across an instance where I appear to still be logged in ( |
The credentials are only stored in the one place above. However, they are used to obtain a short lived access token. That token is stored in |
Ah, that's quite helpful. It was particularly confusing since I'd run |
I know there are some limits on the api to the rate you can use the "big" creds to get the 1 hour cookie-like access token that you actually use for the api. I worry if we have env vars that use the big creds, people will quickly exhaust that limit. Maybe if we make
|
Thank you for pointing that out! I will admit that I am currently in danger of running across that same limit on the number of temporary credentials I can use, and it was surprising to me as well. I am "used" to Heroku, Github, and AWS APIs that allow me to generate semi-permanent API keys and secrets I can use until I revoke them. That fits my mental model as well as my security practices! Since I must generate one of these short-lived tokens in order to use the API, when I was writing my scripts I am using my permanent credentials to generate one of these hour-long credentials at the beginning of the script. That works fine until I go to debug my script and run it a few times. My understanding is that if I run such a script more than 20 times in an hour, I'm going to start getting rejected. Given that I might be using the crunchy API to do automated tasks on a semi-frequent basis across multiple machines, this limit seems rather constraining and surprising. Furthermore, since my permanent credentials must live on these machines that are making automated use of the API, I don't believe anything has been gained from a security perspective. At the moment, requesting this temporary token just feels like a fragile hoop for my machines/scripts to jump through. |
There has been some discussion around this recently. I'm not sure of the direction it will go, but I can say it's been a consideration.
I suppose it depends on whether or not your script removes the short-lived token after every time it runs. If it doesn't then you should be good. If it does, then yeah, you'd likely run up against this wall. However, there has been discussions around increasing this limit. Though, noted that it wouldn't matter if the above model was available.
Similar to the Heroku, Github, AWS model you mentioned above, you can always reset/revoke these credentials and generate a new set. However, the point you make isn't lost on me. |
@Taytay I just wanted to follow up with some of the above. Specifically the following:
We have updated this in the API and you should no longer run up against this kind of limit. We hope this helps. We're still discussing and working towards some of the other items. But, I at least wanted to give you a heads up on this recent update to the API. I don't have any update on the original request at this time. But, we've made note of it and will continue to take it into consideration along side of other improvements to |
I would like to use the CLI as part of some automated tasks. We are currently writing to the file manually :
echo "$CRUNCHY_BRIDGE_AUTH" > $HOME/.config/cb/api.crunchybridge.com
I'd prefer to be able to set the credentials in a way similar to how heroku or aws CLIs let me do it though. For Heroku I can just set the
HEROKU_API_KEY
environment variables, and AWS has their similarAWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
.The text was updated successfully, but these errors were encountered: