Closed jedrazb closed 2 months ago
Which api key will be used in this case? The one that's specified in the config, right?
@artem-shelkovnikov yeah the default authentication method (whatever comes from the config) will be used.
This is the result of the fact that we don't call the _update_native_connector_authentication
function in the if statement
Which in turns overrides es config api_key used for authentication for this sync job execution.
I think it should be ok just to add extra assertion that _update_native_connector_authentication
never gets called?
Any reason why we shouldn't just remove all vestiges of connector secrets in 9.x? Why make it configurable instead of just removing all that code?
Any reason why we shouldn't just remove all vestiges of connector secrets in 9.x? Why make it configurable instead of just removing all that code?
@seanstory This isa a minimal change that unblocks us short-tem.
Connector secrets are already available in the connector service, CLI, and even through ES APIs for managing them. We should plan for a dedicated initiative to deprecate our current "secrets" for 9.x
@artem-shelkovnikov I addressed your comment to verify if es_config api key is changed in https://github.com/elastic/connectors/pull/2808/commits/897e692ccf480accd127bbfee472256b5ece694d (we are checking if the func that modifies es config is called)
Closes https://github.com/elastic/search-team/issues/8229
For Elastic-managed connectors in agentless we need to disable connector secrets on a service-level.
I added new "internal" option
_use_native_connector_api_keys
that is not documented inconfig.py
, similar to how we handle the_force_allow_native
flag in: https://github.com/elastic/connectors/blob/4e97330803087151952debbdfa35408ff240666d/connectors/preflight_check.py#L192Let me know if this approach work for you!
Verification
I ran the setup e2e and verified that this allows native connectors to run without connector secrets. If flag is not provided to service config the logic defaults it to
True
which is backward compatible option.Checklists
Pre-Review Checklist
config.yml.example
)v7.13.2
,v7.14.0
,v8.0.0
)