question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spring cloud client issue with decryption locally

See original GitHub issue

we are trying to decrypt some of the properties locally before connecting to spring configserver. as per the cloud documention we use the key and encrypt.* properties in our local application.yml and additionally added spring-security-rsa in our maven pom. we found its not able to load the key while startup and seems always throwing

java.lang.UnsupportedOperationException: No decryption for FailsafeTextEncryptor. Did you configure the keystore correctly?
    at org.springframework.cloud.bootstrap.encrypt.EncryptionBootstrapConfiguration$FailsafeTextEncryptor.decrypt(EncryptionBootstrapConfiguration.java:149)
    at org.springframework.cloud.bootstrap.encrypt.EnvironmentDecryptApplicationInitializer.decrypt(EnvironmentDecryptApplicationInitializer.java:91)

when we tried in debug we observed the TextEncryptor locally is not loaded with any of the values. any suggestions or is this really works ?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
RaphCcommented, Aug 4, 2016

Hi,

I had a problem with the same result ( which I solved by replacing in bootstrap.yml “key-store” by “keyStore”). It seems the spring boot condition org.springframework.cloud.bootstrap.encrypt.EncryptionBootstrapConfiguration$KeyCondition only recognise encrypt.keyStore.location and encrypt.keyStore.password

if (hasProperty(environment, "encrypt.keyStore.location")) {
                if (hasProperty(environment, "encrypt.keyStore.password")) {
                    return ConditionOutcome.match("Keystore found in Environment");
                }
                return ConditionOutcome
                        .noMatch("Keystore found but no password in Environment");
            }

My version is 1.1.2.RELEASE.

Regards

0reactions
MingningShaocommented, Jul 12, 2016

config encrypt.* properties in bootstrap.yaml.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Cloud Config
Sometimes you want the clients to decrypt the configuration locally, instead of doing it in the server. In that case you can still...
Read more >
Spring Cloud Config not decrypting the config server password
I experienced this error because my application was taking local bootstrap.yml instead of cloud config in the server ...
Read more >
Spring Cloud Config — Encryption and Decryption at Rest
When Spring Cloud config server pulls encrypted values from a Git repository or a native file system backend, it will decrypt encrypted values...
Read more >
Encrypt Decrypt Cloud Config Properties - DevGlan
While using encrypted property it is required to store the properties in the format {cipher} to GIT. This indicates spring cloud config that...
Read more >
Spring Cloud Config - Encryption and Decryption - YouTube
Demo of Encrypting and Decrypting of properties at spring cloud config server and Decryption at spring cloud config client.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found