I am experimenting with Spring Cloud Config Server for encryption/decryption of config values.
For this, under Config Server project made following changes:
In bootstrap.properties
encrypt.key=abcdefghabcdefghabcdefghabcdefghabcdefghabcdefgh
I have also updated JCE using following command in my Ubuntu 18.04 machine:
sudo apt install oracle-java8-unlimited-jce-policy
But after issuing a POST request, I couldn't see anything in response.
Ideally, encrypted text of the request body should be coming as response.
Sample project: https://github.com/Omkar-Shetkar/pluralsight-springcloud-m2-git
What could be missing here ?
Thanks.
It is actually due CSRF, was getting 401-unauthorized response. Since Spring Boot 2.0, we can disable this in code.
Detailed answer is available here: spring config server encrypt forbidden
Following above steps solved the issue.