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

Elastic registry: allow api-key for authentication #2712

Closed
bodin opened this issue Jul 22, 2021 · 3 comments · Fixed by #2714
Closed

Elastic registry: allow api-key for authentication #2712

bodin opened this issue Jul 22, 2021 · 3 comments · Fixed by #2714
Labels
doc-update A documentation update enhancement A general enhancement registry: elastic An ElasticSearch Registry related issue
Milestone

Comments

@bodin
Copy link
Contributor

bodin commented Jul 22, 2021

Please describe the feature request.
Please allow API keys as an option for authentication into elasticsearch.

Rationale
This allows support for both authentication schemes in elastic and helps remove the need for local users when using SAML/OIDC based user authentication.

Additional context
https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html

To use the generated API key, send a request with an Authorization header that contains an ApiKey prefix followed by the API key credentials. The credentials are a Base64-encoded string in UTF-8 format that you create by combining the id and api_key with a colon (:). For example:

curl -H "Authorization: ApiKey <credentials>" http://localhost:9200/_cluster/health\?pretty
@bodin bodin added the enhancement A general enhancement label Jul 22, 2021
@jonatan-ivanov jonatan-ivanov added the registry: elastic An ElasticSearch Registry related issue label Jul 22, 2021
@jonatan-ivanov
Copy link
Member

jonatan-ivanov commented Jul 22, 2021

@bodin This seems like a relatively simple and valuable change to me.
Would you like to help us out and add this functionality? We can help with the changes if you need some.

@jonatan-ivanov jonatan-ivanov added the help wanted An issue that a contributor can help us with label Jul 22, 2021
@jonatan-ivanov jonatan-ivanov added this to the 1.8 tentative milestone Jul 22, 2021
@bodin
Copy link
Contributor Author

bodin commented Jul 22, 2021

Happy to provide a PR - I will push it up in the next day or so.

bodin added a commit to bodin/micrometer that referenced this issue Jul 23, 2021
@shakuzen shakuzen removed the help wanted An issue that a contributor can help us with label Oct 14, 2021
@shakuzen shakuzen modified the milestones: 1.8 tentative, 1.8.0-RC1 Oct 14, 2021
@shakuzen
Copy link
Member

New method added to ElasticConfig for configuring API key authentication: apiKeyCredentials.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc-update A documentation update enhancement A general enhancement registry: elastic An ElasticSearch Registry related issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants