12 Commits

Author SHA1 Message Date
Thom Seddon
c4317b7503
Allow to be run without middleware + improve request reading consistency (#217)
Prior to this change, the request URI was only ever read from the
X-Forwarded-Uri header which was only set when the container was
accessed via the forwardauth middleware. As such, it was necessary
to apply the treafik-forward-auth middleware to the treafik-forward-auth
container when running auth host mode.
This is a quirk, unnecessary complexity and is a frequent source of
configuration issues.
2021-06-24 21:45:28 +01:00
Thom Seddon
04f5499f0b
Allow override of domains and whitelist in rules (#169)
Co-authored-by: Mathieu Cantin <mcantin@petalmd.com>
Co-authored-by: Pete Shaw <lozlow@users.noreply.github.com>
2020-09-23 14:50:15 +01:00
Thom Seddon
41560feaa7
Support concurrent CSRF cookies by using a prefix of nonce (#187)
* Support concurrent CSRF cookies by using a prefix of nonce.
* Move ValidateState out and make CSRF cookies last 1h
* add tests to check csrf cookie nam + minor tweaks

Co-authored-by: Michal Witkowski <michal@cerberus>
2020-09-23 14:48:04 +01:00
Thom Seddon
fb8b216481
Optionally match emails against *either* whitelist or domains when both are provided (#106)
The previous behaviour would ignore domains if the whitelist parameter was provided, however if both parameters are provided then matching either is more likely the intent.
2020-06-03 14:11:59 +01:00
Thom Seddon
8b3a950162
Add logout endpoint (#107)
Add logout endpoint that clears the auth cookie + optional "logout-redirect" config option, to which, when set, the user will be redirected.
2020-06-03 14:00:47 +01:00
Thom Seddon
7381450015 Improve internal function docs 2020-05-11 14:42:33 +01:00
Thom Seddon
5a9c6adedf Multiple provider support + OIDC provider 2020-02-10 17:09:09 +00:00
Thom Seddon
a99330e6b2 Fix typos 2019-09-30 10:44:46 +01:00
Thom Seddon
3e6ccc8f45 Redirect to login on cookie expiry + simplify ValidateCookie function
Possible fix for #31
2019-06-13 15:13:52 +01:00
Thom Seddon
3cc9cd13e1 Update option descriptions + prefer multiple singular options
Plus backwards compatability for legacy comma separated list options
2019-04-23 18:26:56 +01:00
Thom Seddon
6968f6181b Add more v2 tests + fixes + improve legacy config parsing 2019-04-18 16:37:41 +01:00
Thom Seddon
9abe509f66 Refactor progress
- move directory structure
- string based rule definition
- use traefik rule parsing
- drop toml config
- new flag library
- implement go dep
2019-04-18 16:37:55 +01:00