How to disable www-authenticate protocol?

Viewed 31

We are using Lever integration for developing a connector for one of our Client. While testing we are facing authentication error , the Authentication token is getting expired in every 1 hour , so when the token is expired and if we try to hit any other API it gives status code as 403 Forbidden which is expected but the response returned from Lever side is missing WWW-Authenticate parameter in response header which throws HttpResponseException:

HTTP protocol violation: Authentication challenge without WWW-Authenticate header

We are using Http Client Library.

Is there any way to disable www-authenticate protocol check? Is there any workaround to this error?

Error Log:

{
"timestamp":"15 Jul 2022 14:52:50,960", 
"level":"ERROR", 
"class":"LoginHelper.java:108", 
"requestId":"d725d5d3-0f13-4e9d-ba2c-300ca8885303", 
"details":LogLine{logNamespace=LoginHelper, message=Error sending authentication request due to org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header, logData={RequestVersion=1, RequestId=470150876413-bd5c390c7b3e3ee742c965dd03dab117}} , 
"exceptionTrace":" org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
 at org.eclipse.jetty.client.AuthenticationProtocolHandler$AuthenticationListener.onComplete(AuthenticationProtocolHandler.java:164) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:196) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.ResponseNotifier.notifyComplete(ResponseNotifier.java:188) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.HttpReceiver.terminateResponse(HttpReceiver.java:441) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.HttpReceiver.responseSuccess(HttpReceiver.java:387) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.messageComplete(HttpReceiverOverHTTP.java:316) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.http.HttpParser.handleContentMessage(HttpParser.java:599) ~[jetty-http-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.http.HttpParser.parseContent(HttpParser.java:1669) ~[jetty-http-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1517) ~[jetty-http-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.parse(HttpReceiverOverHTTP.java:172) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.process(HttpReceiverOverHTTP.java:135) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.http.HttpReceiverOverHTTP.receive(HttpReceiverOverHTTP.java:73) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.http.HttpChannelOverHTTP.receive(HttpChannelOverHTTP.java:133) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.http.HttpConnectionOverHTTP.onFillable(HttpConnectionOverHTTP.java:155) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305) ~[jetty-io-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[jetty-io-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:427) ~[jetty-io-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:321) ~[jetty-io-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:159) ~[jetty-io-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) ~[jetty-io-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) ~[jetty-io-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333) ~[jetty-util-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310) ~[jetty-util-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168) ~[jetty-util-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126) ~[jetty-util-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366) ~[jetty-util-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:698) ~[jetty-util-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:804) ~[jetty-util-9.4.18.v20190429.jar:9.4.18.v20190429]
 ... 1 more
Wrapped by: java.util.concurrent.ExecutionException: org.eclipse.jetty.client.HttpResponseException: HTTP protocol violation: Authentication challenge without WWW-Authenticate header
 at org.eclipse.jetty.client.util.FutureResponseListener.getResult(FutureResponseListener.java:118) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.util.FutureResponseListener.get(FutureResponseListener.java:101) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at org.eclipse.jetty.client.HttpRequest.send(HttpRequest.java:683) ~[jetty-client-9.4.18.v20190429.jar:9.4.18.v20190429]
 at com.amazon.sandstonebridge.connector.rest.login.LoginHelper.login(LoginHelper.java:105) ~[SandstoneBridgeRestConnector-1.0.jar:?]
 at com.amazonaws.sandstone.connector.credentials.refresh.provider.AbstractConnectorCredentialsRefreshProvider.login(AbstractConnectorCredentialsRefreshProvider.java:116) ~[SandstoneConnectorCredentialsRefresh-1.0.jar:?]
 at com.amazonaws.sandstone.connector.credentials.refresh.provider.AbstractConnectorCredentialsRefreshProvider.getRefreshedTokens(AbstractConnectorCredentialsRefreshProvider.java:110) ~[SandstoneConnectorCredentialsRefresh-1.0.jar:?]
 at com.amazonaws.sandstone.connector.credentials.refresh.provider.CustomConnectorCredentialsRefreshProvider.refreshAndUpdateSecretsArn(CustomConnectorCredentialsRefreshProvider.java:27) ~[SandstoneConnectorCredentialsRefresh-1.0.jar:?]
 at com.amazonaws.sandstone.connector.credentials.refresh.provider.CustomConnectorCredentialsRefreshProvider.refreshAndUpdateSecretsArn(CustomConnectorCredentialsRefreshProvider.java:16) ~[SandstoneConnectorCredentialsRefresh-1.0.jar:?]
 at com.amazonaws.sandstone.connector.credentials.refresh.handler.ConnectorCredentialsRefreshHandler.refreshAndUpdateSecretsArn(ConnectorCredentialsRefreshHandler.java:91) ~[SandstoneConnectorCredentialsRefresh-1.0.jar:?]
 at com.amazon.sandstonebridge.connector.impl.customconnector.OAuth2CustomConnector.getRefreshedTokens(OAuth2CustomConnector.java:140) ~[SandstoneBridgeConnector-1.0.jar:?]
 at com.amazon.sandstonebridge.connector.impl.customconnector.OAuth2CustomConnector.refresh(OAuth2CustomConnector.java:122) ~[SandstoneBridgeConnector-1.0.jar:?]
 at com.amazon.sandstonebridge.connector.impl.customconnector.OAuth2CustomConnector$AbstractPagedRefreshableIterator.refreshAndGetNextPage(OAuth2CustomConnector.java:245) ~[SandstoneBridgeConnector-1.0.jar:?]
 at com.amazon.sandstonebridge.connector.impl.customconnector.OAuth2CustomConnector$AbstractPagedRefreshableIterator.getNextPage(OAuth2CustomConnector.java:233) ~[SandstoneBridgeConnector-1.0.jar:?]
 at com.amazon.sandstonebridge.connector.generic.AbstractPagedIterator.next(AbstractPagedIterator.java:19) ~[SandstoneBridgeGenericConnector-1.0.jar:?]
 at com.amazonaws.sandstonebridge.worker.handler.AbstractConnectorExecutor.tryNextPage(AbstractConnectorExecutor.java:465) ~[SandstoneBridgeWorkerService-1.0.jar:?]
 at com.amazonaws.sandstonebridge.worker.handler.AbstractConnectorExecutor.execute(AbstractConnectorExecutor.java:367) ~[SandstoneBridgeWorkerService-1.0.jar:?]
 at com.amazonaws.sandstonebridge.worker.handler.ConnectorReadDataExecutor.execute(ConnectorReadDataExecutor.java:44) ~[SandstoneBridgeWorkerService-1.0.jar:?]
 at com.amazonaws.sandstonebridge.worker.handler.ConnectorExecutorRetryHandler.execute(ConnectorExecutorRetryHandler.java:55) ~[SandstoneBridgeWorkerService-1.0.jar:?]
 at com.amazonaws.sandstonebridge.worker.handler.ConnectorExecutionHandler.delegateToConnector(ConnectorExecutionHandler.java:130) ~[SandstoneBridgeWorkerService-1.0.jar:?]
 at com.amazonaws.sandstonebridge.worker.handler.ConnectorExecutionHandler.executeConnector(ConnectorExecutionHandler.java:79) ~[SandstoneBridgeWorkerService-1.0.jar:?]
 at com.amazonaws.sandstonebridge.worker.handler.TaskExecutionHandler.execute(TaskExecutionHandler.java:93) ~[SandstoneBridgeWorkerService-1.0.jar:?]
 at com.amazonaws.sandstonebridge.worker.handler.TaskSubmissionHandler.lambda$submitToExecutorService$0(TaskSubmissionHandler.java:63) ~[SandstoneBridgeWorkerService-1.0.jar:?]
 at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_332]
 at com.amazonaws.sandstonebridge.worker.module.RequestHandlerModule$Log4jContextAwareRunnable.run(RequestHandlerModule.java:375) ~[SandstoneBridgeWorkerService-1.0.jar:?]
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_332]
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_332]
 at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_332]
" }
0 Answers
Related