External Service Task with basic Auth

I have a standalone Camunda instance. There are multiple external task clients subscribing to various topics in a process. I turned on basic auth ( with the filter change in web.xml) and all the external tasks throw “Caused by: java.lang.IllegalStateException: A filter or servlet of the current chain does not support asynchronous operations.”
FYI… Here is how I build the client.
ExternalTaskClient client = ExternalTaskClient.create()
.baseUrl(“http://myhost:8080/engine-rest”)
.asyncResponseTimeout(10000) // long polling timeout
.maxTasks(1)
.addInterceptor(new BasicAuthProvider(“demo”, “demo”)) // Only change made after turning on basic auth
.backoffStrategy(new ExponentialBackoffStrategy(0, 0, 0))
.build();
Is the above the right way to build external task client for a Camunda instance with basic auth turned on?

1 Like

Resolution is in the github project. 2 changes I made that resolved.

  1. Updated external client maven dependency to right version according to https://docs.camunda.org/manual/7.10/user-guide/ext-client/compatibility-matrix/
  2. Added true to basic auth filter in web.xml. I assume this applies to any filter added to the request chain, for async external tasks.