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

[Fleet] Use Kibana Authz for API authorization #205335

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

nchaulet
Copy link
Member

@nchaulet nchaulet commented Dec 31, 2024

Summary

Resolve #203170

Use Kibana authz instead of having custom logic for Fleet when it's possible. This add the required privileges to the generated open API doc.

Privileges are tested with API integration tests, so I do not think we will introduce a regression or a breaking change with that PR.

It was not possible to migrate all routes as some scenario are not yet supported like a route need (privilege1 AND privilege2) OR (privilege3 AND privilege 4) @legrego do you think it will be possible to support this kind of rules? do you want me to create an issue for that.

Screenshot 2025-01-03 at 8 57 21 AM

Do we want to backport this to 8.x?

nchaulet and others added 11 commits December 31, 2024 10:53
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@nchaulet nchaulet marked this pull request as ready for review January 2, 2025 17:48
@nchaulet nchaulet requested a review from a team as a code owner January 2, 2025 17:48
@nchaulet nchaulet marked this pull request as draft January 2, 2025 17:48
@nchaulet nchaulet added release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting labels Jan 2, 2025
nchaulet and others added 7 commits January 2, 2025 14:01
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@nchaulet nchaulet self-assigned this Jan 3, 2025
@nchaulet nchaulet added the Team:Fleet Team label for Observability Data Collection Fleet team label Jan 3, 2025
@nchaulet nchaulet marked this pull request as ready for review January 3, 2025 14:00
@elasticmachine
Copy link
Contributor

Pinging @elastic/fleet (Team:Fleet)

@legrego
Copy link
Member

legrego commented Jan 3, 2025

It was not possible to migrate all routes as some scenario are not yet supported like a route need (privilege1 AND privilege2) OR (privilege3 AND privilege 4) @legrego do you think it will be possible to support this kind of rules? do you want me to create an issue for that.

@elena-shostak what do you think about this request?

…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@juliaElastic
Copy link
Contributor

Do we want to backport this to 8.x?

Probably not, the previous response schema changes are not backported, we would get a lot of conflicts in backport.

@nchaulet
Copy link
Member Author

nchaulet commented Jan 3, 2025

@elasticmachine merge upstream

@nchaulet nchaulet requested a review from juliaElastic January 3, 2025 15:41
Copy link
Contributor

@juliaElastic juliaElastic left a comment

Choose a reason for hiding this comment

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

LGTM

nchaulet and others added 8 commits January 3, 2025 10:54
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
…t --include-path /api/status --include-path /api/alerting/rule/ --include-path /api/alerting/rules --include-path /api/actions --include-path /api/security/role --include-path /api/spaces --include-path /api/fleet --include-path /api/dashboards --update'
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

cc @nchaulet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Fleet Team label for Observability Data Collection Fleet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Fleet] Convert Fleet roles/permissions to new Kibana authz framework
5 participants