#50752 Issue: 50690 - Port Password Storage test cases from TET to python3(create required types in password_plugins)
Closed a year ago by spichugi. Opened 2 years ago by aborah.
aborah/389-ds-base password_plugins  into  master

@@ -81,7 +81,7 @@ 

  DN_MONITOR = "cn=monitor"

  DN_MONITOR_SNMP = "cn=snmp,cn=monitor"

  DN_MONITOR_LDBM = "cn=monitor,cn=ldbm database,cn=plugins,cn=config"

- 

+ DN_PWDSTORAGE_SCHEMES = "cn=Password Storage Schemes,cn=plugins,cn=config"

  

  CMD_PATH_SETUP_DS = "setup-ds.pl"

  CMD_PATH_REMOVE_DS = "remove-ds.pl"

@@ -7,6 +7,8 @@ 

  # --- END COPYRIGHT BLOCK ---

  

  from lib389.plugins import Plugin

+ from lib389._constants import DN_PWDSTORAGE_SCHEMES

+ 

  

  class PasswordPlugin(Plugin):

      _plugin_properties = {
@@ -32,3 +34,22 @@ 

      def __init__(self, instance, dn="cn=PBKDF2_SHA256,cn=Password Storage Schemes,cn=plugins,cn=config"):

          super(PBKDF2Plugin, self).__init__(instance, dn)

  

+ 

+ class SSHA512Plugin(PasswordPlugin):

+     def __init__(self, instance, dn=f'cn=SSHA512,{DN_PWDSTORAGE_SCHEMES}'):

+         super(SSHA512Plugin, self).__init__(instance, dn)

+ 

+ 

+ class SHAPlugin(PasswordPlugin):

+     def __init__(self, instance, dn=f'cn=SHA,{DN_PWDSTORAGE_SCHEMES}'):

+         super(SHAPlugin, self).__init__(instance, dn)

+ 

+ 

+ class CRYPTPlugin(PasswordPlugin):

+     def __init__(self, instance, dn=f'cn=CRYPT,{DN_PWDSTORAGE_SCHEMES}'):

+         super(CRYPTPlugin, self).__init__(instance, dn)

+ 

+ 

+ class SSHAPlugin(PasswordPlugin):

+     def __init__(self, instance, dn=f'cn=SSHA,{DN_PWDSTORAGE_SCHEMES}'):

+         super(SSHAPlugin, self).__init__(instance, dn)

Bug Description: Port Password Storage test cases from TET to python3(create required types in password_plugins)

Relates: https://pagure.io/389-ds-base/issue/50690

Author: aborah

Reviewed by: ???

rebased onto b1ca56e4f3e0b5963d6aa54da0ebb56c643d560f

2 years ago

I think we can move cn=Password Storage Schemes,cn=plugins,cn=config to constants as DN_PWDSTORAGE_SCHEMES and use it here and in tests.

1 new commit added

  • Fixing Viktor's comment
2 years ago

I think we can move cn=Password Storage Schemes,cn=plugins,cn=config to constants as DN_PWDSTORAGE_SCHEMES and use it here and in tests.

Changed

Sorry for not being clear, I meant _constants.py.

2 new commits added

  • Fixing Viktor's comment
  • Issue: 50690 - Port Password Storage test cases from TET to python3(create required types in password_plugins)
2 years ago

Sorry for not being clear, I meant _constants.py.

Done

LGTM. Please rebase and fixup commits.

rebased onto 4c03e008fff378360e96e42f6353474d4b8320d2

2 years ago

rebased onto 164d7c996a2d4b4461a6dcf05b9513c8efdfa2c8

2 years ago

rebased onto 8a604aa

2 years ago

LGTM. Please rebase and fixup commits.

Done

Pull-Request has been merged by vashirov

2 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This pull request has been cloned to Github as issue and is available here:
- https://github.com/389ds/389-ds-base/issues/3807

If you want to continue to work on the PR, please navigate to the github issue,
download the patch from the attachments and file a new pull request.

Thank you for understanding. We apologize for all inconvenience.

Pull-Request has been closed by spichugi

a year ago