Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Credentials elasticsearch are ignored in es6 configuration #2896

Closed
shofstee opened this issue Apr 5, 2022 · 3 comments
Closed

Credentials elasticsearch are ignored in es6 configuration #2896

shofstee opened this issue Apr 5, 2022 · 3 comments
Labels
type: bug bugs/ bug fixes

Comments

@shofstee
Copy link
Contributor

shofstee commented Apr 5, 2022

Describe the bug
According to the documentatie you can configure the username and password for the elasticsearch configuration. You can do this by setting conductor.elasticsearch.username and conductor.elasticsearch.password. This works if you're using the elasticsearch 7 configuration, but not when using the elasticsearch 6 configuration

Details
Conductor version: 3.6.1 (build from the main branch)
When conductor.indexing.enabled is enabled and the username and password are set the application crashes with an unauthorized exception when starting.

conductor.indexing.enabled=true
conductor.elasticsearch.version=6
conductor.elasticsearch.url=...
conductor.elasticsearch.username=...
conductor.elasticsearch.password=...

To Reproduce
Steps to reproduce the behavior:

  1. Configure conductor to user elasticsearch with a username and password
  2. Start conductor-server
  3. Watch the logs for Unauthorized error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots

conductor-server  | Caused by: org.elasticsearch.client.ResponseException: method [GET], host [http://es:9200], URI [/_cluster/health?timeout=30s&wait_for_status=yellow], status line [HTTP/1.1 401 Unauthorized]
conductor-server  | Unauthorized
conductor-server  |     at org.elasticsearch.client.RestClient$1.completed(RestClient.java:552) ~[elasticsearch-rest-client-6.8.12.jar!/:6.8.12]
conductor-server  |     at org.elasticsearch.client.RestClient$1.completed(RestClient.java:537) ~[elasticsearch-rest-client-6.8.12.jar!/:6.8.12]
conductor-server  |     at org.apache.http.concurrent.BasicFuture.completed(BasicFuture.java:122) ~[httpcore-4.4.14.jar!/:4.4.14]

Additional context
I fixed it by copying the configuration from com.netflix.conductor.es7.config.ElasticSearchV7Configuration to com.netflix.conductor.es6.config.ElasticSearchV6Configuration concerning username and password. That fixed the problem
0001-Fix-credentials-for-es6.patch.txt

@shofstee shofstee added the type: bug bugs/ bug fixes label Apr 5, 2022
@manan164
Copy link
Contributor

manan164 commented Apr 6, 2022

Hi @shofstee , Fell free to raise the PR to fix this. Thanks.

@shofstee shofstee mentioned this issue Apr 6, 2022
6 tasks
@apanicker-nflx
Copy link
Collaborator

Fixed in #2900

@apanicker-nflx
Copy link
Collaborator

@shofstee Please add your company name to the users list - #2706

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug bugs/ bug fixes
Projects
None yet
Development

No branches or pull requests

3 participants