While authenticaing tasklist using default creds → demo/demo using camunda-tasklist-client-java library. Getting exception in authentication :
Caused by: java.lang.RuntimeException: Unable to authenticate
at io.camunda.common.auth.SimpleAuthentication.retrieveToken(SimpleAuthentication.java:70) ~[java-common-8.4.0.jar:8.4.0]
at io.camunda.common.auth.SimpleAuthentication.getTokenHeader(SimpleAuthentication.java:91) ~[java-common-8.4.0.jar:8.4.0]
Below is the code I’m using
@Bean
public CamundaTaskListClient getTaskClient() throws TaskListException {
SimpleConfig simpleConf = new SimpleConfig();
simpleConf.addProduct(Product.TASKLIST, new SimpleCredential("demo", "demo"));
Authentication auth = SimpleAuthentication.builder().simpleConfig(simpleConf).build();
CamundaTaskListClient client = CamundaTaskListClient.builder().taskListUrl("http://localhost:8082")
.shouldReturnVariables().shouldLoadTruncatedVariables().authentication(auth).build();
return client;
}
No, Do you mean installing keycloak and linking it to my self managed env?
Can I do this without it? If not can you please let me know after installing the keycloak, what username password I need to use for taslist simpleAuth??
Hi @Harshdeep_Singh - version 8.0 is a couple years old at this point. It’s possible you have a version mismatch, as that Tasklist client was released around the time 8.3 was released.
There is an issue with the current release of spring-zeebe that is causing issues with simple authentication. It is fixed in spring-zeebe:8.4.2-rc2. Try updating spring-zeebe to 8.4.2-rc2 and see if you still have the problem? It’s possible you might due to the version mismatch though.
Here is a working sample project that one of our consultants put together last week as we were testing your question! We tested it against Camunda 8.4, however …