Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

connect Elasticsearch with username and password #833

Merged
merged 4 commits into from
Oct 13, 2020

Conversation

linvon
Copy link
Contributor

@linvon linvon commented Oct 12, 2020

What changed?

  1. complete ES config, now the client support connect with username and password
  2. disable sniff, ES may in docker or behind the LB of CloudService, see here

Why?
Elasticsearch is not supported well

How did you test it?
local build and connect to ES on cloud service

Potential risks
Supplementary changes, no risk

Indices map[string]string `yaml:indices` //nolint:govet
URL url.URL `yaml:"url"` //nolint:govet
Username *string `yaml:"username"`
Password *string `yaml:"password"`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even want to support putting passwords to yaml files? A more secure way I think would be to only accept passwords programmatically. Now that we added server options, this can be done elegantly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least our current solution allows password in yaml:
https://github.com/temporalio/temporal/blob/master/common/service/config/config.go#L224

one more thing is accept passwords programmatically requires the user to use our service like lib, while currently users can basically directly use our published docker.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one more thing: the user / pass can be passed in from environment vars: https://github.com/temporalio/temporal/blob/master/docker/config_template.yaml#L32
this is how the secrets were used in my prev company

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. Why *string and not string like on the other cases?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that is true

@linvon could you plz change the *string to string?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I've changed it

@wxing1292 wxing1292 merged commit e30f9f3 into temporalio:master Oct 13, 2020
@sergeybykov
Copy link
Member

Thank you, @linvon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants