1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-02-13 13:59:53 +02:00

258 Commits

Author SHA1 Message Date
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
Koen van Zuijlen
76bc2cf73f
Refactored docs (#2284)
* Refactored documentation for providers

* Lots of fixes
- Fixed grammar/typos
- Fixed sidebar config
- Enabled additional prism languages

* Removed useless spaces

* Fixed leftover typos

* Fixes for verify-generate

* Updated package-lock.json
2023-10-31 19:32:59 +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
Florian Beier
3862182039
Fix oidc-issuer-url in example (#2245)
Fix path (/auth/ part was dropped with the move to Quarkus in Keycloak 17)

Add note for older Keycloak versions
2023-10-24 20:01:36 +01:00
Filipe Pina
dcf3bd1bcf
update error middleware definition (for traefik) (#2272) 2023-10-24 20:01:16 +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
Jan Larwig
225dc92adf
Docs: Add Search (#2228)
* add search and update depedencies

* refactor documentation workflow to follow best github action best practices
2023-09-13 12:00:14 +01: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
Christian Brunotte
5f2f95e118
Improved session documentation (#2208)
* Improved session documentation

* Replaced "OAuth2-Proxy" with "OAuth2 Proxy"
2023-09-08 09:51:18 +01:00
kvanzuijlen
bfc04fa84c
Create versioned docs for release v7.5.x
Created using: yarn run docusaurus docs:version 7.5.x
2023-09-04 12:28:42 +02: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
anotherthomas
738c09095b
documented default for errors-to-info-log (#1990) 2023-08-26 15:33:40 +01:00
Cory Bolar
bc4acd7434 Add docs entry to endpoints page for /oauth2/static/ path 2023-08-24 20:50:17 -04: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
avila-m-6
63d05c54d9
update: use go install in build step (#2046)
* update: use go install in build step

go get was deprecated since https://go.dev/doc/go-get-install-deprecation

* Update installation.md
2023-05-06 19:21:05 +01:00
Reeta Singh
155b437769
Add documentation for redis-insecure-skip-tls-verify flag (#2040) 2023-03-05 22:06:53 +00:00
gitgabz
487a0a5b99
Added documentation for the keycloak-oidc provider and the new Keycloak admin console #1931 (#1999)
* Added documentation for the keycloak-oidc provider in regard to the new Keycloak admin console "Admin2". As of v19.0.0 it is the default web console and OAuth2 proxy documentation has been updated to show end-users how to create a sample test Keycloak OIDC client to integrate with Oauth2 Proxy.

* Issue #1931
Added documentation for the keycloak-oidc provider in regard to the new Keycloak admin console "Admin2". As of v19.0.0 it is the default web console and OAuth2 proxy documentation has been updated to show end-users how to create a sample test Keycloak OIDC client to integrate with Oauth2 Proxy.
Added a link in the documentation to older keycloak-oidc pull request, as the provider currently evaluates aud from the access token and not the id token.

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2023-03-05 18:24:10 +00:00
Amith KK
df8df9b536
Update formatting error in overview for custom-sign-in-logo (#1886) 2023-02-10 18:35:27 +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
Joel Speed
efe9aed559
Create versioned docs for release v7.4.x
Created with: yarn run docusaurus docs:version 7.4.x
2022-10-29 13:19:49 +01:00
Joel Speed
2c21b2830d
Update changelog for v7.4.0 release 2022-10-29 13:19:48 +01:00
Joel Speed
cfcba1a7fc
Merge pull request #1811 from mdoro-13/warn_about_potential_mistake_in_whitelist-domain
Warn not to include URL instead of domain and port
2022-10-23 11:47:01 +02:00
Adrian Aneci
a5d918898c Add azure groups support and oauth2 v2.0 2022-10-21 20:23:21 +03: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
Sven Schliesing
a6c8f6f04a
Change "API Manager" to "APIs & Services" (#1824) 2022-10-15 14:33:53 +01:00
mdoro-13
51d3d55a69 Warn not to include URL instead of domain and port 2022-10-04 18:39:55 +03:00
Segfault16
965fab422d
Add API route config (#1760)
* Add API route config

In addition to requests with Accept header `application/json` return 401 instead of 302 to login page on requests matching API paths regex.

* Update changelog

* Refactor

* Remove unnecessary comment

* Reorder checks

* Lint Api -> API

Co-authored-by: Sebastian Halder <sebastian.halder@boehringer-ingelheim.com>
2022-09-11 16:09:32 +01:00
Ian Serpa
f53754808b Support negating for skip auth routes 2022-09-02 22:23:29 +02:00
Braunson
fcecbeb13c
Inconsistent code-challenge-method CLI flag and config file naming (#1766)
* Inconsistent code-challenge-method CLI flag and config file naming

- Allow previous config option for now to prevent breaking configs

Fixes #1667

* Add changelog entry

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2022-09-01 10:58:43 +01:00
Chris Bednarz
ebacc2d7e4 Added ability to specify allowed TLS cipher suites. 2022-08-31 17:55:06 -07:00
Nuno Miguel Micaelo Borges
a1ff878fdc
Add flags to define CSRF cookie expiration time and to allow CSRF cookies per request (#1708)
* Add start of state to CSRF cookie name

* Update CHANGELOG.md

* Update CHANGELOG.md

* Support optional flags

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update overview.md

Add new CSRF flags

* Update overview.md

Describe new CSRF flags

Co-authored-by: Nuno Borges <Nuno.Borges@ctw.bmwgroup.com>
2022-08-31 23:27:56 +01:00
Lorenzo Biava
f8bd853702
Azure AD Doc: change permission to openid and add warning on consent (#1752)
The Azure AD Doc mentioned a very broad and risky permission, which is not really required by the proxy, and some Admins won't even permit.
This change recommends using the much more restricted "openid", and also warns about the consent that could still be required in certain cases.
2022-08-31 22:16:53 +01:00
Felix Stupp
723f6cc5d5
docs/conf/overview: Add hint about cookie prefixes to --cookie-name (#1744)
* docs/conf/overview: Add hint about cookie prefixes to --cookie-name

Cookie Prefixes further restricts the possibilities of session attacks because supporting clients will only accept cookies with one of the prefix if certain requirements were meet, see https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies#cookie_prefixes

* Backport cookie prefixes to older docs

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2022-08-31 22:08:02 +01:00
Konstantin Shalygin
c228d9e273
docs/docs/configuration/auth: fixed example of oidc-issuer-url for Keycloak (#1758)
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2022-08-31 22:07:49 +01:00
Dmitry Kartsev
0cfb9c6da0
adding IdleTimeout with the redis-connection-idle-timeout flag, to ke… (#1691)
* adding IdleTimeout with the redis-connection-idle-timeout flag, to keep redis connections in valid state, when Redis  option is set

* docs update - add redis idle timeout configurations

* changelog update for #1691 fix
2022-08-09 21:57:13 +01:00
Joel Speed
4344610f80
Create versioned docs for release v7.3.x
Created with: yarn run docusaurus docs:version 7.3.x
2022-05-29 15:43:02 +01:00
Joel Speed
95e1a4973e
Update CHANGELOG for v7.3.0 release 2022-05-29 15:36:50 +01:00
snowjet
01da2ac352
Update KeyCloak Auth Provider oidc_issuer_url (#1661)
The correct URL for the oidc-issuer-url in KeyCloak v18.0 is: https://<keycloak host>/realms/<your realm>. 
Using the old URL causes oauth2-proxy to crash on startup.

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2022-05-29 10:20:42 +01:00
bradybus
167acf7f09
Add redirect instructions for gitlab on sub-dir (#1616)
* Add redirect instructions for gitlab on sub-dir

* include redirect instructions in unversioned docs

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2022-05-29 10:17:30 +01:00
t-katsumura
c6a98369a0
Add description on ipv6 address (#1635)
* add docs on ipv6

* add tests for ipv6 address

* add tests for ipv6 address

* remove Print function for debugging

* Updated changelog
2022-05-23 10:17:29 +01:00
Jack Henschel
7a27cb04df Implement configurable timeout for upstream connections
Signed-off-by: Jack Henschel <jack.henschel@cern.ch>
2022-05-18 11:41:17 +01:00
zv0n
b794248176
Add allowed_emails option to the auth endpoint query string (#1595)
* Add allowed_emails option to the auth endpoint query string

* Don't return true from checkAllowedEmailsOrDomains only because domains field was empty

* Fix checkAllowedEmailsOrDomains logic

* Added tests for allowed_emails query parameter

* Updated CHANGELOG

* Remove checkAllowedEmailsOrDomains

Co-authored-by: Nick Meves <nicholas.meves@gmail.com>
2022-04-23 18:11:38 -07:00
Braunson
ce750e9b30
PKCE Support (#1541)
* Add the allowed_email_domains and the allowed_groups on the auth_request endpoint + support standard wildcard char for validation with sub-domain and email-domain.

Signed-off-by: Valentin Pichard <github@w3st.fr>

* Fix provider data initialisation

* PKCE Support

Adds Code Challenge PKCE support (RFC-7636) and partial
Authorization Server Metadata (RFC-8414) for detecting PKCE support.

- Introduces new option `--force-code-challenge-method` to force a
specific code challenge method (either `S256` or `plain`) for instances
when the server has not implemented RFC-8414 in order to detect
PKCE support on the discovery document.
- In all other cases, if the PKCE support can be determined during discovery
then the `code_challenge_methods_supported` is used and S256 is always
preferred.
- The force command line argument is helpful with some providers like Azure
who supports PKCE but does not list it in their discovery document yet.
- Initial thought was given to just always attempt PKCE since according to spec
additional URL parameters should be dropped by servers which implemented
OAuth 2, however other projects found cases in the wild where this causes 500
errors by buggy implementations.
See: https://github.com/spring-projects/spring-security/pull/7804#issuecomment-578323810
- Due to the fact that the `code_verifier` must be saved between the redirect and
callback, sessions are now created when the redirect takes place with `Authenticated: false`.
The session will be recreated and marked as `Authenticated` on callback.
- Individual provider implementations can choose to include or ignore code_challenge
and code_verifier function parameters passed to them

Note: Technically speaking `plain` is not required to be implemented since
oauth2-proxy will always be able to handle S256 and servers MUST implement
S256 support.
> If the client is capable of using "S256", it MUST use "S256", as "S256"
> is Mandatory To Implement (MTI) on the server.  Clients are permitted
> to use "plain" only if they cannot support "S256" for some technical
> reason and know via out-of-band configuration that the server supports
> "plain".
Ref: RFC-7636 Sec 4.2

oauth2-proxy will always use S256 unless the user explicitly forces `plain`.

Fixes #1361

* Address PR comments by moving pkce generation

* Make PKCE opt-in, move to using the Nonce generater for code verifier

* Make PKCE opt-in, move to using the Nonce generater for code verifier

* Encrypt CodeVerifier in CSRF Token instead of Session

- Update Dex for PKCE support
- Expose HTTPBin for further use cases

* Correct the tests

* Move code challenges into extra params

* Correct typo in code challenge method

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

* Correct the extra space in docs

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

* Address changelog and new line nits

* Add generated docs

Co-authored-by: Valentin Pichard <github@w3st.fr>
Co-authored-by: Joel Speed <joel.speed@hotmail.co.uk>
2022-03-13 10:08:33 +00:00
Simon Hollenbach
b999c41a5a docs/7.1.x/configuration: Use 32 bytes to generate secret 2022-02-20 14:41:46 +01:00
Simon Hollenbach
4ed564901e docs/versioned_docs: Backport fix entropy for bash secret (#1511) 2022-02-20 14:38:11 +01:00