Skip to content

Commit

Permalink
Update docu for 3.1.0 release (#546)
Browse files Browse the repository at this point in the history
  • Loading branch information
p53 authored Jan 20, 2025
1 parent 69f2d54 commit fe9cfa1
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ Please remember to provide a good summary, description as well as steps to repro
To run Gatekeeper, you can build it using this command:

```bash
docker buildx build --platform linux/amd64,linux/arm64 -t quay.io/gogatekeeper/gatekeeper:3.0.2 .
docker buildx build --platform linux/amd64,linux/arm64 -t quay.io/gogatekeeper/gatekeeper:3.1.0 .
```

or you can use aleady existing Docker image by running:

```bash
docker run -it --rm quay.io/gogatekeeper/gatekeeper:3.0.2 \
docker run -it --rm quay.io/gogatekeeper/gatekeeper:3.1.0 \
--listen 127.0.0.1:8080 \
--upstream-url http://127.0.0.1:80 \
--discovery-url https://keycloak.example.com/realms/<REALM_NAME> \
Expand Down
41 changes: 37 additions & 4 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,41 @@ If you have roles listed in some custom claim, please see [custom claim matching
You can use gatekeeper to protect APIs, frontend server applications, frontend client applications.
Frontend server-side applications can be protected by Authorization Code Flow (also with PKCE), during which several redirection
steps take place. For protecting APIs you can use Client Credentials Grant to avoid redirections steps
involved in authorization code flow you have to use `--no-redirects=true`. For frontend applications
you can use Authorization Code Flow (also with PKCE) with encrypted refresh token cookies enabled, in this case however you have to handle redirections, e.g. at token expiration.
involved in authorization code flow you have to use `--no-redirects=true`.

From version 3.1.0 gatekeeper also supports both Authorization Code Flow and "API" mode to be configured
on same gatekeeper, example:

```yaml
# this configuration enables globally Authorization Code Flow and "API" (no-redirect=true) mode
# on /api/v1/* and /api/v2*
no-redirects: false
resources:
- uri: /api/v1/*
methods:
- GET
no-redirect: true
- uri: /api/v2/*
methods:
- GET
no-redirect: true
```

**IMPORTANT** - This will not work, from technical and backward compatibility reasons, you can override in
resources only to no-redirect=true:

```yaml
no-redirects: true
resources:
- uri: /myfrontend1
methods:
- GET
no-redirect: false
- uri: /myfrontend2
methods:
- GET
no-redirect: false
```

## Default Deny

Expand Down Expand Up @@ -481,7 +514,7 @@ in Keycloak, providing granular role controls over issue tokens.

``` yaml
- name: gatekeeper
image: quay.io/gogatekeeper/gatekeeper:3.0.2
image: quay.io/gogatekeeper/gatekeeper:3.1.0
args:
- --enable-forwarding=true
- --forwarding-username=projecta
Expand All @@ -508,7 +541,7 @@ Example setup client credentials grant:

``` yaml
- name: gatekeeper
image: quay.io/gogatekeeper/gatekeeper:3.0.2
image: quay.io/gogatekeeper/gatekeeper:3.1.0
args:
- --enable-forwarding=true
- --forwarding-domains=projecta.svc.cluster.local
Expand Down
2 changes: 1 addition & 1 deletion e2e/k8s/manifest_test_forwardauth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2626,7 +2626,7 @@ spec:
- -c
- "while true;do sleep 10;done"
- name: proxy
image: quay.io/gogatekeeper/gatekeeper:3.0.2
image: quay.io/gogatekeeper/gatekeeper:3.1.0
imagePullPolicy: Never
args:
- --client-id=test-client
Expand Down
2 changes: 1 addition & 1 deletion kube/reverse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
secretName: tls
containers:
- name: proxy
image: quay.io/gogatekeeper/gatekeeper:3.0.2
image: quay.io/gogatekeeper/gatekeeper:3.1.0
imagePullPolicy: Always
args:
- --client-id=broker
Expand Down

0 comments on commit fe9cfa1

Please sign in to comment.