oauth2-proxy/providers
Sebastian Schmidt d3bc203d5c fix: stop logging provider userinfo response body in token validation
The validateToken helper in providers/internal_util.go logged the full
response body of the provider ValidateURL on every successful and failed
validation. For OIDC-style providers ValidateURL points at the userinfo
endpoint, so userinfo claims (email, sub, name, ...) ended up in the
standard log on every refresh tick. The lines could not be silenced via
--request-logging=false / --auth-logging=false; only --standard-logging
suppresses them, and that also disables operationally important error
logging on the same channel.

Drop result.Body() from both log statements and add a regression test
that asserts the response body is not present in standard log output
on the success and the non-200 error paths.

Refs https://github.com/oauth2-proxy/oauth2-proxy/issues/3431

Signed-off-by: Sebastian Schmidt <sebastian.schmidt@dewango.de>
2026-05-10 18:26:03 +02:00
..
adfs.go deref everything but now with default constants 2025-11-16 22:38:56 +01:00
adfs_test.go refactor: ptr.Ptr to ptr.To 2025-11-16 22:38:59 +01:00
auth_test.go Integrate claim extractor into providers 2022-02-16 10:28:33 +00:00
azure.go ci: fix linter warnings for preallocation 2026-01-17 16:01:14 +01:00
azure_test.go chore: Updated go-jwt to v5 2024-03-04 01:42:00 +01:00
bitbucket.go Move provider initialisation into providers package 2022-02-16 10:38:05 +00:00
bitbucket_test.go Move provider initialisation into providers package 2022-02-16 10:38:05 +00:00
cidaas.go feat: add Cidaas provider (#2273) 2025-08-12 17:41:45 +02:00
cidaas_test.go feat: add Cidaas provider (#2273) 2025-08-12 17:41:45 +02:00
digitalocean.go Fix Linting Errors (#1835) 2022-10-21 11:57:51 +01:00
digitalocean_test.go Fix import path for v7 (#800) 2020-09-29 17:44:42 +01:00
facebook.go Integrate claim extractor into providers 2022-02-16 10:28:33 +00:00
facebook_test.go Move provider URLs to package level vars 2020-07-19 18:34:55 +01:00
gitea_test.go fix gitea token validation by allowing custom validation url and extracting the proper base api url for github cloud, github enterprise and gitea (#2194) 2023-09-14 10:09:57 +01:00
github.go fix: Gitea team membership (#3150) 2025-08-19 08:40:36 +02:00
github_test.go feat: support for multiple github orgs (#3072) 2025-05-29 18:11:07 +02:00
gitlab.go upgrading to go 1.21 (#2235) 2024-01-22 13:39:53 +00:00
gitlab_test.go chore(deps): Updated to ginkgo v2 (#2459) 2024-07-18 22:41:02 +02:00
google.go feat: migrate google used organization id and header normalization booleans to pointers 2025-11-16 22:39:01 +01:00
google_test.go feat: added organizationId/employee id as preferred username (#3237) 2025-11-07 19:44:32 +01:00
internal_util.go fix: stop logging provider userinfo response body in token validation 2026-05-10 18:26:03 +02:00
internal_util_test.go fix: stop logging provider userinfo response body in token validation 2026-05-10 18:26:03 +02:00
keycloak.go upgrading to go 1.21 (#2235) 2024-01-22 13:39:53 +00:00
keycloak_oidc.go ci: fix linter warnings for preallocation 2026-01-17 16:01:14 +01:00
keycloak_oidc_test.go fix: role extraction from access token in keycloak oidc (#1916) 2025-04-28 10:23:19 +01:00
keycloak_test.go chore(deps): Updated to ginkgo v2 (#2459) 2024-07-18 22:41:02 +02:00
linkedin.go Fix Linting Errors (#1835) 2022-10-21 11:57:51 +01:00
linkedin_test.go Update LinkedIn provider validate URL (#1444) 2021-11-19 21:36:33 +00:00
logingov.go Fix linting after updating golangci-lint to 1.62.2 2024-12-31 13:14:39 +01:00
logingov_test.go chore: Updated go-jwt to v5 2024-03-04 01:42:00 +01:00
ms_entra_id.go chore(deps): update gomod and golangci/golangci-lint to v2.11.4 (#3382) 2026-03-23 09:38:12 +01:00
ms_entra_id_test.go refactor: ptr.Ptr to ptr.To 2025-11-16 22:38:59 +01:00
nextcloud.go upgrading to go 1.21 (#2235) 2024-01-22 13:39:53 +00:00
nextcloud_test.go Integrate claim extractor into providers 2022-02-16 10:28:33 +00:00
oidc.go fix: session refresh handling in OIDC provider (#3267) 2026-01-14 23:18:27 +01:00
oidc_test.go feat: migrate all alpha config booleans to pointers 2025-11-16 22:38:49 +01:00
provider_data.go fix: filter empty strings from allowed groups (#3365) 2026-03-18 22:44:11 +08:00
provider_data_test.go feat: allow arbitrary claims from the IDToken and IdentityProvider UserInfo endpoint to be added to the session state (#2685) 2026-03-14 12:04:33 +08:00
provider_default.go chore(deps): update dependency golangci/golangci-lint to v2.7.2 (#3254) 2026-01-04 10:23:26 +01:00
provider_default_test.go fix: filter empty strings from allowed groups (#3365) 2026-03-18 22:44:11 +08:00
providers.go feat: add support for specifying allowed OIDC JWT signing algorithms (#2753) (#2851) 2026-03-18 22:24:27 +08:00
providers_suite_test.go chore(deps): Updated to ginkgo v2 (#2459) 2024-07-18 22:41:02 +02:00
providers_test.go feat: add support for specifying allowed OIDC JWT signing algorithms (#2753) (#2851) 2026-03-18 22:24:27 +08:00
srht.go feat: add SourceHut (sr.ht) provider (#2359) 2025-07-22 08:16:32 +02:00
srht_test.go feat: add SourceHut (sr.ht) provider (#2359) 2025-07-22 08:16:32 +02:00
util.go Support for passing through URL query parameters from /oauth2/start to the ID provider's login URL. 2022-02-19 16:11:09 +00:00
util_test.go feat: add support for specifying allowed OIDC JWT signing algorithms (#2753) (#2851) 2026-03-18 22:24:27 +08:00