Sign inSign up

dnl50/eureka-server

By dnl50

Updated over 5 years ago

Simple Netflix Eureka Service Discovery Server

Image
0

1.7K

dnl50/eureka-server repository overview

Simple Netflix Eureka Service Discovery Server

This is very a basic Spring Boot Application using Spring Cloud Netflix and Spring Security under the hood.

The default port of this Spring Boot Application is 8761 (which is the default port of a Eureka Server).

Docker Examples

A docker image of this application is available over on Docker Hub.

After using these examples below, the Eureka Server will be accessible on port 8761. When you execute these commands locally, the Eureka Server can be reached under http://localhost:8761/

HTTP Basic enabled:

docker run -p 8761:8761 -d -e APP_EUREKA_SECURITY_BASIC_ENABLED=true -e APP_EUREKA_SECURITY_BASIC_USERNAME=daniel -e APP_EUREKA_SECURITY_BASIC_PASSWORD=secret --name eureka-server dnl50/eureka-server:latest

HTTP Basic disabled:

docker run -p 8761:8761 -d --name eureka-server dnl50/eureka-server:latest

Common Configuration Properties

Here is a list of the most important configuration properties:

Spring PropertyEnvironment Property NameTypeDefault ValueDescription
app.eureka.security.basic.enabledAPP_EUREKA_SECURITY_BASIC_ENABLEDbooleanfalseEnables or disables HTTP basic authentication.
app.eureka.security.basic.usernameAPP_EUREKA_SECURITY_BASIC_USERNAMEStringusernameThe username to authenticate with. Must be at least 3 characters long.
app.eureka.security.basic.passwordAPP_EUREKA_SECURITY_BASIC_PASSWORDStringpasswordThe password to authenticate with. Must be at least 5 characters long.

Since this application is a simple Spring Boot Application under the hood, you can also configure the underlying Tomcat and other Spring features using their respective properties. Take a look at Spring Boot's Docs for more details.

Enabling HTTP basic authentication

HTTP Basic authentication can be enabled by setting the app.eureka.security.basic.enabled to true. The username and password can be configured via properties with the same prefix as well. HTTP basic is not enabled by default.

HTTP Basic authentication only affects Eureka's API Endpoints. Other endpoints like Spring Boots Actuator Endpoint do not require authentication.

Registration at a HTTP Basic authenticated Eureka Server

Eureka Clients support HTTP Basic authentication out-of-the-box. The credentials must be included in the zone URL of the Eureka Client:

eureka.client.service-url.defaultZone=http://{username}:{password}@{domain}:{port}/eureka/

Tag summary

Content type

Image

Digest

Size

129.9 MB

Last updated

over 5 years ago

docker pull dnl50/eureka-server