camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.5k stars 481 forks source link

Deploying Model Using Basic Auth (Camunda 7) #3657

Open baalmael opened 1 year ago

baalmael commented 1 year ago

Describe the bug

I know this was possible in earlier versions, but now this feature seems to be missing or is to hard to find.

Expected: I can deploy models using the modeler even when basic auth is enabled for the REST API.

Actual: image -> Credentials do not match with the server. [ deploy-error ]

If this is still possible, the log could explain where to configure the credentials if putting the fields back into the deploy dialogue really is not possible.

Steps to reproduce

  1. Enable Authentication for Camunda REST API
  2. Press Rocket (deploy)
  3. Enter REST endpoint
  4. Press Deploy

Expected behavior

  1. Press Rocket
  2. Credentials can be entered
  3. Deployment works

Environment

Additional context

No response

marstamm commented 1 year ago

Hi @baalmael ,

When adding a URL with authentication enabled, the deploy dialog should detect that authentication is required and add the Authentication options to the dialog.

Recording 2023-06-12 at 15 18 17

The server does have to make a request first to check the endpoint and to verify. Can you confirm that these options do not appear for you, even after waiting for a few moments?

baalmael commented 1 year ago

Hi @marstamm,

thank you! I replicated with a basic camunda engine project and there the feature works as you described. I will look into why our project behaves differently and come back to you.

marstamm commented 1 year ago

Thank you for confirming. I'll close this issue for now, but feel free to reopen it when it is not working as intended

baalmael commented 1 year ago

The issue was, that we had GET whitelisted which is why the modeler did not detect, that authentication is necessary for POST. I suggest using POST (the method that is needed to deploy model or start an instance) to check if authentication is necessary.

Independently I suggest to implement a way to enter authentication if a deploy/start instance request returned 401 (Unauthorized).

marstamm commented 1 year ago

Thank you for getting back and great job on root-causing this! It makes total sense to be able to configure authentication even when only certain resources require authentication.

I'll reopen this ticket and move it into backlog.