Commit 77357a2 Ticket 49477 - Missing pbkdf python

1 file Authored and Committed by firstyear 5 months ago
Ticket 49477 - Missing pbkdf python

Bug Description:  When I wrote the tests for the pbkdf2 regression
I missed adding a file.

Fix Description:  Recreate and add the file as required.

https://pagure.io/389-ds-base/issue/49447

Author: firstyear

Review by: mreynolds (Thank you!)

    
 1 @@ -0,0 +1,34 @@
 2 + # --- BEGIN COPYRIGHT BLOCK ---
 3 + # Copyright (C) 2018 William Brown <william@blackhats.net.au>
 4 + # All rights reserved.
 5 + #
 6 + # License: GPL (version 3 or any later version).
 7 + # See LICENSE for details.
 8 + # --- END COPYRIGHT BLOCK ---
 9 + 
10 + from lib389.plugins import Plugin
11 + 
12 + class PasswordPlugin(Plugin):
13 +     _plugin_properties = {
14 +         'nsslapd-pluginpath': 'libpwdstorage-plugin',
15 +         'nsslapd-plugintype': 'pwdstoragescheme',
16 +         'nsslapd-pluginEnabled' : 'on'
17 +     }
18 + 
19 +     def __init__(self, instance, dn=None):
20 +         super(PasswordPlugin, self).__init__(instance, dn)
21 +         self._rdn_attribute = 'cn'
22 +         self._must_attributes = [
23 +             'nsslapd-pluginEnabled',
24 +             'nsslapd-pluginPath',
25 +             'nsslapd-pluginInitfunc',
26 +             'nsslapd-pluginType',
27 +             ]
28 +         self._create_objectclasses = ['top', 'nsslapdplugin']
29 +         # We'll mark this protected, and people can just disable the plugins.
30 +         self._protected = True
31 + 
32 + class PBKDF2Plugin(PasswordPlugin):
33 +     def __init__(self, instance, dn="cn=PBKDF2_SHA256,cn=Password Storage Schemes,cn=plugins,cn=config"):
34 +         super(PBKDF2Plugin, self).__init__(instance, dn)
35 +