-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
RBAC Design Doc #620
Comments
Are you already working on this? is there some wip I can take a look at? is there an estimated time for this to land in master? |
Feedback from Ev:
This will allow us to retain admin access even in case if auth server is down. |
@tehsis see ablove, this is slowly getting into shape |
Some questions on this:
|
See my answers below:
Yes
No, they will get fetched by nodes automatically from the auth service
If by static you mean the ones present in configs then yes
No, but you will be able to have a user that is assigned multiple roles at once, in this case the resulting role will be computed using union method.
In this case more permissive attribute will take over - you can always restrict it back by removing the role from this user. |
@tehsis hey Pablo, can you help me out trying out Auth0 with OIDC? I'm having trouble setting up OIDC with Auth0. I'm getting error when trying verify JWT signature: The signature in JWT token does not match fetched public key. Here's my OIDC config:
Is there anything I'm missing ? Can you post OIDC config that worked for you?> |
map OIDC scopes to roles, implements #620
@klizhentas shall I close this? |
all implemented, closing. |
Nitpick: does the OIDC connector mapping in the example actually work? When I read it, my heart almost skipped a beat. As far as I know, Google's tokens don't support any kind of group membership claims. :-( |
@therc Google's OIDC does not support any custom membership claims, however we are going to demo the workaround that uses identity federation + some simple plugins to inject custom claims in OIDC for google or github |
Question if anyone is watching this thread still? Was |
@vancluever this did not end up in static config, but you can try out alpha |
although we don't recommend to use alpha in production. |
@klizhentas thanks! I'm mainly looking for a way to ensure that OIDC users get auto-added in a way that I can control access purely thru configuration, so command line is not necessarily what I'm looking for here. Although bootstrapping the roles via config is something that I may play with, as I could see there being a path to doing that on startup of the service. |
@klizhentas I think I got a pattern here to pre-loading roles via Question: how volatile do you think (not expecting any guarantees of course) the rolespec, or
|
@vancluever I will let @klizhentas to answer your questions, but it looks to me you're missing one aspect of Teleport design: [1] Supported backends for storing secrets (including roles) are: BoltDB, directory, etcd and DynamoDB. |
@kontsevoy yeah I get the fact that it's a database operation, but what I'm looking for (as what was originally implied from the design doc here) is the ability to completely control the configuration of Teleport, including its auth roles, via configuration. Having the ability to automate the upsert of roles from a static configuration means that I can maintain roles in configuration management, along with the Teleport configuration at large save pertinent sensitive information such as registration tokens and OAuth access info. Given that the use case I'm targeting is OIDC, I think that I could (and would like to) get away with as little manual management as possible. I still plan on using one of the secret backends, and making sure clustering is handled properly, but seeing as an upsert operation is, well, an upsert operation, I don't see too much harm in loading configuration every startup cycle (which hopefully won't be too often). |
Multiple users expressed interest in adding more fine-grained authorization to the Teleport.
This document is a proposal for RBAC - role based access control.
Current State
The Teleport user identity is stored in a certificate as KeyID field and
AllowedLogins
. And the SSH login (AKA "OS login") this user is allowed to assume is translated toValid Principals
in the SSH certificate for SSH compatibility purposes.It is worth noting that we can't use custom user cert extensions to store metadata to keep its certificates compatible with OpenSSH due to this bug
RBAC Proposal
Role
A Role is a collection of permissions.
Role Object
Here's a structure of a role object:
Cluster namespaces
In addition to clusters we are going to introduce namespaces to limit access and visibility for various teams within the same cluster.
Teleport nodes will belong to namespaces, by default teleport node will be provisioned in
default
namespace, however we can provision nodes in different namespace within the same cluster.Sessions and all activity executed on the node within the namespace will be automatically assigned to the same namespace.
Teleport users and roles
Teleport user is assigned to multiple roles.
User object will get new property
roles
with a list of roles assigned to it.Every user will have a default role created and associated with this user only, e.g.
alice
will get role@alice
.If user is assigned multiple roles, resulting permissions set is a union of all roles assigned to the user.
Migration for existing users
Existing users will be migrated to get to auto-generated role:
This means that after the upgrade to new version of teleport with RBAC, there won't be any situation where users will be not assigned to any of the roles, simplifying management.
External users and roles
Let's assume we have an external org "Ops" that wants to get access to database nodes of the org "Bank" for db administration, but nowhere else.
ops
roles
property set toops
:Note that users for external org do not have to sync user entries on the cluster "Bank", however locally, in cluster "Org" they will have to be assigned to the role "ops" to get a certificate signed by certificate authority "ops" and get access.
Changes to the CLI
Adding users
Admins will be able to specify the role when creating new local users.
Also note, that
--logins
flag will be still supported, to maintain backwards compatibility, we can allow using this flag, that will simply update a role associated with this user@bob
Adding roles dynamically
I suggest we allow users to add/update roles via CLI:
we will reuse
upsert
command extending support for other types of objects, e.g. users and certificate authorities.Changes to the configuration
Some roles may be supplied statically for static teleport backend use-case:
Mapping OIDC/OAuth2.0 claims to Roles
We are going to update
OIDC
connectors with special dynamic mappings to map claims to roles defined in the system.Consider the following OIDC connector:
The text was updated successfully, but these errors were encountered: