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

Support base64 encoded Api Key #1064

Open
jsvd opened this issue Jan 19, 2022 · 1 comment
Open

Support base64 encoded Api Key #1064

jsvd opened this issue Jan 19, 2022 · 1 comment

Comments

@jsvd
Copy link
Member

jsvd commented Jan 19, 2022

Currently logstash supports the api key in the form of "id:key":

input {
  elasticsearch {
    "api_key" => "TiNAGG4BaaMdaH1tRfuU:KnR6yE41RrSowb0kQ0HWoA" 
  }
}

However, the Elasticsearch output when creating an API Key is:

{
  "id" : "9tPacX4BGhtIQNIMawN9",
  "name" : "my-api-key",
  "api_key" : "hATekzVwRemmgCSxJXcWsw",
  "encoded" : "OXRQYWNYNEJHaHRJUU5JTWF3Tjk6aEFUZWt6VndSZW1tZ0NTeEpYY1dzdw=="
}

Which means a user must compose the "id:key" themselves. Using the encoded form would mean less copy pasting, less errors, and simpler experience.
For backwards compatibility sake we can still support the "id:key" format by detecting if the input has a ":". In this case we can skip the base64 encoding and use the input as is.

@deepak-ritual
Copy link

deepak-ritual commented Jul 11, 2023

Hi, is there an update on this? We are trying to run logstash 8.8.1 in k8s which only supports secrets in the base64 format and we are now being forced to add an additional step to decode it. Same goes for cloud_id as well.

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

No branches or pull requests

4 participants