-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add cert-based API server authentication
Add the ability to authenticate incoming requests, verifying that all requests originate from the Kubernetes API server and no where else. Authenticating the API server requires manual steps to configure both the API server and the webhook. Follow the Kubernetes webhook documentation[1] to create an admission configuration and kubeconfig for the API server, and update the kube-apiserver flags to use them. Only cert-based authentication is supported, basic auth and token authentication will not be recognized. Then, set auth.clientCA in the webhook chart's values.yaml to the base64-encoded CA for the certs, and set auth.allowedCNs to the CN for the client cert the apiserver will present. [1] https://kubernetes.io/docs/reference/access-authn-authz/extensible-admission-controllers/#authenticate-apiservers
- Loading branch information
Showing
7 changed files
with
167 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{{- $auth := .Values.auth | default dict }} | ||
{{- if $auth.clientCA }} | ||
apiVersion: v1 | ||
data: | ||
ca.crt: {{ $auth.clientCA }} | ||
kind: Secret | ||
metadata: | ||
name: client-ca | ||
namespace: cattle-system | ||
type: Opaque | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters