514 Commits

Author SHA1 Message Date
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
Ross Golder
f3dbca600f
Add ability to configure username for Redis cluster connections (#2381)
* Initial attempt.

* Add CHANGELOG entry.

* Drop commented-out Sentinel test.

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2024-01-20 20:00:02 +00:00
Nils Gustav Stråbø
4c2bf5a2fe
Feature/add option to skip loading claims from profile url (#2329)
* add new flag skip-claims-from-profile-url

* skip passing profile URL if SkipClaimsFromProfileURL

* docs for --skip-claims-from-profile-url flag

* update flag comment

* update docs

* update CHANGELOG.md

* Update providers/provider_data.go

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

* Add tests for SkipClaimsFromProfileURL

* simplify tests for SkipClaimsFromProfileURL

* generate alpha_config.md

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2024-01-20 19:51:42 +00:00
Jan Larwig
0b24f45965
remove nsswitch workaround (#2371)
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2024-01-20 19:48:36 +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
charvadzo
ee3e9b8841
Log error details when failed loading CSRF cookie (#2345)
* Log error details when failed loading CSRF cookie

* Add a record about this PR to CHANGELOG.md

---------

Co-authored-by: Ondrej Charvat <ondrej.charvat@yunextraffic.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2024-01-20 19:27:23 +00:00
Koen van Zuijlen
51a5765f77
chore: Create sha256sum for tar instead of binary (#2343)
* Create sha256sum for tar instead of binary

* chore: Add checksum for binary

* chore: Updated changelog

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2024-01-20 19:18:54 +00:00
Jan Brezina
bc022fbfd1
Add possibility to encode the state param as UrlEncodedBase64 (#2312)
* Add possibility to encode the state param as UrlEncodedBase64

* Update CHANGELOG.md

* Update oauthproxy.go

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

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2024-01-20 19:08:30 +00:00
Koen van Zuijlen
be84906fbc
enhancement: Change base image from alpine to distroless (#2295)
* Changed base image from alpine to distroless

* chore: updated Makefile

* fix: removed arm/v6 and ppc64le for distroless variant

* Update Dockerfile

* Update Makefile

* docs: Add README-section, CHANGELOG-entry and --pull to prevent caching

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2024-01-20 18:48:04 +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
Jan Larwig
0762267ac4
add breaking change notice for the new auth route regex matching behaviour introduced by #2193 (#2366) 2024-01-02 10:50:38 +00:00
Jan Larwig
52ad31752d
Feature: Add GitHub groups (orgs/teams) support (#2196)
* Add GitHub groups (orgs/teams) support

* align code of getTeams with getOrgs to support Github Enterprise Server instances with different domain

* add documentation

* add missing import after rebase

* add nightly build and push (#2297)

* add nightly build and push

* add date based nightly build tags

* only keep single multiarch image build and push

* add changelog

* add images to internal docs static files

* add docu for nightly builds

* remove unnecessary spaces

* update nightly repository

* Issue 978: Fix Custom cookie name breaks redis for session (#1949)

* Issue 978: Fix Custom cookie name breaks redis for session (see https://github.com/oauth2-proxy/oauth2-proxy/issues/978)

* Issue 978: Fix Custom cookie name breaks redis for session (see https://github.com/oauth2-proxy/oauth2-proxy/issues/978)

* Update CHANGELOG.md

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Update CHANGELOG.md

---------

Co-authored-by: Nuno Borges <Nuno.Borges@ctw.bmwgroup.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>

* Support http.AllowQuerySemicolons (#2248)

* Support http.AllowQuerySemicolons

* Docs

* Make it clear we are overriding the handler

* Update documentation for allow-query-semicolons

* Fix changelog format

* Fix formatting

---------

Co-authored-by: MickMake <github@mickmake.com>

* Add GitHub groups (orgs/teams) support

* align code of getTeams with getOrgs to support Github Enterprise Server instances with different domain

* add documentation

* fix changelog & documentation

* fix missing import

---------

Co-authored-by: Tobias Mayer <github@tobiasm.de>
Co-authored-by: Nuno Miguel Micaelo Borges <miguelborges99@gmail.com>
Co-authored-by: Nuno Borges <Nuno.Borges@ctw.bmwgroup.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
Co-authored-by: Tim White <tim.white@su.org.au>
Co-authored-by: MickMake <github@mickmake.com>
2023-12-18 10:03:19 +00:00
Jan Larwig
fc6e7fdbd1
bugfix: OIDCConfig based providers are not respecting flags and configs (#2299)
* add full support for all oidc config based providers to use and respect all configs set via OIDCConfig

* add changelog entry

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-11-25 11:32:31 +00:00
Tim White
551b6c9056
Support http.AllowQuerySemicolons (#2248)
* Support http.AllowQuerySemicolons

* Docs

* Make it clear we are overriding the handler

* Update documentation for allow-query-semicolons

* Fix changelog format

* Fix formatting

---------

Co-authored-by: MickMake <github@mickmake.com>
2023-11-20 09:36:03 +00:00
Nuno Miguel Micaelo Borges
1e61b65e28
Issue 978: Fix Custom cookie name breaks redis for session (#1949)
* Issue 978: Fix Custom cookie name breaks redis for session (see https://github.com/oauth2-proxy/oauth2-proxy/issues/978)

* Issue 978: Fix Custom cookie name breaks redis for session (see https://github.com/oauth2-proxy/oauth2-proxy/issues/978)

* Update CHANGELOG.md

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Issue 978: Fix Custom cookie name breaks redis for session

* Update CHANGELOG.md

---------

Co-authored-by: Nuno Borges <Nuno.Borges@ctw.bmwgroup.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-11-18 14:23:00 +00:00
Jan Larwig
bee7879cb2
add nightly build and push (#2297)
* add nightly build and push

* add date based nightly build tags

* only keep single multiarch image build and push

* add changelog

* add images to internal docs static files

* add docu for nightly builds

* remove unnecessary spaces

* update nightly repository
2023-11-18 13:56:29 +00:00
Charley Wu
5e8956b52f
Improve the Nginx auth_request example (#2278)
* The `X-Forwarded-Uri` was required to bypass authentication

- Fix the `skip_auth_routes` option not working in Nginx

* Add tests for allowed requests with proxied `X-Forwarded-Uri` header

* Avoid nginx startup failure: host not found in upstream "oauth2-proxy"

* The `--reverse-proxy` option is required for nginx

* Update the change logs

* Use the authOnlyPath constant

* Remove the unused header `X-Scheme`
2023-11-02 22:57:21 +00:00
Markus Blaschke
66bfd8ebd5
add azure china support (#2269)
* add azure china support

Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>

* update changelog

Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>

* fix lint

Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>

---------

Signed-off-by: Markus Blaschke <mblaschke82@gmail.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-11-01 10:12:34 +00:00
Damien Degois
70571d96e1
Add support for unix socket as upstream (#1866)
* Add support for unix socket as upstream

* Add CHANGELOG.md entry

* Add Unix socket documentation

* Don't export unixRoundTripper, switch from string prefix to Scheme match

* Add basic unix server mock

* Add some tests and comments
2023-10-26 10:57:00 +01:00
emsixteeen
a5006fd606
Issue: 2236 - adds an option to append CA certificates (#2237)
* adding append option for custom CA certs

* updated test for changed GetCertPool signature, added testing to check functionality of empty and non-empty store

* adding legacy options as well

* update associated documentation

* fixing code climate complaints - reduce number of return statements

* Apply suggestions from code review

Changes caFilesAppend (and variants) to useSystemTrustStore

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

* Apply suggestions from code review

Fixes extra whitespaces and grammar.

Co-authored-by: Koen van Zuijlen <8818390+kvanzuijlen@users.noreply.github.com>

* fix indentation

* update changelog

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Koen van Zuijlen <8818390+kvanzuijlen@users.noreply.github.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-10-25 11:36:17 +01:00
axel7083
601477a52c
Feature: Allowing relative redirect url though an option (#2183)
* Adding relative redirect url option

* Updating CHANGELOG.md

* tests: adding unit test for getOAuthRedirectURI

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-10-25 10:25:01 +01: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
Koen van Zuijlen
ef95957990
Release v7.5.1 (#2227)
* Update changelog for v7.5.1 release

* Create versioned docs for release v7.5.x
Created using: yarn run docusaurus docs:version 7.5.x

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-09-22 14:29:14 +01:00
Jan Larwig
13af1b4786
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
tuunit
7683902a42 bugfix: default scopes for OIDCProvider based providers 2023-09-10 20:10:14 +00:00
polarctos
62056a59c2 Update alpine to 3.18
Only pinning minor version to automatically receive patches
2023-09-08 18:22:46 +02:00
Koen van Zuijlen
982ae7e9d2
Added arch types to Docker and binary releases (#2220)
* Added several arm builds to dist.sh

* Added platforms to Dockerfile and updated docs

* Reverted changes made for testing

* Fix docker platform images

* Fix docker platform images

* Update Makefile

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

* Update Makefile

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

* Update Makefile

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

* Formatting improvements

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2023-09-08 17:18:20 +01:00
Koen van Zuijlen
f3269b3f26
Fixed name for GoogleGroups env variable + unit tests (#2221)
* Fixed name for GoogleGroups env variable + unit tests

* Added changelog

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-09-08 16:27:15 +01:00
Jan Larwig
6f6039c82b bugfix: move oidc scope logic to oidc provider 2023-09-08 05:35:41 +00:00
kvanzuijlen
07591fc93a
Update changelog for v7.5.0 release 2023-09-04 12:28:38 +02:00
Koen van Zuijlen
a6e8ec81e8
Workload identity support (#2126)
* WIP: support for workload identity

* WIP: bugfixes to support WI

* Added support for Workload Identity

* Added missing flag

* Refactoring and typo

* Updated CHANGELOG.md

* Updated docs

* Updated changelog

* Improved readability and fixed codeclimate issues

* Update CHANGELOG.md

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

* Fixed if statement

* Apply suggestions from code review

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

* Cleanup

* Removed target principal

* Removed references to target principal

* Added docs

* Fixed header anchor linking

* Update auth.md

* Updated generated code

* Improved code

* Fixed tests

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
Co-authored-by: Jan Larwig <jan@larwig.com>
2023-09-04 10:34:54 +01:00
Cory Bolar
40ee2bb944 Add changelog entry 2023-08-24 20:50:43 -04: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
Jan Wystub
2d22530f8f
docs: add changelog entry 2023-08-23 15:15:50 +02: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
Amr Hanafi
dd4fa414ea
Update golang.org/x/net to v0.7.0 ato address GHSA-vvpx-j8f3-3w6h (#2028)
* Update golang.org/x/net to v0.7.0 ato address GHSA-vvpx-j8f3-3w6h

Addresses https://github.com/advisories/GHSA-vvpx-j8f3-3w6h

Signed-off-by: Amr Hanafi (MAHDI)) <amrh@microsoft.com>

* Update CHANGELOG

---------

Signed-off-by: Amr Hanafi (MAHDI)) <amrh@microsoft.com>
2023-03-07 10:42:12 +00:00
Ole-Martin Bratteng
5d60177d3e
Log the difference between invalid email and not authorized session (#2010)
* Log the difference between invalid email and not authorized session

* Add changelog entry

* Remove superfluous argument

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-03-05 18:28:56 +00:00
Cory Bolar
1bb3fbcea6
Ensure sign-in page background is uniform throughout the page (#1988)
* Ensure sign-in page background is uniform throughout the page

Configured banners that take up large amounts of space leave a gap of blank
background between where the body ends and the footer starts.  Fix this by
setting the style for the section containing the banner to match the body and
footer

* Add changelog entry

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-03-05 17:24:35 +00:00
Nuno Miguel Micaelo Borges
e079c60dfe
Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is wri… (#2013)
* Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is written in code & updates versions due to fixed CVEs

* Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is written in code & updates versions due to fixed CVEs

* Fixes CVE-2022-41721 (#1994)

See: https://avd.aquasec.com/nvd/2022/cve-2022-41717/

* update checkout actions (#1981)

* Fix a typo in oauthproxy.go (#2021)

* fix typo (#2001)

* Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is written in code & updates versions due to fixed CVEs

* Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is written in code & updates versions due to fixed CVEs

* Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is written in code & updates versions due to fixed CVEs

* Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is written in code & updates versions due to fixed CVEs

* Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is written in code & updates versions due to fixed CVEs

* Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is written in code & updates versions due to fixed CVEs

* Issue 1929: Oauth2-proxy v7.4.0 is not using alpine:3.16 as it is written in code & updates versions due to fixed CVEs

---------

Co-authored-by: Nuno Borges <Nuno.Borges@ctw.bmwgroup.com>
Co-authored-by: Jeroen Landheer <jlandheer@bintelligence.nl>
Co-authored-by: Ryuichi Watanabe <ryucrosskey@gmail.com>
Co-authored-by: Ho Kim <ho.kim@ulagbulag.io>
Co-authored-by: Terrell Russell <terrellrussell@gmail.com>
2023-03-05 17:12:55 +00:00
Nuno Miguel Micaelo Borges
cbc973c8d9
Issue 1878: Validate URL call does not correctly honor already set UR… (#1951)
* Issue 1878: Validate URL call does not correctly honor already set URL parameters

* Issue 1878: Validate URL call does not correctly honor already set URL parameters

* Update CHANGELOG.md

---------

Co-authored-by: Nuno Borges <Nuno.Borges@ctw.bmwgroup.com>
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-02-10 18:36:13 +00:00
Marc Schiereck
5577cf0151 add changelog entry 2023-02-03 14:35:33 +00:00
Kobi Meirson
f753ec1ca5
feat: readiness check (#1839)
* feat: readiness check

* fix: no need for query param

* docs: add a note

* chore: move the readyness check to its own endpoint

* docs(cr): add godoc

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2022-12-23 09:08:12 +00:00
Jan Larwig
8b77c97009
Fix default scope settings for none oidc providers like GitHub (#1927)
* fix default scope settings for none oidc providers

* add changelog for bugfix

* fix scope test cases by producing and accessing correct result value
2022-12-23 09:00:57 +00:00
Braunson M
f4f5b7756c Fix PKCE code verifier generation to never use UTF-8 characters
- This could result in intermittent/random failures of PKCE enabled IdP's
2022-11-18 20:37:14 -05:00
Damien Degois
fd2807c091
Fix uninitialized user claim (#1873)
* Fix uninitialized user claim

Some providers doesn't initialize data with setProviderDefaults function
(keycloak-oidc for example), therefore UserClaim is never initialized
with the default value and stay as an empty string.
This result in an empty user.

* Add CHANGELOG.md entry for #1873

* Call setProviderDefaults where missing

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2022-11-07 08:42:33 +00:00