camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.03k stars 1.53k forks source link

Avoid logging `invalidLdapEntityReturned` error when entity has insufficient authorizations #4293

Open yanavasileva opened 2 months ago

yanavasileva commented 2 months ago

Environment (Required on creation)

Camunda 7.20+ & LDAP plugin

Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket)

LDAP error are logged on loading WebApps welcome page with misleading text LDAP group query returned a group with id null as the group is returned correctly but doesn't have Camunda authorizations instead.

Steps to reproduce (Required on creation)

Observed Behavior (Required on creation)

The following error is logged for each of the user’s groups:

org.camunda.bpm.identity.impl.ldap LDAP-00004 LDAP group query returned a group with id null. This group will be ignored. This indicates a misconfiguration of the LDAP plugin or a problem with the LDAP service. Enable DEBUG/FINE logging for details.

Expected behavior (Required on creation)

No error is logged

Root Cause (Required on prioritization)

invalidLdapEntityReturned error (link) is thrown when a group is not authorized (link and link) even though the LDAP group query returns correct the groups. The same misleading error can be thrown for a user entity too.

Solution Ideas

  1. Thrown a different error when entity (user/group) is not authorized.
  2. Avoid throwing any error when entity is not authorized (behaviour prior 7.20).

Hints

Links

Breakdown

### Pull Requests

Dev2QA handover