Commit Graph

562 Commits

Author SHA1 Message Date
Richard Hagen 7d85c99d8e
fix(entra-id): use federated credentials for refresh token (#3031)
* fix: use federated credentials to refresh token in entra id

* fix: add some error handling

* chore: update changelog

* chore: update comments

* chore: update comments

* doc: reference entra id docs and clearer phrasing of comments

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-04-25 09:59:09 +02:00
Enrico 07b60b1553
chore(deps): upgrade to latest golang v1.23.x release (#3041) 2025-04-24 13:47:48 +02:00
Justin Ryan 8abdbb5a18
Add --bearer-token-login-fallback option (#2924)
* add --deny-invalid-bearer-tokens

* update changelog

* PR feedback, update api-routes description

* update --api-routes description

* revert load_test fix that I needed locally

---------

Co-authored-by: Justin Ryan <j.ryan@mwam.com>
2025-04-21 13:40:39 +01:00
Michael Cornel f6b95c0df8
feat: allow to set non-default authorization request response mode (#3001)
* Update Go version in devcontainer

* Add option to change response mode in authorization request

* Fix option name

* Update docs and changelog

* Rename config value to underscore

* Add unit tests for added parameter

* Move change to upcoming release

* Generate alpha config

---------

Co-authored-by: Michael Cornel <michael@stieler.it>
2025-03-31 10:04:19 +02:00
Evan Gibler b2c69e25eb
feat: update HashNonce to use crypto/sha256 (#2967)
Signed-off-by: egibs <20933572+egibs@users.noreply.github.com>
2025-03-25 21:12:37 +01:00
github-actions[bot] 2ab22bd9f1
release v7.8.2 (#3012)
* update to release version v7.8.2

* docs: release letter

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-03-25 20:45:16 +01:00
Jan Larwig 46554b5bff
chore(deps): update golang dependencies and pin to latest golang v1.23.x release (#3011)
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-03-25 20:22:56 +01:00
Olivier Mengué 8a8fcab580 deps: remove tools/reference-gen from go.mod
Remove github.com/oauth2-proxy/tools/reference-gen from dependencies.
Instead we are now running it with "go run" with a version suffix.

Long version:
- github.com/oauth2-proxy/tools/reference-gen is removed from
  tools/tool/go
- in pkg/apis/options/doc.go we now run reference-run with a version
  suffix (go run package@version) with the version comming from go.mod.
- the "//go:generate" line is split in 2 lines (using the -command
  flag) for readability
- "go mod tidy" for cleaning dependencies from go.mod, go.sum

Note: we are not upgrading reference-gen here. That will be a further
separate change.
2025-03-19 00:37:11 +01:00
David Symonds 8a36a6622d Update golang.org/x/net to v0.36.0.
This addresses CVE-2025-22870 (https://go.dev/issue/71984).
2025-03-05 08:13:48 +11:00
David Symonds cc87465e9b Update golang.org/x/oauth2 to v0.27.0.
This addresses CVE-2025-22868 (https://go.dev/issue/71490).
2025-02-25 20:42:09 +11:00
Matthias Penner a393ea3ca0 pkg/cookies: use 'Max-Age' instead of 'Expires' for cookie expiration 2025-02-24 11:14:51 +01:00
Jan Larwig 3cf74c21f8 doc: update changelog 2025-01-20 20:45:45 +01:00
Jan Larwig 0edecd381e
update release highlights 2025-01-15 12:22:44 +01:00
github-actions[bot] c580b7fad7 update to release version v7.8.1 2025-01-15 11:04:42 +00:00
Jan Larwig a29eda3a6d
Merge branch 'master' into fix/missing-version-during-docker-built 2025-01-15 09:08:42 +01:00
stomekpe f31e02cebd
fix: jwt regex validation error during skip-jwt-bearer-tokens flow (#2888)
---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2025-01-15 09:06:21 +01:00
Jan Larwig f1a5011108
fix: setting missing version during docker built 2025-01-14 16:29:26 +01:00
tuunit 8dd2cbec4d
fix: systemd socket support build handling for windows 2025-01-13 16:41:33 +01:00
tuunit ae5b5dc45f
doc: update release v7.8.0 changelog 2025-01-13 16:41:33 +01:00
github-actions[bot] f2ce83b154
doc: add new docs version 7.8.x 2025-01-13 16:41:19 +01:00
axel7083 e28603f7af
feature: static public keys file support for oidc provider
Co-authored-by: Jan Larwig <jan@larwig.com>
Co-authored-by: JJ Łakis <jacek.lakis@checkatrade.com>
2025-01-11 12:09:23 +00:00
JJ Łakis ae8fb08a89
feat(entra): add Workload Identity support for Entra ID (#2902) 2025-01-11 11:12:41 +00:00
Jacek J. Łakis 05b91f310a chore: extend test cases for oidc provider and documentation regarding implicit setting of the groups scope when no scope was specified in the config
Co-authored-by: Jan Larwig <jan@larwig.com>
2024-11-09 15:48:29 +01:00
Vish (Ishaya) Abrams 4e2013e6ba
fix: update code_verifier to use recommended method (#2620)
The [RFC](https://datatracker.ietf.org/doc/html/rfc7636#section-4.1)
says that a code verifier just uses unreserved characters, but the
recommended method is that it is a base64-urlencoded 32-octet url. Some
implementations of PKCE (most notably the one used by salesforce)
require that this is a valid base64 encoded string[1], so this patch
switches to using the recommended approach to make it more compatible.

[1]: https://help.salesforce.com/s/articleView?id=sf.remoteaccess_pkce.htm&type=5
2024-11-06 15:16:39 +01:00
Ondrej Sika 3ceef0cff4
feat: add CF-Connecting-IP as supported real ip header (#2821) 2024-11-04 23:28:08 +01:00
Reto Kupferschmid 64e736f668
fix: websocket path rewrite (#2300) 2024-11-04 23:12:35 +01:00
Josef Johansson 6743a9cc89 Add support for systemd.socket
When using sockets to pass data between e.g. nginx and oauth2-proxy it's
simpler to use sockets. Systemd can even facilitate this and pass the
actual socket directly.

This also means that only the socket runs with the same group as nginx
while the service runs with DynamicUser.

Does not support TLS yet.

nginx
```
server {
    location /oauth2/ {
      proxy_pass http://unix:/run/oauth2-proxy/oauth2.sock;
}
```

oauth2-proxy.socket
```
[Socket]
ListenStream=%t/oauth2.sock
SocketGroup=www-data
SocketMode=0660
```

Start oauth2-proxy with the parameter `--http-address=fd:3`.

Signed-off-by: Josef Johansson <josef@oderland.se>
2024-10-23 09:35:47 +02:00
bjencks 66f1063722
feat: add X-Envoy-External-Address as supported header (#2755) 2024-10-13 19:55:47 +02:00
Gavin Mogan ab448cf38e
doc: add standard opencontainer docker labels (#2800) 2024-10-09 15:01:36 +02:00
github-actions[bot] 055a63432c
update to release version v7.7.1 2024-10-08 14:41:41 +02:00
Nuno Miguel Micaelo Borges ff761d2523
fix: runtime error: index out of range (0) with length 0 (#2328)
* Issue 2311: runtime error: index out of range [0] with length 0 while extracting state of of the csrf

---------

Co-authored-by: tuunit <jan@larwig.com>
2024-10-08 14:40:41 +02:00
rd-danny-fleer 642ba174d4
fix: unable to use hyphen in JSON path for oidc-groups-claim option (#2619) 2024-10-07 20:08:44 +02:00
tuunit 4bd920b208
add changelog entry 2024-10-06 21:55:45 +02:00
tuunit 07230ead91
fix(ci): testing full release cycle before release branches can be merged 2024-10-02 16:03:13 +02:00
tuunit 3c7dadcbd2
add v7.7.0 release highlights 2024-10-01 11:15:48 +02:00
tuunit 6e32bd6e38
fix missing 'changes since' section logic 2024-10-01 11:15:47 +02:00
github-actions[bot] f432cf79e2
update to release version v7.7.0 2024-10-01 11:15:46 +02:00
Johann 65e83fc3cc
fix(csrf): possible infinite loop (#2607) 2024-09-30 18:20:43 +02:00
tuunit 41c8d5bfce chore(deps): update all golang dependencies 2024-09-23 16:38:40 +02:00
Ian Roberts 51c65c9e79 docs: added changelog entry for file upstream rewriteTarget 2024-09-02 11:27:48 +01:00
priby05 f71a7fd2a2
feature/s390x architecture support (#2734)
* Add s390x architecture support

* Update CHANGELOG
2024-08-23 09:02:02 +02:00
Jan Larwig ca25c906bb
docs: update provider list with refresh support (#2711)
---------

Co-authored-by: mikefab-msf <117652131+mikefab-msf@users.noreply.github.com>
2024-07-18 23:43:58 +02:00
Koen van Zuijlen 343bd61ebb
chore(deps): Updated to ginkgo v2 (#2459)
* chore(deps): Updated to ginkgo v2

* fix basic auth test suite cleanup

* fix redis store tests

* add changelog entry

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2024-07-18 22:41:02 +02:00
af su 211c605875
docs: additional notes about available claims for HeaderValue (#2674)
* docs: additional notes on HeaderValue

* docs: add code comments

* fix missing preferred_username

* regenerate docs

* add changelog entry

---------

Co-authored-by: afsu <saf@zjuici.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2024-07-18 22:31:19 +02:00
Jacob Middag 3045392c17
feat: Replace default Go user-agent with oauth2-proxy and version (#2570)
* feat: Replace default Go user-agent with oauth2-proxy and version

* Add to CHANGELOG

* Make userAgentTransport configurable and composable

* Use correct naming convention for DefaultHTTPClient

* Move version to own package and use named arguments

* Update version path in Makefile

* Fix import path in Makefile

* Change importpath in dist.sh

* Minor style issues
2024-07-14 21:09:17 +01:00
Pierluigi Lenoci 2d07c08811
Added changelog and docs 2024-06-10 11:37:00 +02:00
Josef Johansson 8f7209ba1a pkg/http: Fix leaking goroutines in tests
By using the context created by the test, the goroutines produced in
http.Client is actually closed when cancelled and such, not leaked.

Signed-off-by: Josef Johansson <josef86@gmail.com>
2024-03-26 12:31:26 +01:00
github-actions[bot] b009395223
update to release version v7.6.0 2024-02-13 10:00:54 +00:00
Damien Degois e7d20519df
Session aware logout, backend logout url approach (#1876)
* Session aware logout, backend logout url approach

* Add CHANGELOG.md and documentation for #1876

* Proper http handling and case change for golint compliance

* Update alpha_config.md

* Fix case conformity

* Change placeholder from ${id_token} to {id_token}

As this should be specified in a URL and curly braces should be escaped as %7b and %7d, therefore using {} shouldn't be an issue

* Apply suggestions from code review

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

* Add other suggestions

* Add suggestions and move background logout to generic provider

* Changelog updated

* Update oauthproxy.go

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>

* Add comment for gosec, remove sensitive data from log

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2024-01-26 12:48:09 +00:00
Jan Larwig 5e68dad636
upgrading to go 1.21 (#2235)
* chore: bump go to version 1.21

update all depedencies as well

* fix linting issues based on golang 1.20 deprecations

* cleanup go depedencies

* add custom gomega matcher for option intefaces

* revert and upgrade golangci-lint to 1.55.2

* fix lint issues for v1.55.2 of golangci-lint

* fix toml loading test

* remove second runspecs call

* update go.sum

* revert testutil package
2024-01-22 13:39:53 +00:00