Skip to content

[Connectors] Persist inbound token on a dedicated SO - #290908

Open
yngrdyn wants to merge 2 commits into
elastic:mainfrom
yngrdyn:19171-connectors-dedicated-saved-object-for-inbound-ingest-credentials
Open

[Connectors] Persist inbound token on a dedicated SO#290908
yngrdyn wants to merge 2 commits into
elastic:mainfrom
yngrdyn:19171-connectors-dedicated-saved-object-for-inbound-ingest-credentials

Conversation

@yngrdyn

@yngrdyn yngrdyn commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Closes https://github.com/elastic/security-team/issues/19171).

Summary

Move inbound ingest-token verification off action.config onto a hidden connector_ingress_credential saved object.

The stored value is an HMAC-SHA256 hex digest (not the raw token, not ESO). The public token is {credentialId}.{secret}. The hub loads the credential by id, checks connectorId, and verifies the HMAC. Create/update never mint. Rotate is the only mint path and still returns { ingest_token } once.

Fixes the GA-safety problem of putting a verifier on action.config (Core cannot migrate attributes across SO types).

Why a dedicated SO

  • Hash-on-action.config is not a safe long-term shape.
  • Encrypting a non-replayable digest only adds decrypt cost on every hub POST.
  • connector_token is the wrong sibling: those rows are deleted on connector update. Ingest credentials must survive rename/update.
  • namespaceType: multiple-isolated matches action (same connector id in two spaces must not share a credential).
  • Register the type unconditionally so Saved Objects CI sees it. The feature flag only hides the hub and .inboundWebhook.

Behavior

  • One live credential per connector (random SO id). Rotate creates the new row, then deletes the previous ones (keepCredentialId). Delete failures throw; connector delete does not proceed if cleanup fails.
  • Token prefix is the credential id. Preview tokens that only had config.ingestTokenHash 404.
  • Public GET/create/update/list never return the hash. Export still strips leftover config.ingestTokenHash.
  • Rotate does not remint last-saver apiKey / uiamApiKey.
  • Hub fail-closed: missing/unparseable/wrong token -> 404
  • Type lives on .kibana_alerting_cases, importableAndExportable: false.

@yngrdyn
yngrdyn requested review from a team as code owners September 14, 2026 14:56
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown
🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

@yngrdyn yngrdyn added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting labels Sep 14, 2026
@kibanamachine

kibanamachine commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

💔 Build Failed

Failed CI Steps

Metrics [docs]

✅ unchanged

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants