6.1.1.3.1.4.1.3. linotp.lib.security.provider module

the security provider is a dynamic handler for the security relevant tasks like

random, crypt, decrypt, sign
class linotp.lib.security.provider.SecurityProvider(secLock)[source]

Bases: object

the Security provider is the singleton in the server who provides the security modules to run security relevant methods

  • read the hsm configurations
  • set up a pool of hsm modules
  • bind a hsm to one session
  • free the hsm from session after usage

as session identifier the thread id is used

createHSMPool(hsm_id=None, *args, **kw)[source]

setup a pool of secutity provider

dropSecurityModule(hsm_id=None, sessionId=None)[source]
getSecurityModule(hsm_id=None, sessionId=None)[source]
loadSecurityModule(id=None)[source]

return the specified security module

Parameters:id (String or None) – identifier for the security module (from the configuration)
Returns:None or the created object
Return type:security module
load_config(config)[source]

load the security modules configuration

setupModule(hsm_id, config=None)[source]

setupModule is called during runtime to define the config parameters like passw or connection strings

linotp.lib.security.provider.main()[source]