Security

HTTP 401 -- Unauthorized - API connection error after some requests

isa_melo
Observer

I have an error in authentication in the API, I do some authentications successfully, but then it gives an error HTTP 401 -- Unauthorized.

The problem may be that the connection is not closed, but I don't know how I could do it and if this is really the cause of the error.

private void authentication() {

Service.setSslSecurityProtocol(SSLSecurityProtocol.TLSv1);
serviceSplunk = new Service(configMap.getSplunkHost(), configMap.getSplunkPort());
String credentials = configMap.getSplunkUserName() + ":" + configMap.getSplunkPassword();
String basicAuthHeader = Base64.encode(credentials.getBytes());
serviceSplunk.setToken("Basic " + basicAuthHeader);

}

Help me, please!

Labels (4)
0 Karma
Get Updates on the Splunk Community!

.conf24 | Day 0

Hello Splunk Community! My name is Chris, and I'm based in Canberra, Australia's capital, and I travelled for ...

Enhance Security Visibility with Splunk Enterprise Security 7.1 through Threat ...

(view in My Videos)Struggling with alert fatigue, lack of context, and prioritization around security ...

Troubleshooting the OpenTelemetry Collector

  In this tech talk, you’ll learn how to troubleshoot the OpenTelemetry collector - from checking the ...