druid icon indicating copy to clipboard operation
druid copied to clipboard

Set username and pass in headers for HTTP API examples

Open techdocsmith opened this issue 3 years ago • 2 comments

Currently we have user/pass in the URL for some API examples. For example SQL-Based ingestion has:

# curl
curl --location --request POST 'https://<username>:<password>@<your-instance>:<port>/druid/v2/sql/task/' \
...
# python
url = "https://<username>:<password>@<your-instance>:<port>/druid/v2/sql/task/"

OOB Druid has basic auth off, so for cp/paste, I think it might be better to have auth in the headers instead. For example:

#curl
curl --location --request POST 'https://ROUTER_HOST:ROUTER_PORT/druid/v2/sql/task/' \
       --user USER:PASSWORD

techdocsmith avatar Oct 07 '22 01:10 techdocsmith

I would like to work on this @techdocsmith

Karthik781 avatar Oct 09 '22 20:10 Karthik781

Thank you @Karthik781 ! I've assigned it to you.

techdocsmith avatar Oct 10 '22 19:10 techdocsmith