Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve consistency of pluggable module import paths #1337

Closed
fredreichbier opened this issue Dec 12, 2018 · 0 comments
Closed

Improve consistency of pluggable module import paths #1337

fredreichbier opened this issue Dec 12, 2018 · 0 comments
Labels
Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature.

Comments

@fredreichbier
Copy link
Contributor

privacyIDEA has several modules which are "pluggable", i.e. their concrete implementation class is imported from a module specified in the config file. Examples are the audit module, HSM module, or monitoring module. While working on #1335, I noticed that we have slight inconsistencies there.

  • Audit module and monitoring module: The PI_AUDIT_CLASS and PI_MONITORING_MODULE options contain a path to a Python module which contains the concrete implementation class which has a fixed name:
PI_MONITORING_MODULE = "privacyidea.lib.monitoringmodule.sqlstats" # the class is privacyidea.lib.monitoringmodule.sqlstats.Monitoring
PI_AUDIT_MODULE = ""privacyidea.lib.auditmodules.sqlaudit" # the class is privacyidea.lib.monitoringmodule.sqlstats.Audit
  • HSM module, SMS provider, PIN handler policy: The PI_HSM_MODULE option contains the path to the concrete implementation class:
PI_HSM_MODULE = "privacyidea.lib.security.default.DefaultSecurityModule"

The SMS provider and PIN handler classes are not configured via pi.cfg, but they also contain the path to the concrete implementation class, e.g. "privacyidea.lib.smsprovider.HttpSMSProvider.HttpSMSProvider"

  • Engine registry class: This is not actually pluggable, the only valid values for PI_ENGINE_REGISTRY_CLASS are "null" and "shared". But it could be made pluggable!

As everything is documented properly, I don't think we have to do something about that right now, but I wanted to open this issue to keep this in mind if we rework our plugin interface in the future.

@fredreichbier fredreichbier added the Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature. label Dec 12, 2018
@fredreichbier fredreichbier modified the milestone: 3.0 Code Cleanup Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Not a complete new functional component/feature but an enhancement of an already existing feature.
Projects
None yet
Development

No branches or pull requests

2 participants