Describe the bug
The encrypt.rsa properties appear to be not working. After creating a cipher with the /encrypt endpoint, change the rsa properties and restart. The decrypt endpoint still decrypts the generated cipher with the changed properties
Sample
application.yml
encrypt:
rsa:
strong: true
salt: deadbeef
algorithm: DEFAULT
key: 12345678901234567890
spring:
cloud:
config:
server:
git:
uri: https://github.com/fennekit/configuration
application.yml
encrypt:
rsa:
strong: true
salt: aaaaaa
algorithm: DEFAULT
key: 12345678901234567890
spring:
cloud:
config:
server:
git:
uri: https://github.com/fennekit/configuration
It appear the rsa properties always use the default settings. When I change the key the decryption fails. When I change any of the RSA settings it still decodes. Changing the algorithm to something else then DEFAULT or OAEP config-server does not start. Changing salt, strong or algorithm still result in a decryption instead of an error
Comment From: fennekit
I discovered this while I was working on the .Net decoding of the cipher https://github.com/fennekit/spring-cloud-config-decode
Comment From: kvmw
@fennekit Where did you find the above RSA properties ?
Checking the docs here, i can see the following properties needed for asymmetric keys. Property | Description -- | -- encrypt.keyStore.location | Contains a Resource location encrypt.keyStore.password | Holds the password that unlocks the keystore encrypt.keyStore.alias | Identifies which key in the store to use encrypt.keyStore.type | The type of KeyStore to create. Defaults to jks.
Comment From: fennekit
Ah. That makes sense. So for symetric encryption the only parameter is the key.