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

[Spaces] Users able to login to any Space without permissions #25701

Closed
magicpotion opened this issue Nov 15, 2018 · 13 comments
Closed

[Spaces] Users able to login to any Space without permissions #25701

magicpotion opened this issue Nov 15, 2018 · 13 comments
Labels
Feature:Security/Spaces Platform Security - Spaces feature Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!

Comments

@magicpotion
Copy link

Kibana version:
6.5.0

Describe the bug:
Space privileges not working, users can still login to Space they don't have permissions.
I would consider it a critical bug, if you released this feature already.

Expected behavior:
Users will not see Spaces, they don't have permissions for

image

What User see after login:

image

@azasypkin azasypkin added the Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! label Nov 15, 2018
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security

@azasypkin azasypkin added the Feature:Security/Spaces Platform Security - Spaces feature label Nov 15, 2018
@legrego
Copy link
Member

legrego commented Nov 15, 2018

Hey @magicpotion,
I'm not able to reproduce this behavior. Is this user assigned multiple roles? If this user also has the kibana_user role for example, then they will have access to all spaces within Kibana, regardless of what their other roles dictate.

Can you try assigning this user just the one role, and see if that works as you expect?

@magicpotion
Copy link
Author

@legrego
there's only kibana_dashboard_only_user role assigned, if I don't assign any role, user just can't login.
How else should I assign roles for users so they are able to see dashboards, but only in the Space, that they are authorized to use?

Besides, securitywise shouldn't explicitly set privilege None on a Space, take precedence above anything else?

@legrego
Copy link
Member

legrego commented Nov 15, 2018

@magicpotion,

The kibana_dashboard_only_user role always grants the user access to all spaces:
image

How else should I assign roles for users so they are able to see dashboards, but only in the Space, that they are authorized to use?

To create a dashboard-only role that is restricted to a specific space (or spaces):

  1. Create the role as you normally would:
    image
  2. Assign user to that role:
    image
  3. Go to the space you want the user to have access to, and navigate to Advanced Settings. Edit the "Dashboard only roles" to include the new role you created in step 1:
    image
  4. Test by logging in as this new user, and see that they only have access to a single space, in dashboard-only mode:
    image

Besides, securitywise shouldn't explicitly set privilege None on a Space, take precedence above anything else?

Kibana privileges follow an additive security model, which is consistent with our cluster and index privileges. So if a user has two roles granted, one with access to all spaces, and one with access to no spaces, then the user will have access to all spaces. The lack of privileges in one role will not negate the privileges granted by another role.

@magicpotion
Copy link
Author

@legrego ok, it is indeed working as expected. thanks

I don't think this process is very clear though, I'd wish you could improve it.

@kobelb
Copy link
Contributor

kobelb commented Nov 15, 2018

Hey @magicpotion, is it primarily the additive nature of the roles and their privileges that you find confusing, or that kibana_user and kibana_dashboard_only users automatically have access to all created Spaces?

@legrego
Copy link
Member

legrego commented Nov 15, 2018

Great, I'm glad it's working for you! I've opened #25721 so we can improve the documentation around this functionality.

I'm going to close this since everything is working as designed, but feel free to respond if you have more to add to the conversation 👍

@legrego legrego closed this as completed Nov 15, 2018
@magicpotion
Copy link
Author

I think the real problem is that I wasn't aware of the setting dashboard only roles and that I can create such roles, I think it would be useful to at least have a link to it from Edit Role | Kibana, since it's related to roles, or some kind of indication, that such setting exist.

@kobelb
Copy link
Contributor

kobelb commented Nov 15, 2018

@magicpotion that makes sense, thanks for the feedback!

@francisca-lima
Copy link

francisca-lima commented Jan 10, 2019

Hello. I created a new space and defined these settings, however it is not working. In the left bar, not only appears "Dashboard", but everything else. Any idea? Thank you.

@legrego
Copy link
Member

legrego commented Jan 10, 2019

@francisca-lima what roles do you have assigned to your user? Are any of these roles defined as "Dashboard only mode" roles in the Advanced Settings for your particular space?

image

I'd suggest posting in our discussion boards if you need more assistance: https://discuss.elastic.co/c/kibana

@francisca-lima
Copy link

@francisca-lima what roles do you have assigned to your user? Are any of these roles defined as "Dashboard only mode" roles in the Advanced Settings for your particular space?

image

I'd suggest posting in our discussion boards if you need more assistance: https://discuss.elastic.co/c/kibana

The one that I created for this purpose, the my_custom_dashboard_only_role. Any other idea?

@francisca-lima
Copy link

I forgot to set this setting in each space, my bad!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Security/Spaces Platform Security - Spaces feature Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

No branches or pull requests

6 participants