Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to druid with basic authentication enabled #910

Closed
playsimple opened this issue Jul 22, 2022 · 2 comments
Closed

Unable to connect to druid with basic authentication enabled #910

playsimple opened this issue Jul 22, 2022 · 2 comments

Comments

@playsimple
Copy link

I am unable to connect to our internally hosted druid server which has a basic authentication implemented. Seeing the following error


Settings load timeout (800ms) hit, continuing
Failed to connect to cluster ‘druid’ because: 401 - {“error”:“Unauthorized request”,“errorMessage”:null,“errorClass”:null,“host”:“d7059c4ddb2c”} (will retry in 1ms)
Re-attempting to connect to cluster ‘druid’ (retry 1)

I am trying to connect using the following command

npm run start:dev -- --druid http://druid_system:password2@<ip>:8082/

This is how the configuration looks like for our druid deployment


#
# Authentication
#
druid_auth_authenticatorChain=["MyBasicMetadataAuthenticator"]
druid_auth_authenticator_MyBasicMetadataAuthenticator_type=basic
druid_auth_authenticator_MyBasicMetadataAuthenticator_initialAdminPassword=password1
druid_auth_authenticator_MyBasicMetadataAuthenticator_initialInternalClientPassword=password2
druid_auth_authenticator_MyBasicMetadataAuthenticator_credentialsValidator_type=metadata
druid_auth_authenticator_MyBasicMetadataAuthenticator_skipOnFailure=false
druid_auth_authenticator_MyBasicMetadataAuthenticator_authorizerName=MyBasicMetadataAuthorizer


# Escalator
druid_escalator_type=basic
druid_escalator_internalClientUsername=druid_system
druid_escalator_internalClientPassword=password2
druid_escalator_authorizerName=MyBasicMetadataAuthorizer
# Authorizer
druid_auth_authorizers=["MyBasicMetadataAuthorizer"]
druid_auth_authorizer_MyBasicMetadataAuthorizer_type=basic
@adrianmroz-allegro
Copy link
Contributor

You should use request decorator for passing Basic Auth headers. Look at the example

@adrianmroz
Copy link
Collaborator

Reopen if request decorator is not sufficient for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants