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

Add property to disable adding invalid prefix when decryption fails #2708

Merged

Conversation

ryanjbaxter
Copy link
Contributor

Fixes #2632

@ryanjbaxter ryanjbaxter added this to the 4.1.6 milestone Jan 15, 2025
@ryanjbaxter ryanjbaxter force-pushed the disable-invalid-prefix-property branch from 4008707 to 8ceab26 Compare January 15, 2025 16:16
@@ -44,6 +45,9 @@
@AutoConfigureAfter(DefaultTextEncryptionAutoConfiguration.class)
public class EncryptionAutoConfiguration {

@Value("${spring.cloud.config.server.encrypt.prefixInvalidProperties:${spring.cloud.config.server.encrypt.prefix-invalid-properties:true}}")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not like doing it this way but if I were to initialize ConfigServerProperties in this class it would cause some issues when the config server uses bootstrap. It looks like certain properties do not get initialized properly and promoted to the main context. This was the lest amount of disruptive changes to make this work.

@ryanjbaxter ryanjbaxter removed this from the 4.1.6 milestone Jan 15, 2025
@ryanjbaxter ryanjbaxter merged commit 2d88fa0 into spring-cloud:4.1.x Jan 15, 2025
2 checks passed
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

Successfully merging this pull request may close these issues.

Add Ability to skip property value decryption (e.g. "decryptProperties=false")
2 participants