k3s/hack
Kubernetes Submit Queue 5995690396 Merge pull request #46076 from liggitt/node-authorizer
Automatic merge from submit-queue

Node authorizer

This PR implements the authorization portion of https://github.com/kubernetes/community/blob/master/contributors/design-proposals/kubelet-authorizer.md and kubernetes/features#279:
* Adds a new authorization mode (`Node`) that authorizes requests from nodes based on a graph of related pods,secrets,configmaps,pvcs, and pvs:
  * Watches pods, adds edges (secret -> pod, configmap -> pod, pvc -> pod, pod -> node)
  * Watches pvs, adds edges (secret -> pv, pv -> pvc)
  * When both Node and RBAC authorization modes are enabled, the default RBAC binding that grants the `system:node` role to the `system:nodes` group is not automatically created.
* Tightens the `NodeRestriction` admission plugin to require identifiable nodes for requests from users in the `system:nodes` group.

This authorization mode is intended to be used in combination with the `NodeRestriction` admission plugin, which limits the pods and nodes a node may modify. To enable in combination with RBAC authorization and the NodeRestriction admission plugin:
* start the API server with `--authorization-mode=Node,RBAC --admission-control=...,NodeRestriction,...`
* start kubelets with TLS boostrapping or with client credentials that place them in the `system:nodes` group with a username of `system:node:<nodeName>`

```release-note
kube-apiserver: a new authorization mode (`--authorization-mode=Node`) authorizes nodes to access secrets, configmaps, persistent volume claims and persistent volumes related to their pods.
* Nodes must use client credentials that place them in the `system:nodes` group with a username of `system:node:<nodeName>` in order to be authorized by the node authorizer (the credentials obtained by the kubelet via TLS bootstrapping satisfy these requirements)
* When used in combination with the `RBAC` authorization mode (`--authorization-mode=Node,RBAC`), the `system:node` role is no longer automatically granted to the `system:nodes` group.
```

```release-note
RBAC: the automatic binding of the `system:node` role to the `system:nodes` group is deprecated and will not be created in future releases. It is recommended that nodes be authorized using the new `Node` authorization mode instead. Installations that wish to continue giving all members of the `system:nodes` group the `system:node` role (which grants broad read access, including all secrets and configmaps) must create an installation-specific ClusterRoleBinding.
```

Follow-up:
- [ ] enable e2e CI environment with admission and authorizer enabled (blocked by kubelet TLS bootstrapping enablement in https://github.com/kubernetes/kubernetes/pull/40760)
- [ ] optionally enable this authorizer and admission plugin in kubeadm
- [ ] optionally enable this authorizer and admission plugin in kube-up
2017-05-30 22:42:54 -07:00
..
boilerplate
cmd/teststale
e2e-internal Split federation-{up,down} from e2e-{up,down}. 2017-02-24 14:27:31 -08:00
gen-swagger-doc update url information to prevent http 304 redirection 2017-05-25 14:05:02 +08:00
jenkins Export patch files to artifacts 2017-03-25 12:16:50 -07:00
lib Add networking.k8s.io v1 API, with NetworkPolicy 2017-05-28 10:11:01 -04:00
make-rules move CRD from alpha to beta 2017-05-30 07:57:26 -04:00
testdata Remove vestiges of defaulting from conversion path, switch to top-level default registration only 2017-04-12 13:36:15 -04:00
verify-flags Merge pull request #46461 from ncdc/e2e-suite-metrics 2017-05-30 16:41:49 -07:00
.linted_packages Add PV util for extracting referenced secrets 2017-05-30 15:12:30 -04:00
BUILD Add verify-gofmt as a Bazel test. 2017-02-10 17:00:28 -08:00
OWNERS Merge pull request #45996 from cblecker/hack-owner 2017-05-19 16:06:27 -07:00
autogenerated_placeholder.txt
benchmark-go.sh
build-cross.sh
build-go.sh
build-ui.sh move swagger route to apiserver 2017-02-01 15:18:32 -05:00
cherry_pick_pull.sh
dev-build-and-push.sh
dev-build-and-up.sh
dev-push-hyperkube.sh
e2e-node-test.sh
e2e.go return nil when err is nil 2017-05-27 14:34:45 +08:00
e2e_test.go hack/e2e_test.go's tester shouldn't stat files from the future 2017-02-15 15:59:47 -08:00
federated-ginkgo-e2e.sh Default FEDERATION_KUBE_CONTEXT to FEDERATION_NAME in federation e2e up/down scripts. 2017-04-05 18:47:03 -07:00
generate-bindata.sh Adding an installer script that installs Nvidia drivers in Container Optimized OS 2017-05-20 21:17:19 -07:00
generate-docs.sh Move .generated_docs to docs/ so docs OWNERS can review / approve 2017-02-16 10:11:57 -08:00
get-build.sh
ginkgo-e2e.sh e2e test: test azure disk volume 2017-04-28 18:51:34 +00:00
godep-restore.sh hack/godep-restore.sh: use godep v79 which works 2017-03-12 18:43:10 +01:00
godep-save.sh wire new staging repo 2017-05-02 08:43:31 -04:00
grab-profiles.sh
install-etcd.sh
list-feature-tests.sh
local-up-cluster.sh Add Node authorization mode based on graph of node-related objects 2017-05-30 16:53:03 -04:00
lookup_pull.py update url information to prevent http 304 redirection 2017-05-25 14:05:02 +08:00
print-workspace-status.sh Use munged semantic version for side-loaded docker tag 2017-04-27 15:05:40 -07:00
run-in-gopath.sh
test-cmd.sh
test-go.sh
test-integration.sh hack/test-integration.sh: provide a recommended command and exit 2017-02-17 08:44:49 -08:00
test-update-storage-objects.sh Support storageclass storage upgrades to v1 2017-05-24 10:43:56 -04:00
update-all.sh Add update-federation-* scripts to update-all.sh 2017-05-15 16:51:09 -07:00
update-api-reference-docs.sh
update-bazel.sh Update gazel to v17 2017-04-27 15:01:34 -07:00
update-codecgen.sh Add internal audit API types 2017-05-18 10:30:21 -07:00
update-codegen.sh wire new staging repo 2017-05-02 08:43:31 -04:00
update-federation-api-reference-docs.sh
update-federation-generated-swagger-docs.sh
update-federation-openapi-spec.sh Fix hack/update-federation-openapi-spec.sh flakyness 2017-05-19 15:39:08 -07:00
update-federation-swagger-spec.sh
update-generated-docs.sh Move .generated_docs to docs/ so docs OWNERS can review / approve 2017-02-16 10:11:57 -08:00
update-generated-protobuf-dockerized.sh
update-generated-protobuf.sh
update-generated-runtime-dockerized.sh Reorganize kubelet tree so apis can be independently versioned 2017-05-12 10:02:33 -07:00
update-generated-runtime.sh
update-generated-swagger-docs.sh
update-godep-licenses.sh
update-gofmt.sh hack/*.sh: re-add staging dirs to verify+update scripts 2017-02-17 08:51:31 +01:00
update-openapi-spec.sh
update-staging-client-go.sh Use "hack/godep-restore.sh" instead of godep restore 2017-03-28 04:05:47 -04:00
update-staging-godeps.sh move metrics to staging 2017-05-01 16:43:50 -07:00
update-swagger-spec.sh enable all available api versions when starting apiserver in update-swagger-spec.sh 2017-05-25 23:55:15 -07:00
update-translations.sh Extract a bunch more strings from kubectl 2017-04-06 20:12:50 -07:00
update_owners.py Make update_owners.py also emit a JSON sig-owners list. 2017-05-11 17:01:29 -07:00
verify-all.sh
verify-api-groups.sh add "admission" API group 2017-05-19 10:17:37 -06:00
verify-api-reference-docs.sh
verify-bazel.sh Update gazel to v17 2017-04-27 15:01:34 -07:00
verify-boilerplate.sh
verify-cli-conventions.sh More cli sanity verifications 2017-05-18 15:44:49 -03:00
verify-codecgen.sh
verify-codegen.sh Update generated files 2017-05-18 10:39:04 -07:00
verify-description.sh
verify-federation-api-reference-docs.sh Adding verify-federation-api-reference-docs.sh 2017-05-14 17:20:24 -07:00
verify-federation-generated-swagger-docs.sh Adding verify-federation-generated-swagger-docs.sh 2017-05-14 17:20:24 -07:00
verify-federation-openapi-spec.sh
verify-federation-swagger-spec.sh Adding verify-federation-swagger-spec.sh 2017-05-14 17:15:41 -07:00
verify-flags-underscore.py check flag format in file known-flags.txt 2017-05-22 10:51:04 +08:00
verify-generated-docs.sh Move .generated_docs to docs/ so docs OWNERS can review / approve 2017-02-16 10:11:57 -08:00
verify-generated-protobuf.sh [go-to-protobuf] generate proto for k8s.io/metrics 2017-05-26 19:59:27 -04:00
verify-generated-runtime.sh Reorganize kubelet tree so apis can be independently versioned 2017-05-12 10:02:33 -07:00
verify-generated-swagger-docs.sh
verify-godep-licenses.sh
verify-godeps.sh Export patch files to artifacts 2017-03-25 12:16:50 -07:00
verify-gofmt.sh hack/*.sh: re-add staging dirs to verify+update scripts 2017-02-17 08:51:31 +01:00
verify-golint.sh
verify-govet.sh
verify-import-boss.sh
verify-linkcheck.sh
verify-no-vendor-cycles.sh Detect and prevent new vendor cycles 2017-05-12 16:56:08 -07:00
verify-openapi-spec.sh
verify-pkg-names.sh add "admission" API group 2017-05-19 10:17:37 -06:00
verify-readonly-packages.sh hack/*.sh: re-add staging dirs to verify+update scripts 2017-02-17 08:51:31 +01:00
verify-staging-client-go.sh hack/verify-staging-client-go.sh: fail on changes 2017-02-27 14:11:41 +01:00
verify-staging-godeps.sh update-staging-{client-go,godeps}.sh: no godep-restore, pin godep, check workdir 2017-02-25 22:38:23 +01:00
verify-staging-imports.sh hack/verify-staging-imports.sh: check that plugins are not imported by default 2017-03-12 19:51:31 +01:00
verify-swagger-spec.sh
verify-symbols.sh
verify-test-images.sh
verify-test-owners.sh