This message was deleted.
# general
s
This message was deleted.
t
h
@Tejas Parbat following this guide will help me setting up password-based authentication for druid
t
👍
yes you can setup basic auth
h
@Tejas Parbat should I enable TLS before beginning with this guide?
Or I can skip the TLS part
t
its upto you , you can try first and then enable TLS
h
can't I enable password-based auth over http?
t
yeah you can enable it .
h
@Tejas Parbat while create authorizer user
Copy code
{
  "error": "Basic authenticator with name [MyBasicMetadataAuthenticator] does not exist."
}
I am getting this error
I updated the same in my properties file
t
can you please paste the API you tried , redact the passwords
h
/druid-ext/basic-security/authentication/db/MyBasicMetadataAuthenticator/users/userA
@Tejas Parbat
t
hope all services are running fine after adding configd , are you able to login to console with admin/password1 Please make sure you are using right API , also modify the ports and https/https as per your env. Listing users:
Copy code
curl -XGET -H'Content-Type: application/json' -uadmin:Pass_From_APISection -k <https://localhost:8281/druid-ext/basic-security/authentication/db/basic/users>

["admin","John"]
Create user:
Copy code
curl -XPOST -H'Content-Type: application/json' -uadmin:Pass_From_APISection -k <https://localhost:8281/druid-ext/basic-security/authentication/db/basic/users/john>
Set password:
Copy code
curl -XPOST -H'Content-Type: application/json' -d @password.json -uadmin:Pass -k <https://localhost:8281/druid-ext/basic-security/authentication/db/{authenticatorName}/users/john/credentials>
password.json:
{
"password": "Imply-123"
}
delete useer:
Copy code
curl -XDELETE -H'Content-Type: application/json' -uadmin:Pass -k <https://localhost:8281/druid-ext/basic-security/authentication/db/basic/users/john>
h
No @Tejas Parbat
I am still not being asked for entering username and password, Inspite of updating the enviroment file (since I am using docker compose)
https://gist.github.com/davidagee/c0c839cd23f047b838e8a3ea73320346 I have updated the
environment
file with load-list and other configuration as mentioned in the shared link
t
did you added extension in load list in common runtime and able to verify configs .
Copy code
"druid-basic-security"
eg
Copy code
druid.extensions.loadList=["druid-basic-security", "druid-histogram", "druid-datasketches", "druid-kafka-indexing-service", "imply-utility-belt"]
h
I am accessing the service on
<EC2 instance IP>:8081
instead of default
8888
yes the load list has been updated with the mentioned extension
@Tejas Parbat
t
it looks like some config issues, may be you can cleanup and give a try once again.
h
Am I using the right port
?
t
default port for router
8888
are you able to access druid console with EC2 instance IP:8888 druid console is hosted by router service and 8081 is coordinator service
h
Does the user-password auth mechanism available when the service is requested from a specific port? To log into the druid console (IP_Add:port) It should ask for username and password
Copy code
# Java tuning
#DRUID_XMX=1g
#DRUID_XMS=1g
#DRUID_MAXNEWSIZE=250m
#DRUID_NEWSIZE=250m
#DRUID_MAXDIRECTMEMORYSIZE=6172m
DRUID_SINGLE_NODE_CONF=micro-quickstart

druid_emitter_logging_logLevel=debug

druid_extensions_loadList=["druid-basic-security","druid-histogram", "druid-datasketches", "druid-lookups-cached-global", "postgresql-metadata-storage", "druid-multi-stage-query", "druid-kafka-indexing-service"]
Are these conf correct @Tejas Parbat?
t
druid console is always accessible on router port 8888 (non ssl) and 9088(ssl port) if ssl enabled
for basic auth we need "druid-basic-security" extension in load list
h
If we look at the link that you shared earlier
then I have followed everything from there expect for enabling TLS
t
yeah that looks good (extension part ) and same sample configs you can paste for testing . but somehow docker is not picking if you are not being asked username/password . also pls make sure if your druid console accessible
h
the properties file ('enviroment file' since I am using docker) has been updated accordingly
yes the console is accessible over internet
that is why I wanted to have an password based mechanism
t
As discussed ,tested druid basic auth with same configs on micro-quickstart and able to configure successfully . Accordingly you can configure with your deployment.