Commit Graph

27 Commits

Author SHA1 Message Date
Yu Liao
fc21115c3f Moved staging/src/k8s.io/client-go/tools/bootstrap to staging/src/k8s.io/cluster-bootstrap 2018-10-02 09:46:13 -07:00
Di Xu
997a612206 kubeadm join the cluster with pre-existing client certificate 2018-07-26 19:34:09 +08:00
fabriziopandini
a6b0410f83 Automated rename from NodeConfiguration to JoinConfiguration 2018-07-13 22:52:41 +02:00
Jeff Grafton
23ceebac22 Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
Lucas Käldström
67a9f1bfe7
autogenerated 2018-05-31 22:21:06 +03:00
Lucas Käldström
c473039580
kubeadm: Initial refactor of the Bootstrap Tokens. Add the new API objects, add/move helpers and start using the new flow in the code 2018-05-31 22:19:26 +03:00
Karan Goel
24d6483558 Add --cluster-name to kubeadm 2018-04-11 09:42:31 -07:00
Rostislav M. Georgiev
230a9c67ce kubeadm: Introduce controllable timeout on join
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
2018-04-03 14:05:02 +03:00
Jeff Grafton
ef56a8d6bb Autogenerated: hack/update-bazel.sh 2018-02-16 13:43:01 -08:00
Kubernetes Submit Queue
77ac663df4
Merge pull request #57941 from stewart-yu/improveErrorMessages
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

improve error message for expired tokens

**What this PR does / why we need it**:
When you join a node with a expired tokens, you can get fuzz error messages: `[discovery] Failed to connect to API Server "<cluster-ip>:6443": there is no JWS signed token in the cluster-info ConfigMap. This token id "c33826" is invalid for this cluster, can't connect`, we should improve it.

**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:
Fixes [https://github.com/kubernetes/kubeadm/issues/630](https://github.com/kubernetes/kubeadm/issues/630)

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
2018-01-19 14:34:12 -08:00
Gavin
f653d02b05 create auto-gen files 2018-01-17 16:23:03 +08:00
Gavin
bb5e156aba Add generic Bootstrap Token constants and helpers to client-go 2018-01-17 16:22:37 +08:00
stewart-yu
528435f8dc improve error message for expired tokens 2018-01-17 09:54:06 +08:00
Jeff Grafton
efee0704c6 Autogenerate BUILD files 2017-12-23 13:12:11 -08:00
Jeff Grafton
aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Serguei Bezverkhi
42bd500134 kubeadm golint clean up
Closes #375
2017-09-23 08:07:55 -04:00
Jeff Grafton
a7f49c906d Use buildozer to delete licenses() rules except under third_party/ 2017-08-11 09:32:39 -07:00
Jeff Grafton
33276f06be Use buildozer to remove deprecated automanaged tags 2017-08-11 09:31:50 -07:00
Matt Moyer
1be639d6b0 kubeadm: implement TLS discovery root CA pinning.
This change adds the `--discovery-token-ca-cert-hash` and `--discovery-token-unsafe-skip-ca-verification` flags for `kubeadm join` and corresponding fields on the kubeadm NodeConfiguration struct. These flags configure enhanced TLS validation for token-based discovery.

The enhanced TLS validation works by pinning the public key hashes of the cluster CA. This is done by connecting to the `cluster-info` endpoint initially using an unvalidated/unsafe TLS connection. After the cluster info has been loaded, parsed, and validated with the existing symmetric signature/MAC scheme, the root CA is validated against the pinned public key set. A second request is made using validated/safe TLS using the newly-known CA and the result is validated to make sure the same `cluster-info` was returned from both requests.

This validation prevents a class of attacks where a leaked bootstrap token (such as from a compromised worker node) allows an attacker to impersonate the API server.

This change also update `kubeadm init` to print the correct `--discovery-token-ca-cert-hash` flag in the example `kubeadm join` command it prints at the end of initialization.
2017-08-10 11:39:25 -05:00
Matt Moyer
1d9bc00b81 Begin polling for bootstrap cluster info immediately.
The previous behavior was to sleep for `constants.DiscoveryRetryInterval` (5 seconds) before the first request.
2017-07-10 15:40:33 -07:00
Chao Xu
60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu
f2d3220a11 run root-rewrite-import-client-go-api-types 2017-06-22 11:30:59 -07:00
Mike Danese
a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
Lucas Käldström
61a284d720
Hook up kubeadm against the BootstrapSigner/BootstrapTokenAuthenticator 2017-03-04 11:17:52 +02:00
Derek McQuay
69dd248747 kubeadm: changed error passing to be more clear
updated flag error in discovery/https, discovery/token, and
discovery/file
2017-02-02 09:18:42 -08:00
Jeff Grafton
20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Mike Danese
690c7e578b kubeadm: refactor discovery behind an interface 2016-12-15 13:54:49 -08:00