I have a proposal regarding the Security Module that I would appreciate being considered. I am more than happy to implement this change given the go ahead from the XWiki team. If the stretch goal mentioned below is possible within the XWiki framework, then I am happy to tackle that also but I would need guidance from the XWiki team on how best to approach it.
Change the Security Module implementation to drop back to default behaviour if the class/component referenced by
security.authorization.settler is not present.
A stretch goal to this proposal would be for the Security Module to (efficiently) react to the deployment and undeployment of the extension containing the class/component that represents the value defined by
security.authorization.settler to avoid having to restart XWiki.
Background / Reasoning
As per the Security Module documentation, it is possible to set a
security.authorization.settler property within
xwiki.properties. Doing so will cause the Security Module to consult that “settler” when making Rights decisions.
The recommended approach for adding/customising capabilities to XWiki is to bundle them in an extension and to deploy that extension using the Extension Manager. As such, it is quite likely that the implementation behind the value of
security.authorization.settler is going to be in an extension. This distinction is important because the presence of an extension can be considered more transient than components/libraries contained in the WEB-INF/lib folder of XWiki. Using the Extension Manager to install the code behind a custom “settler” is attractive due to all of the benefits using the Extension Manager provides (dependency management/checking, etc.)
security.authorization.settler property is set but the class/component in an extension referred to by that property is not present/deployed, XWiki fails to start properly. This makes building a new XWiki environment more challenging from an operations standpoint as it requires an ordered multi-step process as follows:
- Start XWiki with no
- Deploy the extension containing the custom “settler”.
- Set the
- Restart XWiki.
It also means that uninstalling the extension has greater impact than your average extension. Rather than defaulting back to XWiki default behaviour, restarting XWiki without also resetting the
security.authorization.settler property will consequently lead to a failed XWiki. The person managing that process would need to be aware of the “special” behaviour of this extension and the configuration value.