-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable login authentication for eureka
- Loading branch information
Showing
7 changed files
with
106 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1528,3 +1528,31 @@ admin-services.access.tokens=098f6bcd4621d373cade4e832627b4f6,ad0234829205b90331 | |
> For version 2.0.0 and above | ||
The default value is 60, in seconds. Since the key authentication needs to verify the time, there may be time deviation between the time of the client and the time of the server, if the deviation is too large, the authentication will fail, this configuration can configure the tolerated time deviation size, the default is 60 seconds. | ||
|
||
### 3.2.9 apollo.eureka.server.security.enabled - Configure whether to enable Eureka login authentication | ||
|
||
> For version 2.1.0 and above | ||
The default value is false, if you want to improve security (such as when apollo is exposed to the public network), you can enable login authentication for eureka by setting this configuration to true. | ||
|
||
Note that if eureka login authentication is enabled, the addresses in [eureka.service.url](#_321-eurekaserviceurl-eureka-service-url) needs to be configured with a user name and password, such as: | ||
|
||
``` | ||
http://some-user-name:[email protected]:8080/eureka/, http://some-user-name:[email protected]:8080/eureka/ | ||
``` | ||
|
||
Among them, `some-user-name` and `some-password` need to be consistent with the configuration items of `apollo.eureka.server.security.username` and `apollo.eureka.server.security.password`. | ||
|
||
### 3.2.10 apollo.eureka.server.security.username - Configure the username of Eureka server | ||
|
||
> For version 2.1.0 and above | ||
Configure the login username of eureka server, which needs to be used together with [apollo.eureka.server.security.enabled](#_329-apolloeurekaserversecurityenabled-configure-whether-to-enable-eureka-login-authentication). | ||
|
||
> Note that the username cannot be configured as apollo. | ||
### 3.2.11 apollo.eureka.server.security.password - Configure the password of Eureka server | ||
|
||
> For version 2.1.0 and above | ||
Configure the login password of eureka server, which needs to be used together with [apollo.eureka.server.security.enabled](#_329-apolloeurekaserversecurityenabled-configure-whether-to-enable-eureka-login-authentication). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1470,3 +1470,30 @@ admin-service.access.tokens=098f6bcd4621d373cade4e832627b4f6,ad0234829205b903319 | |
> 适用于2.0.0及以上版本 | ||
默认值为60,单位为秒。由于密钥认证时需要校验时间,客户端与服务端的时间可能存在时间偏差,如果偏差太大会导致认证失败,此配置可以配置容忍的时间偏差大小,默认为60秒。 | ||
|
||
### 3.2.9 apollo.eureka.server.security.enabled - 配置是否开启eureka server的登录认证 | ||
|
||
> 适用于2.1.0及以上版本 | ||
默认为false,如果希望提升安全性(比如公网可访问的场景),可以设置该配置项为true启用登录认证。 | ||
|
||
需要注意的是,开启登录认证后,[eureka.service.url](#_321-eurekaserviceurl-eureka服务url)中的地址需要配置用户名和密码,如: | ||
|
||
``` | ||
http://some-user-name:[email protected]:8080/eureka/,http://some-user-name:[email protected]:8080/eureka/ | ||
``` | ||
其中`some-user-name`和`some-password`需要和`apollo.eureka.server.security.username`以及`apollo.eureka.server.security.password`的配置项一致。 | ||
|
||
### 3.2.10 apollo.eureka.server.security.username - 配置eureka server的登录用户名 | ||
|
||
> 适用于2.1.0及以上版本 | ||
配置eureka server的登录用户名,需要和[apollo.eureka.server.security.enabled](#_329-apolloeurekaserversecurityenabled-配置是否开启eureka-server的登录认证)一起使用。 | ||
|
||
> 注意用户名不能配置为apollo | ||
### 3.2.11 apollo.eureka.server.security.password - 配置eureka server的登录密码 | ||
|
||
> 适用于2.1.0及以上版本 | ||
配置eureka server的登录密码,需要和[apollo.eureka.server.security.enabled](#_329-apolloeurekaserversecurityenabled-配置是否开启eureka-server的登录认证)一起使用。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters