Commit Graph

21 Commits (dcdb423ef4090113975ba5995f80744ad68868d6)

Author SHA1 Message Date
David Eads e8a703b651 allow */subresource in rbac policy rules 2017-10-16 16:17:51 -04:00
Monis Khan 5eb5b3e402
Correct APIGroup for RoleBindingBuilder Subjects
This change corrects RoleBindingBuilder to use the RBAC API group
with users and groups as subjects (service accounts use the empty
string since they are in the legacy core group).  This is based on
the defaulting in pkg/apis/rbac/v1/defaults.go#SetDefaults_Subject.
This is required because the bootstrap RBAC data is built with these
helpers and does not go through defaulting, whereas the data
retrieved from the server has already gone through defaulting.  This
can lead to the reconciliation code incorrectly adding duplicate
subjects because it believes that they are missing (since the API
groups do not match).

Signed-off-by: Monis Khan <mkhan@redhat.com>
2017-09-30 12:15:43 -04:00
xilabao ece3188507 remove dead code in rbac helper 2017-06-22 17:48:54 +08:00
Kubernetes Submit Queue 78a9e4feba Merge pull request #46375 from deads2k/auth-05-nameprotection
Automatic merge from submit-queue (batch tested with PRs 46456, 46675, 46676, 46416, 46375)

prevent illegal verb/name combinations in default policy rules

Names aren't presented with some kinds of "normal" verbs.  This prevents people from making common mistakes.

@timothysc as I noted in your pull.  This will prevent some classes of errors.
2017-06-03 00:28:53 -07:00
deads2k 5539a6721d prevent illegal verb/name combinations in default policy rules 2017-05-26 12:20:27 -04:00
xilabao 9fe2ef54ba add policy_compact to rbac validation 2017-05-26 13:22:38 +08:00
Jordan Liggitt 67360883bc
Switch to pointer to policy rule, visit and short circuit during authorization 2017-04-20 10:52:53 -04:00
deads2k e24b1c0c25 add namespaced role bindings 2017-02-28 13:04:23 -05:00
Jordan Liggitt 2a76fa1c8f
Switch RBAC subject apiVersion to apiGroup in v1beta1 2017-02-13 15:33:09 -05:00
Madhusudan.C.S 05a0f64903 Address review comments. 2017-01-30 14:31:15 -08:00
Madhusudan.C.S 4f969bdfc2 Add helpers for creating an RBAC RoleBinding. 2017-01-26 20:29:07 -08:00
Clayton Coleman 36acd90aba
Move APIs and core code to use metav1.ObjectMeta 2017-01-17 16:17:18 -05:00
deads2k 6a4d5cd7cc start the apimachinery repo 2017-01-11 09:09:48 -05:00
Jordan Liggitt 8553a8b867
Check in YAML versions of bootstrap roles/rolebindings 2016-12-05 12:03:55 -05:00
Kubernetes Submit Queue 15fa210056 Merge pull request #36217 from xilabao/get-detail-about-rolebinding
Automatic merge from submit-queue

add kubectl get rolebindings/clusterrolebindings -o wide

Use "-o wide" to get more information of roleRef/subjects
`kubectl get rolebindings -o wide`

|NAME | AGE | ROLE | USERS | GROUPS | SERVICEACCOUNTS|
|:-------|:-------|:-------|:-------|:-------|:-------|
|admin-resource-binding |1s | Role/admin-resource-role | test | | |


`kubectl get clusterrolebindings -o wide`

|NAME|AGE|ROLE|USERS|GROUPS|SERVICEACCOUNTS|
|:-------|:-------|:-------|:-------|:-------|:-------|
|cluster-admin|27s|cluster-admin| |system:masters| |
|system:basic-user|27s|system:basic-user| |system:authenticated, system:unauthenticated | |
|system:controller:replication-controller|27s|system:controller:replication-controller | | |kube-system/replication-controller|
|system:discovery |27s|system:discovery| |system:authenticated, system:unauthenticated| |
2016-12-01 07:52:11 -08:00
Clayton Coleman 35a6bfbcee
generated: refactor 2016-11-23 22:30:47 -06:00
xilabao 93be603d8f add kubectl get rolebindings/clusterrolebindings -o wide 2016-11-08 16:19:57 +08:00
deads2k 467b7d928f add clusterrolebindings to bootstrapping 2016-10-10 15:00:35 -04:00
deads2k b330b0a220 start creating controller SA roles. start with just one 2016-09-26 09:31:36 -04:00
deads2k 1943d256d2 make rbac authorizer use rule comparison, not covers 2016-09-16 15:53:42 -04:00
deads2k 8c788233e7 change rbac roleref type 2016-09-09 09:55:51 -04:00