-
Notifications
You must be signed in to change notification settings - Fork 2k
Import JWKS from URL on JWT policy #3347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
611a10d
add new crd fields and validation functions
haywoodsh f062290
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 561492d
update template
haywoodsh a2aaa23
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] c838449
Merge branch 'main' into feat/jwks-uri
1ee3b71
Update validation for policy.go
a847d40
Remove unused tests for VirtualServer
e4ad127
Remove TODO comments
c6bd4c9
Update controller to not create secretRef for JWK policy when using J…
9cd49d2
Merge branch 'main' into feat/jwks-uri
44f9911
Add README to jwks example folder
71b3483
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8aa2588
Update CRDs and README
d2c872d
Update jwks_uri location to proxy_pass to an upstream
9941750
Merge branch 'main' into feat/jwks-uri
d9f49df
Prevent Nginx reload fail when JwksUri host can't be resolved
a133dd9
Update template to make unique proxy cache directory
17f2bc8
Update README
35979e1
Merge branch 'main' into feat/jwks-uri
fa505c6
Remove comments and blank space
6799635
Update template to check if JwksUri.JwksHost is empty
cb537f8
Merge branch 'main' into feat/jwks-uri
0deab82
Update README to add example of ConfigMap with resolver
06bb8dc
Allow user input for uri scheme and remove tests
haywoodsh b1cbc5c
update unit tests
haywoodsh 3634f3d
update unit tests
haywoodsh b518a15
Merge branch 'main' into feat/jwks-uri
haywoodsh 20d3e5d
add web docs for jwksURI feature
vepatel 5858fd1
update readme
haywoodsh 0eb5038
Fixes typo, adds proper title capitalisation
vepatel 3d82e54
Update docs, jwksuri readme & example
vepatel faca9d9
Merge branch 'main' into feat/jwks-uri
vepatel 9fe4a75
Merge branch 'main' into feat/jwks-uri
haywoodsh 32de563
set proxy_cache_valid to 12h
vepatel 5145c7e
Updates to example files and README
a4d8d91
Merge branch 'main' into feat/jwks-uri
b35b173
Revert jwks example yaml files
7428326
update readme to include links to docs
haywoodsh e9c54c2
Update REAMDE
567bf88
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] fbd16b8
fix: update github url for app-protect-waf (#3412)
JTorreG 7717e27
Merge branch 'main' into feat/jwks-uri
shaun-nx d08eb93
Add spacing
976aa06
update readme formatting
haywoodsh 453f5c5
Merge branch 'main' into feat/jwks-uri
shaun-nx ca04509
Code review updates
6bb0424
use validateTime instead of a new function.
haywoodsh be928f6
Merge branch 'main' into feat/jwks-uri
vepatel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,181 @@ | ||
# JWKS | ||
|
||
In this example we deploy a web application, configure load balancing with a VirtualServer, and apply a JWT policy. | ||
Instead of using a local secret to verify the client request such as in the [jwt](https://github.com/nginxinc/kubernetes-ingress/tree/main/examples/custom-resources/jwt) example, we will define an external Identity Provider (IdP) using the `JwksURI` field. | ||
|
||
We will be using a deployment of [KeyCloak](https://www.keycloak.org/) to work as our IdP in this example. | ||
In this example, KeyCloak is deployed as a single container for the purpose of exposing it with an Ingress Controller. | ||
shaun-nx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
shaun-nx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
## Prerequisites | ||
|
||
1. Follow the [installation](https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/) instructions to deploy the Ingress Controller. | ||
|
||
2. Save the public IP address of the Ingress Controller into `/etc/hosts` of your machine: | ||
``` | ||
... | ||
XXX.YYY.ZZZ.III webapp.example.com | ||
XXX.YYY.ZZZ.III keycloak.example.com | ||
``` | ||
Here `webapp.example.com` is the domain for the web application and `keycloak.example.com` is the domain for Keycloak. | ||
## Step 1 - Deploy a TLS Secret | ||
Create a secret with the TLS certificate and key that will be used for TLS termination of the web application and Keycloak: | ||
``` | ||
$ kubectl apply -f tls-secret.yaml | ||
``` | ||
## Step 2 - Deploy a Web Application | ||
Create the application deployment and service: | ||
``` | ||
$ kubectl apply -f webapp.yaml | ||
``` | ||
## Step 3 - Deploy Keycloak | ||
1. Create the Keycloak deployment and service: | ||
``` | ||
$ kubectl apply -f keycloak.yaml | ||
``` | ||
1. Create a VirtualServer resource for Keycloak: | ||
``` | ||
$ kubectl apply -f virtual-server-idp.yaml | ||
``` | ||
## Step 4 - Configure Keycloak | ||
To set up Keycloak: | ||
1. To connect to Keycloak, use `https://keycloak.example.com`. | ||
2. Create a new Realm. We will use `jwks-example` for this example. This can be done by selecting the dropdown menu on the left and selecting `Create Realm` | ||
3. Create a new Client called `jwks-client`. This can be done by selecting the `Client`s tab on the left and then selecting `Create client`. | ||
- When creating the Client, ensure both `Client authentication` and `Authorization` are enabled. | ||
4. Once the client is created, navigate to the `Credentials` tab for that client and copy the client secret. | ||
- This can be saved in the `SECRET` shell variable for later: | ||
``` | ||
export SECRET=<client secret> | ||
``` | ||
5. Create a new User called `jwks-user` by selecting the Users tab on the left and then selecting Create client. | ||
6. Once the user is created, navigate to the `Credentials` tab for that user and select `Set password`. For this example the password can be whatever you want. | ||
- This can be saved in the `PASSWORD` shell variable for later: | ||
``` | ||
export PASSWORD=<user password> | ||
``` | ||
## Step 5 - Deploy the JWT Policy | ||
1. Create a policy with the name `jwt-policy` and configure the `JwksURI` field so that it only permits requests to our web application that contain a valid JWT. | ||
In the example policy below, replace `<your_realm>` with the realm created in Step 4. We used `jwks-example` as our realm name. | ||
The value of `spec.jwt.token` is set to `$http_token` in this example as we are sending the client token in an HTTP header. | ||
``` | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: Policy | ||
metadata: | ||
name: jwt-policy | ||
spec: | ||
jwt: | ||
realm: MyProductAPI | ||
token: $http_token | ||
jwksURI: http://keycloak.default.svc.cluster.local:8080/realms/<your_realm>/protocol/openid-connect/certs | ||
keyCache: 1h | ||
``` | ||
2. Deploy the policy: | ||
``` | ||
$ kubectl apply -f jwks.yaml | ||
``` | ||
## Step 6 - Deploy a config map with a resolver | ||
If the value of `jwksURI` uses a hostname, the Ingress Controller will need to reference a resolver. | ||
This can be done by deploying a ConfigMap with the `resolver-addresses` data field | ||
``` | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: nginx-config | ||
namespace: nginx-ingress | ||
data: | ||
resolver-addresses: <resolver-address> | ||
``` | ||
In this example, we create a ConfigMap using Kubernetes' default DNS `kube-dns.kube-system.svc.cluster.local` for the resolver address. For more information on `resolver-addresses` and other related ConfigMap keys, please refer to our documentation [ConfigMap Resource](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/#summary-of-configmap-keys) and our blog post [Using DNS for Service Discovery with NGINX and NGINX Plus](https://www.nginx.com/blog/dns-service-discovery-nginx-plus) | ||
NOTE: When setting the value of `jwksURI` in Step 5, the response will differ depending on the IDP used. In some cases the response will be too large for NGINX to properly handle. | ||
If this occurs you will need to configure the [subrequest_output_buffer_size](https://nginx.org/en/docs/http/ngx_http_core_module.html#subrequest_output_buffer_size) directive in the http context. | ||
This can currently be done using `http-snippets`. Please refer to our document on [snippets and custom templates](https://docs.nginx.com/nginx-ingress-controller/configuration/global-configuration/configmap-resource/#snippets-and-custom-templates) for details on how to configure this directive. | ||
The code block below is an example of the updated configmap which adds `subrequest_output_buffer_size` under the http context in the nginx.conf. | ||
NOTE: The value of `subrequest_output_buffer_size` is only an example value and should be changed to suite your environment. | ||
shaun-nx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: nginx-config | ||
namespace: nginx-ingress | ||
data: | ||
resolver-addresses: <resolver-address> | ||
http-snippets: | | ||
subrequest_output_buffer_size 64k; | ||
``` | ||
``` | ||
$ kubectl apply -f nginx-config.yaml | ||
``` | ||
## Step 7 - Configure Load Balancing | ||
Create a VirtualServer resource for the web application: | ||
``` | ||
$ kubectl apply -f virtual-server.yaml | ||
``` | ||
Note that the VirtualServer references the policy `jwt-policy` created in Step 5. | ||
## Step 8 - Get the client token | ||
For the client to have permission to send requests to the web application they must send a Bearer token to the application. | ||
To get this token, run the following `curl` command: | ||
``` | ||
$ export TOKEN=$(curl -k -L -X POST 'https://keycloak.example.com/realms/jwks-example/protocol/openid-connect/token' \ | ||
-H 'Content-Type: application/x-www-form-urlencoded' \ | ||
--data-urlencode grant_type=password \ | ||
--data-urlencode scope=openid \ | ||
--data-urlencode client_id=jwks-client \ | ||
--data-urlencode client_secret=$SECRET \ | ||
--data-urlencode username=jwks-user \ | ||
--data-urlencode password=$PASSWORD \ | ||
| jq -r .access_token) | ||
``` | ||
This command will save the token in the `TOKEN` shell variable. | ||
## Step 9 - Test the Configuration | ||
If you attempt to access the application without providing the bearer token, NGINX will reject your requests for that VirtualServer: | ||
``` | ||
$ curl -H 'Accept: application/json' webapp.example.com | ||
<html> | ||
<head><title>401 Authorization Required</title></head> | ||
<body> | ||
<center><h1>401 Authorization Required</h1></center> | ||
<hr><center>nginx/1.23.2</center> | ||
</body> | ||
</html> | ||
``` | ||
If a valid bearer token is provided, the request will succeed: | ||
``` | ||
$ curl -H 'Accept: application/json' -H "token: ${TOKEN}" webapp.example.com | ||
Server address: 10.42.0.7:8080 | ||
Server name: webapp-5c6fdbcbf9-pt9tp | ||
Date: 13/Dec/2022:14:50:33 +0000 | ||
URI: / | ||
Request ID: f1241390ac51318afa4fcc39d2341359 | ||
``` |
This file contains hidden or 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,10 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: Policy | ||
metadata: | ||
name: jwt-policy | ||
spec: | ||
jwt: | ||
realm: MyProductAPI | ||
token: $http_token | ||
jwksURI: http://keycloak.default.svc.cluster.local:8080/realms/jwks-example/protocol/openid-connect/certs | ||
shaun-nx marked this conversation as resolved.
Show resolved
Hide resolved
|
||
keyCache: 1h |
This file contains hidden or 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,51 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: keycloak | ||
labels: | ||
app: keycloak | ||
spec: | ||
ports: | ||
- name: http | ||
port: 8080 | ||
targetPort: 8080 | ||
selector: | ||
app: keycloak | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: keycloak | ||
namespace: default | ||
labels: | ||
app: keycloak | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: keycloak | ||
template: | ||
metadata: | ||
labels: | ||
app: keycloak | ||
spec: | ||
containers: | ||
- name: keycloak | ||
image: quay.io/keycloak/keycloak:20.0.1 | ||
args: ["start-dev"] | ||
env: | ||
- name: KEYCLOAK_ADMIN | ||
value: "admin" | ||
- name: KEYCLOAK_ADMIN_PASSWORD | ||
value: "admin" | ||
- name: KC_PROXY | ||
value: "edge" | ||
ports: | ||
- name: http | ||
containerPort: 8080 | ||
- name: https | ||
containerPort: 8443 | ||
readinessProbe: | ||
httpGet: | ||
path: /realms/master | ||
port: 8080 |
This file contains hidden or 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: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: nginx-config | ||
namespace: nginx-ingress | ||
data: | ||
resolver-addresses: "kube-dns.kube-system.svc.cluster.local" | ||
shaun-nx marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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: tls-secret | ||
type: kubernetes.io/tls | ||
data: | ||
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURFVENDQWZtZ0F3SUJBZ0lVS2hTQzBBcnhUblYrbjBhVnNENkFVTE5VQWhZd0RRWUpLb1pJaHZjTkFRRUwKQlFBd0dERVdNQlFHQTFVRUF3d05LaTVsZUdGdGNHeGxMbU52YlRBZUZ3MHlNVEF4TVRZd01qSXpNekZhRncwegpNVEF4TVRRd01qSXpNekZhTUJneEZqQVVCZ05WQkFNTURTb3VaWGhoYlhCc1pTNWpiMjB3Z2dFaU1BMEdDU3FHClNJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUURGeU1DSlhlSm9tMTdhcUVQc01NbTNlVzlpQzFHdlI4YW8KaDJhNmgvZWRXTUFndEtWSERmR2tPQ2V5NDBEdGtXTDN3U0NvZE1McnhPcnN2Lzhuc1VablFwQmNBekxBbzBJVgptYnhoS21WaS9EMkJpb2pBcDlqVXlsMjNma2RWMFdYM3NYV0JQek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yTHo4Z0RDNFo4WldqWDBBKzVTaTlQd3RMaFEKN3pBZEJUMHk5WjZuNGYxMVg0UWhKSkR1Ci0tLS0tRU5EIFBSSVZBVEUgS0VZLS0tLS0K |
This file contains hidden or 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: keycloak | ||
spec: | ||
host: keycloak.example.com | ||
tls: | ||
secret: tls-secret | ||
redirect: | ||
enable: true | ||
upstreams: | ||
- name: keycloak | ||
service: keycloak | ||
port: 8080 | ||
routes: | ||
- path: / | ||
action: | ||
pass: keycloak |
This file contains hidden or 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,16 @@ | ||
apiVersion: k8s.nginx.org/v1 | ||
kind: VirtualServer | ||
metadata: | ||
name: webapp | ||
spec: | ||
host: webapp.example.com | ||
policies: | ||
- name: jwt-policy | ||
upstreams: | ||
- name: webapp | ||
service: webapp-svc | ||
port: 80 | ||
routes: | ||
- path: / | ||
action: | ||
pass: webapp |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.