che icon indicating copy to clipboard operation
che copied to clipboard

No authorization required to use che

Open toorog opened this issue 8 years ago • 4 comments

Description

If you login to che via keycloak you can immediately use che. This means either that there is no authorization at all or that the default permissions applied to each new user are weak and already allowing usage by default.

In my usecase I need to have authorization (or a more restrictive default permission set) in place. A user that is authenticated with keycloak should not immediately (at least not with any additional role) have the permission to access che.

I could not find anything in the documentation how to implement such a scenario. Is it possible to change the default permissions for new users to "none"? Is it possible to have the che permissions as keycloak roles instead?

Reproduction Steps

  1. Sign up in keycloak with a new user
    • Login in keycloak
    • Access che (Works, but should not in my case)

OS and version:
Multiuser Che 6.7.0 @ K8s with Keycloak

toorog avatar Aug 01 '18 13:08 toorog

@toorog what you are asking for is for Che admin to be able to manually approve registered users?

Not sure I know the answer, but what you can do is disable registration which lets Keycloak admin create users manually.

What is your ideal flow?

ghost avatar Aug 02 '18 03:08 ghost

@eivantsov Yes that's exactly what I want to do.

We really have to differentiate here between authorization and authentication. In my scenario keycloak uses Active Directory / LDAP as identity provider. That's why disabling registration (controlling permissions via authentication) won't work.

The ideal flow would be something like this:

  1. User logs in to keycloak with his already exisisting AD account
  2. User gets a permission denied error when accessing che
  3. Administrator adds keycloak-role "che-user" to the user's account in keycloak
  4. User is able to access che

toorog avatar Aug 02 '18 05:08 toorog

@toorog this isn't smth you can do now.

Why can't you control who can access Che via LDAP group? You create a group in LDAP, configure filter in Keycloak, and when you want to add a new Che user, you add it to LDAP group.

ghost avatar Aug 02 '18 06:08 ghost

@toorog I am going to close this issue. There are no immediate plans to change the flow. Once a user is added in Keycloak, such a user can authenticate in Che.

As suggested, you can create LDAP group and manually add users.

ghost avatar Sep 10 '18 11:09 ghost