Configuring authentication for a client and a server

The implementation of authentication for Spring Cloud Config Server looks exactly the same as for the Eureka server. We can use an HTTP basic authentication basing on standard Spring security mechanisms. First, we need to make sure that the spring-security artifact is on the classpath. Then we should enable security with security.basic. enabled set to true and define a username and password. The sample configuration settings are visible in the following code fragment:

security: basic:  enabled: true user:  name: admin  password: admin123

The basic authentication must also be enabled on the client side. It can be realized in two different ways. The first of these is via the config server URL: ...

Get Mastering Spring Cloud now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.