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

Secure visibility of index-patterns #100974

Closed
woodywalton opened this issue Apr 7, 2021 · 12 comments
Closed

Secure visibility of index-patterns #100974

woodywalton opened this issue Apr 7, 2021 · 12 comments
Labels
Feature:Security/Feature Controls Platform Security - Spaces & Role Mgmt feature controls 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 Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@woodywalton
Copy link

Just the knowledge about the existence of an index-pattern can sometimes be too much information, even though RBAC prevents access of the data within the related indices. Perhaps this requires a new permission type on the ability to list-indices or something similar?

@elasticmachine
Copy link
Contributor

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

@tvernum
Copy link
Contributor

tvernum commented Apr 8, 2021

Do you mean Kibana index patterns, or something else? Can you provide a concrete example?

@woodywalton
Copy link
Author

Hi @tvernum ! Sure thing - and yes I do mean Kibana index-patterns. Let's say that we have a Role called black_speech (this was leftover from a LOTR-themed demo that pretended kibana_sample_data_logs was a protected data set from Mordor):

image

We have a wizard user Gandalf who should be the only one who can read that black_speech data set, and we should definitely keep our hapless Hobbit users from reading it aloud - but unfortunately even our non-wizard users can see the existence of the index and wonder what's in it:

image

We all know how curious Pippin can be and what trouble that gets him into...

image

So it would be cool if we could hide the existence of resources that our users don't have access to.

@woodywalton
Copy link
Author

@derickson for visibility

@derickson
Copy link
Contributor

derickson commented May 28, 2021

@bytebilly @tvernum
Is this something that would only be secured in our security model once we achieve Object level security for kibana inside of a space? @woodywalton , does this even manifest as a problem cross-space?

@woodywalton
Copy link
Author

I think it could be a problem, depending on the customer expectations about whether a user should know about the existence of a data source or not. In the example I outlined it's exposed cross-space, hence why I suggest adding the ability to put security controls on index-patterns like we would for other saved objects.

@tvernum
Copy link
Contributor

tvernum commented May 31, 2021

I'm going to move this to the kibana repository, because I think the solution needs to be driven from there.

Would we prefer to

  1. Apply security to the index pattern as an object. That is, attach some sort of permissions model to an index pattern so that black_speech can be locked down to just Gandalf.
    OR
  2. Automatically determine whether the user has permission to some/all of the underlying indices and only show index patterns that would resolve to an index (Important: I don't think this should mean "an index exists", because that would hide index patterns from everyone if data that was deleted. It should mean "if an index was created for this pattern, would the current user be able to search in it").

@tvernum tvernum transferred this issue from elastic/elasticsearch May 31, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label May 31, 2021
@tvernum tvernum added Feature:Security/Feature Controls Platform Security - Spaces & Role Mgmt feature controls and removed needs-team Issues missing a team label labels May 31, 2021
@botelastic botelastic bot added the needs-team Issues missing a team label label May 31, 2021
@tvernum tvernum added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label May 31, 2021
@elasticmachine
Copy link
Contributor

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

@botelastic botelastic bot removed the needs-team Issues missing a team label label May 31, 2021
@legrego
Copy link
Member

legrego commented May 31, 2021

This is a duplicate of #23294. Closing in favor of the original

@legrego legrego closed this as completed May 31, 2021
@woodywalton
Copy link
Author

Thanks @legrego - sorry for he late response, didn't realize this got closed.

I just did some testing on my same "Minas Tirith" cluster for this... While pushing users through the Spaces construct would work if the Space isn't shared amongst users of differing roles, and it does indeed prevent users from seeing actual data (or selecting indices they don't have access to during index_pattern creation process), it does not prevent the user from seeing index_patterns created within the same Space by another user with a different role.

User aragorn does not have the black_speech role and cannot access that data, but because he shares a Space with user gandalf and he did create that index_pattern, aragorn can see it:

image

@woodywalton woodywalton reopened this Oct 11, 2021
@legrego
Copy link
Member

legrego commented Oct 12, 2021

Hey @woodywalton,

While pushing users through the Spaces construct would work if the Space isn't shared amongst users of differing roles, and it does indeed prevent users from seeing actual data (or selecting indices they don't have access to during index_pattern creation process), it does not prevent the user from seeing index_patterns created within the same Space by another user with a different role.

Yes, I agree. I think the issue I linked above (#23294) describes this requirement, regardless of which Space the user us currently in. Ideally we wouldn't show index patterns Data Views to users who aren't authorized to read any of the underlying indices.

@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 Oct 12, 2021
@woodywalton
Copy link
Author

Thanks again @legrego !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Security/Feature Controls Platform Security - Spaces & Role Mgmt feature controls 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 Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests

5 participants