Spring Cloud Fundamentals: with java codes by Ajay Kumar

Spring Cloud Fundamentals: with java codes by Ajay Kumar

Author:Ajay Kumar [Kumar, Ajay]
Language: eng
Format: epub, pdf
Publisher: UNKNOWN
Published: 2018-12-26T22:00:00+00:00


Encrypt and Decrypt REST Endpoints

Once you have your Config Server all set up for cryptography, you can utilize some of the utility REST endpoints to encrypt and decrypt values that you will put or take out of your configuration. Both of the endpoints are really, really easy to use.

Utility REST Endpoints: Encrypt Values

Endpoint

POST /encrypt

Example

Request: /encrypt

Data: <value_to_encrypt>

The first one is the encrypt endpoint, and you'd use this to generate the encrypted values that you'll use in your configuration. And it's really simple to use, like I said. All you do is send a POST request to the /encrypt endpoint, and you pass the value that you want to encrypt as the body of the request. The Config Server will use its configured key, either the symmetric or the asymmetric key, to encrypt that value. And again, I can't stress this enough, make sure that this endpoint is secure using Spring Security or any other means to ensure that this endpoint is only accessed by authorized users.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.