HTTP Basic Authentication with Eureka client 1.1.147

57 просмотров
Перейти к первому непрочитанному сообщению

ch...@chrismiles.org

не прочитано,
2 июн. 2016 г., 07:18:3002.06.2016
– eureka_netflix
Due to corporate limitations we are not yet approved to use any newer version of Eureka than 1.1.147 but I am having problems with authentication.

Within EurekaJerseyClient the apache client config is created outwith my control and I can see no way to configure a credentials provider into it.

public static JerseyClient createJerseyClient(String clientName, int connectionTimeout,
int readTimeout, int maxConnectionsPerHost,
int maxTotalConnections, int connectionIdleTimeout) {
Preconditions.checkNotNull(clientName, "Client name can not be null.");
try {
ClientConfig jerseyClientConfig = new CustomApacheHttpClientConfig(clientName, maxConnectionsPerHost,
maxTotalConnections);

return new JerseyClient(connectionTimeout, readTimeout,
connectionIdleTimeout, jerseyClientConfig);
} catch (Throwable e) {
throw new RuntimeException("Cannot create Jersey client ", e);
}
}

The only solution I have is to have a defaultZone which is hardcoded with the username and password

https://username:password@myhost:8761/eureka/

But the problem with this means that the username and password is logged out to our Eureka log files numerous times.

Does anyone have any pointers?

Many thanks

Chris

Ответить всем
Отправить сообщение автору
Переслать
0 новых сообщений