1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-01-10 04:18:14 +02:00
oauth2-proxy/providers
Kevin Schu 25371ea4af
improved audience handling to support client credentials access tokens without aud claims (#1204)
* implementation draft

* add cfg options skip-au-when-missing && client-id-verification-claim; enhance the provider data verification logic for sake of the added options

* refactor configs, added logging and add additional claim verification

* simplify logic by just having one configuration similar to oidc-email-claim

* added internal oidc token verifier, so that aud check behavior can be managed with oauth2-proxy and is compatible with extra-jwt-issuers

* refactored verification to reduce complexity

* refactored verification to reduce complexity

* added docs

* adjust tests to support new OIDCAudienceClaim and OIDCExtraAudiences options

* extend unit tests and ensure that audience is set with the value of aud claim configuration

* revert filemodes and update docs

* update docs

* remove unneccesary logging, refactor audience existence check and added additional unit tests

* fix linting issues after rebase on origin/main

* cleanup: use new imports for migrated libraries after rebase on origin/main

* adapt mock in keycloak_oidc_test.go

* allow specifying multiple audience claims, fixed bug where jwt issuers client id was not the being considered and fixed bug where aud claims with multiple audiences has broken the whole validation

* fixed formatting issue

* do not pass the whole options struct to minimize complexity and dependency to the configuration structure

* added changelog entry

* update docs

Co-authored-by: Sofia Weiler <sofia.weiler@aoe.com>
Co-authored-by: Christian Zenker <christian.zenker@aoe.com>
2022-02-15 16:12:22 +00:00
..
adfs_test.go improved audience handling to support client credentials access tokens without aud claims (#1204) 2022-02-15 16:12:22 +00:00
adfs.go Handle UPN fallback when profileURL isn't set 2021-12-01 19:08:15 -08:00
auth_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
azure_test.go improved audience handling to support client credentials access tokens without aud claims (#1204) 2022-02-15 16:12:22 +00:00
azure.go Standarize provider refresh implemention & logging 2021-06-22 17:04:30 -07:00
bitbucket_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
bitbucket.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
digitalocean_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
digitalocean.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
facebook_test.go Move provider URLs to package level vars 2020-07-19 18:34:55 +01:00
facebook.go RefreshSessions immediately when called 2021-06-21 21:54:52 -07:00
github_test.go Refactor GitHub to EnrichSessionState 2020-10-19 14:09:45 -07:00
github.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
gitlab_test.go Preserve Nickname around refreshes 2021-09-25 16:49:30 -07:00
gitlab.go Preserve Nickname around refreshes 2021-09-25 16:49:30 -07:00
google_test.go Authorize in Redeem callback flow 2020-11-12 11:18:59 -08:00
google.go Standarize provider refresh implemention & logging 2021-06-22 17:04:30 -07:00
internal_util_test.go Cleanup method name refactors missed in comments 2020-11-29 14:18:14 -08:00
internal_util.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
keycloak_oidc_test.go improved audience handling to support client credentials access tokens without aud claims (#1204) 2022-02-15 16:12:22 +00:00
keycloak_oidc.go update keycloak oidc provider and add unit tests 2021-08-02 11:39:50 +02:00
keycloak_test.go Use a generic http.HandlerFunc in Keycloak tests 2020-12-24 14:04:19 -08:00
keycloak.go Handle ValidateURL fallback for nil & empty struct cases 2020-12-24 14:04:20 -08:00
linkedin_test.go Update LinkedIn provider validate URL (#1444) 2021-11-19 21:36:33 +00:00
linkedin.go Update LinkedIn provider validate URL (#1444) 2021-11-19 21:36:33 +00:00
logingov_test.go Add ValidateSession function to LoginGovProvder to include Auth Header (#1509) 2022-02-04 09:22:33 +00:00
logingov.go Add ValidateSession function to LoginGovProvder to include Auth Header (#1509) 2022-02-04 09:22:33 +00:00
nextcloud_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
nextcloud.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
oidc_test.go improved audience handling to support client credentials access tokens without aud claims (#1204) 2022-02-15 16:12:22 +00:00
oidc.go Standarize provider refresh implemention & logging 2021-06-22 17:04:30 -07:00
provider_data_test.go improved audience handling to support client credentials access tokens without aud claims (#1204) 2022-02-15 16:12:22 +00:00
provider_data.go improved audience handling to support client credentials access tokens without aud claims (#1204) 2022-02-15 16:12:22 +00:00
provider_default_test.go Use ErrNotImplemented in default refresh implementation 2021-06-22 17:04:42 -07:00
provider_default.go Use ErrNotImplemented in default refresh implementation 2021-06-22 17:04:42 -07:00
providers_suite_test.go Ensure errors in tests are logged to the GinkgoWriter 2021-02-10 19:50:04 +00:00
providers.go Add keycloak-oidc provider based on OIDCProvider 2021-07-30 09:46:13 +02:00
util_test.go Refactor OIDC to EnrichSession 2020-12-21 16:51:52 -08:00
util.go Use global OIDC fields for Gitlab 2020-12-21 16:54:12 -08:00