-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 authenticating to Elasticsearch via service account tokens #102121
Support authenticating to Elasticsearch via service account tokens #102121
Conversation
Pinging @elastic/kibana-security (Team:Security) |
...development/core/server/kibana-plugin-core-server.elasticsearchconfig.serviceaccounttoken.md
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
legrego helped me with getting this tested, in case it helps others:
- clone es into a sibling directory of kibana
- git fetch origin pull/73738/head:pr/73738
- git checkout pr/73738
- cd ../kibana && yarn es source --license trial
Few nits above but overall LGTM. I ran some extra tests with verbose logging to make sure none of this was leaked, didn't have any issues.
We decided today to wait until the |
@elasticmachine merge upstream |
expected head sha didn’t match current head ref. |
@elasticmachine merge upstream |
💚 Build Succeeded
Metrics [docs]History
To update your PR or re-run it, just comment with: cc @legrego |
💔 Backport failed
To backport manually run: |
…lastic#102121) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # src/core/server/elasticsearch/elasticsearch_config.ts
Manual backport to |
Summary
Adds support for authenticating to Elasticsearch via service account tokens.
Service account tokens are
Bearer
style tokens that replace the traditionalusername
/password
based configuration.This PR adds a new
elasticsearch.serviceAccountToken
configuration option, which can be used in place of the traditionalelasticsearch.username
andelasticsearch.password
configuration options.Note I am marking this as
beta
in the docs because the underlying ES APIs are marked asbeta
. This gives us the necessary flexibility to make a breaking change if required (although I do not expect any at this time)This PR must be tested against elastic/elasticsearch#73738, as this contains the code necessary to grant service account tokens with the necessary privileges for the
kibana-system
service account.Once Elasticsearch is up and running, issue the following API call as the
elastic
user to generate a service account token:You will receive a token in the response. This token should be used in your
kibana.yml
:Checklist