Skip to content

[9.4] chore: remove unused native connector secrets code (#4524) - #4576

Merged
Jan-Kazlouski-elastic merged 1 commit into
9.4from
backport/9.4/pr-4524
Oct 7, 2026
Merged

Jan-Kazlouski-elastic merged 1 commit into
9.4from
backport/9.4/pr-4524

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

Backports the following commits to 9.4:

## Part of #2990

#2989 removed `_update_native_connector_authentication()`, the only
place the framework read a connector secret, and set
`native_connector_api_keys_enabled` to False. Several pieces it relied
on were left behind with no remaining callers. This PR removes those:

- `ESManagementClient.get_connector_secret()`
- the `Connector.api_key_secret_id` property
- `ApiKeyNotFoundError` in `sync_job_runner.py`
- `Features.native_connector_api_keys_enabled()` and the
`Features.NATIVE_CONNECTOR_API_KEYS` constant in `connectors_sdk`

Their tests are removed with them, along with a leftover
`native_connector_api_keys_enabled` mock in `test_sync_job_runner.py`.

Nothing here changes what is written to Elasticsearch or what Kibana
sees. The following are deliberately left in place because removing them
would be observable outside the framework, and are for a separate PR if
that is wanted:

- the `native_connector_api_keys` entry in `BaseDataSource.features()`,
which is written into the connector doc
- `create_connector_secret()`, which `connectors connector create
--native` still uses to store an API key and set `api_key_secret_id` on
the connector doc
- `api_key_secret_id` in `docs/CONNECTOR_PROTOCOL.md`

`Features.native_connector_api_keys_enabled()` and
`NATIVE_CONNECTOR_API_KEYS` are public in the published `connectors_sdk`
package. Nothing in this repo uses them, but external code calling them
would break.

Tests: `make lint` and `make test` pass in both `app/connectors_service`
(2504 passed, 92.01% coverage) and `libs/connectors_sdk` (343 passed,
84.21% coverage).

## Checklists

#### Pre-Review Checklist
- [x] this PR does NOT contain credentials of any kind, such as API keys
or username/passwords (double check `config.yml.example`)
- [x] this PR has a meaningful title
- [x] this PR links to all relevant github issues that it fixes or
partially addresses
- [x] Covered the changes with automated tests
- [ ] Tested the changes locally (ran `make lint` and `make test`; not
tested against a live cluster)

## Related Pull Requests

- #2989, which removed the code path these were used by.
- #4523 adds a test next to the ones removed here in
`test_management_client.py`, so whichever merges second will need a
small rebase.

Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions
github-actions Bot requested a review from a team as a code owner October 7, 2026 12:51
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic enabled auto-merge (squash) October 7, 2026 12:54
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic merged commit 216e307 into 9.4 Oct 7, 2026
2 checks passed
@Jan-Kazlouski-elastic
Jan-Kazlouski-elastic deleted the backport/9.4/pr-4524 branch October 7, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants