Sun Identity Manager Deployment Guide

ProcedureTo Prepare the Test

  1. Set up the following files:

    sample/compat/example.3/example.properties

    sample/compat/example.3/SimulatedCompatibilityConfig.xml


    Note –

    The default path to the simulated resource in SimulatedCompatibilityConfig is /tmp/mySimulatedResource.xml.

    You can edit this path to specify a different location by changing two lines in the file.


  2. Before executing the example, copy ant-junit.jar from Apache ant 1.6.5 to your $WSHOME/WEB-INF/lib directory.

  3. You must initialize the repository to run the encrypt command.

    For example, use the lh import sample/init.xml command to initialize the repository, where the original file looks like the following:


    <Attribute name="login_infos">
             <List>
               <Object>
                 <Attribute name="sim_user" value="ctUser" />
                 <Attribute name="sim_password" value="ctPass" />
                 <Attribute name="shouldfail" value="no" />
               </Object>
               <Object>
                 <Attribute name="sim_user" value="ctUser" />
                 <Attribute name="sim_password" value="wrongPass" />
                 <Attribute name="shouldfail" value="yes" />
               </Object>
               <Object>
                 <Attribute name="sim_user" value="ctUser" />
                 <Attribute name="sim_password">
                   <!-- result of ’encrypt ctPass’ from lh console -->
                   <EncryptedData>11D1DEF534EA1BE0:-32DFBF32:1165DC91D73:
    -7FFA|mDBIkSQB3xg=</EncryptedData>
                 </Attribute>
                 <Attribute name="shouldfail" value="no" />
               </Object>
               <Object>
                 <Attribute name="sim_user" value="ctUser" />
                 <Attribute name="sim_password">
                   <!-- result of ’encrypt wrongPass’ from lh console -->
                   <EncryptedData>11D1DEF534EA1BE0:-32DFBF32:1165DC91D73:
    -7FFA|m0n9bAaMx+sKpqs5PmH3eQ==
    </EncryptedData>
                 </Attribute>
                 <Attribute name="shouldfail" value="yes" />
               </Object>
             </List>
           </Attribute>
  4. In each case, use an encrypt command from the lh console to get an encrypted password that can be decrypted in your environment.

    Run lh console and at the console prompt, type the text in single quotes for each of the preceding EncryptedData entries (for example, encrypt ctPass) and replace the text between <EncryptedData> and </EncryptedData> with the result.

    See the following example:


    <!-- result of ’encrypt ctPass’ from lh console -->
    <EncryptedData>11D1DEF534EA1BE0:-65F64461:1163AB5A7B2:-7FFA|iMm4Tcqck+M=</EncryptedData>
    
    <!-- result of ’encrypt wrongPass’ from lh console -->
    <EncryptedData>11D1DEF534EA1BE0:-65F64461:1163AB5A7B2:-7FFA|d1/PheqRok+J3uaggtj9Gw==
    </EncryptedData>

    Alternatively, you can have the DataProvider skip the two login info entries by commenting out the whole block as follows:


    <!-- commented out
           <Attribute name="login_infos">
             <List>
               <Object>
                 <Attribute name="sim_user" value="ctUser" />
                 <Attribute name="sim_password" value="ctPass" />
                 <Attribute name="shouldfail" value="no" />
               </Object>
               <Object>
                 <Attribute name="sim_user" value="ctUser" />
                 <Attribute name="sim_password" value="wrongPass" />
                 <Attribute name="shouldfail" value="yes" />
               </Object>
               <Object>
                 <Attribute name="sim_user" value="ctUser" />
                 <Attribute name="sim_password">
                   <EncryptedData>11D1DEF534EA1BE0:-32DFBF32:1165DC91D73:-7FFA|mDBIkSQB3xg=
    </EncryptedData>
                 </Attribute>
                 <Attribute name="shouldfail" value="no" />
               </Object>
               <Object>
                 <Attribute name="sim_user" value="ctUser" />
                 <Attribute name="sim_password">
                   <EncryptedData>11D1DEF534EA1BE0:-32DFBF32:1165DC91D73:
    -7FFA|m0n9bAaMx+sKpqs5PmH3eQ==
    </EncryptedData>
                 </Attribute>
                 <Attribute name="shouldfail" value="yes" />
               </Object>
             </List>
           </Attribute>
    -->
  5. Next, copy the new data and paste it inside the <EncryptedData> tag to replace the old data. Be certain there are no extra spaces or line breaks inside the tag.