Skip to content

druid-basic-security Non-coordinator services repeatedly logging JsonMappingException#8692

Merged
jon-wei merged 1 commit intoapache:masterfrom
mohammadjkhan:PR8678
Oct 18, 2019
Merged

druid-basic-security Non-coordinator services repeatedly logging JsonMappingException#8692
jon-wei merged 1 commit intoapache:masterfrom
mohammadjkhan:PR8678

Conversation

@mohammadjkhan
Copy link
Contributor

@mohammadjkhan mohammadjkhan commented Oct 17, 2019

Fixes #8678

Description

Non-coordinator services are repeatedly logging JsonMappingException when using druid-basic-security extension with an authenticator (metadata/ldap) that has no users setup in the metastore.

Fixed the bug ...

Added a check for empty/zero byte array in CoordinatorPollingBasicAuthenticatorCacheManager class' tryFetchUserMapFromCoordinator method before attempting to deserialize


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths.
  • added integration tests.
  • been tested in a test Druid cluster.

Key changed/added classes in this PR
  • Changed/updated CoordinatorPollingBasicAuthenticatorCacheManager.java class' tryFetchUserMapFromCoordinator method

…gException when using druid-basic-security extension with an authenticator that has no users setup
@jon-wei
Copy link
Contributor

jon-wei commented Oct 17, 2019

Can you update the PR title and description to describe the fix, and remove "Issue 8678" from the title? We don't usually refer to the issue numbers in the PR title, it should be referenced by

Fixes #XXXX.

in the PR description.

@mohammadjkhan mohammadjkhan changed the title Issue 8678 Non-coordinator services are repeatedly logging JsonMappin… druid-basic-security Non-coordinator services repeatedly logging JsonMappingException Oct 18, 2019
@mohammadjkhan
Copy link
Contributor Author

@jon-wei Update the PR title and description

Copy link
Contributor

@jon-wei jon-wei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, thanks for the fix

@jon-wei jon-wei merged commit 1ca8595 into apache:master Oct 18, 2019
@mohammadjkhan
Copy link
Contributor Author

@jon-wei Thank you!
@capistrant Thanks for discovering this issue

@jon-wei jon-wei added this to the 0.17.0 milestone Dec 17, 2019
@averma111
Copy link

Please refer this issue and help me

ERROR [qtp1604271704-130] org.apache.druid.security.basic.authentication.validator.LDAPCredentialsValidator - Exception during user lookup #9303

@scrawfor
Copy link
Contributor

Is there a workaround for this? I'm attempting to upgrade our cluster to 0.17 and I'm encountering this issue. I have users set up on 0.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

4 participants