- Sep 05, 2021
-
-
Julian authored
Fixes #104. Replaced "group" keyword argument for login_required with "permission_check". Most views already define a *_acl_check function that returns whether the current user has the required permissions for use with register_navbar. The same function can now be passed to login_required as the "permission_check" argument. Differenciated login and selfservice access permissions. Previously ACL_SELFSERVICE_GROUP was required to login. Now ACL_ACCESS_GROUP is required to login and ACL_SELFSERVICE_GROUP is required to access selfservice functions (and to use role-granting invite links). A user with just ACL_ACCESS_GROUP can now login, access the services overview page and authenticate with OAuth2 services he has access to, but not change his user attributes, password or roles/permissions.
-
- Sep 04, 2021
-
-
Julian authored
The test cases effectivly tested if the user_acl_check works which is already covered by other test cases.
-
Julian authored
-
Julian authored
Prior to this change permission errors (i.e. the user is logged in but does not have a required group) were reported with flash('Access denied') and a redirect to the selfservice index page. This causes two problems: The error is reported with HTTP status 301/200 which is difficult to check for in tests. This can also cause redirect loops as soon as the selfservice uses more differentiated permission checks (see #104). With this change a dedicated error page is displayed in place the requested page and the HTTP status 403 is returned. This is implemented with flask's errorhandler concept for 403.
-
Julian authored
-
Julian authored
Fixes #103.
- Sep 02, 2021
-
-
Julian authored
flask_oauthlib is no longer available in Debian Bullseye. It is only a wrapper around oauthlib, which is still available. While this change does increase the OAuth2 code size, it achieves compatability with both Debian Buster and Bullseye. Aside from error handling, this change has no noticable effects on OAuth2.0 clients. In terms of error handling, a few cases that were not properly handled before now return appropriate error pages. Fixes #101
- Aug 30, 2021
-
-
Julian authored
Prior to this change user passwords were not validated on change aside from their length, but validated on login/bind by ldap3 with SASLprep. Instead of using SASLprep on password change, this change restricts passwords to 7-bit ASCII without control characters. Control characters are forbidden by SASLprep. Multi-byte characters are uncommon in password, especially in those generated by password managers. This ensures that passwords are always SASLprep-safe without implementing the rather complex SASLprep algorithm. It also allows us to fully describe the alphabet restrictions in the relevant forms. Fixes #100
-
Julian authored
Ldap3 raises LDAPSASLPrepError on bind if the password contains characters forbidden by SASLPrep (string preperation/normalization algorithm for user names and passwords). Examples are carriage return ("\r") or newline ("\n") characters. See #100.
-
- Aug 14, 2021
-
-
Julian authored
-
- Aug 13, 2021
- Aug 12, 2021
-
-
Julian authored
-
Julian authored
Co-authored-by:
nd <nd@cccv.de>
-
Julian authored
Broken mail clients like Thunderbird fail to recognize urlsafe characters like "-" as part of an URL. token_urlfriendly avoids those characters. Closes #93. Co-authored-by:
nd <nd@cccv.de>
- Aug 11, 2021
- Aug 04, 2021
-
- Aug 02, 2021
- Aug 01, 2021
- Jul 31, 2021