1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-08-06 22:42:56 +02:00

347 Commits

Author SHA1 Message Date
c0a928eded release v7.11.0 (#3145)
* add new docs version 7.11.x

* update to release version v7.11.0

* add changelog entry for v7.11.0

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

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-30 20:09:33 +02:00
e75a258299 feat: make google-groups argument optional (#3138)
add test cases

update documentation

refactor code and some cleanup

update changelog

Signed-off-by: Jan Larwig <jan@larwig.com>
2025-07-24 07:55:54 +02:00
dc8b1623a2 feat(cookie): add feature support for cookie-secret-file (#3104)
* feat: add feature support for cookie-secret-file

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-Authored-By: Sandy Chen <Yuxuan.Chen@morganstanley.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-22 18:59:55 +02:00
a88306be98 feat: add SourceHut (sr.ht) provider (#2359)
* Add SourceHut (sr.ht) provider

* fix 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-07-22 08:16:32 +02:00
4d17bc1d68 feat: allow use more possible google admin-sdk api scopes (#2743)
* feat: Allow use more possible google admin-sdk api scopes.

* reduce cognitive complexity

Signed-off-by: Bob Du <i@bobdu.cc>

* remove unnecessary else block / indentation

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

* add changelog entry

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

* slight formatting and error message rephrasing

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

---------

Signed-off-by: Bob Du <i@bobdu.cc>
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-07-21 09:06:17 +02:00
3ac834dbcf Fix local-environment ports (#3136)
* Change Dex port in local-environment from 4190 to 5556

Port 4190 is blocked by standards-compliant browsers (e.g. Firefox), as per https://fetch.spec.whatwg.org/#port-blocking.
Port 5556 is used by Dex in its example config files: 745e1114f3/examples/config-dev.yaml (L50)

* Fix upstream in local-environment/oauth2-proxy.cfg

http://httpbin.localtest.me:8080 is only exposed to the host, not to httpbin Docker network.
Causes Bad Gateway before.

* Do not expose unauthenticated httpbin service in local-environment

This defeats the point of having oauth2-proxy.
It has already been misleading by causing the bug fixed in cafc6af48fc38f6fe4395fb0c7e2638bc84e6091.
It serves as a bad example: users might accidentally expose the service they're trying to protect in the first place.

* Remove unnecessary httpbin.localtest.me alias from local-environment
2025-07-20 20:32:50 +02:00
b57c82181d feat(cookie) csrf per request limit (#3134)
* Allow setting maximum number of csrf cookies, deleting the oldest if necessary

* Add a test for multiple CSRF cookies to remove the old cookie

* Add docs/changelog

* If limit is <=0 do not clear

Signed-off-by: test <bert@transtrend.com>

* Better docs

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

* direct check of option value

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

* direct use of option value

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

* sort based on clock compare vs time compare

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

* clock.Clock does not implement Compare, fix csrf cookie extraction after rename

Signed-off-by: Bert Helderman <bert@transtrend.com>

* Linter fix

* add method signature documentation and slight formatting

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

* fix: test case for csrf cookie limit and flag

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

---------

Signed-off-by: Bert Helderman <bert@transtrend.com>
Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: test <bert@transtrend.com>
Co-authored-by: bh-tt <71650427+bh-tt@users.noreply.github.com>
2025-07-20 16:44:42 +02:00
313a2cb38b chore(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.52.0 (#3131)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-20 11:07:35 +02:00
5808f5376a update to release version v7.10.0 2025-07-17 07:56:01 +00:00
07a388d17e add new docs version 7.10.x 2025-07-17 07:56:01 +00:00
d390877945 chore(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.51.0 (#3098)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-13 22:00:12 +02:00
7731437af4 feat: support for multiple github orgs (#3072)
* fix for github teams

* Update github.go

* added errorhandling

* Update github.md

* refactored GitHub provider

refactored hasOrg, hasOrgAndTeams and hasTeam into hasAccess to stay within function limit

* reverted Refactoring

* refactored github.go

- joined hasOrgAndTeamAccess into checkRestrictions

* refactored github.go

- reduced number of returns of function checkRestrictions to 4

* updated GitHub provider to accept legacy team ids

* GoFmt and golangci-lint

Formatted with GoFmt and followed recommendations of GoLint

* added Tests

added Tests for checkRestrictions.

* refactored in maintainer feedback

* Removed code, documentation and tests for legacy ids

* add changelog and update docs

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-05-29 18:11:07 +02:00
14d5355655 docs: add note about version obfuscation to footer option (#3051)
Signed-off-by: Jan Larwig <jan@larwig.com>
2025-05-03 21:44:30 +02:00
bae509d2ec docs: clear up multiple-providers is unimplemented (#3046)
* docs: clear up multiple-providers is unimplemented

Currently this configuration option is held up by #926. So users don't
assume this solution will work for them, and later find the feature is
not yet implemented -- own the shortcoming clearly.

* doc: add note about missing multi provider implementation to versioned docs

---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-04-28 23:52:27 +02:00
2ecb2c64aa release: v7.9.0 (#3047)
* add new docs version 7.9.x

* update to release version v7.9.0

* doc: add changelog summary

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-04-28 18:22:58 +02:00
367183d7b8 chore(build): refactoring makefile for better usability and introducing a default help target (#2930) 2025-04-27 20:09:52 +02:00
4237358ac3 doc(entra-id): correct toml field in sample (#2946)
---------

Signed-off-by: Jan Larwig <jan@larwig.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-04-27 19:36:16 +02:00
8abdbb5a18 Add --bearer-token-login-fallback option (#2924)
* add --deny-invalid-bearer-tokens

* update changelog

* PR feedback, update api-routes description

* update --api-routes description

* revert load_test fix that I needed locally

---------

Co-authored-by: Justin Ryan <j.ryan@mwam.com>
2025-04-21 13:40:39 +01:00
f6b95c0df8 feat: allow to set non-default authorization request response mode (#3001)
* Update Go version in devcontainer

* Add option to change response mode in authorization request

* Fix option name

* Update docs and changelog

* Rename config value to underscore

* Add unit tests for added parameter

* Move change to upcoming release

* Generate alpha config

---------

Co-authored-by: Michael Cornel <michael@stieler.it>
2025-03-31 10:04:19 +02:00
b34b617aad docs: fix gitlab docs url for oauth2 integration (#3002)
* Update gitlab.md with correct url for creating an application

* docs: fix gitlab docs url for oauth2 integration

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2025-03-29 10:47:54 +01:00
2ab22bd9f1 release v7.8.2 (#3012)
* update to release version v7.8.2

* docs: release letter

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jan Larwig <jan@larwig.com>
2025-03-25 20:45:16 +01:00
ef51685491 chore(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.49.0 2025-03-19 00:48:38 +01:00
876feeeb3f fix: wrong documentation for --trusted-ip in v7.6, v7.7, v7.8 2025-02-18 17:44:33 +01:00
38bb15300e fix: wrong documentation for --trusted-ip (#2959) 2025-02-17 19:51:37 +01:00
b7a8d38b9d chore(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.48.0 2025-01-20 19:47:48 +01:00
c580b7fad7 update to release version v7.8.1 2025-01-15 11:04:42 +00:00
f2ce83b154 doc: add new docs version 7.8.x 2025-01-13 16:41:19 +01:00
f5631a657c chore(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.47.0 (#2911)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-12 18:42:40 +01: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
ae8fb08a89 feat(entra): add Workload Identity support for Entra ID (#2902) 2025-01-11 11:12:41 +00:00
60570cc60e doc: fix formatting issue in Google provider doc (#2907)
A missing line break caused subsequent list items to be squished into a single paragraph.
2025-01-09 01:51:20 +01:00
507d63e05b chore(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.46.0 2025-01-04 19:02:37 +01:00
5f188e5b6b Microsoft Entra ID provider (#2390)
* Microsoft Entra ID Provider

* fix typo in function name

* documentation tweaks

* documentation and comment tweak

* docs tweaks

* final tweaks

* refactor: drop flag for skipping graph groups

* update legacy / deprecated provider page and sort provider overview

* reformat

* move entra-id provider into switch (treat like every other provider

* fix test case and reformat

* fix sidebar configuration

* apply review suggestions

* add pagination for graph api

* fix: do not error when groups unable to retrieve

* doc: number of groups fix

* restore master packages

* docs: tiny docs tweak

* address review comments

* fix codegen

---------

Co-authored-by: tuunit <jan@larwig.com>
2024-12-31 11:46:13 +00:00
ef8ba75987 docs: fix insecure Caddy configuration example (#2827)
The original example only protected the root (`/`) path, leaving other routes unsecured.
* docs: add syntax highlighting for nginx config
* docs: fix headings in `configuration/integration` page
* docs: fix redirect in caddy configuraion example
2024-11-11 10:04:04 +01:00
05b91f310a chore: extend test cases for oidc provider and documentation regarding implicit setting of the groups scope when no scope was specified in the config
Co-authored-by: Jan Larwig <jan@larwig.com>
2024-11-09 15:48:29 +01:00
3ceef0cff4 feat: add CF-Connecting-IP as supported real ip header (#2821) 2024-11-04 23:28:08 +01:00
b4f7e0603e doc: fix relative URLs to configuration page (#2818) 2024-10-29 16:21:43 +01:00
4d2b5c30a1 Merge pull request #1985 from isodude/systemd-socket
Add support for systemd socket
2024-10-28 03:56:05 +07:00
9945b68a06 doc: readme overhaul and azure sponsorship (#2826)
* new readme structure

* add adopters file

* add microsoft sponsorship

* add reference to adopter file

* add gopher slack invite link

* slightly rephrase nightly image section

* add sponsor request for action

* better formatting for contributor wall

* add longer wait time for stale PRs and issues and allow for exemption through bug and high-priority labels

* apply review suggestion

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

---------

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2024-10-27 12:12:46 +00:00
6743a9cc89 Add support for systemd.socket
When using sockets to pass data between e.g. nginx and oauth2-proxy it's
simpler to use sockets. Systemd can even facilitate this and pass the
actual socket directly.

This also means that only the socket runs with the same group as nginx
while the service runs with DynamicUser.

Does not support TLS yet.

nginx
```
server {
    location /oauth2/ {
      proxy_pass http://unix:/run/oauth2-proxy/oauth2.sock;
}
```

oauth2-proxy.socket
```
[Socket]
ListenStream=%t/oauth2.sock
SocketGroup=www-data
SocketMode=0660
```

Start oauth2-proxy with the parameter `--http-address=fd:3`.

Signed-off-by: Josef Johansson <josef@oderland.se>
2024-10-23 09:35:47 +02:00
66f1063722 feat: add X-Envoy-External-Address as supported header (#2755) 2024-10-13 19:55:47 +02:00
798b846643 chore(deps): update dependency @easyops-cn/docusaurus-search-local to ^0.45.0 2024-10-13 19:43:24 +02:00
defc456ba0 doc: expand on --upstream URL matching and trailing slash behaviour (#2813) 2024-10-12 18:57:21 +02:00
055a63432c update to release version v7.7.1 2024-10-08 14:41:41 +02:00
f432cf79e2 update to release version v7.7.0 2024-10-01 11:15:46 +02:00
f978388e28 add new docs version 7.7.x 2024-10-01 11:15:41 +02:00
fff5dd358f doc: add example for caddy v2 forward_auth (#2759)
---------

Co-authored-by: Denis Dabischa <34655672+dabde@users.noreply.github.com>
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-09-23 16:34:08 +02:00
bc034454f6 fix go version in DevContainer and contibution guide (#2768)
* Remove trailing whitespaces in contribution.md

They make the pre-commit hook "trailing-whitespace" fail.

* Correct Go version in DevContainer and Contibution guide
2024-09-23 16:23:27 +02:00
d365d5fc41 doc: fix toml key for provider ca certs (#2780)
* Fixed toml key of --provider-ca-file flag
2024-09-17 12:46:55 +02:00
d436e19183 Fix broken traefik docs link
Old link:
https://doc.traefik.io/traefik/middlewares/forwardauth/

Replaced with:
https://doc.traefik.io/traefik/middlewares/http/forwardauth/
2024-09-15 09:19:54 +02:00