Enabling Basic Authentication filter exception on Fetch And Lock

I am having issue when I activate the Authentication filtering
[Configure Authentication | docs.camunda.org](http://Configure Authentication)

RESTEASY003320: Failed processing arguments of public void org.camunda.bpm.engine.rest.impl.FetchAndLockRestServiceImpl.fetchAndLock(org.camunda.bpm.engine.rest.dto.externaltask.FetchExternalTasksExtendedDto,javax.ws.rs.container.AsyncResponse)

I get this error

Any body please help?

Hi @jecabili-dev, can you share the rest of the request you’re making (headers and body)? also, the stacktrace from Camunda? The request is making it to the fetchAndLock code, it doesn’t appear to be related to the authentication filtering…

Here’s my headers @jgigliotti :


body:
image

This is only happens when I enable authentication filtering.

But other services are working fine like this one

Hmmm, nothing is jumping out at me as wrong with your request (I’m able to enable authentication and make the call in my simple reproduction using a similar request payload). Are you in fact using Camunda 7.8? (got that from the docs you linked)

Can you share the rest of your web.xml just for a spot check?

Currently I am using camunda-bpm-tomcat-7.12.0

Here’s my web.xml

web.xml (173.4 KB)

Looking suspiciously like this, what OS and Java version are you using? Like the user in the thread indicated, I’m also using Camunda in a docker container. Trying to reproduce, but not having any luck.

Anything interesting in the stacktrace? Can you share it?

Can you describe your setup and deployment a little more? Maybe share a project on Github? It may assist in establishing a reproduction.

Hi @jgigliotti,

My setup is hosted at AWS EC2 instance running on CentOS 7 with openjdk 11.0.6 and RDS MariaDB for the database.

It’s going to be really hard to help without more info… at the very least some logs from Camunda.

At this point, the only thing that stands out is you’re possibly missing the <init-param> for rest-url-pattern-prefix in your web.xml. I would expect to see the following appear after the <init-param> for authentication-provider that is already included in your web.xml as indicated here in the docs

<init-param>
  <param-name>rest-url-pattern-prefix</param-name>
  <param-value></param-value>
</init-param>

I ran into the same error and found a solution. Posting it here in case it helps someone.

Tomcat log showed the following:

java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations.
		at org.apache.catalina.connector.Request.startAsync(Request.java:1690)
		at org.apache.catalina.connector.Request.startAsync(Request.java:1682)
		at org.apache.catalina.connector.RequestFacade.startAsync(RequestFacade.java:1043)
		at javax.servlet.ServletRequestWrapper.startAsync(ServletRequestWrapper.java:400)
		at org.jboss.resteasy.plugins.server.servlet.Servlet3AsyncHttpRequest$Servlet3ExecutionContext.setupAsyncContext(Servlet3AsyncHttpRequest.java:336)

So, fixed the error by adding the following tag to the offending filter in web.xml:
<async-supported>true</async-supported>