You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default RBAC settings for Elafros resources are a mystery to me (K8s defaults).
Most folks manipulating these today are contributors, and therefore typically also cluster admins.
We should provide a reasonable default set of RBAC bindings, but what exactly that is also requires some amount of documentation.
At a minimum, it is expected that the default RBAC would restrict who may create Revision resources, to encourage folks to do so through the Service and Configuration resources instead.
The curated roles for Configurer and Releaser are straightforward in that they look the same but are only applied to the specific resources (Configuration, Route).
The ServiceEditor role is likely implemented similarly, though it's more powerful in that a Service can create and manipulate the underlying resources. Unfortunately, the story of going from "automatic mode" in a Service to "manual mode" (direct control of underlying resources) will require a developer providing new RoleBindings on each component resource (they will also need to have permissions to do so), as there's no inheritance of RBAC policies.
Another open question: do we want a role for Revision viewer separate from the ability to either configure the Service or release a new Revision?
I'm leery of adding a lot of complexity on initial install. Can we limit the roles to 1-2 user-assigned roles, plus whatever "system" roles we need to make the components like our controller, prometheus, ELK, etc?
I expect that most operators who aren't just kicking the tires will probably want to create their own custom roles to grant access to Elafros + whatever other resources in the cluster are appropriate for their development workflow. (For example, "builder" might actually be more popular than any of the compute-related ones.)
My $0.02 is to have a "Developer" role like the following:
kind: RoleapiVersion: rbac.authorization.k8s.io/v1metadata:
name: elafros-developernamespace: defaultrules:
- apiGroups: ["elafros.dev/v1alpha1"]resources: ["service", "build"] + eventing typesverbs: ["get", "watch", "list", "create", "update", "delete"]# Can look under the hood, but don't access directly.
- apiGroups: ["elafros.dev/v1alpha1"]resources: ["*"]verbs: ["get", "watch", "list"]
- apiGroups: ["core.v1"]resources: ["pod", "replicaset", "deployment"]verbs: ["get", "watch", "list"]# Add similar for ELK, Istio, or Prometheus?
Activity
asciimike commentedon Apr 18, 2018
My proposal is as follows:
Editor,Viewer,ServiceEditor,Configurer,Releaser, and (eventually)Builder. I'm open to better names on all of these :)Example:
The curated roles for
ConfigurerandReleaserare straightforward in that they look the same but are only applied to the specific resources (Configuration,Route).The
ServiceEditorrole is likely implemented similarly, though it's more powerful in that aServicecan create and manipulate the underlying resources. Unfortunately, the story of going from "automatic mode" in aServiceto "manual mode" (direct control of underlying resources) will require a developer providing newRoleBindings on each component resource (they will also need to have permissions to do so), as there's no inheritance of RBAC policies.Another open question: do we want a role for
Revisionviewer separate from the ability to either configure theServiceor release a newRevision?evankanderson commentedon Apr 23, 2018
I'm leery of adding a lot of complexity on initial install. Can we limit the roles to 1-2 user-assigned roles, plus whatever "system" roles we need to make the components like our controller, prometheus, ELK, etc?
I expect that most operators who aren't just kicking the tires will probably want to create their own custom roles to grant access to Elafros + whatever other resources in the cluster are appropriate for their development workflow. (For example, "builder" might actually be more popular than any of the compute-related ones.)
My $0.02 is to have a "Developer" role like the following:
mattmoor commentedon Jul 8, 2018
Closing in favor of #1131