1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-10-30 23:47:52 +02:00

2227 Commits

Author SHA1 Message Date
David Symonds
110d51d1d7 test: replace mock pkg/clock with narrowly targeted stub clocks. (#3238)
The package under pkg/clock is github.com/benbjohnson/clock, which is
archived. It's also way more complex than is what is actually needed
here, so we can entirely remove the dependency and remove the helper
package.

Fixes #2840.

Signed-off-by: David Symonds <dsymonds@gmail.com>
2025-10-28 10:05:02 +01:00
Jan Larwig
8f687e4d0c chore(deps): upgrade to latest go1.25.3 (#3244)
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-10-28 09:54:10 +01:00
Olivier Mengué
f950dc9942 feat(makefile): simplify validate-go-version (#3147)
Since Go 1.21 the go toolchain validates strictly the "go" version
directive in go.mod, and downloads and uses the requested toolchain if
necessary. See https://go.dev/doc/toolchain

So we can just run "go list" to tell the Go toolchain to validate our
build environment according to go.mod.

To extract the "go" directive version from go.mod (used to select the
Docker build image) we also use "go list".
2025-10-28 09:13:35 +01:00
Schmitt Paul
31b275f580 docs: clarify ingress-nginx integration and remove Lua block example (#3202)
* docs: clarify ingress-nginx integration and remove Lua block example for oauth2-proxy

This PR revises the integration guide for oauth2-proxy with ingress-nginx in Kubernetes:

Recommends the minimal configuration: just auth-url and auth-signin annotations.
Removes the Lua block example, as it did not work in practice despite following nginx documentation and extensive testing.
Clearly states that the official ingress-nginx external auth example is the recommended approach for most users.
Notes that advanced Lua/cookie handling is only needed for rare, advanced scenarios.

Signed-off-by: Jan Larwig <jan@larwig.com>

* doc: update 3 latest docs versions

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-10-28 08:48:23 +01:00
Vincent Privat
ea1dc3f606 Fix typo: diffrerent -> different (#3222)
Signed-off-by: Vincent Privat <vincent.privat@airbus.com>
2025-10-28 08:40:51 +01:00
stagswtf
51e80f24ef fix: use GetSecret() in ticket.go makeCookie to respect cookie-secret-file (#3228)
* fix: use GetSecret() in ticket.go makeCookie

The makeCookie method in ticket.go was using t.options.Secret directly, which
meant cookie-secret-file was not being respected. Updated to use GetSecret()
which handles both cookie-secret and cookie-secret-file properly.

Also added test coverage for cookie-secret-file functionality.

Fixes #3224

Signed-off-by: stagswtf <142280349+stagswtf@users.noreply.github.com>

* docs: update CHANGELOG.md for cookie-secret-file fix

Signed-off-by: stagswtf <142280349+stagswtf@users.noreply.github.com>

* correct PR link and undo file formatting

Signed-off-by: stagswtf <142280349+stagswtf@users.noreply.github.com>

* fix: error wrapping

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: stagswtf <142280349+stagswtf@users.noreply.github.com>
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-10-28 08:37:25 +01:00
renovate[bot]
c0a087d7f2 chore(deps): update actions/upload-artifact action to v5 (#3243)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 08:03:40 +01:00
renovate[bot]
4295f0c1f9 chore(deps): update dependency golangci/golangci-lint to v2.5.0 (#3212)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 08:00:27 +01:00
renovate[bot]
a50bbcd6f6 chore(deps): update docker-compose (#3188)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 07:53:29 +01:00
renovate[bot]
dea0d0cf44 chore(deps): update helmv3 (#3189)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 07:53:12 +01:00
renovate[bot]
e693f4070a chore(deps): update actions/labeler action to v6 (#3190)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 07:43:22 +01:00
renovate[bot]
5539e59002 chore(deps): update actions/setup-go action to v6 (#3191)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 07:43:04 +01:00
renovate[bot]
65ef2ca3c9 chore(deps): update actions/stale action to v10 (#3193)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 07:42:13 +01:00
renovate[bot]
bccc988366 chore(deps): update actions/setup-node action to v6 (#3242)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 07:41:34 +01:00
renovate[bot]
a3349add54 chore(deps): update alpine docker tag to v3.22.2 (#3241)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-28 07:40:08 +01:00
Richard Ahlquist
9168731c7a fix(deps): revert actions/upload-pages-artifact action to v3 (#3211)
Signed-off-by: Richard Ahlquist <richard.jimmy.johansson@gmail.com>
2025-09-28 14:48:59 +02:00
David Symonds
66cdb9d939 doc: update contribution guide to avoid a specific mention of the version of Go being used. (#3157) 2025-09-25 20:11:57 +02:00
renovate[bot]
f1c08a3cd7 chore(deps): update actions/upload-pages-artifact action to v4 (#3194)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 20:09:52 +02:00
Conrad Hoffmann
8afb047e01 doc: SourceHut documentation fixes (#3170)
* fix: SourceHut documentation

- Add it to sidebar and provider index
- Fix broken link

This fixes an oversight in #2359, where I had not fully understood how
the documentation works.

Signed-off-by: Conrad Hoffmann <ch@bitfehler.net>

* fix: doc build instructions in docs/README.md

---------

Signed-off-by: Conrad Hoffmann <ch@bitfehler.net>
2025-08-20 12:02:32 +02:00
Jan Larwig
5082db0bec Merge pull request #3169 from oauth2-proxy/release/v7.12.0
release v7.12.0
v7.12.0
2025-08-19 08:50:29 +02:00
Jan Larwig
7294eebce1 add changelog entry for v7.12.0
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-08-19 08:42:24 +02:00
github-actions[bot]
b4b69a6cb3 update to release version v7.12.0 2025-08-19 08:42:24 +02:00
github-actions[bot]
413d4f6976 add new docs version 7.12.x
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-08-19 08:42:18 +02:00
Richard Brežák
8c1b2b63bf fix: Gitea team membership (#3150)
* bugfix: Gitaa team membership

Gitea doesn't properly fill in all the fields like GitHub,
so implement a series of fallbacks.

Signed-off-by: magic_rb <magic_rb@redalder.org>

* add changelog, documentation and fix groups list

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: magic_rb <magic_rb@redalder.org>
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-08-19 08:40:36 +02:00
jet
f18a0b7b07 feat: allow disable-keep-alives configuration in upstream (#3156)
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-08-19 07:56:16 +02:00
renovate[bot]
3978b2f27f chore(deps): update docker-compose (#3160)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 14:27:46 +02:00
renovate[bot]
26813d3cdd chore(deps): update dependency golangci/golangci-lint to v2.4.0 (#3161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 14:27:37 +02:00
renovate[bot]
82e016954c chore(deps): update actions/checkout action to v5 (#3164)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-18 14:27:29 +02:00
Jan Larwig
744b31a2c6 chore(dep): upgrade to latest golang 1.24.6 (#3166)
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-08-18 14:27:19 +02:00
Kevin Kreitner
4c86a4d574 feat: add Cidaas provider (#2273)
* Add sensible logging flag to default setup for logger

* Fix default value flag for sensitive logging

* Remove sensitive logging changes

* Add Cidaas provider

* Update CHANGELOG.md

* Add required groups scope to defaults

* Fix tests

* Remove if block with protected resource

* Fix linting

* Adjust provider sorting, fixes

* Directly handle error return

Co-authored-by: Jan Larwig <jan@larwig.com>

* Use less deep nesting

Co-authored-by: Jan Larwig <jan@larwig.com>

* Directly handle returned error

Co-authored-by: Jan Larwig <jan@larwig.com>

* Pass provider options to Cidaas provider

Co-authored-by: Jan Larwig <jan@larwig.com>

* Add import for provider options

* Fix tests

* Fix linting

* Add Cidaas doc page

* Add Cidaas provider doc page to overview

* Fix link in docs

* Fix link in docs

* Add link to Cidaas

* fix provider order in docs and changelog position

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Teko012 <112829523+Teko012@users.noreply.github.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Kevin Kreitner <kevinkreitner@gmail.com>
2025-08-12 17:41:45 +02:00
Jan Larwig
9667bce094 feat(e2e): add workflow to trigger e2e test suite through PR comments (#3153)
* feat(e2e): add workflow to trigger e2e test suite through PR comments

* add empty line
2025-08-12 08:11:00 +02:00
Theron Boerner
4eaa1bcfd5 fix: port for local-environment (#3148) 2025-08-02 00:36:45 +02:00
github-actions[bot]
c0a928eded release v7.11.0 (#3145)
* add new docs version 7.11.x

* update to release version v7.11.0

* add changelog entry for v7.11.0

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
v7.11.0
2025-07-30 20:09:33 +02:00
Jan Larwig
9ffafad4b2 Merge commit from fork
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-07-30 19:46:58 +02:00
nobletrout
f4b33b64bd feat: differentiate between "no available key" and error for redis sessions (#3093)
* add some better error handling

* add changelog entry

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-24 08:33:06 +02:00
Sourav Agrawal
e75a258299 feat: make google-groups argument optional (#3138)
add test cases

update documentation

refactor code and some cleanup

update changelog

Signed-off-by: Jan Larwig <jan@larwig.com>
2025-07-24 07:55:54 +02:00
Michael Cornel
b905f2cd93 feat: use non-default authorization request response mode in OIDC providers (#3055)
* fix: OIDC sets response mode

* Update CHANGELOG
2025-07-23 22:40:12 +02:00
Sandy Chen
dc8b1623a2 feat(cookie): add feature support for cookie-secret-file (#3104)
* feat: add feature support for cookie-secret-file

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-Authored-By: Sandy Chen <Yuxuan.Chen@morganstanley.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-22 18:59:55 +02:00
Ashkan Daie
137e59d526 fix: regex substitution for $ signs in upstream path handling before running envsubst (#2524)
* Perform a regex replace of $NUM to $$NUM before running envsubst

* Perform a regex replace of $NUM to $$NUM before running envsubst

* add test case; fix linter warnings; add method documentation

Signed-off-by: Jan Larwig <jan@larwig.com>

* add changelog entry

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-22 08:52:23 +02:00
Conrad Hoffmann
a88306be98 feat: add SourceHut (sr.ht) provider (#2359)
* Add SourceHut (sr.ht) provider

* fix changelog entry

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-22 08:16:32 +02:00
Bob Du
4d17bc1d68 feat: allow use more possible google admin-sdk api scopes (#2743)
* feat: Allow use more possible google admin-sdk api scopes.

* reduce cognitive complexity

Signed-off-by: Bob Du <i@bobdu.cc>

* remove unnecessary else block / indentation

Signed-off-by: Jan Larwig <jan@larwig.com>

* add changelog entry

Signed-off-by: Jan Larwig <jan@larwig.com>

* slight formatting and error message rephrasing

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Bob Du <i@bobdu.cc>
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-21 09:06:17 +02:00
Simmo Saan
3ac834dbcf Fix local-environment ports (#3136)
* Change Dex port in local-environment from 4190 to 5556

Port 4190 is blocked by standards-compliant browsers (e.g. Firefox), as per https://fetch.spec.whatwg.org/#port-blocking.
Port 5556 is used by Dex in its example config files: 745e1114f3/examples/config-dev.yaml (L50)

* Fix upstream in local-environment/oauth2-proxy.cfg

http://httpbin.localtest.me:8080 is only exposed to the host, not to httpbin Docker network.
Causes Bad Gateway before.

* Do not expose unauthenticated httpbin service in local-environment

This defeats the point of having oauth2-proxy.
It has already been misleading by causing the bug fixed in cafc6af48fc38f6fe4395fb0c7e2638bc84e6091.
It serves as a bad example: users might accidentally expose the service they're trying to protect in the first place.

* Remove unnecessary httpbin.localtest.me alias from local-environment
2025-07-20 20:32:50 +02:00
Johann
5e7f14bdcb fix: show login page on broken session cookie (#2605)
* fix: redirect on invalid cookie

* docs: update changelog

* chore: remove duplicated code

* fix: status code handling if wrong http method is used

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-20 17:17:24 +02:00
Jan Larwig
b57c82181d feat(cookie) csrf per request limit (#3134)
* Allow setting maximum number of csrf cookies, deleting the oldest if necessary

* Add a test for multiple CSRF cookies to remove the old cookie

* Add docs/changelog

* If limit is <=0 do not clear

Signed-off-by: test <bert@transtrend.com>

* Better docs

Co-authored-by: Jan Larwig <jan@larwig.com>

* direct check of option value

Co-authored-by: Jan Larwig <jan@larwig.com>

* direct use of option value

Co-authored-by: Jan Larwig <jan@larwig.com>

* sort based on clock compare vs time compare

Co-authored-by: Jan Larwig <jan@larwig.com>

* clock.Clock does not implement Compare, fix csrf cookie extraction after rename

Signed-off-by: Bert Helderman <bert@transtrend.com>

* Linter fix

* add method signature documentation and slight formatting

Signed-off-by: Jan Larwig <jan@larwig.com>

* fix: test case for csrf cookie limit and flag

Signed-off-by: Jan Larwig <jan@larwig.com>

---------

Signed-off-by: Bert Helderman <bert@transtrend.com>
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: test <bert@transtrend.com>
Co-authored-by: bh-tt <71650427+bh-tt@users.noreply.github.com>
2025-07-20 16:44:42 +02:00
renovate[bot]
d5f8507cc8 chore(deps): update alpine docker tag to v3.22.1 (#3129)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-20 11:37:45 +02:00
renovate[bot]
20f561cf70 chore(deps): update docker-compose (#3130)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-20 11:08:44 +02:00
renovate[bot]
c403d61d73 chore(deps): update helm release oauth2-proxy to v7.14.1 (#3133)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-20 11:08:23 +02:00
renovate[bot]
658256d566 chore(deps): update gomod (#3132)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-20 11:08:02 +02:00
renovate[bot]
313a2cb38b chore(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.52.0 (#3131)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-20 11:07:35 +02:00
Joel Speed
78d2a3658f Merge pull request #3128 from oauth2-proxy/release/v7.10.0
release v7.10.0
v7.10.0
2025-07-17 13:02:09 +01:00