-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
[Connector APIs] Enforce index prefix for managed connectors #117778
base: main
Are you sure you want to change the base?
[Connector APIs] Enforce index prefix for managed connectors #117778
Conversation
ConnectorStatus status = getConnectorStatusFromSearchResult(connector); | ||
|
||
// If connector was connected already, change its status to CONFIGURED as we need to re-connect | ||
if (status == ConnectorStatus.CONNECTED) { |
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.
I realised we would always set status CONFIGURED
once changing the is_native
flag - it's likely wrong, we got here because I copied logic from Kibana initially https://github.com/elastic/kibana/pull/175536/files
- match: { results.0.id: "connector-a" } | ||
- match: { results.0.index_name: "search-1-test" } | ||
- match: { results.0.language: "pl" } | ||
- match: { results.0.id: "connector-b" } |
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.
content-
index is first alphabetically so order of list API
results changes (we sort by index_name by default)
Pinging @elastic/search-eng (Team:SearchOrg) |
Pinging @elastic/search-extract-and-transform (Team:Search - Extract & Transform) |
Rest compatibility failing because it's not a backward compatible change |
Changes
For
9.x
, Connectors will be deployed in an agentless environment. This means the Fleet service account will now be responsible for generating API keys, enabling the connector to read/write from connector state indices and interact with thecontent
index (where data is synced by connector from the 3rd party data source).To maintain granular permissions and avoid granting the Fleet service account access to all indices (e.g.,
*
), it has been decided to restrict content index names to those prefixed withcontent-*
.This PR introduces restrictions and validations to ensure that Elastic-managed connectors (with
isNative: true
flag) can only attach to indices with thecontent-
prefix. We validate index name on:content-
then update the connector to native connector)Why this is not a significant breaking change for users:
8.x
->9.x
migration, there is a clear migration path for Elastic-managed connectorsAdditionally, the
ConnectorIndexServiceTests
have been unmuted. These tests have been stable for about a year. A few flaky tests had caused them to be muted earlier, but they now run successfully. We need to keep them active.Verification