Consuming Spring Cloud Config Server configuration through a NestJS application with encrypted data

757 views Asked by At

Currently I'm working trying to read the Spring Cloud Config Server configurations through a NestJS app. I found some packages like cloud-config-client and node-scc-config but I need to decrypt some keys that are encrypted using JCE. The endpoint is also a secured with Basic Authorization header, but with those packages is not possible to connect and get the configuration. Is possible to get them in some way and decrypt encrypted {cipher}XXX config keys?

1

There are 1 answers

0
DanTe On

You are trying to access Spring Config Server from non-spring application.
in your case, i think the best approach is to use there REST API.

API Resources non-spring applications

application is injected as the spring.config.name in the SpringApplication (what is normally application in a regular Spring Boot app).
profile is an active profile (or comma-separated list of properties).

Path Method Description
/application/profile GET Configuration data for app for Spring profile (comma-separated).
/application/profile/label GET an optional git label (defaults to master).

more details can be found in there doc here