Open 360build opened 7 months ago
When setting up the opensearch provider it is not possible to use a bearer token and set the flag: insecure = true
insecure = true
`provider "opensearch" { url = "https://localhost:5000"
token = var.opensearch_jwt_token token_name = "Bearer"
insecure = true healthcheck = false }`
Basic auth is working
I would expect that when setting the insecure = true the bearer token is still set as header. When I remove the insecure flag it works.
Link to the code that creates the issue.
The problem is in the if else statement. When setting the insecure flag the tlsHttpClient is always used. It can never go to the tokenHttpClient
tlsHttpClient
tokenHttpClient
[Triage] Thanks @360build, we might need another condition to execute the tokenHttpClient while applying insecure as well. Thanks
insecure
Adding @bbarani @rblcoder @peterzhuamazon for more thoughts.
What is the bug?
When setting up the opensearch provider it is not possible to use a bearer token and set the flag:
insecure = true
How can one reproduce the bug?
`provider "opensearch" { url = "https://localhost:5000"
token = var.opensearch_jwt_token token_name = "Bearer"
insecure = true healthcheck = false }`
Basic auth is working
What is the expected behavior?
I would expect that when setting the
insecure = true
the bearer token is still set as header. When I remove the insecure flag it works.Do you have any additional context?
Link to the code that creates the issue.
The problem is in the if else statement. When setting the insecure flag the
tlsHttpClient
is always used. It can never go to thetokenHttpClient