Skip to content

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

Merged
ryanjbaxter merged 1 commit intospring-cloud:4.1.xfrom
ryanjbaxter:disable-invalid-prefix-property
Jan 15, 2025
Merged

Add property to disable adding invalid prefix when decryption fails#2708
ryanjbaxter merged 1 commit intospring-cloud:4.1.xfrom
ryanjbaxter:disable-invalid-prefix-property

Conversation

@ryanjbaxter
Copy link
Copy Markdown
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
@AutoConfigureAfter(DefaultTextEncryptionAutoConfiguration.class)
public class EncryptionAutoConfiguration {

@Value("${spring.cloud.config.server.encrypt.prefixInvalidProperties:${spring.cloud.config.server.encrypt.prefix-invalid-properties:true}}")
Copy link
Copy Markdown
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
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