Commit Graph

47 Commits (f34a24e98e7c837b567b78be3af958ac1156cd80)

Author SHA1 Message Date
Dr. Stefan Schimanski cad0364e73 Update bazel 2017-10-18 17:24:04 +02:00
Dr. Stefan Schimanski 7773a30f67 pkg/api/legacyscheme: fixup imports 2017-10-18 17:23:55 +02:00
Jeff Grafton aee5f457db update BUILD files 2017-10-15 18:18:13 -07:00
Davanum Srinivas 26b11474ca Remove cmd/kubeadm from pkg/controller 2017-10-13 07:06:21 -04:00
Matt Moyer 9bb322f647 Drop --experimental-bootstrap-token-auth flag.
This flag was replaced by `--enable-bootstrap-token-auth` in 1.8 (https://github.com/kubernetes/kubernetes/pull/51198).
2017-09-15 09:54:53 -05:00
Kubernetes Submit Queue d970eb8f94 Merge pull request #50875 from ericchiang/oidc-claims-prefix
Automatic merge from submit-queue (batch tested with PRs 50579, 50875, 51797, 51807, 51803)

oidc auth: make the OIDC claims prefix configurable

Add the following flags to control the prefixing of usernames and
groups authenticated using OpenID Connect tokens.

	--oidc-username-prefix
	--oidc-groups-prefix

```release-note
The OpenID Connect authenticator can now use a custom prefix, or omit the default prefix, for username and groups claims through the --oidc-username-prefix and --oidc-groups-prefix flags. For example, the authenticator can map a user with the username "jane" to "google:jane" by supplying the "google:" username prefix.
```

Closes https://github.com/kubernetes/kubernetes/issues/50408
Ref https://github.com/kubernetes/kubernetes/issues/31380

cc @grillz @kubernetes/sig-auth-pr-reviews @thomastaylor312 @gtaylor
2017-09-03 08:46:23 -07:00
Kubernetes Submit Queue 432790df88 Merge pull request #51198 from mattmoyer/rename-experimental-bootstrap-token-auth
Automatic merge from submit-queue (batch tested with PRs 50713, 47660, 51198, 51159, 51195)

kubeapiserver: rename `--experimental-bootstrap-token-auth` to `--enable-bootstrap-token-auth`.

#**What this PR does / why we need it**:
This change renames the API server `--experimental-bootstrap-token-auth` flag to `--enable-bootstrap-token-auth`. The old flag is accepted but generates a warning.

In 1.9, we will drop support for `--experimental-bootstrap-token-auth` entirely.

#### Example of the warning log:
```
$ kube-apiserver --experimental-bootstrap-token-auth --etcd-servers https://127.0.0.1:1234 --service-cluster-ip-range 10.0.1.0/24
Flag --experimental-bootstrap-token-auth has been deprecated, use --enable-bootstrap-token-auth instead.
[...]
```

**Which issue this PR fixes** fixes https://github.com/kubernetes/kubernetes/issues/50613

**Release note**:
```release-note
Renamed the API server flag `--experimental-bootstrap-token-auth` to `--enable-bootstrap-token-auth`. The old value is accepted with a warning in 1.8 and will be removed in 1.9.
```

/sig cli
/sig cluster-lifecycle

cc @luxas
2017-08-24 11:17:09 -07:00
Kubernetes Submit Queue aef39e6f47 Merge pull request #50489 from yujunzhang/Fix-the-typo-of-WithAnonymous
Automatic merge from submit-queue (batch tested with PRs 50489, 51070, 51011, 51022, 51141)

Fix the method name of BuiltInAuthenticationOptions.WithAnyonymous

change the BuiltInAuthenticationOptions.WithAnyonymous to
WithAnonymous would be better.



**What this PR does / why we need it**:
The BuiltInAuthenticationOptions.WithAnyonymous method name should be a meaningful name of  WithAnonymous

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:

**Release note**:

```release-note
None
```
2017-08-23 19:54:22 -07:00
Matt Moyer 9dad15e220 kubeapiserver: rename `--experimental-bootstrap-token-auth` to `--enable-bootstrap-token-auth`.
This change renames the `--experimental-bootstrap-token-auth` flag to `--enable-bootstrap-token-auth`. The old flag is accepted but generates a warning.

In 1.9, we will drop support for `--experimental-bootstrap-token-auth` entirely.
2017-08-23 11:04:54 -05:00
Eric Chiang 1f8ee7fe13 oidc auth: make the OIDC claims prefix configurable
Add the following flags to control the prefixing of usernames and
groups authenticated using OpenID Connect tokens.

	--oidc-username-prefix
	--oidc-groups-prefix
2017-08-18 09:49:32 -07:00
Kubernetes Submit Queue 42adb9ef25 Merge pull request #50258 from liggitt/token-cache
Automatic merge from submit-queue (batch tested with PRs 49488, 50407, 46105, 50456, 50258)

Enable caching successful token authentication

Resolves #50472

To support revocation of service account tokens, an etcd lookup of the token and service account is done by the token authenticator. Controllers that make dozens or hundreds of API calls per second (like the endpoints controller) cause this lookup to be done very frequently on the same objects.

This PR:
* Implements a cached token authenticator that conforms to the authenticator.Token interface
* Implements a union token authenticator (same approach as the union request authenticator, conforming to the authenticator.Token interface)
* Cleans up the auth chain construction to group all token authenticators (means we only do bearer and websocket header parsing once)
* Adds a 10-second TTL cache to successful token authentication

```release-note
API server authentication now caches successful bearer token authentication results for a few seconds.
```
2017-08-11 14:14:06 -07: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
zhangyujun 4355d7014d Fix the method name of BuiltInAuthenticationOptions
change the BuiltInAuthenticationOptions.WithAnyonymous to
WithAnonymous would be better.
2017-08-11 14:54:59 +08:00
Jordan Liggitt 0458fac8c0
Simplify bearer token auth chain, cache successful authentications 2017-08-09 23:37:24 -04:00
Davanum Srinivas f4011d485a Set external hostname in local-up-cluster
If we set --external-hostname, then the api server does not look
in the CloudProviderOptions.DefaultExternalHost method. While we
are at it, let's log an info message, so if there is a failure
the operator gets a hint that they can use --external-hostname
to bypass the lookup in the cloud provider. This will enable us
to set the CLOUD_PROVIDER to openstack for example and not have to
really run api server inside a openstack vm.
2017-07-24 07:58:46 -04:00
Eric Chiang e2f2ab67f2 *: remove --insecure-allow-any-token option
e2e and integration tests have been switched over to the tokenfile
authenticator instead.

```release-note
The --insecure-allow-any-token flag has been removed from kube-apiserver. Users of the flag should use impersonation headers instead for debugging.
```
2017-07-18 16:03:15 -07:00
Kubernetes Submit Queue 6acfb0f868 Merge pull request #47038 from yastij/DefaultExternalHost-for-registredCP
Automatic merge from submit-queue (batch tested with PRs 47038, 47105)

extending DefaultExternalHost for any registred cloud provider

**What this PR does / why we need it**: this PR enables DefaultExternalHost to work with any registered cloud provider.

**Which issue this PR fixes** : fixes #46567 

**Special notes for your reviewer**:

**Release note**:

```release-note
When determining the default external host of the kube apiserver, any configured cloud provider is now consulted
```
2017-06-27 08:29:25 -07:00
Chao Xu 60604f8818 run hack/update-all 2017-06-22 11:31:03 -07:00
Chao Xu f4989a45a5 run root-rewrite-v1-..., compile 2017-06-22 10:25:57 -07:00
Yassine TIJANI 2eec2beed8 extending DefaultExternalHost for any registred cloud provider see #46567 2017-06-06 13:40:21 +02:00
Cao Shufeng 9710eb62ae validate oidc flags
This change validate oidc flags for kube-apiserver.
2017-05-22 18:03:28 +08:00
Kubernetes Submit Queue 55f802b72a Merge pull request #44196 from xiangpengzhao/cmd-cleanup
Automatic merge from submit-queue

Delete "hard-coded" default value in flags usage.

**What this PR does / why we need it**:
Some flags of kubernetes components have "hard-coded" default values in their usage info. In fact, [pflag pkg](https://github.com/kubernetes/kubernetes/blob/master/vendor/github.com/spf13/pflag/flag.go#L602-L608) has already added a string `(default value)` automatically in the usage info if the flag is initialized. Then we don't need to hard-code the default value in usage info. After this PR, if we want to update the default value of a flag, we only need to update the flag where it is initialized. `pflag` will update the usage info for us. This will avoid inconsistency.

For example:
Before
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. Default: 10s (default 10s)
...
```

After
```
kubelet -h
...
--node-status-update-frequency duration                   Specifies how often kubelet posts node status to master. Note: be cautious when changing the constant, it must work with nodeMonitorGracePeriod in nodecontroller. (default 10s)
...
```

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

**Special notes for your reviewer**:
This PR doesn't delete some "hard-coded" default values because they are not explicitly initialized. We still need to hard-code them to give users friendly info.

```
--allow-privileged                                        If true, allow containers to request privileged mode. [default=false]
```

**Release note**:

```release-note
None
```
2017-04-28 21:28:09 -07:00
Mike Danese a05c3c0efd autogenerated 2017-04-14 10:40:57 -07:00
xiangpengzhao 420caf200c
Delete "hard-coded" default value in flags usage. 2017-04-07 11:21:37 +08:00
Jordan Liggitt 0d2e5a0dd8
Enable service account token lookup by default
```release-note
kube-apiserver: --service-account-lookup now defaults to true. This enables service account tokens to be revoked by deleting the Secret object containing the token.
```
2017-04-04 22:00:11 -04:00
Jordan Liggitt 890894ac4f
Disable RBAC post-start hook if not using the RBAC authorizer 2017-03-30 23:30:04 -04:00
deads2k cd29754680 move legacy insecure options out of the main flow 2017-03-27 14:07:54 -04:00
deads2k c2f8ef1b1a move insecure options to kubeapiserver 2017-03-27 13:55:45 -04:00
deads2k acba2cbd6d tweak defaults for recommended apiserver options 2017-02-27 07:47:19 -05:00
Andy Goldstein 022bff7fbe Switch admission to use shared informers 2017-02-23 11:16:09 -05:00
Lucas Käldström ab344da565
Move the authorization mode constants into a separate package 2017-02-23 15:27:16 +02:00
Eric Chiang a0df658b20 kube-apiserver: add a bootstrap token authenticator for TLS bootstrapping 2017-02-21 08:43:55 -08:00
deads2k 470cb9d2c9 streamline etcd options for aggregated api server 2017-02-08 09:07:47 -05:00
deads2k 226af4adc4 move --runtime-config to kubeapiserver 2017-02-07 13:43:13 -05:00
deads2k 250408ee9c apiserver command line options lead to config 2017-02-07 07:57:11 -05:00
Dr. Stefan Schimanski 6af3210d6f Update generated files 2017-02-03 08:15:46 +01:00
Dr. Stefan Schimanski 536460e1d9 Mechanical fixup imports: pkg/genericapiserver 2017-02-03 08:15:45 +01:00
deads2k 6b57489552 move apiserver options 2017-02-01 15:18:33 -05:00
deads2k 384c873914 remove unneeded storage options 2017-01-31 13:44:39 -05:00
Jordan Liggitt c6c0b8518e
avoid incorrect short-circuit of client-ca setup 2017-01-22 14:50:42 -05:00
Dr. Stefan Schimanski 3d9449a353 genericapiserver: fix imports 2017-01-19 13:06:47 +01:00
deads2k de725e56e2 prevent anonymous auth and allow all 2017-01-17 10:16:33 -05:00
Jeff Grafton 20d221f75c Enable auto-generating sources rules 2017-01-05 14:14:13 -08:00
Dr. Stefan Schimanski f96fa748d8 Move apiserver cloudprovider dep into kubeapiserver 2017-01-05 09:40:03 +01:00
deads2k ab1b77673f decouple genericapiserver from non-generic authenticator 2016-12-22 07:48:08 -05:00
deads2k a3564c0aa8 start kubeapiserver package for sharing between kubeapiserver and federation 2016-12-22 07:43:42 -05:00