forked from redimp/otterwiki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Closes redimp#90. Proof of concept for reverse-proxy auth.
- This commit adds a new auth manager class for authorizing via proxy headers `ProxyHeaderAuth` which can be selected by setting the `AUTH_METHOD` env var to `PROXY_HEADER` - This auth manager looks for the following headers in order to create a "pseudo-user" on each request. No users are committed to the SQLite database when using this auth manager. - `X-OtterWiki-Name` - the name of the user to include on the Git commit when editing a page - `X-OtterWiki-Email` - the email of the user to include on the Git commit when editing a page - `X-OtterWiki-Permissions` - a comma separated list of permissions to grant to the user - The Docker `entrypoint.sh` script has been updated to pass the `AUTH_METHOD` config option thru if set in the environment. - `has_permission(permission, user)` is now a method specific to each auth manager - auth managers now implement a `supported_features()` method to detail which features they support (like whether an auth manager allows a user to change their name or password, or logout) - the features object this method returns is present in all Jinja templates as the variable `auth_supported_features` - the settings page was updated to prevent a user from editing their password and name if it is not supported by the current auth manager. - the dropdown menu present on all page was updated to hide the "logout" button if it is not supported by the current auth manager - The `test_settings.py` test was updated to tolerate extra whitespace
- Loading branch information
1 parent
ffa7aa7
commit 3ed05d5
Showing
6 changed files
with
221 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.