mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

smaguin
16.38.2007 9ca13bac415f30ae0638575e4565d71f55c149b7
use dsconfig to set mapper certificate configuration
4 files modified
112 ■■■■ changed files
opendj-sdk/opends/tests/functional-tests/testcases/security/client_auth/equal_dn_mapper.xml 10 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/security/client_auth/fingerprint_mapper.xml 45 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/security/client_auth/subject_attribute_mapper.xml 34 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/security/client_auth/subject_dn_mapper.xml 23 ●●●●● patch | view | raw | blame | history
opendj-sdk/opends/tests/functional-tests/testcases/security/client_auth/equal_dn_mapper.xml
@@ -54,15 +54,15 @@
             '----  Configure the SASL EXTERNAL mechanism -----'
      </message>      
    
      <call function="'modifyAnAttribute'">
     <call function="'dsconfig'">
          { 'dsInstanceHost'       :  DIRECTORY_INSTANCE_HOST ,
             'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
             'dsInstanceDn'          : DIRECTORY_INSTANCE_DN ,
             'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
             'DNToModify'          :  'cn=EXTERNAL,cn=SASL Mechanisms,cn=config',
             'attributeName'        : 'ds-cfg-certificate-mapper',
             'newAttributeValue'  : 'cn=Subject Equals DN,cn=Certificate Mappers,cn=config',
             'changetype' : 'replace',
        'subcommand'        : 'set-sasl-mechanism-handler-prop' ,
        'objectType'         : 'handler-name' ,
        'objectName'        : 'EXTERNAL',
        'optionsString'      : '--set certificate-mapper:"Subject Equals DN"',
             'expectedRC'           :  0 }      
      </call>
   
opendj-sdk/opends/tests/functional-tests/testcases/security/client_auth/fingerprint_mapper.xml
@@ -55,15 +55,15 @@
             '----  Configure the SASL EXTERNAL mechanism -----'
    </message>      
    
    <call function="'modifyAnAttribute'">
    <call function="'dsconfig'">
          { 'dsInstanceHost'       :  DIRECTORY_INSTANCE_HOST ,
             'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
             'dsInstanceDn'          : DIRECTORY_INSTANCE_DN ,
             'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
             'DNToModify'          :  'cn=EXTERNAL,cn=SASL Mechanisms,cn=config',
             'attributeName'        : 'ds-cfg-certificate-mapper',
             'newAttributeValue'  : 'cn=Fingerprint Mapper,cn=Certificate Mappers,cn=config',
             'changetype' : 'replace',
        'subcommand'        : 'set-sasl-mechanism-handler-prop' ,
        'objectType'         : 'handler-name' ,
        'objectName'        : 'EXTERNAL',
        'optionsString'      : '--set certificate-mapper:"Fingerprint Mapper"',
             'expectedRC'           :  0 }    
    </call>
 
@@ -145,25 +145,23 @@
   <message>'SHA1 fingerprint for %s is  : %s ' %  (USER_2_CERT,SHA1_fingerprint_cert2)</message>          
  <!--   Configure the mapper to map MD5 -->        
     <script>
            listAttr = []
            listAttr.append('ds-cfg-fingerprint-attribute:ds-certificate-fingerprint')
            listAttr.append('ds-cfg-fingerprint-algorithm:MD5')
     </script>
     <!-- fingerprint-attribute:ds-certificate-fingerprint   -->
     <!-- fingerprint-algorithm:MD5-->
    <message>'----- Configure the mapper to map MD5 fingerprint '</message>       
    
     <call function="'modifyAnAttribute'">
    <call function="'dsconfig'">
    { 'dsInstanceHost'     : DIRECTORY_INSTANCE_HOST ,
    'dsInstancePort'        : DIRECTORY_INSTANCE_PORT ,
    'dsInstanceDn'          : DIRECTORY_INSTANCE_DN ,
    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
    'DNToModify'          : 'cn=Fingerprint Mapper,cn=Certificate Mappers,cn=config',
    'listAttributes' : listAttr,
    'changetype'              : 'replace',
        'subcommand'        : 'set-certificate-mapper-prop' ,
        'objectType'         : 'mapper-name' ,
        'objectName'        : 'fingerPrint Mapper',
        'optionsString'      : '--set fingerprint-attribute:ds-certificate-fingerprint --set fingerprint-algorithm:MD5',
    'expectedRC'           :  0 }       
    </call>          
   
   <!-- configure the user entries -->
   <message>'----- Configure the attribute ds-certificate-fingerprint  for user %s ---' % USER_1_DN</message>
   <message>'----- ds-certificate-fingerprint is the MD5 fingerprint  of the certificate %s ' % USER_1_CERT</message>
@@ -300,21 +298,18 @@
    
   <!--     Configure the mapper to map SHA1  fingerprint   -->
   <message>'----- Configure the mapper to map SHA1 fingerprint '</message>       
       <script>
            listAttr = []
            listAttr.append('ds-cfg-fingerprint-attribute:ds-certificate-fingerprint')
            listAttr.append('ds-cfg-fingerprint-algorithm:SHA1')
      </script>
        
     <call function="'modifyAnAttribute'">
     <!-- fingerprint-attribute:ds-certificate-fingerprint   -->
     <!-- fingerprint-algorithm:SHA1-->
    <call function="'dsconfig'">
    { 'dsInstanceHost'     : DIRECTORY_INSTANCE_HOST ,
    'dsInstancePort'        : DIRECTORY_INSTANCE_PORT ,
    'dsInstanceDn'          : DIRECTORY_INSTANCE_DN ,
    'dsInstancePswd'       : DIRECTORY_INSTANCE_PSWD ,
    'DNToModify'          : 'cn=Fingerprint Mapper,cn=Certificate Mappers,cn=config',
    'listAttributes' : listAttr,
    'changetype'              : 'replace',
        'subcommand'        : 'set-certificate-mapper-prop' ,
        'objectType'         : 'mapper-name' ,
        'objectName'        : 'fingerPrint Mapper',
        'optionsString'      : '--set fingerprint-attribute:ds-certificate-fingerprint --set fingerprint-algorithm:SHA1',
    'expectedRC'           :  0 }       
    </call>              
    
opendj-sdk/opends/tests/functional-tests/testcases/security/client_auth/subject_attribute_mapper.xml
@@ -54,28 +54,19 @@
             '----  Configure the SASL EXTERNAL mechanism with Subject Attribute to User Attribute mapper -----'
      </message>      
    
      <call function="'modifyAnAttribute'">
     <call function="'dsconfig'">
          { 'dsInstanceHost'       :  DIRECTORY_INSTANCE_HOST ,
             'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
             'dsInstanceDn'          : DIRECTORY_INSTANCE_DN ,
             'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
             'DNToModify'          :  'cn=EXTERNAL,cn=SASL Mechanisms,cn=config',
             'attributeName'        : 'ds-cfg-certificate-mapper',
             'newAttributeValue'  : 'cn=Subject Attribute to User Attribute,cn=Certificate Mappers,cn=config',
             'changetype' : 'replace',
        'subcommand'        : 'set-sasl-mechanism-handler-prop' ,
        'objectType'         : 'handler-name' ,
        'objectName'        : 'EXTERNAL',
        'optionsString'      : '--set certificate-mapper:"Subject Attribute to User Attribute"',
             'expectedRC'           :  0 }        
      </call>
   
     <message>
             '----  Configure the Subject Attribute to User Attribute mapper -----'
      </message>
     <script>
             listAttr = []
             listAttr.append('cn=ds-cfg-subject-attribute-mapping:cn:cn')
             listAttr.append('cn=ds-cfg-subject-attribute-mapping:e:mail')
      </script>
      <call function="'testCase_Postamble'"/>
    </sequence>
  </testcase>
@@ -107,19 +98,20 @@
             '----  Configure the Subject Attribute to User Attribute mapper -----'
      </message>       
      <message>'---- Add a new mapping rule from attribute "uid"  from certificate subject and attribute "description" of the user entry'</message>  
      <call function="'modifyAnAttribute'">
     <call function="'dsconfig'">
          { 'dsInstanceHost'       :  DIRECTORY_INSTANCE_HOST ,
             'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
             'dsInstanceDn'          : DIRECTORY_INSTANCE_DN ,
             'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
             'DNToModify'          :  'cn=Subject Attribute to User Attribute,cn=Certificate Mappers,cn=config',
             'attributeName'        : 'ds-cfg-subject-attribute-mapping',
             'newAttributeValue'  : 'uid:description',
             'changetype' : 'replace',
        'subcommand'        : 'set-certificate-mapper-prop' ,
        'objectType'         : 'mapper-name' ,
        'objectName'        : 'Subject Attribute to User Attribute',
        'optionsString'      : '--set subject-attribute-mapping:"uid:description"',
             'expectedRC'           :  0 }        
      </call>
       
    <message>'----- Configure the attribute description  for user %s ---' % USER_1_DN</message>
    <message>'----- the attribute description will map with the attribute "uid" of the certificate subject'</message>
     
opendj-sdk/opends/tests/functional-tests/testcases/security/client_auth/subject_dn_mapper.xml
@@ -55,15 +55,16 @@
             '----  Configure the SASL EXTERNAL mechanism -----'
    </message>      
    
    <call function="'modifyAnAttribute'">
     <call function="'dsconfig'">
          { 'dsInstanceHost'       :  DIRECTORY_INSTANCE_HOST ,
             'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
             'dsInstanceDn'          : DIRECTORY_INSTANCE_DN ,
             'dsInstancePswd'      : DIRECTORY_INSTANCE_PSWD ,
             'DNToModify'          :  'cn=EXTERNAL,cn=SASL Mechanisms,cn=config',
             'attributeName'        : 'ds-cfg-certificate-mapper',
             'newAttributeValue'  : 'cn=Subject DN to User Attribute,cn=Certificate Mappers,cn=config',
             'changetype' : 'replace',
        'subcommand'        : 'set-sasl-mechanism-handler-prop' ,
        'objectType'         : 'handler-name' ,
        'objectName'        : 'EXTERNAL',
        'optionsString'      : '--set certificate-mapper:"Subject DN to User Attribute"',
             'expectedRC'           :  0 }      
    </call>
 
@@ -288,18 +289,20 @@
    
    <message>'----- Configure  the mapping to be done on the attribute description' </message>
          
    <call function="'modifyAnAttribute'">
     <call function="'dsconfig'">
    { 'dsInstanceHost'   : DIRECTORY_INSTANCE_HOST ,
    'dsInstancePort'       : DIRECTORY_INSTANCE_PORT ,
    'dsInstanceDn'          : DIRECTORY_INSTANCE_DN ,
    'dsInstancePswd'     : DIRECTORY_INSTANCE_PSWD ,
    'DNToModify'        : 'cn=Subject DN to User Attribute,cn=Certificate Mappers,cn=config',
    'attributeName'      : 'ds-cfg-subject-attribute',
    'newAttributeValue'  : 'description',
    'changetype' : 'replace',
        'subcommand'        : 'set-certificate-mapper-prop' ,
        'objectType'         : 'mapper-name' ,
        'objectName'        : 'Subject DN to User Attribute',
        'optionsString'      : '--set subject-attribute:description',
    'expectedRC'           :  0 }  
    </call>
    <message>'----- Configure the attribute ds-certificate-subject-dn  for user %s ---' % USER_1_DN</message>      
    
     <call function="'modifyAnAttribute'">