Module Rules
Every module in ColdBox has the capability to contribute their own rules to cbsecurity
by registering them in the ModuleConfig.cfc
within the settings
struct. Just create another struct called cbsecurity
with the following allowed keys:
As you can see each module can have it's own overrides for authentication and authorization events as well as their own rules.
Please note that these security rules will be PREPENDED to the global rules
Rule Sources
As with the global rules defined in config/Coldbox.cfc
, the module cbsecurity.rules
setting supports multiple rule sources:
For example, you can load security rules specific to a module from a JSON file stored in your module:
Loading/Unloading
Also note that if modules are loaded dynamically, it will still inspect them and register them if cbsecurity settings are found. The same goes for unloading, the entire security rules for that module will cease to exist.
Last updated