-
Notifications
You must be signed in to change notification settings - Fork 2k
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
24 changed files
with
1,072 additions
and
64 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,61 @@ | ||
# Egress MTLS | ||
|
||
In this example, we deploy a secure web application, configure load balancing for it via a VirtualServer, and apply an Egress MTLS policy. | ||
|
||
## Prerequisites | ||
|
||
1. Follow the [installation](https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/) instructions to deploy the Ingress Controller. | ||
1. Save the public IP address of the Ingress Controller into a shell variable: | ||
``` | ||
$ IC_IP=XXX.YYY.ZZZ.III | ||
``` | ||
1. Save the HTTP port of the Ingress Controller into a shell variable: | ||
``` | ||
$ IC_HTTP_PORT=<port number> | ||
``` | ||
## Step 1 - Deploy a Secure Web Application | ||
The application requires clients to use TLS and present a client TLS certificate which it will verify. | ||
Create the application deployment, service and secret: | ||
``` | ||
$ kubectl apply -f secure-app.yaml | ||
``` | ||
## Step 2 - Deploy the Egress MLTS Secret | ||
Create a secret with the name `egress-mtls-secret` that will be used for authentication to application: | ||
``` | ||
$ kubectl apply -f egress-mtls-secret.yaml | ||
``` | ||
## Step 3 - Deploy the Trusted CA Secret | ||
Create a secret with the name `egress-trusted-ca-secret` that will be used to verify the certificate of the application: | ||
``` | ||
$ kubectl apply -f egress-trusted-ca-secret.yaml | ||
``` | ||
## Step 4 - Deploy the Egress MTLS Policy | ||
Create a policy with the name `egress-mtls-policy` that references the secrets from the previous steps: | ||
``` | ||
$ kubectl apply -f egress-mtls.yaml | ||
``` | ||
## Step 5 - Configure Load Balancing | ||
Create a VirtualServer resource for the web application: | ||
``` | ||
$ kubectl apply -f virtual-server.yaml | ||
``` | ||
Note that the VirtualServer references the policy `egress-mtls-policy` created in Step 4. | ||
## Step 6 - Test the Configuration | ||
Access the secure backend with the following command: | ||
``` | ||
$ curl --resolve webapp.example.com:$IC_HTTP_PORT:$IC_IP http://webapp.example.com:$IC_HTTP_PORT/ | ||
hello from pod secure-app-8cb576989-7hdhp | ||
``` |
8 changes: 8 additions & 0 deletions
8
examples-of-custom-resources/egress-mtls/egress-mtls-secret.yaml
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,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: egress-mtls-secret | ||
type: Opaque | ||
data: | ||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURVRENDQWpnQ0ZHRUVvSmlwZ2QrdWY4OGI5T0prQ256SHlNMjBNQTBHQ1NxR1NJYjNEUUVCQ3dVQU1HWXgKQ3pBSkJnTlZCQVlUQWxWVE1Rc3dDUVlEVlFRSURBSkRRVEVXTUJRR0ExVUVCd3dOVTJGdUlFWnlZVzVqYVhOagpiekVPTUF3R0ExVUVDZ3dGVGtkSlRsZ3hEREFLQmdOVkJBc01BMHRKUXpFVU1CSUdBMVVFQXd3TFpYaGhiWEJzClpTNWpiMjB3SUJjTk1qQXhNREE0TURJek5qSXdXaGdQTWpFeU1EQTVNVFF3TWpNMk1qQmFNR0V4Q3pBSkJnTlYKQkFZVEFsVlRNUXN3Q1FZRFZRUUlEQUpEUVRFV01CUUdBMVVFQnd3TlUyRnVJRVp5WVc1amFYTmpiekVPTUF3RwpBMVVFQ2d3RlRrZEpUbGd4RERBS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4VVJyUnJzWXZoRUV0UlN4SmRQeG40eUdoL0xhb3F0R1VlTHg3UEUydE1WeW1mamFQd0NCMTk0ZS9YRW9uMgpqamp1Q1N0ZEdTS0kwOEw2R1hVNDJuL3I1Y3BseS9OOVk0ZHpKTmVFbVgzeXUvOUNWcXc9Ci0tLS0tRU5EIFJTQSBQUklWQVRFIEtFWS0tLS0tCg== |
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,12 @@ | ||
apiVersion: k8s.nginx.org/v1alpha1 | ||
kind: Policy | ||
metadata: | ||
name: egress-mtls-policy | ||
spec: | ||
egressMTLS: | ||
tlsSecret: egress-mtls-secret | ||
trustedCertSecret: egress-trusted-ca-secret | ||
verifyServer: on | ||
verifyDepth: 2 | ||
serverName: on | ||
sslName: secure-app.example.com |
7 changes: 7 additions & 0 deletions
7
examples-of-custom-resources/egress-mtls/egress-trusted-ca-secret.yaml
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,7 @@ | ||
kind: Secret | ||
metadata: | ||
name: egress-trusted-ca-secret | ||
apiVersion: v1 | ||
type: Opaque | ||
data: | ||
ca.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURyVENDQXBXZ0F3SUJBZ0lVRk5raHZnakkrTFhORTlGMkV2Wkk4T0dJUTlrd0RRWUpLb1pJaHZjTkFRRUwKQlFBd1pqRUxNQWtHQTFVRUJoTUNWVk14Q3pBSkJnTlZCQWdNQWtOQk1SWXdGQVlEVlFRSERBMVRZVzRnUm5KaApibU5wYzJOdk1RNHdEQVlEVlFRS0RBVk9SMGxPV0RFTU1Bb0dBMVVFQ3d3RFMwbERNUlF3RWdZRFZRUURE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EdSZWVmUkhUWjdNY0N0aWlmNGM0dnFkcURFcHZtR3VGUWVvekxBVHAxOExaZU1WdVJvSERoRVFhZUk0amEKTFlqTk9uL21aU0hGNEp1UzRSSWR0L2pBWnRPaXgwTUljY1RXQi9qNHRDRm5udVhseHhkNFE1YkZmQXF1OWVBSgpCVldnbTQ5RHM4QW9DNmxpWUExT3hQaFJHWGpmQjZDV0FWWitCNnRhNnBBREl6S2IzZmJUNndXaU1hRjBWV3loCm5lUFRUSmVZbGdpelR3V1FDbmRaejB6S0xUejY4eTBuanNJc1ptZXJVVFVZTy9EbXY3MVpMeGtZcVNiVmIrS3oKdFo0TnRQbDl3ZlhHcnAxcnZwRTJmQzB2V0xhVWttdlpXRXZYS2R5NmYrZUMKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= |
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,79 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: secure-app | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: secure-app | ||
template: | ||
metadata: | ||
labels: | ||
app: secure-app | ||
spec: | ||
containers: | ||
- name: secure-app | ||
image: nginxdemos/nginx-hello:plain-text | ||
ports: | ||
- containerPort: 8443 | ||
volumeMounts: | ||
- name: secret | ||
mountPath: /etc/nginx/ssl | ||
readOnly: true | ||
- name: config-volume | ||
mountPath: /etc/nginx/conf.d | ||
volumes: | ||
- name: secret | ||
secret: | ||
secretName: app-tls-secret | ||
- name: config-volume | ||
configMap: | ||
name: secure-config | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: secure-app | ||
spec: | ||
ports: | ||
- port: 8443 | ||
targetPort: 8443 | ||
protocol: TCP | ||
name: https | ||
selector: | ||
app: secure-app | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: secure-config | ||
data: | ||
app.conf: |- | ||
server { | ||
listen 8443 ssl; | ||
server_name secure-app.example.com; | ||
ssl_certificate /etc/nginx/ssl/tls.crt; | ||
ssl_certificate_key /etc/nginx/ssl/tls.key; | ||
ssl_verify_client on; | ||
ssl_client_certificate /etc/nginx/ssl/ca.crt; | ||
default_type text/plain; | ||
location / { | ||
return 200 "hello from pod $hostname\n"; | ||
} | ||
} | ||
--- | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: app-tls-secret | ||
type: Opaque | ||
data: | ||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURZRENDQWtnQ0ZHRUVvSmlwZ2QrdWY4OGI5T0prQ256SHlNMnpNQTBHQ1NxR1NJYjNEUUVCQ3dVQU1HWXgKQ3pBSkJnTlZCQVlUQWxWVE1Rc3dDUVlEVlFRSURBSkRRVEVXTUJRR0ExVUVCd3dOVTJGdUlFWnlZVzVqYVhOagpiekVPTUF3R0ExVUVDZ3dGVGtkSlRsZ3hEREFLQmdOVkJBc01BMHRKUXpFVU1CSUdBMVVFQXd3TFpYaGhiWEJzClpTNWpiMjB3SUJjTk1qQXhNREE0TURJek16UXlXaGdQTWpFeU1EQTVNVFF3TWpNek5ESmFNSEV4Q3pBSkJnTlYKQkFZVEFsVlRNUXN3Q1FZRFZRUUlEQUpEUVRFV01CUUdBMVVFQnd3TlUyRnVJRVp5WVc1amFYTmpiekVPTUF3RwpBMVVFQ2d3RlRrZEpUbGd4RERBS0JnTlZCQXNNQTB0SlF6RWZNQjBHQTFVRUF3d1djMlZqZFhKbExXRndjQzVsCmVHRnRjR3hsTG1OdmJUQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0NnZ0VCQUxCRHRtM0sKekJQQkVCOEtRclY1QVArYmtQaVppd0oveTBoVWZKVWVodTFvYWNWQlJ2NDJaMFJzVm8wWWhMeFpLMmVNZmpNRg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WUVFSXFhZXZiTTRpRU8yZEh5SXd3WEJ5U2VDCmNDWUJBZ01CQUFHalV6QlJNQjBHQTFVZERnUVdCQlFmeWlQZWVzdGd4OVNVaVcyU0N2LzBYamNHVHpBZkJnTlYKSFNNRUdEQVdnQlFmeWlQZWVzdGd4OVNVaVcyU0N2LzBYamNHVHpBUEJnTlZIUk1CQWY4RUJUQURBUUgvTUEwRwpDU3FHU0liM0RRRUJDd1VBQTRJQkFRQThFT3JXSkkyL0piTlNpb0oyZk5WOUVOMkt1QXc4NFNxMkQ2K3ZWRDM0ClB5bEdSZWVmUkhUWjdNY0N0aWlmNGM0dnFkcURFcHZtR3VGUWVvekxBVHAxOExaZU1WdVJvSERoRVFhZUk0amEKTFlqTk9uL21aU0hGNEp1UzRSSWR0L2pBWnRPaXgwTUljY1RXQi9qNHRDRm5udVhseHhkNFE1YkZmQXF1OWVBSgpCVldnbTQ5RHM4QW9DNmxpWUExT3hQaFJHWGpmQjZDV0FWWitCNnRhNnBBREl6S2IzZmJUNndXaU1hRjBWV3loCm5lUFRUSmVZbGdpelR3V1FDbmRaejB6S0xUejY4eTBuanNJc1ptZXJVVFVZTy9EbXY3MVpMeGtZcVNiVmIrS3oKdFo0TnRQbDl3ZlhHcnAxcnZwRTJmQzB2V0xhVWttdlpXRXZYS2R5NmYrZUMKLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo= |
18 changes: 18 additions & 0 deletions
18
examples-of-custom-resources/egress-mtls/virtual-server.yaml
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,18 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: webapp | ||
spec: | ||
host: webapp.example.com | ||
upstreams: | ||
- name: secure-app | ||
service: secure-app | ||
port: 8443 | ||
tls: | ||
enable: true | ||
routes: | ||
- path: / | ||
policies: | ||
- name: egress-mtls-policy | ||
action: | ||
pass: secure-app |
Oops, something went wrong.