Skip to content
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 kibana-presentation #198329

Merged

Conversation

kibanamachine
Copy link
Contributor

@kibanamachine kibanamachine commented Oct 30, 2024

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:

router.get({
  path: '/api/path',
  ...
}, handler);

After migration:

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.
  4. 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.

@kibanamachine kibanamachine requested a review from a team as a code owner October 30, 2024 13:08
@kibanamachine kibanamachine added enhancement New value added to drive a business result Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas release_note:skip Skip the PR/issue when compiling release notes Feature:Security/Authorization Platform Security - Authorization backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Authz: API migration labels Oct 30, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-presentation (Team:Presentation)

@nickpeihl nickpeihl requested a review from a team December 17, 2024 15:51
Copy link
Contributor

@ThomThomson ThomThomson left a comment

Choose a reason for hiding this comment

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

opt-out reasons LGTM! The only one I am slightly concerned about is the options list cluster settings route, but the only piece of config it returns is the allowExpensiveQueries setting, which is quite unimportant. Additionally, this is tracked in #200779

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@ThomThomson ThomThomson merged commit 65a75ff into main Dec 19, 2024
8 checks passed
@ThomThomson ThomThomson deleted the authz-migration/unauthorized-routes-by-kibana-presentation branch December 19, 2024 20:24
@kibanamachine
Copy link
Contributor Author

Starting backport for target branches: 8.x

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

kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Dec 19, 2024
…lastic#198329)

Migrates unauthorized routes owned by the Presentation team to a new security configuration.

(cherry picked from commit 65a75ff)
@kibanamachine
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.x

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

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Dec 19, 2024
…ation (#198329) (#205006)

# Backport

This will backport the following commits from `main` to `8.x`:
- [Unauthorized route migration for routes owned by kibana-presentation
(#198329)](#198329)

<!--- 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-12-19T20:24:23Z","message":"Unauthorized
route migration for routes owned by kibana-presentation
(#198329)\n\nMigrates unauthorized routes owned by the Presentation team
to a new security
configuration.","sha":"65a75ffcb733306cddaf0955e00f6273c9051f73","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["enhancement","Team:Presentation","release_note:skip","Feature:Security/Authorization","v9.0.0","backport:prev-minor","Authz:
API migration"],"title":"Unauthorized route migration for routes owned
by
kibana-presentation","number":198329,"url":"https://github.com/elastic/kibana/pull/198329","mergeCommit":{"message":"Unauthorized
route migration for routes owned by kibana-presentation
(#198329)\n\nMigrates unauthorized routes owned by the Presentation team
to a new security
configuration.","sha":"65a75ffcb733306cddaf0955e00f6273c9051f73"}},"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/198329","number":198329,"mergeCommit":{"message":"Unauthorized
route migration for routes owned by kibana-presentation
(#198329)\n\nMigrates unauthorized routes owned by the Presentation team
to a new security
configuration.","sha":"65a75ffcb733306cddaf0955e00f6273c9051f73"}}]}]
BACKPORT-->
stratoula pushed a commit to stratoula/kibana that referenced this pull request Jan 2, 2025
…lastic#198329)

Migrates unauthorized routes owned by the Presentation team to a new security configuration.
benakansara pushed a commit to benakansara/kibana that referenced this pull request Jan 2, 2025
…lastic#198329)

Migrates unauthorized routes owned by the Presentation team to a new security configuration.
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 13, 2025
…lastic#198329)

Migrates unauthorized routes owned by the Presentation team to a new security configuration.
viduni94 pushed a commit to viduni94/kibana that referenced this pull request Jan 23, 2025
…lastic#198329)

Migrates unauthorized routes owned by the Presentation team to a new security configuration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Authz: API migration backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) enhancement New value added to drive a business result Feature:Security/Authorization Platform Security - Authorization release_note:skip Skip the PR/issue when compiling release notes Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas v8.18.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants