-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
45 additions
and
28 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Client Certificate Authentication | ||
|
||
It is possible to enable Client Certificate Authentication using additional annotations in the Ingress. | ||
|
||
## Setup instructions | ||
1. Create a file named `ca.crt` containing the trusted certificate authority chain (all ca certificates in PEM format) to verify client certificates. | ||
|
||
2. Create a secret from this file: | ||
`kubectl create secret generic auth-tls-chain --from-file=ca.crt --namespace=default` | ||
|
||
3. Add the annotations as provided in the [ingress.yaml](ingress.yaml) example to your ingress object. |
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,30 @@ | ||
apiVersion: extensions/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
annotations: | ||
# Enable client certificate authentication | ||
nginx.ingress.kubernetes.io/auth-tls-verify-client: "on" | ||
# Create the secret containing the trusted ca certificates with `kubectl create secret generic auth-tls-chain --from-file=ca.crt --namespace=default` | ||
nginx.ingress.kubernetes.io/auth-tls-secret: "default/auth-tls-chain" | ||
# Specify the verification depth in the client certificates chain | ||
nginx.ingress.kubernetes.io/auth-tls-verify-depth: "1" | ||
# Specify an error page to be redirected to on verification errors | ||
nginx.ingress.kubernetes.io/auth-tls-error-page: "http://www.mysite.com/error-cert.html" | ||
# Specify if certificates are be passed to upstream server | ||
nginx.ingress.kubernetes.io/auth-tls-pass-certificate-to-upstream: "false" | ||
name: nginx-test | ||
namespace: default | ||
spec: | ||
rules: | ||
- host: ingress.test.com | ||
http: | ||
paths: | ||
- backend: | ||
serviceName: http-svc:80 | ||
servicePort: 80 | ||
path: / | ||
tls: | ||
- hosts: | ||
- ingress.test.com | ||
secretName: tls-secret | ||
|
This file was deleted.
Oops, something went wrong.
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