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

It's not possible to set KEY_SECRET to direct #261

Closed
testworksau opened this issue Aug 18, 2022 · 2 comments
Closed

It's not possible to set KEY_SECRET to direct #261

testworksau opened this issue Aug 18, 2022 · 2 comments

Comments

@testworksau
Copy link

testworksau commented Aug 18, 2022

I'm looking to quickly fire up my own instance of Allstar to assess the application behaviour with a faster turnaround time, before going all in with a properly deployed instance.

According to the documentation, it should be possible to get allstar to consume the PRIVATE_KEY from an environment variable:

Alternatively, you can provide the AppID and KeySecret as environment variables APP_ID and KEY_SECRET. You may need to edit pkg/ghclients/ghclients.go and add a new import line for your secret service, ex: _ "gocloud.dev/runtimevar/gcpsecretmanager".

Warning, this is not a recommended practice for security. If you are not using a supported runtime you may provide the contents of the private key directly in the environment variable PRIVATE_KEY. Allstar will only use this if the contents of KEY_SECRET is set exactly to direct.

It seems there is a schema check in place for the KEY_SECRET variable though, judging by the error that is received:

{"severity":"CRITICAL","error":"open runtimevar.Variable: no scheme in URL \"direct\""
,"time":"2022-08-18T05:53:17Z","message":"Could not load app secret, shutting down"}

Note: I am attempting to run via the published Docker image, rather than compile from source as suggested in the readme.

@jeffmendoza
Copy link
Member

Thanks for the report! The Docker image is old, most operators have been building from head. I have a release process proposed in #145 to do monthly releases. We haven't started as we haven't had someone to consume them. Please take a look at that. If it looks good to you I'll make it official, and start doing the releases.

@testworksau
Copy link
Author

Thanks @jeffmendoza - when compiling this from source, and running the resulting binary, the application accepts direct as a valid value for KEY_SECRET and loads the PRIVATE_KEY from the environment as expected.

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

No branches or pull requests

2 participants