1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-06-21 00:29:44 +02:00
Commit Graph

14 Commits

Author SHA1 Message Date
8dd2cbec4d fix: systemd socket support build handling for windows 2025-01-13 16:41:33 +01: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
343bd61ebb chore(deps): Updated to ginkgo v2 (#2459)
* chore(deps): Updated to ginkgo v2

* fix basic auth test suite cleanup

* fix redis store tests

* add changelog entry

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2024-07-18 22:41:02 +02:00
8f7209ba1a pkg/http: Fix leaking goroutines in tests
By using the context created by the test, the goroutines produced in
http.Client is actually closed when cancelled and such, not leaked.

Signed-off-by: Josef Johansson <josef86@gmail.com>
2024-03-26 12:31:26 +01:00
bb6aba4a00 pkg/http/server_test.go: Add gleak to find goroutine leaks
Signed-off-by: Josef Johansson <josef86@gmail.com>
2024-03-26 12:30:41 +01:00
f88f09f962 Improved dev environment (#2211)
* Improved dev env setup

* Cleanup duplicate checks

* Applied PR feedback

* Updated go.mod/go.sum

* go mod tidy

* Update .devcontainer/devcontainer.json

* Update pkg/http/server_test.go

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

* Create launch.json

* Update .devcontainer/Dockerfile

* Apply suggestions from code review

---------

Co-authored-by: Jan Larwig <jan@larwig.com>
2024-01-20 20:10:37 +00:00
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
ebacc2d7e4 Added ability to specify allowed TLS cipher suites. 2022-08-31 17:55:06 -07:00
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
e03cf87dd8 Add option to specify the tls-min-version for the server 2022-02-09 20:19:01 +01:00
b49e62f9b2 Initalize TLS.Config when connecting to Redis with TLS (#1296)
* init TLS.Config when connecting to Redis with TLS

* don't overwrite TLS config if it exists

* add tests for Redis with TLS

* remove hardcoded certs

* add GenerateCert func

* use GenerateCert util func

* fix issue reported by go fmt

* limit return statements in GenerateCert
2021-10-19 09:17:42 +01:00
a35db2ae8a Fix expected error messages (#1269)
Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2021-07-28 19:56:23 +01:00
2c54ee703f Add server group implementation for running multiple servers at once 2021-03-07 11:49:10 +00:00
d8aca8ac30 Add new http server implementation 2021-03-07 11:49:09 +00:00