Commit Graph

93 Commits

Author SHA1 Message Date
Edward Viaene abb0a35bf3
feat: bump to go1.24.5 and full dependency update (#3116)
* upgrade to go1.24.5

dependency updates

lint fixes

chore(deps): upgrade github.com/spf13/viper to v1.20.1

Note that this upgrade also implied to upgrade github.com/mitchellh/mapstructure
(nowadays unmaintained: https://gist.github.com/mitchellh/90029601268e59a29e64e55bab1c5bdc)
to github.com/go-viper/mapstructure/v2.

fix: adapt tests to match mapstructure v2 error messages

pkg/apis/options/load_test.go: skip tests on Go 1.23

Add a compile guard for Go < 1.24 for the pkg/apis/options/load_test.go
because the LoadYAML test depends on error messages produced by
encoding/json that changed slightly (names of embedded structs are now
reported). As we updated the test for go1.24, the test now fails on
1.23, but just for a slight difference, so we disable the test there.

fix: adapt tests to match mapstructure v2 error messages

remove pre 1.24 disclaimer

add changelog entry

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

Co-Authored-By: Olivier Mengué <dolmen@cpan.org>

* add exclusion for 'avoid meaningless package names' in .golangci.yml

* chore(dep): upgrade all dependencies

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

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Olivier Mengué <dolmen@cpan.org>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-13 21:55:57 +02:00
Olivier Mengué 09f6252ebf
chore(deps): drop golang.org/x/exp/{slices,maps} (#3065)
Use Go 1.23 stdlib instead: slices, maps.
2025-05-26 12:20:49 +02:00
renovate[bot] 16e453e9f6
chore(deps): update module golang.org/x/net to v0.38.0 [security] (#3035)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-21 15:59:57 +02: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
renovate[bot] 669acb9811
chore(deps): update module github.com/golang-jwt/jwt/v5 to v5.2.2 [security] (#3003)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-25 19:57:40 +01:00
renovate[bot] 4e2100a287
chore(deps): update gomod (#2952)
* chore(deps): update gomod

Co-authored-by: Jan Larwig <jan@larwig.com>
2025-03-19 22:19:40 +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
renovate[bot] ee7d79c5d9 chore(deps): update module github.com/go-jose/go-jose/v3 to v3.0.4 [security] 2025-03-12 08:46:00 +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
renovate[bot] b72a9f41ea
chore(deps): update gomod (#2937)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-30 12:31:14 +01:00
Jan Larwig 9b32699c26 chore(deps): update all go depedencies 2025-01-20 20:45:45 +01:00
renovate[bot] 47638db231
chore(deps): update module golang.org/x/net to v0.33.0 [security] 2024-12-19 02:01:45 +00:00
renovate[bot] 0dca9af6d7
chore(deps): update module golang.org/x/crypto to v0.31.0 [security] 2024-12-12 00:59:31 +00:00
renovate[bot] bc1224291c chore(deps): update gomod 2024-11-10 22:43:42 +01:00
renovate[bot] 2fd2f8c63d chore(deps): update gomod 2024-11-06 16:56:57 +01:00
Joel Speed 4d2b5c30a1
Merge pull request #1985 from isodude/systemd-socket
Add support for systemd socket
2024-10-28 03:56:05 +07:00
renovate[bot] 5ec03ab0e9
chore(deps): update module github.com/go-jose/go-jose/v3 to v4 (#2598) 2024-10-27 17:25:27 +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
tuunit f0fe33e032
enforce go 1.22.7 2024-10-01 11:15:47 +02:00
tuunit 41c8d5bfce chore(deps): update all golang dependencies 2024-09-23 16:38:40 +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
renovate[bot] 65225ba397
chore(deps): update gomod 2024-06-23 16:46:10 +00:00
Pierluigi Lenoci 60b879f409
Upgraded all modules to the latest version 2024-06-10 11:29:16 +02:00
renovate[bot] bdd65ebab6
chore(deps): update module github.com/go-jose/go-jose/v3 to v3.0.3 [security] (#2549)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-30 15:41:21 +07:00
renovate[bot] d35d23f75f
chore(deps): update golang.org/x/exp digest to 814bf88 2024-03-04 08:16:39 +00:00
kvanzuijlen f8efdbae5f
chore: Updated go-jwt to v5 2024-03-04 01:42:00 +01:00
renovate[bot] 5a059510af
chore(deps): update github.com/oauth2-proxy/mockoidc digest to 6186c30 2024-02-14 09:35:43 +00:00
renovate[bot] c5ec06de5a
chore(deps): update module google.golang.org/api to v0.164.0 2024-02-14 09:26:26 +00:00
Joel Speed 9b54fcdd66
Merge pull request #2477 from oauth2-proxy/renovate/github.com-ohler55-ojg-1.x
chore(deps): update module github.com/ohler55/ojg to v1.21.1
2024-02-14 09:19:48 +00:00
renovate[bot] 687f5d90a1
chore(deps): update module github.com/ohler55/ojg to v1.21.1 2024-02-14 09:08:32 +00:00
renovate[bot] bf0c151510
chore(deps): update golang.org/x/exp digest to ec58324 2024-02-14 09:07:05 +00:00
renovate[bot] b1929c740c
chore(deps): update module google.golang.org/api to v0.158.0 (#2464)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-26 10:27:34 +00:00
renovate[bot] 509287b555
chore(deps): update module github.com/google/uuid to v1.6.0 (#2456)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-25 09:49:51 +00:00
renovate[bot] 6a03a110bb
chore(deps): update module google.golang.org/api to v0.157.0 (#2429)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-23 10:11:02 +00:00
renovate[bot] 7851428ce6
chore(deps): update module k8s.io/apimachinery to v0.29.1 (#2428)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-22 16:48:04 +00:00
renovate[bot] 67445052d1
chore(deps): update github.com/ghodss/yaml digest to d8423dc (#2427)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-22 16:29:31 +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
renovate[bot] 8141895070
chore(deps): update module github.com/bsm/redislock to v0.9.4 (#2406)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-21 10:42:01 +00:00
renovate[bot] b8ae6448e1
chore(deps): update github.com/ghodss/yaml digest to d8423dc (#2401)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-20 20:09:14 +00:00
renovate[bot] daea40d628
chore(deps): update module golang.org/x/crypto to v0.17.0 [security] (#2400)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-20 20:08:46 +00:00
Jan Larwig 2f3c811e6a
Feature - Add env variable support for alpha struct (#2375)
* added envsubstring package and added simple test cases.imple tests.

* added documentation

* added changelog entry

* added documentation to wrong file


.

* changed tests to ginkgo format

* update project to use better maintained library

* use defer to clear test variable after tests finished

* updated docs for the new package documentation and fixed bad english

* refactored function to "reduce" complexity.

* updated changelog for new version

updated readme

* minor formatting

---------

Co-authored-by: Haydn Evans <h.evans@douglas.de>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2024-01-20 19:37:24 +00:00
darh bfd667e4a2
Update go-jose dependency as requested in #2350 (#2356)
* update go-jose dependency by switching gopkg.in/square/go-jose.v2
with github.com/go-jose/go-jose/v3

* updated `CHANGELOG.md` with entry for PR #2356

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2024-01-08 13:08:35 +00:00
Conrad Hoffmann 71561f637d
Update ojg to latest release (#2357)
The previously used release is no longer available on Github.
2024-01-08 11:49:28 +00:00
Koen van Zuijlen 464f3bcf53
Fixed Google ADC functionality (#2282)
* Fixed Google ADC functionality

* Updated CHANGELOG.md

* Redo changes after merge-conflict

* Fixed docs

* Fixed linting issues

* Applied PR suggestions
2023-10-24 20:03:16 +01:00
Pierluigi Lenoci 8d03adfd04
Upgrade golang.org/x/net to v0.17.0 (#2274)
* golang.org/x/net upgrade to v0.17.0

https://artifacthub.io/packages/helm/oauth2-proxy/oauth2-proxy?modal=security-report

* Update CHANGELOG.md

* go mod tidy
2023-10-24 12:33:03 +01:00
vllvll b78c391adc
Update dependencies (#2128)
* Update dependencies

* Update changelog
2023-10-02 10:26:58 +01:00
Joseph Weigl bd867b5138
Bugfix/check json path (#1921)
* Validate jsonpath in claim extractor

Signed-off-by: Joseph Weigl <joseph.weigl@audi.de>

* Add test and changelog for claim extractor json path

---------

Signed-off-by: Joseph Weigl <joseph.weigl@audi.de>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-08-24 13:40:43 +01:00
t-katsumura d107d885e4
Session-Cookie Support (#1713)
* Create session cookie when cookie-expire set 0

* Fix format

* add test

* fix lint error

* fix test code

* fix conflicted test case

* update test case of cookie expiration

* update tests of csrf cookies

* update docs

* Update docs/docs/configuration/overview.md

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

---------

Co-authored-by: tanuki884 <morkazuk@fsi.co.jp>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-08-16 12:23:02 +01:00
Nuno Miguel Micaelo Borges 6f11e60c0a
Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS (#2047)
* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

* Issue 2016: CVE-2022-41717: DoS in Go net/http may lead to DoS

---------

Co-authored-by: Nuno Borges <Nuno.Borges@ctw.bmwgroup.com>
2023-04-07 12:33:42 +01:00