Add node TLS bootstrapping role

pull/6/head
Jordan Liggitt 2017-01-17 14:31:34 -05:00
parent 685e421b89
commit d11f5a0a20
No known key found for this signature in database
GPG Key ID: 24E7ADF9A3B42012
2 changed files with 35 additions and 0 deletions

View File

@ -223,6 +223,16 @@ func ClusterRoles() []rbac.ClusterRole {
eventsRule(),
},
},
{
// a role to use for bootstrapping a node's client certificates
ObjectMeta: api.ObjectMeta{Name: "system:node-bootstrapper"},
Rules: []rbac.PolicyRule{
// used to check if the node already exists
rbac.NewRule("get").Groups(legacyGroup).Resources("nodes").RuleOrDie(),
// used to create a certificatesigningrequest for a node-specific client certificate, and watch for it to be signed
rbac.NewRule("create", "get", "list", "watch").Groups(certificatesGroup).Resources("certificatesigningrequests").RuleOrDie(),
},
},
{
// a role to use for allowing authentication and authorization delegation
ObjectMeta: api.ObjectMeta{Name: "system:auth-delegator"},

View File

@ -597,6 +597,31 @@ items:
- endpoints
verbs:
- get
- apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRole
metadata:
creationTimestamp: null
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: system:node-bootstrapper
rules:
- apiGroups:
- ""
attributeRestrictions: null
resources:
- nodes
verbs:
- get
- apiGroups:
- certificates.k8s.io
attributeRestrictions: null
resources:
- certificatesigningrequests
verbs:
- create
- get
- list
- watch
- apiVersion: rbac.authorization.k8s.io/v1alpha1
kind: ClusterRole
metadata: