-
Notifications
You must be signed in to change notification settings - Fork 25k
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
Add connector permissions to fleet server service account #112556
Add connector permissions to fleet server service account #112556
Conversation
@elasticmachine merge upstream |
Pinging @elastic/es-security (Team:Security) |
Pinging @elastic/ingestion-team (Team:Search - Extract & Transform) |
Pinging @elastic/ent-search-eng (Team:SearchOrg) |
…zb/elasticsearch into add-connector-permissions-to-fleet
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.
LGTM from the Search team side.
...ity/src/main/java/org/elasticsearch/xpack/security/authc/service/ElasticServiceAccounts.java
Outdated
Show resolved
Hide resolved
...t/src/javaRestTest/java/org/elasticsearch/xpack/security/authc/service/ServiceAccountIT.java
Outdated
Show resolved
Hide resolved
@jakelandis pointed out that we don't need connector secrets, which is the only difference between these too. We don't have a pretty name for the narrower permissions, but we don't need one here. Co-authored-by: Artem Shelkovnikov <lavatroublebubble@gmail.com>
buildkite test this |
## Summary Defines custom permissions for connector package. Note: Wait with merging until elastic/elasticsearch#112556 is merged ### Checklist Delete any items that are not applicable to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios + tested e2e with local ES, fleet server and connectors package --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Sean Story <sean.j.story@gmail.com> Co-authored-by: Artem Shelkovnikov <lavatroublebubble@gmail.com> Co-authored-by: Artem Shelkovnikov <artem.shelkovnikov@elastic.co>
@elasticmachine merge upstream |
Bump @elastic/fleet , would love to get a cursory review from one of y'all before we merge this. |
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.
LGTM 🚀
…2556) * Add connector permissions to fleet server service account * [Security] Add permissions to manage connectors for fleet-server service account * Fix tests * Fix tests * Fix typ again (tm) * switch to connector/* vs manage_connectors @jakelandis pointed out that we don't need connector secrets, which is the only difference between these too. We don't have a pretty name for the narrower permissions, but we don't need one here. Co-authored-by: Artem Shelkovnikov <lavatroublebubble@gmail.com> --------- Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Sean Story <sean.j.story@gmail.com> Co-authored-by: Artem Shelkovnikov <lavatroublebubble@gmail.com>
Changes
Add permissions to
fleet-server
service account to enable running elastic/connectors as an integration.Fleet service service account owns and generates api keys that are used by integrations (components) enrolled in fleet. Connectors are (soon) an integrations that can be deployed in agentless to offer Elastic-managed ingestion story.
There is a corresponding PR in kibana that would grant custom permissions to the
elastic_connectors
package: elastic/kibana#192081Explanation of added permission
manage_connector
rolecluster:admin/xpack/connector/*
- connector service needs to be able to read and write from internal connector indices, there is an ongoing effort to move to this role for connector APIs (see this PR for reference).elastic-connectors*
- this is how we currently manage access to internal connector indices, we need read, write and manage access (for refresh operation), this maps to how this is set up in enterprise-search-server service accountcontent-*
, user can decide on the index name. This corresponds to search- prefix from enterprise-search-server.search-acl-filter-*
- this is a required (and hardcoded in few places) prefix for index storing data related to document-level security logic. If connector index name is e.g.content-google-drive
, its corresponding ACL index will be:.search-acl-filter-content-google-drive
in
enterprise-search-server
we defined index-level permissions to beread,write,manage
, we can be more granual with"read", "write","monitor","create_index","auto_configure","maintenance"
(this would at least prevent deletion of the index)