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

Question: why aws secret manager #6

Open
thomkitchen opened this issue Feb 20, 2021 · 4 comments
Open

Question: why aws secret manager #6

thomkitchen opened this issue Feb 20, 2021 · 4 comments

Comments

@thomkitchen
Copy link

Hey. First of all, thanks so much this was insanely helpful.

Anyway, I was curious why you were using aws secrets for the server password. It kept throwing errors for me about not being able to pull in the secret to set the password so I ended up removing all those calls and hardcoded it.

Thanks again!

@rileydakota
Copy link
Owner

Hi there! Thanks for using the solution and reaching out. Re: Why Secrets Manager - it is best practice to remove any credentials from source code, and store them in an external solution such as Secrets Manager, Parameter Store, Hashicorp Vault etc. This allows you to rotate them, and share your source code without accidentally sharing your server password. Very interested in your error - care to share it, as well as the configuration for the secret (Name of the secret, key value pair without your password, etc). Happy to help troubleshoot and then revise the docs

@rileydakota
Copy link
Owner

FWIW - you can reference the workaround by @sdredsoxfan here to bypass the use of a secret - but would only advise doing so IF you are the only one who has access to your source: #9 (comment)

@thomkitchen
Copy link
Author

Heyo. That's the exact error I was having actually and that's what I ended up doing lol.

As for the secrete creation, I used

aws secretsmanager create-secret --name valheimServerPass --secret-string '{"VALHEIM_SERVER_PASS":"mySuperSecurePassword"}'

When I check secrets manager for it, I see an entry named 'valheimServerPass'. When I go to the details and try to retrieve the secret value, I get '{VALHEIM_SERVER_PASS:mySuperSecurePassword}' (edited of course) for plaintext but the key value tab returns an error (The secret value can't be converted to key name and value pairs).

Hope that helps!

@AndyBarnett
Copy link

I too had to mane this secret manually instead on the AWS site (filling in the key and value properly) and point the code at that one

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

3 participants