Skip to content

Commit

Permalink
Removing extra changes
Browse files Browse the repository at this point in the history
Signed-off-by: Varun Jain <[email protected]>
  • Loading branch information
vibrantvarun committed Jan 3, 2024
1 parent 9de2e6e commit 0be2fb0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.apache.http.ParseException;
import org.apache.http.auth.AuthScope;
import org.apache.http.auth.UsernamePasswordCredentials;
import org.apache.http.client.CredentialsProvider;
import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.apache.http.impl.client.BasicCredentialsProvider;
import org.apache.http.message.BasicHeader;
Expand Down Expand Up @@ -109,9 +110,8 @@ private void configureHttpsClient(final RestClientBuilder builder, final Setting
.orElseThrow(() -> new RuntimeException("user name is missing"));
final String password = Optional.ofNullable(System.getProperty(SYS_PROPERTY_KEY_PASSWORD))
.orElseThrow(() -> new RuntimeException("password is missing"));
final BasicCredentialsProvider credentialsProvider = new BasicCredentialsProvider();
final AuthScope anyScope = new AuthScope(null, -1);
credentialsProvider.setCredentials(anyScope, new UsernamePasswordCredentials(userName, password));
final CredentialsProvider credentialsProvider = new BasicCredentialsProvider();
credentialsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(userName, password));
try {
return httpClientBuilder.setDefaultCredentialsProvider(credentialsProvider)
// disable the certificate since our testing cluster just uses the default security configuration
Expand Down

0 comments on commit 0be2fb0

Please sign in to comment.