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

Cloud Config Client Finchley.M1 and 2.0.0M3 not able to decrypt values #805

Closed
heyitsaakash opened this issue Sep 27, 2017 · 2 comments
Closed

Comments

@heyitsaakash
Copy link

hello

I am using oracle JCE to encyrypt username and password. We are using Spring boot 2.0.0.M3 and spring cloud Finchley.M1

I followed the required steps to encrypt username and password (replacing security files and generating the encrypted values).
I stored the encrypted username and password in the properties file specific to my application
spring.data.cassandra.username={cipher}385f2e77d912e4027dc6f0dd9e9b875cb190927cbe8cbab9c4712c0d85b158ee
spring.data.cassandra.password={cipher}385f2e77d912e4027dc6f0dd9e9b875cb190927cbe8cbab9c4712c0d85b158ee

From client I was able to connect to database implying that the encryption and decryption was working fine.

However, I was still able to see the username and password in the nonencrypted form when i hit the config servr url http://localhost:1010/product-microservice/default/develop so i tried to set the spring.cloud.config.server.encrypt.enabled=false at the config server application-local.properties it didn't work
I provided the variable through the command line param -Dspring.cloud.config.server.encrypt.enabled=false and then it started showing the values in encrypted form as expected ...
"spring.data.cassandra.port": "9042",
"spring.data.cassandra.keyspace-name": "try_deo",
"spring.data.cassandra.username": "{cipher}385f2e77d912e4027dc6f0dd9e9b875cb190927cbe8cbab9c4712c0d85b158ee",
"spring.data.cassandra.password": "{cipher}385f2e77d912e4027dc6f0dd9e9b875cb190927cbe8cbab9c4712c0d85b158ee",

After this i included in the cloud config client entry below

org.springframework.security spring-security-rsa

But, still i see that the properties are picked up in the encrypted format at the client side -
Caused by: com.datastax.driver.core.exceptions.AuthenticationException: Authentication error on host /192.168.33.10:9042: Provided username {cipher}385f2e77d912e4027dc6f0dd9e9b8
at com.datastax.driver.core.Connection$8.apply(Connection.java:390) ~[cassandra-driver-core-3.3.0.jar!/:

Please let me know if there is something wrong at my end?

@spencergibb
Copy link
Member

The Finchley milestones have been fairly unstable due to all of the not changes. M2 is the latest, please try that. You should not be using this in production.

@heyitsaakash
Copy link
Author

thanks.

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

2 participants