Commit Graph

1248 Commits

Author SHA1 Message Date
Joel Speed ee5662e0f5
Merge pull request from GHSA-5m6c-jp6f-2vcv
* Add more Open Redirect test cases

* Add whitelisted domain to test

* Add more test cases

* Improve invalid redirect regex
2020-06-27 12:07:24 +01:00
İlteriş Eroğlu 1b6c54cae1
Change how gitlab-group is parsed on options (#639)
* Changed how gitlab-group is parsed, from string to []string

See #637

* Point out that gitlab-group can be a list

See #637

* Reflect to the []string change on pkg/apis/options/options.go

See #637

* Move cfg option gitlab_group to gitlab_groups

See #637

* Renamed Group to Groups

See #637

* Reflect the change on gitlab.go as well

See #637

* Added #639

* Added the author of #639 to the CHANGELOG

* Add the gitlab_groups env change to CHANGELOG.md

See #639

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

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2020-06-26 23:26:07 +01:00
Joel Speed daedbbd353
Merge pull request #615 from EvgeniGordeev/helm-example
helm kubernetes example based on kind cluster and nginx ingress
2020-06-26 19:06:50 +01:00
Evgeni Gordeev 054979978f Merge remote-tracking branch 'upstream/master' into helm-example
# Conflicts:
#	CHANGELOG.md
2020-06-25 15:24:00 -05:00
Joel Speed 3686b0b442
Merge pull request #596 from grnhse/extra-jwt-token-session
Verify main vs extra JWT bearers differently
2020-06-25 19:16:49 +01:00
Evgeni Gordeev 88a8a70537 update k8s manifest 2020-06-19 22:33:40 -05:00
Evgeni Gordeev 8bec67beb7 code review comments 2020-06-19 22:27:36 -05:00
Evgeni Gordeev e8fce0b14d Merge remote-tracking branch 'upstream/master' into helm-example
# Conflicts:
#	CHANGELOG.md
2020-06-19 22:25:14 -05:00
Nick Meves a3eef1709a
Improve default CreateSessionStateFromBearerToken tests 2020-06-19 11:48:23 -07:00
Nick Meves c2c1caa404
Set User = Subject in ExtraJWTBearer sessions 2020-06-19 11:48:23 -07:00
Nick Meves 788d8ecc1b
Verify main v extra JWT bearers differently
When using the configured provider JWT Verifier, it makes
sense to use the provider `CreateSessionStateFromBearerToken`
method. For any extra JWT Issuers, they should use a generic
default verifier.
2020-06-19 11:47:36 -07:00
Joel Speed 5817028bb1
Merge pull request #597 from oauth2-proxy/no-log-empty-redirect
Don't log invalid redirect if redirect is empty
2020-06-19 19:40:48 +01:00
Joel Speed dc756b9de3
Don't log invalid redirect if redirect is empty 2020-06-19 18:17:05 +01:00
Joel Speed 713c3927a9
Merge pull request #620 from oauth2-proxy/healthcheck-middleware
Add HealthCheck middleware
2020-06-19 18:15:36 +01:00
Evgeni Gordeev 84360114e2 polish 2020-06-17 19:18:52 -05:00
Evgeni Gordeev fa7855a99d get rid of test-connection pods for hello-world and httpbin 2020-06-16 16:59:56 -05:00
Evgeni Gordeev c85e5297b5 * some polish 2020-06-16 16:47:10 -05:00
Evgeni Gordeev 11c033e2c8 * move httpbin and hello-world charts outside.
* expose kind to 443 port
* make helm optional
* rename folder to kubernetes
2020-06-16 16:39:11 -05:00
Evgeni Gordeev 9a495e996b Merge remote-tracking branch 'upstream/master' into helm-example
# Conflicts:
#	CHANGELOG.md
2020-06-16 16:38:01 -05:00
Joel Speed ba3e40ab1c
Add changelog entry for healthcheck middleware 2020-06-14 21:06:14 +01:00
Joel Speed 9bbd6adce9
Integrate HealthCheck middleware 2020-06-14 21:05:17 +01:00
Joel Speed ca416a2ebb
Add HealthCheck middleware 2020-06-14 21:05:17 +01:00
Evgeni Gordeev 43f214ce8b
Add Keycloak local testing environment (#604)
* Adding one more example - keycloak - alongside with dex IDP.

* don't expose keycloak and proxy ports to the host

* specify email-domain list option in documentation

* get rid of nginx and socat to simplify the example as per https://github.com/oauth2-proxy/oauth2-proxy/pull/604#issuecomment-640054390

* get rid of the scripts - use static file for keycloak startup

* changelog entry

* Update CHANGELOG.md

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2020-06-14 14:06:12 +01:00
Joel Speed a197a17bc3
Merge pull request #539 from grnhse/encryption-efficiency-improvements
Encryption efficiency improvements
2020-06-14 13:23:14 +01:00
Nick Meves 1979627534
Move Encrypt/Decrypt Into helper to session_state.go
This helper method is only applicable for Base64 wrapped
encryption since it operated on string -> string primarily.
It wouldn't be used for pure CFB/GCM ciphers. After a messagePack
session refactor, this method would further only be used for
legacy session compatibility - making its placement in cipher.go
not ideal.
2020-06-12 14:46:35 -07:00
Nick Meves 014fa682be
Add EncryptInto/DecryptInto Unit Tests 2020-06-12 14:42:42 -07:00
Nick Meves e43c65cc76
Fix SessionOptions struct spacing 2020-06-12 14:37:00 -07:00
Nick Meves c6939a40c5
Move nested Encrypt/Decrypt test to helper function 2020-06-12 14:36:59 -07:00
Nick Meves 9382293b0b
Ensure Cipher.Encrypt doesn't mangle input data []byte 2020-06-12 14:36:59 -07:00
Nick Meves 7bb5fc0a81
Ensure Cipher.Decrypt doesn't mangle input ciphertext []byte 2020-06-12 14:36:59 -07:00
Nick Meves e823d874b0
Improve cipher_test.go organization with subtests 2020-06-12 14:36:59 -07:00
Nick Meves 559152a10f
Add subtests inside of encryption unit test loops 2020-06-12 14:36:59 -07:00
Nick Meves f60e24d9c3
Split non-cipher code to utils.go out of ciphers.go 2020-06-12 14:36:58 -07:00
Nick Meves ce2e92bc57
Improve design of Base64Cipher wrapping other ciphers.
Have it take in a cipher init function as an argument.
Remove the confusing `newCipher` method that matched legacy behavior
and returns a Base64Cipher(CFBCipher) -- instead explicitly ask for
that in the uses.
2020-06-12 14:36:58 -07:00
Nick Meves b6931aa4ea
Add GCM Cipher support
During the upcoming encoded session refactor, AES GCM is ideal
to use as the Redis (and other DB like stores) encryption wrapper
around the session because each session is encrypted with a
distinct secret that is passed by the session ticket.
2020-06-12 14:36:58 -07:00
Nick Meves f7cca1d0b3
Refactor encryption.Cipher to be an Encrypt/Decrypt Interface
All Encrypt/Decrypt Cipher implementations will now take
and return []byte to set up usage in future binary compatible
encoding schemes to fix issues with bloat encrypting to strings
(which requires base64ing adding 33% size)
2020-06-12 14:36:58 -07:00
Nick Meves b4530b9292
Allow binary values in signed cookies
Make signedValue & Validate operate on []byte
by default and not assume/cast string. Any casting
will be done from callers.
2020-06-12 14:36:58 -07:00
Nick Meves f9025a8f8f
Add binary native AES CFB encryption helpers.
These will take in []byte and not automatically
Base64 encode/decode.
2020-06-12 14:36:56 -07:00
Evgeni Gordeev 363eaf1fac changelog entry 2020-06-12 13:55:38 -05:00
Evgeni Gordeev dbf1b451d9 polish 2020-06-12 13:15:43 -05:00
Evgeni Gordeev a73d0ec268
Merge branch 'master' into helm-example 2020-06-12 13:14:15 -05:00
Evgeni Gordeev 0f343cf0ad helm kubernetes example based on kind cluster 2020-06-12 13:12:59 -05:00
Joel Speed 1683aa5978
Merge pull request #601 from oauth2-proxy/fix-fallback
Ensure decrypted user/email are valid UTF8
2020-06-12 15:47:33 +01:00
Joel Speed 808084b744
Ensure decrypted user/email are valid UTF8 2020-06-12 15:36:55 +01:00
Christopher Kohnert 2c851fcd4f
Allow a health/ping request to be identified by User-Agent (#567)
* Add an option to allow health checks based on User-Agent.

* Formatting fix

* Rename field and avoid unnecessary interface.

* Skip the redirect fix so it can be put into a different PR.

* Add CHANGELOG entry

* Adding a couple tests for the PingUserAgent option.
2020-06-12 14:56:31 +01:00
Joel Speed 160bbaf98e
Fallback to UserInfo is User ID claim not present (#560)
Co-authored-by: Henry Jenkins <henry@henryjenkins.name>
2020-06-04 17:41:29 +01:00
Scott Guymer 3aeca4368c
ACR values should not be automatically added when blank (#598)
* ACR values should not be automatically added when blank

* Added changelog
2020-06-02 18:17:27 +01:00
Yoshiki Nakagawa d8d43bb51b
Support new option "github-user" (#421)
* feat(github): support new option "github-user"

* feat(github): rename github-user to github-users

* feat(github): update docs for github-users option

* feat(github): remove unneeded code

* feat(github): remove logging

* feat(github-user): use github-user as flagset options

* feat(github-user): remove optionns.go

* feat(github-user): add github-user flagset

* feat(github): improve readability in the docs

* feat(github-user): refactored SetUsers method

* Update flag description

Co-authored-by: Joel Speed <Joel.speed@hotmail.co.uk>
2020-06-01 20:02:07 +01:00
Joel Speed a17c48810f
Merge pull request #548 from oauth2-proxy/move-logging-options
Separate logging options out of main options structure
2020-05-31 14:15:18 +01:00
Joel Speed 94e31f8b65
Ensure exclude-logging-paths is consistent with other options 2020-05-31 14:09:28 +01:00