Search code examples
jhipsterspring-cloud-configjhipster-registry

JHipster registry /encrypt and /decrypt endpoints missing


I am using latest JHipster Registry updated just couple of days ago. I am trying to setup symmetric key encryption that is part of spring boot itself https://cloud.spring.io/spring-cloud-config/spring-cloud-config.html (see Key Management). I have gotten it to work in Spring boot by setting the key in bootstrap.properties

Under JHipster, the developers advise is that all endpoints are under /management/** so I have tried /management/encrypt and just encrypt both return a 404.

I have set the encrypt.key in many places to try and get this to work

  1. environment variable ENCRYPT_KEY
  2. in git under application.yml
  3. in bootstrap.yml within the registry app

However it still does not activate the endpoints or something else is wrong. If anyone has gotten it to work please indicate if it works for you and what settings you used.


Solution

  • JHipster Registry sets a prefix for the config server endpoints to be served under /config, this property is set in the bootstrap.yml and bootstrap-prod.yml files.

    Once you add the encrypt.key property (or ENCRYPT_KEY environment variable) and install the "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files" according to the Spring Cloud Config docs, you can access the encrypt/decrypt endpoints at:

    http://admin:password@registry:8761/config/encrypt http://admin:password@registry:8761/config/decrypt