Skip to Content
Mastering Spring Cloud
book

Mastering Spring Cloud

by Piotr Mińkowski
April 2018
Intermediate to advanced content levelIntermediate to advanced
432 pages
10h 38m
English
Packt Publishing
Content preview from Mastering Spring Cloud

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: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microservices with Spring Boot and Spring Cloud - Second Edition

Microservices with Spring Boot and Spring Cloud - Second Edition

Magnus Larsson

Publisher Resources

ISBN: 9781788475433Supplemental Content