Skip to content

[ResponseOps][Rules] Add xpack.alerting.rules.apiKeyType config#251899

Merged
umbopepato merged 15 commits intoelastic:mainfrom
umbopepato:516-alerting-uiam-api-key-feature-flag
Feb 9, 2026
Merged

[ResponseOps][Rules] Add xpack.alerting.rules.apiKeyType config#251899
umbopepato merged 15 commits intoelastic:mainfrom
umbopepato:516-alerting-uiam-api-key-feature-flag

Conversation

@umbopepato
Copy link
Copy Markdown
Member

@umbopepato umbopepato commented Feb 5, 2026

📄 Summary

  • Adds validation schemas and docs metadata for the new xpack.alerting.rules.apiKeyType kibana.yml configuration value
  • Reads the config value and makes it accessible as part of the TaskRunnerContext

⏪ Backport rationale

New functionality, no need to backport

🔗 References

Closes https://github.com/elastic/response-ops-team/issues/543

☑️ Checklist

  • The PR description includes the appropriate Release Notes section, and the correct release_note:* label is applied per the guidelines
  • Review the backport guidelines and apply applicable backport:* labels.

@umbopepato umbopepato added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// labels Feb 5, 2026
@umbopepato umbopepato marked this pull request as ready for review February 6, 2026 10:05
@umbopepato umbopepato requested review from a team as code owners February 6, 2026 10:05
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@ersin-erdal ersin-erdal self-requested a review February 6, 2026 14:13
Copy link
Copy Markdown
Contributor

@ersin-erdal ersin-erdal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Works as expected.
Just added a nit.

maxAlerts: number;
ruleTypeRegistry: RuleTypeRegistry;
rulesSettingsService: RulesSettingsService;
apiKeyType: 'es' | 'uiam';
Copy link
Copy Markdown
Contributor

@ersin-erdal ersin-erdal Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we create an enum in the types files and use it where ever we use these strings?

export enum ApiKeyTypes {
  ES = 'es',
  UIAM = 'uiam',
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Absolutely!

usageCounter: this.usageCounter,
getEventLogClient: (request: KibanaRequest) => plugins.eventLog.getClient(request),
isServerless: this.isServerless,
apiKeyType: this.config.rules.apiKeyType ?? 'es',
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enum could be used here too. ApiKeyTypes.ES

@darnautov darnautov added Feature:Alerting Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework labels Feb 6, 2026
Comment thread docs/settings-gen/source/kibana-alert-action-settings.yml Outdated
Comment thread docs/settings-gen/source/kibana-alert-action-settings.yml Outdated
Comment thread docs/settings-gen/source/kibana-alert-action-settings.yml
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
Copy link
Copy Markdown
Member

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the docs, it'll be best to also directly edit this file https://github.com/elastic/kibana/blob/main/docs/reference/configuration-reference/alerting-settings.md as the current "setting generation" yml file is not yet in use to my knowledge

The content I saw in that file LGTM though


- setting: xpack.alerting.rules.apiKeyType
description: |
The API key type to use for execting alerting rules. The default value, corresponding to the existing behavior, is `es`, which uses an ElasticSearch API key.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The API key type to use for execting alerting rules. The default value, corresponding to the existing behavior, is `es`, which uses an ElasticSearch API key.
The API key type to use for executing alerting rules. The default value, corresponding to the existing behavior, is `es`, which uses an Elasticsearch API key.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 6, 2026

🔍 Preview links for changed docs

max: 5
```

`xpack.alerting.rules.apiKeyType` ![logo cloud](https://doc-icons.s3.us-east-2.amazonaws.com/logo_cloud.svg "Supported on {{ech}}")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are not going to support UIAM in ECH, it is only for Serverless. And users won't have access to change these setting.

Copy link
Copy Markdown
Member

@florent-leborgne florent-leborgne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for docs! Thanks

max: 5
```

`xpack.alerting.rules.apiKeyType`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`xpack.alerting.rules.apiKeyType`
`xpack.alerting.rules.apiKeyType` {applies_to}`serverless:` {applies_to}`stack: unavailable`

As discussed on Slack, this should do it

@elasticmachine
Copy link
Copy Markdown
Contributor

elasticmachine commented Feb 6, 2026

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #51 / Discover alerting Search source Alert should check that there are no errors detected after an alert is created
  • [job] [logs] FTR Configs #119 / Discover alerting Search source Alert should check that there are no errors detected after an alert is created
  • [job] [logs] FTR Configs #119 / Discover alerting Search source Alert should check that there are no errors detected after an alert is created
  • [job] [logs] FTR Configs #51 / Discover alerting Search source Alert should check that there are no errors detected after an alert is created

Metrics [docs]

✅ unchanged

History

@umbopepato umbopepato enabled auto-merge (squash) February 9, 2026 08:13
Comment thread docs/reference/configuration-reference/alerting-settings.md
Copy link
Copy Markdown
Contributor

@darnautov darnautov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@umbopepato umbopepato merged commit 01dfb2e into elastic:main Feb 9, 2026
17 checks passed
Dosant pushed a commit to Dosant/kibana that referenced this pull request Feb 9, 2026
…tic#251899)

## 📄 Summary

- Adds validation schemas and docs metadata for the new
`xpack.alerting.rules.apiKeyType` kibana.yml configuration value
- Reads the config value and makes it accessible as part of the
`TaskRunnerContext`

## ⏪ Backport rationale

New functionality, no need to backport

## 🔗 References

Closes elastic/response-ops-team#516

## ☑️ Checklist

- [x] The PR description includes the appropriate Release Notes section,
and the correct `release_note:*` label is applied per the
[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
- [x] Review the [backport
guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)
and apply applicable `backport:*` labels.

---------

Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
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 Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Feature:Alerting release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v9.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants