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

[8.x] Unauthorized route migration for routes owned by kibana-visualizations,kibana-data-discovery (#198331) #203031

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 8.x:

Questions ?

Please refer to the Backport tool documentation

…s,kibana-data-discovery (elastic#198331)

### 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)

--- EDIT ---

This PR also adds two privileges related to saved query APIs:
`savedQuery:read` and `savedQuery:manage`. These are given by default to
the same roles that already have access to the `query`-type saved
objects.

### **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: Lukas Olson <[email protected]>
Co-authored-by: Matthias Wilhelm <[email protected]>
Co-authored-by: Marta Bondyra <[email protected]>
Co-authored-by: Davis McPhee <[email protected]>
(cherry picked from commit 56c38bc)
@kibanamachine kibanamachine merged commit 8f1d3c6 into elastic:8.x Dec 5, 2024
11 checks passed
@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #74 / EQL execution logic API @ess @serverless Alert Suppression for EQL rules @skipInServerless sequence queries with suppression duration does not suppress alerts outside of duration when query with 3 sequences
  • [job] [logs] FTR Configs #6 / Uptime app with real-world data overview page pagination is cleared when filter criteria changes

Metrics [docs]

✅ unchanged

cc @kibanamachine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants