Commit Graph

6 Commits

Author SHA1 Message Date
Leonardo Mosquera 85db24a882
FEATURE: add --whitelist-prefix for allowing an entire path prefix (#11)
Add --whitelist-prefix option to allowlist a path prefix

The existing --whitelist option only allows a fixed string; this one
does a prefix match instead.

Also extract allowedByWhiteList for unit testability, and add tests.
2024-02-07 15:42:42 -03:00
Sam Saffron f2123554cf FEATURE: add support for allowGroups setting
This new setting allows you to add a list of comma delimited groups to
the allow list.

Previous to this change auth proxy was able to authenticate admins OR
all users on the site, without any fidelity of allowing specific groups.

This also refactors the tests somewhat and adds a bunch of integration
tests to ensure the new setting is properly respected.

Co-authored-by: Saj Goonatilleke <saj@discourse.org>
2020-12-16 15:43:35 +11:00
Saj Goonatilleke 9d9047a2a1 deref pointers 2020-11-06 09:25:38 +11:00
Saj Goonatilleke d40dcddbdd Allow SRV deadline to be configured at runtime 2019-05-15 23:34:49 +10:00
Saj Goonatilleke ec51e302f5 Add support for optional request logging
This is a debugging aid only.  The log format is not stable (and thus
not documented).
2019-05-15 21:26:35 +10:00
Saj Goonatilleke c9b7e27f76 Move all this config gubbins out of the way
There are two distinct configuration layers in this program:  the 'raw'
types provided by the flag library, and the 'validated' types we present
to the rest of the program.  This commit makes that distinction clear,
and internalises some pointer muck from the flag lib.
2019-05-15 21:26:02 +10:00