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

84 Commits

Author SHA1 Message Date
802754caad Migrate to oauth2-proxy/oauth2-proxy 2020-03-29 15:40:10 +01:00
8d0149ccf8 Fix issue with group validation called on every request (#435)
* Revert group validation on every request

* Fix syntax

* Remove unit tests associated with reverted change

* Update CHANGELOG
2020-03-13 20:10:38 +00:00
4cd43ef397 Support the PreferEmailToUser option on PassUserHeaders
Previously in #401, an option was added to support forwarding the email
address as the username to the upstream service when the PassBasicAuth
option is used.

The PassBasicAuth option is not appropriate for all users, with PassUserHeaders
allowing very similar functionality without specifying a basic auth headers.

The PreferEmailToUser option has been expanded to support the PassUserHeaders
option.
2020-03-04 11:47:13 +13:00
51f4d88028 Add option to prefer an Email address to a Username (#401)
With some providers the Username is an upstream Unique ID, like fex. in the
case of Google.

When matching this with downstream databases, it's sometimes preferred to use
the email address as the  known identifier.

However, when _mixing_ this with sometimes other sources, like htaccess, which
doesn't have a concept of an email address, it can turn difficult.

This change makes the headers _prefer_ to use the Email address, if such exists,
for the Username identifier when passing data to downstream services.

Defaults to Off.

Signed-off-by: D.S. Ljungmark <ljungmark@modio.se>

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2020-02-29 17:38:32 +00:00
5489d1624e Merge branch 'master' into kamal/whitelist-redirects-with-ports 2020-01-08 22:24:56 +02:00
6d74a42e57 Merge branch 'master' into feat/static-upstream 2019-11-19 12:23:42 +01:00
6d1b5fc4b0 Merge branch 'master' into kamal/whitelist-redirects-with-ports 2019-11-14 17:19:21 +02:00
fef940da9a Added userinfo endpoint (#300)
* Added userinfo endpoint

* Added documentation for  the userinfo endpoint

* Update oauthproxy.go

Co-Authored-By: Dan Bond <pm@danbond.io>

* Suggested fixes :  Streaming json to rw , header set after error check

* Update oauthproxy.go

Co-Authored-By: Dan Bond <pm@danbond.io>

* fix session.Email

* Ported tests and updated changelog
2019-11-07 14:38:36 -08:00
a12bae35ca update port whitelisting rules, refactor IsValidRedirect tests 2019-10-23 16:38:44 +03:00
ae4e9155d2 implicit/explicit redirect port matching 2019-10-12 23:47:23 +03:00
bfb22506ff allow redirects to whitelisted hosts with ports 2019-10-11 15:39:57 +03:00
3d17159c5c replace getRootEndpoint by getEndpointWithCookie 2019-10-10 10:14:01 +02:00
dc36836800 Add tests for static upstream 2019-10-10 10:14:01 +02:00
7134d22bcc New flag "-ssl-upstream-insecure-skip-validation" (#234)
* New flag "-ssl-upstream-insecure-skip-validation" to skip SSL validation for upstreams with self generated / invalid SSL certificates.

* Fix tests for modified NewReverseProxy method.

* Added change to the changelog.

* Remove duplicate entries from changelog.
2019-08-07 17:48:53 +01:00
630db3769b Merge branch 'master' into refactor 2019-07-15 11:30:43 +01:00
d24aacdb5c Fix lint errors 2019-06-23 21:39:13 +01:00
3881955605 Update unit tests for ValidateGroup 2019-06-20 16:57:20 -07:00
058ffd1047 Update unit tests for username 2019-06-17 13:11:49 -07:00
54d91c69cc Use logger instead of log 2019-06-17 12:52:13 -07:00
10f65e0381 Add a more realistic test for JWT passthrough 2019-06-17 12:52:13 -07:00
1ff74d322a Fix imports 2019-06-17 12:52:13 -07:00
69cb34a04e Add unit tests for JWT -> session translation 2019-06-17 12:52:13 -07:00
187960e9d8 Improve token pattern matching
Unit tests for token discovery
2019-06-17 12:52:13 -07:00
6366690927 Fix gofmt for changed files 2019-06-15 11:34:00 +02:00
fb9616160e Move logger to pkg/logger 2019-06-15 11:33:58 +02:00
093f9da881 Move cipher creation to options and away from oauth2_proxy.go 2019-05-20 11:26:13 +02:00
37e31b5f09 Remove dead code 2019-05-20 11:26:11 +02:00
c61f3a1c65 Use SessionStore for session in proxy 2019-05-20 11:26:10 +02:00
2ab8a7d95d Move SessionState to its own package 2019-05-18 13:09:56 +02:00
39d2f28a40 Add comment; update changelog 2019-05-09 10:14:01 +01:00
15f48fb95e Don't infer username from email local part if username not set 2019-05-07 10:36:00 +01:00
8ec025f536 Auth and standard logging with file rolling 2019-04-12 08:59:46 -07:00
f715c9371b Fixes deletion of splitted cookies - Issue #69 (#70)
* fixes deletion of splitted cookies

* three minor adjustments to improve the tests

* changed cookie name matching to regex

* Update oauthproxy.go

Co-Authored-By: einfachchr <einfachchr@gmail.com>

* removed unused variable

* Changelog
2019-03-15 07:18:37 +00:00
c7193b4085 Merge websocket proxy feature from openshift/oauth-proxy. Original author: Hiram Chirino <hiram@hiramchirino.com> 2019-03-11 14:05:16 +01:00
fa2545636b Merge pull request #15 from pusher/whitelist-domains
Whitelist domains
2019-02-02 18:55:37 +00:00
3326194422 Extract the application/json mime type into a const 2019-01-31 16:23:01 +01:00
c12db0ebf7 Returns HTTP unauthorized for ajax requests instead of redirecting to the sing-in page 2019-01-31 16:23:01 +01:00
01c5f5ae3b Implemented flushing interval (#23)
* Implemented flushing interval

When proxying streaming responses, it would not flush the response writer buffer until some seemingly random point (maybe the number of bytes?). This makes it flush every 1 second by default, but with a configurable interval.

* flushing CHANGELOG

* gofmt and goimports
2019-01-31 14:02:15 +00:00
9007d66559 Test explicit subdomain whitelisting 2019-01-30 17:30:49 +00:00
768a6ce989 Test IsValidRedirect method 2019-01-30 17:30:46 +00:00
090ff11923 redirect to original path after login (#24)
* redirect to original path after login

* tests for new redirect behaviour

* fixed comment

* added redirect fix to changelog
2019-01-29 12:13:02 +00:00
d4b588dbe9 Split large cookies 2019-01-22 11:34:54 +00:00
8ee802d4e5 Lint for non-comment linter errors 2018-11-29 14:26:41 +00:00
847cf25228 Move imports from bitly to pusher 2018-11-27 11:45:05 +00:00
e241fe86d3 Switch from 18F/hmacauth to mbland/hmacauth
Since I'm no longer with 18F, I've re-released hmacauth under the ISC
license as opposed to the previous CC0 license. There have been no
changes to the hmacauth code itself, and all tests still pass.
2017-11-07 07:55:24 -05:00
8a77cfcac3 Swap out bmizerany/assert package that is deprecated in favor of stretchr/testify/assert 2017-10-23 12:24:17 -04:00
b640a69d63 oauthproxy: fix #284 -skip-provider-button for /sign_in route 2017-06-21 15:05:36 -07:00
1e7d2a08a3 #369: Optionally allow skipping authentication for preflight requests 2017-04-07 15:01:47 +03:00
829b442302 add --set-xauthrequest flag for use in Nginx auth_request mode
This is enhancement of #173 to use "Auth Request" consistently in
the command-line option, configuration file and response headers.
It always sets the X-Auth-Request-User response header and if the
email is available, sets X-Auth-Request-Email as well.
2017-03-29 21:28:55 +05:30
55085d9697 csrf protection; always set state 2017-03-29 09:31:10 -04:00