-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
Allow setting an ST2_API_KEY for st2chatops instead of user/pass #197
Conversation
cf5c62e
to
1758535
Compare
1758535
to
b927e4b
Compare
OK. I think I found a clean enough way to make st2chatops use an api_key. What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍
Thanks a lot.
BTW, I also remember that using ST2_API_KEY is more stable and recommended comparing to st2 username:password pair as st2chatops doesn't need to re-generate auth token (which sometimes fails on the javascript side).
Whenever I setup chatops, I prefer giving chatops an api_key instead of a username/password combo.
This PR allows us to add a previously generated st2 api_key as
st2chatops.api_key
invalues.yaml
(make sure to add the api_key object inst2.apikeys
as well). Defining this api_key triggers replacing theST2_AUTH_USERNAME
andST2_AUTH_PASSWORD
environment vars withST2_API_KEY
but only for the st2chatops deployment.