Closed rhuss closed 6 years ago
We discussed this at some point and decided that it would not be proper to deliver hard coded keys. The downside of using random keys is that (as stated) if the pod is restarted any ongoing OAuth skirmishes will fail to complete. Not sure if we can add to OpenShift templates to generate some random keys?
We can create random keys during template instantiation, so that would make much sense. Could we use application.properties, too? Think this would be nice to not pollute the env namespace and to diverge configuration (as we already have an application properties file).
This is an option right now, we should be able to place something like this in the application.yml
:
client:
state:
authentication-algorithm: HmacSHA1
authentication-key: oID3dF6UovTkzMyr3a9dr0kgTnE=
encryption-algorithm: AES/CBC/PKCS5Padding
encryption-key: T2NasjRXURA3dSL8dUQubQ==
tid: 1
The keys are 20 (authentication) and 16 (encryption) bytes Base64 encoded random values. That of course changes with the algorithm parameters.
Can we keep the algorithm fix and just create the keys, right ? Not sure whether the template mechanism supports base64 encoding. Just in case, could we do the encoding on our own (within the code), so that we could put here arbitrary random strings ?
Yes on all accounts.
On staging in the logs:
I this something harmful ? What needs to be done here ? // @zregvart