Skip to content

[ResponseOps][TaskManager] Throw error if using generated encryption key to schedule tasks with user scope#217790

Merged
JiaweiWu merged 3 commits intoelastic:mainfrom
JiaweiWu:issue-216811-disable-api-key-task
May 8, 2025
Merged

[ResponseOps][TaskManager] Throw error if using generated encryption key to schedule tasks with user scope#217790
JiaweiWu merged 3 commits intoelastic:mainfrom
JiaweiWu:issue-216811-disable-api-key-task

Conversation

@JiaweiWu
Copy link
Contributor

@JiaweiWu JiaweiWu commented Apr 10, 2025

Summary

Resolves: #216811

This PR ensures we can only schedule or bulk schedule tasks with API keys if and only if the encryption key is provided (and not auto generated). This PR also contains tests for this.

Checklist

@JiaweiWu JiaweiWu 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// v9.1.0 labels Apr 10, 2025
@JiaweiWu JiaweiWu requested a review from a team as a code owner April 10, 2025 08:33
@elasticmachine
Copy link
Contributor

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

Copy link
Contributor

@ymao1 ymao1 left a comment

Choose a reason for hiding this comment

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

LGTM

@JiaweiWu JiaweiWu added v8.19.0 backport:version Backport to applied version labels and removed backport:skip This PR does not require backporting labels May 7, 2025
@JiaweiWu JiaweiWu enabled auto-merge (squash) May 7, 2025 06:18
@JiaweiWu JiaweiWu merged commit ee81230 into elastic:main May 8, 2025
9 checks passed
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.19

https://github.com/elastic/kibana/actions/runs/14897549139

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #128 / serverless search UI - feature flags Serverless Synonyms Overview Synonyms get started Page should not override existing synonyms set unless specified

Metrics [docs]

✅ unchanged

History

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request May 8, 2025
…key to schedule tasks with user scope (elastic#217790)

## Summary

Resolves: elastic#216811

This PR ensures we can only schedule or bulk schedule tasks with API
keys if and only if the encryption key is provided (and not auto
generated). This PR also contains tests for this.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

(cherry picked from commit ee81230)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label May 12, 2025
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

7 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

4 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

akowalska622 pushed a commit to akowalska622/kibana that referenced this pull request May 29, 2025
…key to schedule tasks with user scope (elastic#217790)

## Summary

Resolves: elastic#216811

This PR ensures we can only schedule or bulk schedule tasks with API
keys if and only if the encryption key is provided (and not auto
generated). This PR also contains tests for this.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

2 similar comments
@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

@kibanamachine
Copy link
Contributor

Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync.
cc: @JiaweiWu

kibanamachine added a commit that referenced this pull request Jun 3, 2025
…yption key to schedule tasks with user scope (#217790) (#220457)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[ResponseOps][TaskManager] Throw error if using generated encryption
key to schedule tasks with user scope
(#217790)](#217790)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Jiawei
Wu","email":"74562234+JiaweiWu@users.noreply.github.com"},"sourceCommit":{"committedDate":"2025-05-08T02:51:26Z","message":"[ResponseOps][TaskManager]
Throw error if using generated encryption key to schedule tasks with
user scope (#217790)\n\n## Summary\n\nResolves:
https://github.com/elastic/kibana/issues/216811\n\nThis PR ensures we
can only schedule or bulk schedule tasks with API\nkeys if and only if
the encryption key is provided (and not auto\ngenerated). This PR also
contains tests for this.\n\n### Checklist\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"ee81230a9fd3e240c685e57d355389888b502638","branchLabelMapping":{"^v9.1.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","backport:version","v9.1.0","v8.19.0"],"title":"[ResponseOps][TaskManager]
Throw error if using generated encryption key to schedule tasks with
user
scope","number":217790,"url":"https://github.com/elastic/kibana/pull/217790","mergeCommit":{"message":"[ResponseOps][TaskManager]
Throw error if using generated encryption key to schedule tasks with
user scope (#217790)\n\n## Summary\n\nResolves:
https://github.com/elastic/kibana/issues/216811\n\nThis PR ensures we
can only schedule or bulk schedule tasks with API\nkeys if and only if
the encryption key is provided (and not auto\ngenerated). This PR also
contains tests for this.\n\n### Checklist\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"ee81230a9fd3e240c685e57d355389888b502638"}},"sourceBranch":"main","suggestedTargetBranches":["8.19"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/217790","number":217790,"mergeCommit":{"message":"[ResponseOps][TaskManager]
Throw error if using generated encryption key to schedule tasks with
user scope (#217790)\n\n## Summary\n\nResolves:
https://github.com/elastic/kibana/issues/216811\n\nThis PR ensures we
can only schedule or bulk schedule tasks with API\nkeys if and only if
the encryption key is provided (and not auto\ngenerated). This PR also
contains tests for this.\n\n### Checklist\n- [x] [Unit or
functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere
updated or added to match the most common
scenarios","sha":"ee81230a9fd3e240c685e57d355389888b502638"}},{"branch":"8.19","label":"v8.19.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Jiawei Wu <74562234+JiaweiWu@users.noreply.github.com>
Co-authored-by: Krzysztof Kowalczyk <krzysztof.kowalczyk@elastic.co>
@kibanamachine kibanamachine removed the backport missing Added to PRs automatically when the are determined to be missing a backport. label Jun 3, 2025
qn895 pushed a commit to qn895/kibana that referenced this pull request Jun 3, 2025
…key to schedule tasks with user scope (elastic#217790)

## Summary

Resolves: elastic#216811

This PR ensures we can only schedule or bulk schedule tasks with API
keys if and only if the encryption key is provided (and not auto
generated). This PR also contains tests for this.

### Checklist
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Platform ResponseOps team (formerly the Cases and Alerting teams) t// v8.19.0 v9.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable support for task manager API keys when ESO is using a generated encryption key

4 participants