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

Fix privileges for predefined roles #72061

Merged
merged 3 commits into from
Apr 23, 2021

Conversation

jkakavas
Copy link
Member

In #71904 we added two new predefined roles, editor and viewer in
elasticsearch. This change adds a missing application privilege to
these roles. This is only needed in 7.x as the behavior has changed
in Kibana, starting 8.0 and this extra privilege is not necessary.

Marking as non-issue as this is not yet released.

In elastic#71904 we added two new predefined roles, editor and viewer in
elasticsearch. This change adds a missing application privilege to
these roles. This is only needed in 7.x as the behavior has changed
in Kibana, starting 8.0 and this extra privilege is not necessary.
@jkakavas jkakavas added >non-issue :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC v7.13.0 labels Apr 22, 2021
@jkakavas jkakavas requested review from legrego and bytebilly April 22, 2021 05:37
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Apr 22, 2021
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@bytebilly bytebilly left a comment

Choose a reason for hiding this comment

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

I left a couple of changes that I think are necessary to make it work properly.

.privileges("read").build() },
.privileges("read").build(),
RoleDescriptor.ApplicationResourcePrivileges.builder()
.application("kibana-.*")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
.application("kibana-.*")
.application("kibana-*")

I think this is the right syntax, given the comment in #71710 (comment) and a chat I had with @legrego

I'll leave to Larry to comment futher.

Copy link
Member Author

Choose a reason for hiding this comment

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

You're probably right, let's wait for @legrego to verify

Copy link
Member

Choose a reason for hiding this comment

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

@jkakavas, @bytebilly's suggestion is the correct syntax: There should not be a . in the application name for "reserved" privileges

.privileges("all").build() },
.privileges("all").build(),
RoleDescriptor.ApplicationResourcePrivileges.builder()
.application("kibana-.*")
Copy link
Contributor

@bytebilly bytebilly Apr 22, 2021

Choose a reason for hiding this comment

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

Suggested change
.application("kibana-.*")
.application("kibana-*")

I think this is the right syntax, given the comment in #71710 (comment) and a chat I had with @legrego

I'll leave to Larry to comment futher.

@jkakavas jkakavas requested a review from bytebilly April 22, 2021 17:44
@jkakavas
Copy link
Member Author

@elasticmachine update branch

Copy link
Contributor

@bytebilly bytebilly left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jkakavas jkakavas merged commit 108b41e into elastic:7.x Apr 23, 2021
jkakavas added a commit to jkakavas/elasticsearch that referenced this pull request Apr 23, 2021
In elastic#71904 we added two new predefined roles, editor and viewer in
elasticsearch. This change adds a missing application privilege to
these roles. This is only needed in 7.x as the behavior has changed
in Kibana, starting 8.0 and this extra privilege is not necessary.
jkakavas added a commit that referenced this pull request Apr 23, 2021
In #71904 we added two new predefined roles, editor and viewer in
elasticsearch. This change adds a missing application privilege to
these roles. This is only needed in 7.x as the behavior has changed
in Kibana, starting 8.0 and this extra privilege is not necessary.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>non-issue :Security/Authorization Roles, Privileges, DLS/FLS, RBAC/ABAC Team:Security Meta label for security team v7.13.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants