HTTP Basic Authentication with Eureka client 1.1.147

57 kali dilihat
Langsung ke pesan pertama yang belum dibaca

ch...@chrismiles.org

belum dibaca,
2 Jun 2016, 07.18.3002/06/16
kepadaeureka_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

Balas ke semua
Balas ke penulis
Teruskan
0 pesan baru