Previously, we learned to protect external communication with HTTPS. Now we will use HTTP basic authentication to restrict access to the APIs and web pages on the discovery server, Netflix Eureka; that is, we will require a user to supply a username and password to get access. Changes are required both on the Eureka server and in the Eureka clients described as follows.
Securing access to the discovery service, Netflix Eureka
Changes in the Eureka server
To protect the Eureka servers, the following changes have been applied:
- A dependency in build.gradle has been added to Spring Security:
implementation 'org.springframework.boot:spring-boot-starter-security'
- Security configuration has been added to the...