Commit Graph
24 Commits
Author SHA1 Message Date
Jan LarwigandOlivier Mengué 61db1188cf chore(deps): replace k8s.io/apimachinery/pkg/util/errors with errors.Join (#3552)
Drop use of k8s.io/apimachinery/pkg/util/errors.NewAggregate and replace
to with errors.Join which is available in stdlib since Go 1.20.

This allows to drop one dependency (which itself brings its own
contraints in its go.mod) and use more standard behavior from stdlib.

Co-authored-by: Olivier Mengué <dolmen@cpan.org>
2026-09-30 17:26:31 +02:00
andoksandJan Larwig 7c96234233 feat: add support for specifying allowed OIDC JWT signing algorithms (#2753) (#2851)
* feat: add support for specifying allowed OIDC JWT signing algorithms (#2753)

TODO:
- [X] update docs
- [X] add support in yaml (modern) config
- [X] add more test(s)?

Add (legacy for now) configuration flag "oidc-enabled-signing-alg" (cfg:
oidc_enabled_signing_algs) that allows setting what signing algorithms
are specified by provider in JWT header ("alg" header claim).

In particular useful when skip_oidc_discovery = true, as verifier
defaults to only accept "RS256" in alg field in such circumstances.

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

* doc: update changelog and alpha config

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

* feat: add signing algorithm intersection handling with oidc discovery and additional tests

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

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2026-03-18 22:24:27 +08:00
e59f7c1549 feat: allow arbitrary claims from the IDToken and IdentityProvider UserInfo endpoint to be added to the session state (#2685)
* feat: support additional claims

Signed-off-by: afsu <suaf2020@163.com>
Signed-off-by: af su <saf@zjuici.com>

* docs: clarify that AdditionalClaims may come from id_token or userinfo endpoint

Signed-off-by: afsu <suaf2020@163.com>
Signed-off-by: af su <saf@zjuici.com>

* feat: include AdditionalClaims in /oauth2/userinfo response (#834)

Signed-off-by: afsu <suaf2020@163.com>
Signed-off-by: af su <saf@zjuici.com>

* refactor: extract coerceClaim logic into util

Signed-off-by: afsu <suaf2020@163.com>
Signed-off-by: af su <saf@zjuici.com>

* doc: add changelog entry for #2685

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

* refactor: added more verbose comments to some struct fields and minor code cleanup

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

---------

Signed-off-by: afsu <suaf2020@163.com>
Signed-off-by: af su <saf@zjuici.com>
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: af su <saf@zjuici.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2026-03-14 12:04:33 +08:00
Raúl SampedroandJan Larwig 7cf69b27fa fix: NewRemoteKeySet is not using DefaultHTTPClient (#3197)
* fix: NewRemoteKeySet is not using DefaultHTTPClient

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

* doc: 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-11-11 21:08:08 +01:00
ikariusandJan Larwig b7ff804506 feat: ability to parse JWT encoded profile claims (#3014)
* fix: parse JWT profile claims

* Comment with OIDC specs reference

* fix: formatting

* Updated changelog

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2025-04-28 16:39:09 +02:00
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
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
Koen van ZuijlenandJan Larwig 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
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
Blue FalconandJan Larwig 8dfb7e9b26 docs: update README and fix code some commentary typos (#2608)
* Update overview.md

see: https://github.com/oauth2-proxy/oauth2-proxy/blob/fc701bfd6a992bb074671b91ac89b50a79d3dc3d/pkg/apis/options/options.go#L123

* docs(code-commentary): typo

- fixed typo

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2024-06-24 22:15:24 +02:00
kvanzuijlen f8efdbae5f chore: Updated go-jwt to v5 2024-03-04 01:42:00 +01:00
darhandJoel Speed 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
kvanzuijlen e13a5048eb Updated linters 2023-10-24 16:37:57 +02:00
Joseph WeiglandJoel Speed 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
Terrell Russell f204625791 fix typo (#2001) 2023-02-20 14:21:42 +00:00
Andrew Hamade 7fe6384f38 Fix Linting Errors (#1835)
* initial commit: add groups to azure

Signed-off-by: andrewphamade@gmail.com <andrewphamade@gmail.com>

* fix deprecations and linting errors

Signed-off-by: Andrew Hamade <andrewphamade@gmail.com>

* remove groups testing from azure provider

Signed-off-by: Andrew Hamade <andrewphamade@gmail.com>

* fix test error

Signed-off-by: Andrew Hamade <andrewphamade@gmail.com>

* verify-generate

Signed-off-by: Andrew Hamade <andrewphamade@gmail.com>

Signed-off-by: andrewphamade@gmail.com <andrewphamade@gmail.com>
Signed-off-by: Andrew Hamade <andrewphamade@gmail.com>
2022-10-21 11:57:51 +01:00
Joel Speed d3f428a1a6 Discover signature algorithms from OIDC provider (#1662) 2022-05-29 13:48:09 +01:00
Joel Speed c3158ebc48 Ensure required PKCE information is exposed from provider 2022-02-19 15:38:33 +00:00
Joel Speed e3678aaaff Add ProviderVerifier to providers/oidc 2022-02-19 15:37:56 +00:00
Joel Speed 3bb9621f5d Add DiscoveryProvider to perform OIDC discovery 2022-02-19 15:37:55 +00:00
Joel Speed ed3892296e Move OIDC IDToken verifier behind interface 2022-02-19 15:37:54 +00:00
Joel Speed 979c3e8cbc Move internal OIDC package to providers package 2022-02-19 15:37:53 +00:00
Joel Speed 25ef843115 Ensure claim extractor does not attempt profile call when URL is empty 2022-02-19 15:33:30 +00:00
Joel Speed 537e596904 Add claim extractor provider util 2022-02-16 10:28:32 +00:00