Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Chicken and egg issue with cerberus.auth.token.hash.salt and getting started locally. #240

Open
fieldju opened this issue Feb 8, 2020 · 0 comments

Comments

@fieldju
Copy link
Contributor

fieldju commented Feb 8, 2020

I noticed when starting this project locally from scratch that there is a bit of chicken and egg issue with cerberus.auth.token.hash.salt

This is normally generated by the LCM CLI when you create an environment.

If I want to run Cerberus locally with out having an env, I had to copy and paste code from here:
https://github.com/Nike-Inc/cerberus-lifecycle-cli/blob/36dda5b5148cafb9aeb389b64a6f599fa22d2b4c/src/main/java/com/nike/cerberus/service/SaltGenerator.java

into a groovyConsole and execute it and then use that output in my cerberus-local.yaml

image

There should be a flag that I can set such as auth.token.hash.salt.autoGenerateForSingleInstanceMode that is set to false by default with a note about if you enable it, it doesn't work with cerberus being in clustered mode, and is for local dev and invalidates tokens after reboots etc.

OR maybe the salt should be stored in the database encrypted with KMS and it can be loaded into the memory at runtime and you delete that property all together?

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

No branches or pull requests

1 participant