camunda-community-hub/camunda-tasklist-client-java

Issue while Authentication in SaaS and Self-Managed

ikomalchauhan opened this issue · 8 comments

Hi Team, Thank you so much for creating the wonderful lib. Its really helpful for the automation process.
I'm facing issue while authentication through self managed as I am receiving multiple 'Set-Cookie'. Also in SaaS authentication its giving me NullPointerException as I provide credentialId and credentialSecret from the console.
Can you guide me on this.

Hi @ikomalchauhan,

Could you tell me your java version, the client version and a list of your dependencies. Authentication is managed with httpclient5 (version 5.1.3) and it could be conflicting with your own dependencies ? If you can share your project with me, I could try to have a look.

Hi @ikomalchauhan,

I've released a new version 1.0.7 that is not relaying on any external library for the authentication. Perhaps you could try and tell me how it goes ?

Hi @chDame,

Thanks for connecting. Please find attachments containing the problem.

auth-error
auth-error-2

while implementing:

public CamundaTaskListClient getTasklistClient(String username, String password) {
		CamundaTaskListClient client = null;

		SaasAuthentication sa = new SaasAuthentication(username, password);

		try {
			client = new CamundaTaskListClient.Builder().authentication(sa)
					.taskListUrl("https://bru-2.tasklist.camunda.io/<address>/").build();
			
			return client;
		} catch (TaskListException e) {
			e.printStackTrace();
		}
		return client;
	}

Hi @ikomalchauhan,

A 404 means that you can't access to https://login.cloud.camunda.io/oauth/token. This URL is publicly accessible and you should certainly look at your network. Could you have a proxy or a firewall blocking it ?

I have update the lib and it work for SaaS. But Self managed is still throwing the error
auth-error-3
:

Could you tell me what is the Camunda version you're using locally? I've tried this client with versions from 8.0.0 to 8.0.3. The error seems to indicate that the graphQL library (apollo) isn't able to read the server response. Could it be that you use some older version ? Or could it be that authentication failed and you're getting an html response instead of the graphql ?

Are you using a local camunda setup with identity and keycloak? If not, you should be able to login on tasklist through such a login page (and SimpleAuthentication will work) ?
image

Note : If you use a local Camunda setup with identity and keycloak, it currently can't work. The process would be the same as for the SaasAuthentication : negotiate a jwt token but this isn't available at the moment on Camunda Tasklist and Operate server sides. It's a known limitation.

Since there is no more activity, do you want to close this issue ?

Thanks Christophe Dame for the help