Skip to content

Commit c220a5e

Browse files
committed
Merge branch 'master' into pr/krumelmonster/552
2 parents 520e8f9 + e6494d9 commit c220a5e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+523
-658
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
# go: ['1.14', '1.15']
21-
go: ['1.18']
21+
go: ['1.23']
2222

2323
steps:
2424
- uses: actions/setup-go@v2

.github/workflows/docker-release-quayio-alpine.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,20 @@ jobs:
1717
steps:
1818
- name: Check out the repo
1919
uses: actions/checkout@v2
20-
20+
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v3
23+
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
2127
- name: Log in to Docker repository
2228
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
2329
with:
2430
registry: ${{ env.DOCKER_REPO }}
2531
username: ${{ secrets.QUAYIO_ROBOT_USERNAME }}
2632
password: ${{ secrets.QUAYIO_ROBOT_PASSWORD }}
27-
33+
2834
- name: Extract metadata (tags, labels) for Docker
2935
id: meta
3036
uses: docker/metadata-action@a67f45cb0f8e65cf693a0bc5bfa1c5057c623030
@@ -36,12 +42,15 @@ jobs:
3642
type=ref,event=branch
3743
type=semver,pattern={{version}}
3844
type=semver,pattern={{major}}.{{minor}}
39-
45+
4046
- name: Build and push Docker image using Dockerfile.alpine
4147
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
4248
with:
4349
file: Dockerfile.alpine
4450
context: .
4551
push: ${{ github.event_name != 'pull_request' }}
4652
tags: ${{ steps.meta.outputs.tags }}
47-
labels: ${{ steps.meta.outputs.labels }}
53+
labels: ${{ steps.meta.outputs.labels }}
54+
platforms: |
55+
linux/amd64
56+
linux/arm64

.github/workflows/docker-release-quayio.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,20 @@ jobs:
1717
steps:
1818
- name: Check out the repo
1919
uses: actions/checkout@v2
20-
20+
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v3
23+
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
2127
- name: Log in to Docker repository
2228
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
2329
with:
2430
registry: ${{ env.DOCKER_REPO }}
2531
username: ${{ secrets.QUAYIO_ROBOT_USERNAME }}
2632
password: ${{ secrets.QUAYIO_ROBOT_PASSWORD }}
27-
33+
2834
- name: Extract metadata (tags, labels) for Docker
2935
id: meta
3036
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
@@ -34,11 +40,14 @@ jobs:
3440
type=ref,event=branch
3541
type=semver,pattern={{version}}
3642
type=semver,pattern={{major}}.{{minor}}
37-
43+
3844
- name: Build and push Docker image using Dockerfile
3945
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
4046
with:
4147
context: .
4248
push: ${{ github.event_name != 'pull_request' }}
4349
tags: ${{ steps.meta.outputs.tags }}
4450
labels: ${{ steps.meta.outputs.labels }}
51+
platforms: |
52+
linux/amd64
53+
linux/arm64

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ main
44
config/config.yml
55
config/*config.yml
66
config/config.yml_*
7+
!config/config.yml_example_pocket-id
78
config/google_config.json
89
config/secret
910
!config/testing/*

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
- docker
88

99
go:
10-
- "1.18"
10+
- "1.23"
1111

1212
env:
1313
- ISTRAVIS=true

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@
44

55
Coming soon! Please document any work in progress here as part of your PR. It will be moved to the next tag when released.
66

7+
## v0.45.0
8+
9+
- Implement a Discord provider that uses `Username` as the username to match against in the `whiteList` config
10+
- Or uses `Username#Discriminator` if the Discriminator is present
11+
- Or uses ID if `discord_use_ids` is set
12+
13+
## v0.44.0
14+
15+
- migrate to github.com/golang-jwt/jwt/v4
16+
17+
## v0.43.0
18+
19+
- support multi-platform / multi-arch builds for published Docker images including `linux/amd64` and `linux/arm64`
20+
21+
## v0.42.0
22+
23+
- [fix auth to github](https://github.com/vouch/vouch-proxy/pull/601)
24+
- cleanup of minor issues flagged by gostaticcheck
25+
26+
## v0.41.0
27+
28+
- upgrade golang to `v1.23` from `v1.22`
29+
30+
## v0.40.0
31+
32+
- upgrade golang to `v1.22` from `v1.18`
33+
734
## v0.39.0
835

936
- [add support for listening on unix domain sockets](https://github.com/vouch/vouch-proxy/pull/488)

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# quay.io/vouch/vouch-proxy
22
# https://github.com/vouch/vouch-proxy
3-
FROM golang:1.18 AS builder
3+
FROM golang:1.23 AS builder
44

55
ARG UID=999
66
ARG GID=999

Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# quay.io/vouch/vouch-proxy
22
# https://github.com/vouch/vouch-proxy
3-
FROM golang:1.18 AS builder
3+
FROM golang:1.23 AS builder
44

55
ARG UID=999
66
ARG GID=999

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,16 @@ Vouch Proxy supports many OAuth and OIDC login providers and can enforce authent
2121
- [Alibaba / Aliyun iDaas](https://github.com/vouch/vouch-proxy/issues/344)
2222
- [AWS Cognito](https://github.com/vouch/vouch-proxy/issues/105)
2323
- [Twitch](https://github.com/vouch/vouch-proxy/blob/master/config/config.yml_example_twitch)
24-
- [Discord](https://github.com/eltariel/foundry-docker-nginx-vouch)
24+
- [Discord](https://github.com/vouch/vouch-proxy/blob/master/config/config.yml_example_discord)
2525
- [SecureAuth](https://github.com/vouch/vouch-proxy/blob/master/config/config.yml_example_secureauth)
2626
- [Gitea](https://github.com/vouch/vouch-proxy/blob/master/config/config.yml_example_gitea)
27-
- Keycloak
27+
- [Keycloak](config/config.yml_example_keycloak)
2828
- [OAuth2 Server Library for PHP](https://github.com/vouch/vouch-proxy/issues/99)
2929
- [HomeAssistant](https://developers.home-assistant.io/docs/en/auth_api.html)
3030
- [OpenStax](https://github.com/vouch/vouch-proxy/pull/141)
3131
- [Ory Hydra](https://github.com/vouch/vouch-proxy/issues/288)
3232
- [Nextcloud](https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/oauth2.html)
33+
- [Pocket ID](https://github.com/vouch/vouch-proxy/blob/master/config/config.yml_example_pocket-id)
3334
- most other OpenID Connect (OIDC) providers
3435

3536
Please do let us know when you have deployed Vouch Proxy with your preffered IdP or library so we can update the list.
@@ -50,11 +51,11 @@ If Vouch is running on the same host as the Nginx reverse proxy the response tim
5051
- [Running from Docker](#running-from-docker)
5152
- [Kubernetes Nginx Ingress](#kubernetes-nginx-ingress)
5253
- [Compiling from source and running the binary](#compiling-from-source-and-running-the-binary)
53-
- [/login and /logout endpoint redirection](#-login-and--logout-endpoint-redirection)
54+
- [/login and /logout endpoint redirection](#login-and-logout-endpoint-redirection)
5455
- [Troubleshooting, Support and Feature Requests](#troubleshooting-support-and-feature-requests-read-this-before-submitting-an-issue-at-github)
5556
(Read this before submitting an issue at GitHub)
56-
- [I'm getting an infinite redirect loop which returns me to my IdP (Google/Okta/GitHub/...)](#i-m-getting-an-infinite-redirect-loop-which-returns-me-to-my-idp--google-okta-github--)
57-
- [Okay, I looked at the issues and have tried some things with my configs but it's still not working](#okay--i-looked-at-the-issues-and-have-tried-some-things-with-my-configs-but-it-s-still-not-working)
57+
- [I'm getting an infinite redirect loop which returns me to my IdP (Google/Okta/GitHub/...)](#im-getting-an-infinite-redirect-loop-which-returns-me-to-my-idp-googleoktagithub)
58+
- [Okay, I looked at the issues and have tried some things with my configs but it's still not working](#okay-i-looked-at-the-issues-and-have-tried-some-things-with-my-configs-but-its-still-not-working)
5859
- [Contributing to Vouch Proxy](#contributing)
5960
- [Advanced Authorization Using OpenResty](#advanced-authorization-using-openresty)
6061
- [The flow of login and authentication using Google Oauth](#the-flow-of-login-and-authentication-using-google-oauth)
@@ -145,7 +146,7 @@ server {
145146
# forward authorized requests to your service protectedapp.yourdomain.com
146147
proxy_pass http://127.0.0.1:8080;
147148
# you may need to set these variables in this block as per https://github.com/vouch/vouch-proxy/issues/26#issuecomment-425215810
148-
# auth_request_set $auth_resp_x_vouch_user $upstream_http_x_vouch_user
149+
# auth_request_set $auth_resp_x_vouch_user $upstream_http_x_vouch_user;
149150
# auth_request_set $auth_resp_x_vouch_idp_claims_groups $upstream_http_x_vouch_idp_claims_groups;
150151
# auth_request_set $auth_resp_x_vouch_idp_claims_given_name $upstream_http_x_vouch_idp_claims_given_name;
151152
@@ -251,7 +252,7 @@ The variable `VOUCH_CONFIG` can be used to set an alternate location for the con
251252
All Vouch Proxy configuration items are documented in [config/config.yml_example](https://github.com/vouch/vouch-proxy/blob/master/config/config.yml_example)
252253

253254
- [Cacheing of the Vouch Proxy `/validate` response in Nginx](https://github.com/vouch/vouch-proxy/issues/76#issuecomment-464028743)
254-
- [Handleing `OPTIONS` requests when protecting an API with Vouch Proxy](https://github.com/vouch/vouch-proxy/issues/216)
255+
- [Handling `OPTIONS` requests when protecting an API with Vouch Proxy](https://github.com/vouch/vouch-proxy/issues/216)
255256
- [Validation by GitHub Team or GitHub Org](https://github.com/vouch/vouch-proxy/pull/205)
256257
- [Running VP on a Raspberry Pi using the ARM based Docker image](https://github.com/vouch/vouch-proxy/pull/247)
257258
- [Kubernetes architecture post ingress](https://github.com/vouch/vouch-proxy/pull/263#issuecomment-628297832)
@@ -332,6 +333,8 @@ an `alpine` based container built from `Dockerfile.alpine`
332333
- `quay.io/vouch/vouch-proxy:alpine-latest`
333334
- `quay.io/vouch/vouch-proxy:alpine-x.y.z`
334335

336+
As of `v0.43.0` both of these images are [Multi-platform builds](https://docs.docker.com/build/building/multi-platform/) supporting `linux/amd64` and `linux/arm64`.
337+
335338
Vouch Proxy `arm` images are available on [Docker Hub](https://hub.docker.com/r/voucher/vouch-proxy/)
336339

337340
- `voucher/vouch-proxy:latest-arm`

config/config.yml_example_discord

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
2+
# Vouch Proxy configuration
3+
# bare minimum to get Vouch Proxy running with Discord as an OpenID Provider
4+
5+
6+
vouch:
7+
domains:
8+
- yourdomain.com
9+
10+
# whiteList is a list of usernames that will allow a login if allowAllUsers is false
11+
whiteList:
12+
# The default behavior matches the Discord user's username
13+
- loganintech
14+
15+
# If the user still hasn't chosen a new username, the old username#discrimnator format will work
16+
- LoganInTech#1203
17+
18+
# If discord_use_ids is set to true, you must use the user's ID
19+
- 12345678901234567
20+
21+
cookie:
22+
# allow the jwt/cookie to be set into http://yourdomain.com (defaults to true, requiring https://yourdomain.com)
23+
secure: false
24+
# vouch.cookie.domain must be set when enabling allowAllUsers
25+
# domain: yourdomain.com
26+
27+
# https://discord.com/developers/docs/topics/oauth2
28+
oauth:
29+
provider: discord
30+
client_id: xxxxxxxxxxxxxxxxxxxxxxxxxxxx
31+
client_secret: xxxxxxxxxxxxxxxxxxxxxxxx
32+
callback_url: http://vouch.yourdomain.com:9090/auth
33+
## Uncomment this to match users based on their Discord ID
34+
# discord_use_ids: true

0 commit comments

Comments
 (0)