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

Create a role with full API permissions by default. #1277

Closed
bmicklea opened this issue Dec 2, 2016 · 15 comments
Closed

Create a role with full API permissions by default. #1277

bmicklea opened this issue Dec 2, 2016 · 15 comments

Comments

@bmicklea
Copy link
Contributor

bmicklea commented Dec 2, 2016

Problem
Today a Codenvy admin can't directly control a user's workspace/projects/machines until that user grants the admin the permission to do so. This means that by default admins can't fully control the system.

Use Cases

  1. In most large organizations system administration follows a linux user style model where there is a role that has ultimate power (the super-admin or "root" user). This is what people expect and allows them to take charge of the system in the event that there is an incident and fix or change anything that is needed to restore service when workspace owners may not be available.

  2. In white label / OEM situations this is often a critical requirement to the integration. For example, Codenvy may be a part of a larger system and its workspace behavior may need to be changed in response to events outside. Having a super-admin account makes complex, automated relationships between the Codenvy and the other system possible.

  3. There are secure / regulated environments where the existence of a super-admin user may not be allowed. In these cases the customer needs a way to disable the super-admin account.

Requirements

  • Either we should grant the existing admin role in Codenvy full rights to all workspaces/projects/machines by default, or we should create a new super-admin role that has those rights.
  • There must be a way to enable and disable this super-admin role, ideally without system restart.
  • Document this role so that users understand what it can do and why it should be carefully guarded.
@bmicklea
Copy link
Contributor Author

bmicklea commented Dec 2, 2016

@skabashnyuk - I'm not sure if this role should be enabled or disabled by default. What are your thoughts?

Also this came up with an OEM customer because they were trying to operate on a user's workspace, but the same issue could exist for project, machines and maybe other parts of the model too.

@skabashnyuk
Copy link
Contributor

role with full API permissions is wrong way I think. We should only give user permissions depends on his role.
Is there any practical use case you are trying to solve?

@bmicklea
Copy link
Contributor Author

bmicklea commented Dec 2, 2016

Yes, I'm not suggesting that all roles have full permissions, but we need one role that either defaults to full permissions or can easily be granted full permissions. The use cases are in the description but imagine a scenario where something is going wrong with a codenvy install and an admin needs to stop a bunch of user workspaces, add RAM to them all and restart them. Right now I think that would require all of those workspace owners to grant the admin permission to do that but if there are 600 workspace owners that's a lot of people to chase down...

Another example is an OEM where we are part of an online training solution - the training solution may have a 2 hour timeout for each "free class" but paid classes have no timeouts. There needs to be a way for the training solution outside Codenvy to shut down workspaces when free class workspaces get to the 2 hour timeout.

If you want to have a call and discuss let me know.

@skabashnyuk
Copy link
Contributor

stop a bunch of user workspaces

User with role manageSystem is able to do that

, add RAM to them all

@sleshchenko wdyt ?

restart them

Not sure it's good idea. @sleshchenko @gazarenkov wdyt?

@bmicklea
Copy link
Contributor Author

bmicklea commented Dec 2, 2016 via email

@gazarenkov
Copy link

In general, I do not think Linux root user is a person who should be able to do anything, it is very simplified view which rather the case of smaller organization which do not really care about fine grained permission access or temporarily when you want to just make it work.
I suppose latter ("just to make it work for demo" :) ) is the motivation for this requirement.

What I am saying is that the requirement makes sense but definitely can not be taken as a "best practice" to apply everywhere. That is why we totally reworked access permission model for C4.

Actually we do not prevent any of scenarios by model, it is very flexible.
It assumes fine grained permissions which potentially can be applied to user individually, to a group of users.
We do not have the notion of "role" in the core model but this citizen can be added (Role is a predefined group of Permissions) to simplify management experience - we assumed this when designed the model.
The good news here is that these things can be done declaratively and individually per system.
The bad news (but we need to do this anyway) is that it requires additional entities (probably), settings, tools/UI probably.

**What I am saying is that we need to discuss and solve this in complex like:

  • how to define roles (as a set of permission) per-system and what kind of defaults we need to have.
  • how to change UX to make it accept roles along with atomic permissions**
    So, I would redefine the epic in more generic way and consider a time for implementing it (apparentkly should be postponed due to Team project)

@bmicklea
Copy link
Contributor Author

bmicklea commented Dec 3, 2016 via email

@skabashnyuk
Copy link
Contributor

You don't have to. Admin is able to do that we just need UI for that.

@gazarenkov
Copy link

@skabashnyuk if we mess it this way I think we are in trouble.
It looks like if for example the builder of your house automatically obtain the keys from your flat, forever.
Installer should not automatically have this permission. Yes, it should be able to be configured for same person but it must not be hardcoded behaviour, that is different level of access.

@skabashnyuk
Copy link
Contributor

let me rephrase my statemented . User with role systemManager is able to stop any workspace.

@bmicklea
Copy link
Contributor Author

bmicklea commented Dec 3, 2016 via email

@gazarenkov
Copy link

gazarenkov commented Dec 3, 2016

@skabashnyuk better but we will have to change it for real enterprise usecase I am afraid. It should be more fine-grained.
and, yes, it is not a "role", it is "permission"

@gazarenkov
Copy link

"manageWorkspaces" permission should be applied on account (organization) level instead
then this user is able to manage all the org's workspaces

@bmicklea
Copy link
Contributor Author

bmicklea commented Dec 5, 2016 via email

@sleshchenko
Copy link
Contributor

User who has manageSystem permission is able to see workspace configuration by workspace id, get workspaces by user, stop workspace by id.
Created issue to make this feature configurable #1302

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants