-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unauthorized route migration for routes owned by obs-ux-management-team #198374
Unauthorized route migration for routes owned by obs-ux-management-team #198374
Conversation
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
…igration/unauthorized-routes-by-obs-ux-management-team
…x-management-team
…x-management-team
…x-management-team
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, i added some API tests !!
…x-management-team
…x-management-team
💚 Build Succeeded
Metrics [docs]
History
|
Starting backport for target branches: 8.x |
…am (elastic#198374) ### Authz API migration for unauthorized routes This PR migrates unauthorized routes owned by your team to a new security configuration. Please refer to the documentation for more information: [Authorization API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization) ### **Before migration:** ```ts router.get({ path: '/api/path', ... }, handler); ``` ### **After migration:** ```ts router.get({ path: '/api/path', security: { authz: { enabled: false, reason: 'This route is opted out from authorization because ...', }, }, ... }, handler); ``` ### What to do next? 1. Review the changes in this PR. 2. Elaborate on the reasoning to opt-out of authorization. 3. Routes without a compelling reason to opt-out of authorization should plan to introduce them as soon as possible. 2. You might need to update your tests to reflect the new security configuration: - If you have snapshot tests that include the route definition. ## Any questions? If you have any questions or need help with API authorization, please reach out to the `@elastic/kibana-security` team. --------- Co-authored-by: Dominique Belcher <[email protected]> Co-authored-by: Shahzad <[email protected]> (cherry picked from commit 0b193ec)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…ent-team (#198374) (#201298) # Backport This will backport the following commits from `main` to `8.x`: - [Unauthorized route migration for routes owned by obs-ux-management-team (#198374)](#198374) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kibana Machine","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-21T22:03:55Z","message":"Unauthorized route migration for routes owned by obs-ux-management-team (#198374)\n\n### Authz API migration for unauthorized routes\r\n\r\nThis PR migrates unauthorized routes owned by your team to a new\r\nsecurity configuration.\r\nPlease refer to the documentation for more information: [Authorization\r\nAPI](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)\r\n\r\n### **Before migration:**\r\n```ts\r\nrouter.get({\r\n path: '/api/path',\r\n ...\r\n}, handler);\r\n```\r\n\r\n### **After migration:**\r\n```ts\r\nrouter.get({\r\n path: '/api/path',\r\n security: {\r\n authz: {\r\n enabled: false,\r\n reason: 'This route is opted out from authorization because ...',\r\n },\r\n },\r\n ...\r\n}, handler);\r\n```\r\n\r\n### What to do next?\r\n1. Review the changes in this PR.\r\n2. Elaborate on the reasoning to opt-out of authorization.\r\n3. Routes without a compelling reason to opt-out of authorization should\r\nplan to introduce them as soon as possible.\r\n2. You might need to update your tests to reflect the new security\r\nconfiguration:\r\n - If you have snapshot tests that include the route definition.\r\n\r\n## Any questions?\r\nIf you have any questions or need help with API authorization, please\r\nreach out to the `@elastic/kibana-security` team.\r\n\r\n---------\r\n\r\nCo-authored-by: Dominique Belcher <[email protected]>\r\nCo-authored-by: Shahzad <[email protected]>","sha":"0b193ec81ed70e1e36cfb824e89d9bf12b7c5b0b","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["enhancement","release_note:skip","Feature:Security/Authorization","v9.0.0","backport:prev-minor","ci:project-deploy-observability","Team:obs-ux-management","Authz: API migration"],"title":"Unauthorized route migration for routes owned by obs-ux-management-team","number":198374,"url":"https://github.com/elastic/kibana/pull/198374","mergeCommit":{"message":"Unauthorized route migration for routes owned by obs-ux-management-team (#198374)\n\n### Authz API migration for unauthorized routes\r\n\r\nThis PR migrates unauthorized routes owned by your team to a new\r\nsecurity configuration.\r\nPlease refer to the documentation for more information: [Authorization\r\nAPI](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)\r\n\r\n### **Before migration:**\r\n```ts\r\nrouter.get({\r\n path: '/api/path',\r\n ...\r\n}, handler);\r\n```\r\n\r\n### **After migration:**\r\n```ts\r\nrouter.get({\r\n path: '/api/path',\r\n security: {\r\n authz: {\r\n enabled: false,\r\n reason: 'This route is opted out from authorization because ...',\r\n },\r\n },\r\n ...\r\n}, handler);\r\n```\r\n\r\n### What to do next?\r\n1. Review the changes in this PR.\r\n2. Elaborate on the reasoning to opt-out of authorization.\r\n3. Routes without a compelling reason to opt-out of authorization should\r\nplan to introduce them as soon as possible.\r\n2. You might need to update your tests to reflect the new security\r\nconfiguration:\r\n - If you have snapshot tests that include the route definition.\r\n\r\n## Any questions?\r\nIf you have any questions or need help with API authorization, please\r\nreach out to the `@elastic/kibana-security` team.\r\n\r\n---------\r\n\r\nCo-authored-by: Dominique Belcher <[email protected]>\r\nCo-authored-by: Shahzad <[email protected]>","sha":"0b193ec81ed70e1e36cfb824e89d9bf12b7c5b0b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198374","number":198374,"mergeCommit":{"message":"Unauthorized route migration for routes owned by obs-ux-management-team (#198374)\n\n### Authz API migration for unauthorized routes\r\n\r\nThis PR migrates unauthorized routes owned by your team to a new\r\nsecurity configuration.\r\nPlease refer to the documentation for more information: [Authorization\r\nAPI](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization)\r\n\r\n### **Before migration:**\r\n```ts\r\nrouter.get({\r\n path: '/api/path',\r\n ...\r\n}, handler);\r\n```\r\n\r\n### **After migration:**\r\n```ts\r\nrouter.get({\r\n path: '/api/path',\r\n security: {\r\n authz: {\r\n enabled: false,\r\n reason: 'This route is opted out from authorization because ...',\r\n },\r\n },\r\n ...\r\n}, handler);\r\n```\r\n\r\n### What to do next?\r\n1. Review the changes in this PR.\r\n2. Elaborate on the reasoning to opt-out of authorization.\r\n3. Routes without a compelling reason to opt-out of authorization should\r\nplan to introduce them as soon as possible.\r\n2. You might need to update your tests to reflect the new security\r\nconfiguration:\r\n - If you have snapshot tests that include the route definition.\r\n\r\n## Any questions?\r\nIf you have any questions or need help with API authorization, please\r\nreach out to the `@elastic/kibana-security` team.\r\n\r\n---------\r\n\r\nCo-authored-by: Dominique Belcher <[email protected]>\r\nCo-authored-by: Shahzad <[email protected]>","sha":"0b193ec81ed70e1e36cfb824e89d9bf12b7c5b0b"}}]}] BACKPORT-->
…am (elastic#198374) ### Authz API migration for unauthorized routes This PR migrates unauthorized routes owned by your team to a new security configuration. Please refer to the documentation for more information: [Authorization API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization) ### **Before migration:** ```ts router.get({ path: '/api/path', ... }, handler); ``` ### **After migration:** ```ts router.get({ path: '/api/path', security: { authz: { enabled: false, reason: 'This route is opted out from authorization because ...', }, }, ... }, handler); ``` ### What to do next? 1. Review the changes in this PR. 2. Elaborate on the reasoning to opt-out of authorization. 3. Routes without a compelling reason to opt-out of authorization should plan to introduce them as soon as possible. 2. You might need to update your tests to reflect the new security configuration: - If you have snapshot tests that include the route definition. ## Any questions? If you have any questions or need help with API authorization, please reach out to the `@elastic/kibana-security` team. --------- Co-authored-by: Dominique Belcher <[email protected]> Co-authored-by: Shahzad <[email protected]>
…am (elastic#198374) ### Authz API migration for unauthorized routes This PR migrates unauthorized routes owned by your team to a new security configuration. Please refer to the documentation for more information: [Authorization API](https://docs.elastic.dev/kibana-dev-docs/key-concepts/security-api-authorization) ### **Before migration:** ```ts router.get({ path: '/api/path', ... }, handler); ``` ### **After migration:** ```ts router.get({ path: '/api/path', security: { authz: { enabled: false, reason: 'This route is opted out from authorization because ...', }, }, ... }, handler); ``` ### What to do next? 1. Review the changes in this PR. 2. Elaborate on the reasoning to opt-out of authorization. 3. Routes without a compelling reason to opt-out of authorization should plan to introduce them as soon as possible. 2. You might need to update your tests to reflect the new security configuration: - If you have snapshot tests that include the route definition. ## Any questions? If you have any questions or need help with API authorization, please reach out to the `@elastic/kibana-security` team. --------- Co-authored-by: Dominique Belcher <[email protected]> Co-authored-by: Shahzad <[email protected]>
…radigm (elastic#203415) ## Summary It fixes elastic#203319 And mostly covered by elastic#198374
Authz API migration for unauthorized routes
This PR migrates unauthorized routes owned by your team to a new security configuration.
Please refer to the documentation for more information: Authorization API
Before migration:
After migration:
What to do next?
Any questions?
If you have any questions or need help with API authorization, please reach out to the
@elastic/kibana-security
team.