Maurits van Rees: 3 authentication add-ons
Lightning talk by Maurits van Rees at the Plone Conference 2019 in Ferrara.
Three PAS plugins:
- collective.denyroles
- pas.plugins.headers
- collective.contentgroups
collective.denyroles
Deny access to roles like Manager and Editor
- Use case: Manager only logs in to edit-domain, not live site.
- By default deny access to Manager, Editor, etc.
- env DENY_ROLES=0 to disable
- or Apache/nginx header X_DONT_CHECK_ROLES
- Actually not a plugin, but a patch.
pas.plugins.headers
PAS plugin for authentication based on request headers.
Use case: Apache/nginx adds SAML headers to requests.
Configuration in ZMI or profiles/default/pas.plugins.headers.json:
{ "userid_header": "uid", "required_headers": ["uid"], "roles_header": "roles", "allowed_roles": ["student", "teacher"], "deny_unauthorized": true, "redirect_url": "https://maurits.vanrees.org", "memberdata_to_header": [ "fullname|HEADER_firstname HEADER_lastname" ] }
collective.contentgroups
Plone PAS plugin for content as groups.
- Use case: create content item that works as a group.
- dexterity behavior
- No Products.membrane, no Products.remember, no dexterity.membrane.
- No separate membrane_catalog.
- Only groups, not users.
- No multiple inheritance, just AccessControl.users.BasicUser.
Code: https://github.com/collective/collective.contentgroups