Skip to content

Commit

Permalink
Add auth query params docu, deps update (#459)
Browse files Browse the repository at this point in the history
* Update deps

* Update docu for 2.11.0 release
  • Loading branch information
p53 committed May 6, 2024
1 parent 79855c9 commit 3af5686
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 15 deletions.
14 changes: 7 additions & 7 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:2.10.0 .
docker buildx build --platform linux/amd64,linux/arm64 -t quay.io/gogatekeeper/gatekeeper:2.11.0 .
```

or you can use aleady existing Docker image by running:

```bash
docker run -it --rm quay.io/gogatekeeper/gatekeeper:2.10.0 \
docker run -it --rm quay.io/gogatekeeper/gatekeeper:2.11.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 All @@ -44,16 +44,16 @@ Beside links to archives of binaries we provide also checksum file containing ch
for archives. You can download file gatekeeper-checksum.txt, it contains sha512 checksums e.g.:

```
324b34ece86b6214f835ba9fd79e185864a9005f514458796c22c053de63f428235d2d2a04864065a49c090ad81d2daeb45546544fdd9531a8dea1a43145b8f0 gatekeeper_2.10.0_windows_amd64.zip
38759e75a94d130758cd26958bd9a66b261be8d58a6c7a0fc04845157649aaf628d22a115c95285b405f8e4d6afa8bd78ca8677d1304faf06db93a0cbbc831a6 gatekeeper_2.10.0_linux_amd64.tar.gz
f5322e41b3d78017191246bdd54f99e9b3dd8d5ff9d224e7e81b678a952c1d5aae125ea4c251928969b0a0ea0dc59724308c918993c8227f384f61896f58cbd0 gatekeeper_2.10.0_macOS_amd64.tar.gz
324b34ece86b6214f835ba9fd79e185864a9005f514458796c22c053de63f428235d2d2a04864065a49c090ad81d2daeb45546544fdd9531a8dea1a43145b8f0 gatekeeper_2.11.0_windows_amd64.zip
38759e75a94d130758cd26958bd9a66b261be8d58a6c7a0fc04845157649aaf628d22a115c95285b405f8e4d6afa8bd78ca8677d1304faf06db93a0cbbc831a6 gatekeeper_2.11.0_linux_amd64.tar.gz
f5322e41b3d78017191246bdd54f99e9b3dd8d5ff9d224e7e81b678a952c1d5aae125ea4c251928969b0a0ea0dc59724308c918993c8227f384f61896f58cbd0 gatekeeper_2.11.0_macOS_amd64.tar.gz
```

After you download archive of binary you can calculate it's checksum by using e.g. sha512sum Linux utility:

```
sha512sum /my/path/gatekeeper_2.10.0_linux_amd64.tar.gz
38759e75a94d130758cd26958bd9a66b261be8d58a6c7a0fc04845157649aaf628d22a115c95285b405f8e4d6afa8bd78ca8677d1304faf06db93a0cbbc831a6 gatekeeper_2.10.0_linux_amd64.tar.g
sha512sum /my/path/gatekeeper_2.11.0_linux_amd64.tar.gz
38759e75a94d130758cd26958bd9a66b261be8d58a6c7a0fc04845157649aaf628d22a115c95285b405f8e4d6afa8bd78ca8677d1304faf06db93a0cbbc831a6 gatekeeper_2.11.0_linux_amd64.tar.g
```

As you can see output of command is checksum, you can compare it with the one in gatekeeper-checksum.txt.
Expand Down
35 changes: 33 additions & 2 deletions docs/content/userguide/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,18 +300,49 @@ where you can specify which query params will be forwarded to IDP

This example will allow passing myparam and yourparam with any value to IDP:

<<<<<<< HEAD
```bash
=======
```
>>>>>>> 79855c9ed13894f61e656147fb2b9d062a262e94
--allowed-query-params="myparam=" \
--allowed-query-params="yourparam="
```
<<<<<<< HEAD
yaml example:
```yaml
allowed-query-params:
- myparam: ""
- yourparam: ""
```

This example will allow passing myparam and yourparam only with specified value:

```bash
=======
This example will allow passing myparam and yourparam only with specified value:

```
>>>>>>> 79855c9ed13894f61e656147fb2b9d062a262e94
--allowed-query-params="myparam=myvalue" \
--allowed-query-params="yourparam=yourvalue"
```
<<<<<<< HEAD
yaml example:
yaml example:
```yaml
allowed-query-params:
- myparam: "myvalue"
- yourparam: "yourvalueF"
```

=======
>>>>>>> 79855c9ed13894f61e656147fb2b9d062a262e94
## TCP proxy with HTTP CONNECT

You can protect your TCP services with gogatekeeper by adding `CONNECT` HTTP method to list of `custom-http-methods`. On client side you will need to pass of course token in `Authorization` header (righ now there are few clients which could make HTTP connect with `Bearer` token and then forward tcp, e.g. gost proxy - but only in static way, some IDE provide HTTP CONNECT functionality for db connectors but only with `Basic` authentication, we would like to add this functionality to gatekeeper in future). This setup will authenticate connection at start and will create tunnel to your backend service. Please use with care and ensure that it allows connection only to intended services, otherwise it can be missused for various attacks.
Expand Down Expand Up @@ -436,7 +467,7 @@ in Keycloak, providing granular role controls over issue tokens.

``` yaml
- name: gatekeeper
image: quay.io/gogatekeeper/gatekeeper:2.10.0
image: quay.io/gogatekeeper/gatekeeper:2.11.0
args:
- --enable-forwarding=true
- --forwarding-username=projecta
Expand All @@ -463,7 +494,7 @@ Example setup client credentials grant:

``` yaml
- name: gatekeeper
image: quay.io/gogatekeeper/gatekeeper:2.10.0
image: quay.io/gogatekeeper/gatekeeper:2.11.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:2.10.0
image: quay.io/gogatekeeper/gatekeeper:2.11.0
imagePullPolicy: Never
args:
- --client-id=test-client
Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ require (
github.com/unrolled/secure v1.0.8
github.com/urfave/cli/v2 v2.25.7
go.uber.org/zap v1.19.0
golang.org/x/crypto v0.21.0
golang.org/x/net v0.21.0
golang.org/x/crypto v0.23.0
golang.org/x/net v0.25.0
golang.org/x/oauth2 v0.14.0
gopkg.in/yaml.v2 v2.4.0
)
Expand Down Expand Up @@ -138,8 +138,8 @@ require (
golang.org/x/arch v0.7.0 // indirect
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a // indirect
golang.org/x/sync v0.6.0 // indirect
golang.org/x/sys v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/text v0.15.0 // indirect
golang.org/x/tools v0.18.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240102182953-50ed04b92917 // indirect
Expand Down
8 changes: 8 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ golang.org/x/crypto v0.19.0 h1:ENy+Az/9Y1vSrlrvBSyna3PITt4tiZLf7sgCjZBX7Wo=
golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA=
golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs=
golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a h1:HinSgX1tJRX3KsL//Gxynpw5CTOAIPhgL4W8PNiIpVE=
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc=
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
Expand All @@ -406,6 +408,8 @@ golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.14.0 h1:P0Vrf/2538nmC0H+pEQ3MNFRRnVR7RlqyVw+bvm26z0=
golang.org/x/oauth2 v0.14.0/go.mod h1:lAtNWgaWfL4cm7j2OV8TxGi9Qb7ECORx8DktCY74OwM=
Expand Down Expand Up @@ -440,6 +444,8 @@ golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y=
golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
Expand All @@ -456,6 +462,8 @@ golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
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:2.10.0
image: quay.io/gogatekeeper/gatekeeper:2.11.0
imagePullPolicy: Always
args:
- --client-id=broker
Expand Down

0 comments on commit 3af5686

Please sign in to comment.