Commit Graph

22 Commits

Author SHA1 Message Date
Akira Ajisaka ed92df3537
Support TLS 1.3 (#923)
* Support TLS 1.3

* Set TLS 1.3 explicitly to fix gosec warning.

* Add an entry to changelog.

* Fix typo in the changelog.

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2020-11-19 10:25:53 +00:00
Mitsuo Heijo 3fa42edb73
Fix import path for v7 (#800)
* fix import path for v7

find ./ -name "*.go" | xargs sed -i -e 's|"github.com/oauth2-proxy/oauth2-proxy|"github.com/oauth2-proxy/oauth2-proxy/v7|'

* fix module path

* go mod tidy

* fix installation docs

* update CHANGELOG

* Update CHANGELOG.md

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

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2020-09-29 17:44:42 +01:00
Phil Taprogge d69fd6af22
Allow Logging to stdout with separate Error Log Channel (#718)
* Add dedicated error logging writer

* Document new errors to stdout flag

* Update changelog

* Thread-safe the log buffer

* Address feedback

* Remove duplication by adding log level

* Clean up error formatting

* Apply suggestions from code review

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2020-08-10 11:44:08 +01:00
Nick Meves ad52587ae6
Document GoSec nosec skip comments 2020-08-09 07:55:40 -07:00
Nick Meves 65c228394f
Address gosec findings
Mostly handling unhandled errors appropriately.
If logging to STDERR fails, we panic. Added #nosec
comments to findings we are OK with.
2020-08-09 07:55:39 -07:00
Joel Speed 1c1106721e
Move RedirectToHTTPS to middleware package
Moves the logic for redirecting to HTTPs to a middleware package and adds tests for this logic.
Also makes the functionality more useful, previously it always redirected to the HTTPS address of the proxy, which may not have been intended, now it will redirect based on if a port is provided in the URL (assume public facing 80 to 443 or 4180 to 8443 for example)
2020-07-03 17:19:09 +01:00
Joel Speed 9bbd6adce9
Integrate HealthCheck middleware 2020-06-14 21:05:17 +01:00
Joel Speed 44b27e0208
Move Options and Validation to package 2020-05-21 22:43:42 +01:00
Mitsuo Heijo c7bfbdecef
Implement graceful shutdown and propagate request context (#468)
* feature: Implement graceful shutdown

Propagate the request context to the Redis client.
It is possible to propagate a context cancel to Redis client if the connection is closed by the HTTP client.
The redis.Cmdable cannot use WithContext, so added the Client interface to handle redis.Client and redis.ClusterClient transparently.

Added handling of Unix signals to http server.

Upgrade go-redis/redis to v7.

* Update dependencies

- Upgrade golang/x/* and google-api-go
- Migrate fsnotify import from gopkg.in to github.com
- Replace bmizerany/assert with stretchr/testify/assert

* add doc for  wrapper interface

* Update CHANGELOG.md

* fix: upgrade fsnotify to v1.4.9

* fix: remove unnessary logging

* fix: wait until  all connections have been closed

* refactor: move chan to main for testing

* add assert to check if stop chan is empty

* add an idiomatic for sync.WaitGroup with timeout
2020-04-04 16:12:38 +01:00
Joel Speed 802754caad
Migrate to oauth2-proxy/oauth2-proxy 2020-03-29 15:40:10 +01:00
Josh Michielsen c0bfe0357a
Confirm that the proto is not empty, and change condition to OR
Co-Authored-By: Joel Speed <Joel.speed@hotmail.co.uk>
2019-10-22 14:21:06 +01:00
Josh Michielsen dcc430f6f1 Check `X-Forwared-Proto` for https (via another reverse proxy)
Signed-off-by: Josh Michielsen <github@mickey.dev>
2019-10-21 23:21:35 +01:00
Josh Michielsen bed0336608 Add SSL check and test no redirect when HTTPS
Signed-off-by: Josh Michielsen <github@mickey.dev>
2019-10-17 22:04:24 +01:00
Josh Michielsen aae91b0ad6 Add new handler to redirect to HTTPS if flag is set
Signed-off-by: Josh Michielsen <github@mickey.dev>
2019-10-17 16:30:48 +01:00
Joel Speed fb9616160e
Move logger to pkg/logger 2019-06-15 11:33:58 +02:00
MisterWil 8ec025f536 Auth and standard logging with file rolling 2019-04-12 08:59:46 -07:00
timothy-spencer ff4e5588d8
incorporate suggestions from @benfdking 2019-03-25 10:32:29 -07:00
timothy-spencer 3476daf322
added an option to enable GCP healthcheck endpoints 2019-03-20 14:29:44 -07:00
Joel Speed ee913fb788
Add comments to exported methods for root package 2018-12-20 09:30:42 +00:00
Joel Speed 8ee802d4e5
Lint for non-comment linter errors 2018-11-29 14:26:41 +00:00
Travis Hunter f983933d88
Parse http address without url 2017-04-02 16:23:27 -04:00
Jehiah Czebotar f5b2b20f67 support TLS directly 2015-06-07 23:14:48 -04:00