Skip to content

[8.x] Unauthorized route migration for routes owned by kibana-core (#198333)#199778

Merged
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-198333
Nov 29, 2024
Merged

[8.x] Unauthorized route migration for routes owned by kibana-core (#198333)#199778
kibanamachine merged 1 commit intoelastic:8.xfrom
kibanamachine:backport/8.x/pr-198333

Conversation

@kibanamachine
Copy link
Copy Markdown
Contributor

Backport

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

Questions ?

Please refer to the Backport tool documentation

@kibanamachine kibanamachine self-assigned this Nov 12, 2024
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Nov 12, 2024
@kibanamachine kibanamachine enabled auto-merge (squash) November 12, 2024 12:27
…#198333)

### 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: Jean-Louis Leysens <jeanlouis.leysens@elastic.co>
(cherry picked from commit 763b5de)
@kibanamachine kibanamachine merged commit fc35eca into elastic:8.x Nov 29, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

  • 💚 Build #250314 succeeded f78aec7b6a8214cb25ef77fed25a719b81e6cbda

cc @kibanamachine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants