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

Multiple property decryption #368

Open
raviraja opened this issue Jul 24, 2023 · 0 comments
Open

Multiple property decryption #368

raviraja opened this issue Jul 24, 2023 · 0 comments

Comments

@raviraja
Copy link

raviraja commented Jul 24, 2023

Hi,
In my project i pass an encrypted secret to the application as below
In application.properties

secret=ENC(encryptedValue)

and in my application code i read it as

@Value("${secret}")
private String secret

this setup works perfectly fine.

Now we want to read multiple encrypted values from the same property as something like

@Value("${secret}")
private String[] secrets

What is the correct way to pass the encrypted values in .proprties file? we tried a few combinations like

secret = ENC(encryptedValue1), ENC(encryptedValue2)

or

secret = ENC(encryptedValue1,encryptedValue2)

but none of them work.!!

Is it possible to achieve this out of the box, if yes how should the properties be defined? if no, what is the custom logic that's needed?

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

1 participant