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

Evolving Kibana's authorization model #95513

Open
6 tasks
legrego opened this issue Mar 26, 2021 · 8 comments
Open
6 tasks

Evolving Kibana's authorization model #95513

legrego opened this issue Mar 26, 2021 · 8 comments
Labels
discuss impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:x-large Extra Large Level of Effort Meta Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! unified-security-painpoint Highlights issues that are painpoints as a result of the lack of a unified security model

Comments

@legrego
Copy link
Member

legrego commented Mar 26, 2021

Kibana authorization model was built in a much simpler time. Our needs are growing more sophisticated by the day, and our authorization model has not kept pace with the needs of our solutions.

As a result of these limitations, solution teams have had to implement their own RBAC using our security primitives, which weren't originally designed for such broad consumption. We need to evolve our security model so that solution teams don't need to write their own authorization logic.

Known usages of custom authorization:

  • Connectors
  • Rules
  • Cases

Potential future usages of custom authorization:

  • Alerts
  • Notifications
  • Scheduled reports
  • Background searches?
@legrego legrego added discuss Meta Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! labels Mar 26, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@mikecote
Copy link
Contributor

I updated the description a bit and added a Potential future usages of custom authorization section.

@legrego
Copy link
Member Author

legrego commented Mar 26, 2021

Thanks, @mikecote -- are you aware of the requirements for the potential future usages? That would be really helpful to make sure we're building something that'll actually meet our needs of tomorrow.

@mikecote
Copy link
Contributor

@legrego the main pattern I see for the potential future usages is to have a single saved object type serve multiple features and limit access based on the inherited feature on a per-document basis. I'll put some examples below, but @ppisljar and @Bamieh keep me honest on my speculation:

  • Notifications (speculation): Different features create notifications, and access to those notifications should reflect the user's feature access.
  • Scheduled reports (speculation): Different features create scheduled reports, and access to those reports should reflect the user's feature access.
  • Background searches (speculation): If they are visible outside the user searching, I'm guessing different features would create them, and access to those background searches should reflect the user's feature access.

@ppisljar
Copy link
Member

at the moment we don't plan to make background searches accessible to other users (apart from the one creating it) but i agree that would make a lot of sense with reporting.

@pgayvallet
Copy link
Contributor

(not sure if this is directly related to this issue, but) @legrego following up on #95058 (comment), one other improvement would be to allow plugins to register feature capabilities without being forced to impact the features plugin's codebase.

@legrego
Copy link
Member Author

legrego commented Jun 3, 2021

(not sure if this is directly related to this issue, but) @legrego following up on #95058 (comment), one other improvement would be to allow plugins to register feature capabilities without being forced to impact the features plugin's codebase.

@pgayvallet I think the changes necessary to evolve Kibana's authorization model will require a more robust features implementation, so I expect that we will end up addressing both at the same time

@exalate-issue-sync exalate-issue-sync bot added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Sep 10, 2021
@legrego legrego added loe:x-large Extra Large Level of Effort impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. and removed loe:small Small Level of Effort impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels May 2, 2022
@semd
Copy link
Contributor

semd commented Apr 11, 2024

At the request of @azasypkin, I'll explain the limitation we ran into with the superuser role in Security Solution for serverless:

We set up the Kibana features configuration to register dynamically based on the type of product being used (like Essentials or Complete).

So, some features and action privileges don't get registered in Kibana when using the "Essentials tier," for example. Consequently, we expected the Elasticsearch hasPrivileges API to return false for privileges or actions that don't exist. Since it behaved as expected with regular roles, we streamlined roles and product-level checks based on this assumption.

However, we later found out that hasPrivileges didn't behave the same way for the superuser (or any *) role. This API consistently returned true for the superuser, regardless of whether the action or privilege existed or not.

This was breaking our checks for product features when accessed by these * roles in serverless. So, we initiated a discussion with the security team to address the issue. They explained that this behavior for the superuser role was deliberately implemented to solve another specific problem (though I can't recall which one), and it wasn't feasible to alter this behavior to be consistent with the rest of the roles.

In the end, we implemented a workaround on the Security Solution side by verifying if the privilege or action to check exists in the config object we registered as Kibana features, before calling the hasPrivilege API.

@legrego legrego added the unified-security-painpoint Highlights issues that are painpoints as a result of the lack of a unified security model label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss impact:needs-assessment Product and/or Engineering needs to evaluate the impact of the change. loe:x-large Extra Large Level of Effort Meta Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! unified-security-painpoint Highlights issues that are painpoints as a result of the lack of a unified security model
Projects
None yet
Development

No branches or pull requests

6 participants