Open Queries Regarding OpenSearch JWT Authentication

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): v3.5

Describe the issue:

  1. What is the impact of http_enabled and transport_enabled flag in jwt_auth_domain configuration?
  2. How can I use the Authorization header when accessing dashboards through a browser? I am able to access it using the Authorization header via curl, but when using a browser, I currently have to pass the token as a query parameter. I would like to use the Authorization header instead of the token parameter when accessing dashboards through the browser.

response=$(curl -k https://dashboards.$NAMESPACE.svc.cluster.local:5601$dashbooard_request -H ā€œosd-xsrf: trueā€ -H ā€œContent-type: application/jsonā€ -d ā€˜{ā€œattributesā€: {ā€œtitleā€ : ā€œlog-testā€}}’ -H ā€œAuthorization: Bearer $tokenā€ --write-out ā€˜%{http_code}’ -o $tempfile)

You could use a JWT token inside the URL

https://docker1.pablo.local:5601/goto/0c74539251a21ceb4a9cba38a79ef377?mytoken=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJhZG1pbiIsInJvbGVzIjoiYWRtaW4iLCJpYXQiOjE1MTYyMzkwMjJ9.zeEgRjPg8oRJrfA5iLinbBW-I8-akmfkg3NZAxHIMs8&security_tenant=global

Alternatively, a browser plugin called Mod Header.

1 Like

@shubtiwa Regarding the http_enabled and transport_enabled.

http_enabled enables authentication domain on the HTTP endpoint (9200).
transport_enabled is no longer in use as Transport Client Authentication/Authorization has been deprecated in 2.x

Thanks @pablo . So can I remove transport_enabled` flag from the jwt_auth_configuration since I am using Opensearch version 3.5 ?

@shubtiwa I’ve tested JWT without transport_enabled in config.yml and it runs with no issues.