[ResponseOps][Rules] Add xpack.alerting.rules.apiKeyType config#251899
[ResponseOps][Rules] Add xpack.alerting.rules.apiKeyType config#251899umbopepato merged 15 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/response-ops (Team:ResponseOps) |
ersin-erdal
left a comment
There was a problem hiding this comment.
LGTM
Works as expected.
Just added a nit.
| maxAlerts: number; | ||
| ruleTypeRegistry: RuleTypeRegistry; | ||
| rulesSettingsService: RulesSettingsService; | ||
| apiKeyType: 'es' | 'uiam'; |
There was a problem hiding this comment.
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',
}
| usageCounter: this.usageCounter, | ||
| getEventLogClient: (request: KibanaRequest) => plugins.eventLog.getClient(request), | ||
| isServerless: this.isServerless, | ||
| apiKeyType: this.config.rules.apiKeyType ?? 'es', |
There was a problem hiding this comment.
enum could be used here too. ApiKeyTypes.ES
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
florent-leborgne
left a comment
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
| 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. |
🔍 Preview links for changed docs |
| max: 5 | ||
| ``` | ||
|
|
||
| `xpack.alerting.rules.apiKeyType`  |
There was a problem hiding this comment.
We are not going to support UIAM in ECH, it is only for Serverless. And users won't have access to change these setting.
florent-leborgne
left a comment
There was a problem hiding this comment.
LGTM for docs! Thanks
| max: 5 | ||
| ``` | ||
|
|
||
| `xpack.alerting.rules.apiKeyType` |
There was a problem hiding this comment.
| `xpack.alerting.rules.apiKeyType` | |
| `xpack.alerting.rules.apiKeyType` {applies_to}`serverless:` {applies_to}`stack: unavailable` |
As discussed on Slack, this should do it
💔 Build Failed
Failed CI StepsTest Failures
Metrics [docs]
History
|
…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>
📄 Summary
xpack.alerting.rules.apiKeyTypekibana.yml configuration valueTaskRunnerContext⏪ Backport rationale
New functionality, no need to backport
🔗 References
Closes https://github.com/elastic/response-ops-team/issues/543
☑️ Checklist
release_note:*label is applied per the guidelinesbackport:*labels.