Skip to content

Conversation

@albertzaharovits
Copy link
Contributor

@albertzaharovits albertzaharovits commented Apr 14, 2022

This introduces a new Security API (_security/profile/_has_privileges) that can be used to verify which Users, given their associated User Profiles (multiple profile uids can be specified in a single request), have the requested privileges.

This is analogous to the existing Has privileges API | Elasticsearch Guide [8.1] | Elastic. It also uses the same format for specifying the privileges to be checked, and should be used in the same situations (ie to run an authorization preflight check or to verify privileges over application resources). However, unlike the existing has privilege API, this can be used to check the privileges of multiple users (not of the currently authenticated one), but the users must have an existing profile, and the response is binary only (has or has not the requested privileges).
Calling this API requires the manage_user_profile cluster privilege.

@albertzaharovits albertzaharovits self-assigned this Apr 14, 2022
@albertzaharovits albertzaharovits added the :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC label Apr 14, 2022
@albertzaharovits
Copy link
Contributor Author

@elasticmachine update branch

@albertzaharovits albertzaharovits requested a review from ywangd May 4, 2022 16:32
@albertzaharovits
Copy link
Contributor Author

ready for another round @ywangd .

Copy link
Member

@ywangd ywangd left a comment

Choose a reason for hiding this comment

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

LGTM thanks for the iterations!

@albertzaharovits albertzaharovits merged commit 3d4234e into elastic:master May 6, 2022
@albertzaharovits albertzaharovits deleted the has-privilege-for-profile branch May 6, 2022 06:54
elasticsearchmachine pushed a commit that referenced this pull request Jun 7, 2022
albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Jun 7, 2022
elasticsearchmachine pushed a commit that referenced this pull request Jun 7, 2022
yml REST test for the profile has privilege API from
#85898.
albertzaharovits added a commit to albertzaharovits/elasticsearch that referenced this pull request Jun 7, 2022
yml REST test for the profile has privilege API from
elastic#85898.
elasticsearchmachine pushed a commit that referenced this pull request Jun 7, 2022
yml REST test for the profile has privilege API from
#85898.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>feature :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants