Importing LDAP Data

This is an example of commands to import LDAP data into 12.2.1.2.

Before importing LDAP data, perform the following on the target 12.2.1.2 environment:
ssh -i opc_rsa opc@host_adminip_target
sudo -su oracle
cd /u01/app/oracle/middleware/oracle_common/common/bin/
./wlst.sh
connect('weblogic','welcome1','t3s://<target_host_ip>:<target_host_port>')
currentDomainName=cmo.getName()
  1. Import users and groups.
    cd('serverConfig:/SecurityConfiguration/' + currentDomainName + 
    '/Realms/myrealm/AuthenticationProviders/DefaultAuthenticator')
    cmo.importData('DefaultAtn','filename', Properties())
    cmo.importData('DefaultAtn','/tmp/temp_usera/DefaultAuthenticator.dat', Properties())
  2. Import security RoleMapper.
    cd('serverConfig:/SecurityConfiguration/' + currentDomainName +
    '/Realms/myrealm/RoleMappers/XACMLRoleMapper')
    cmo.importData('XACML','filename', Properties())
  3. Import credential mapper.

    The WebLogic credential mapper is not used. In general, it is recommended not to import data that is not used. This is because this data may have WebLogic seeded data which might conflict with seeded data in the target environment. However it is provided for completeness.

    cd('serverConfig:/SecurityConfiguration/' + currentDomainName +
    '/Realms/myrealm/CredentialMappers/DefaultCredentialMapper')
    cmo.importData('DefaultCreds','filename', Properties())
  4. Import XACML Authorizer.

    WebLogic XACML authorization is not used. In general, it is recommended not to import data that is not used. This is because this data may have WebLogic seeded data which might conflict with seeded data in the target environment. However it is provided for completeness.

    cd('serverConfig:/SecurityConfiguration/' + currentDomainName +
    '/Realms/myrealm/Authorizers/XACMLAuthorizer')
    cmo.importData('XACML','filename', Properties())

    Where filename is the directory in which the imported data needs to be placed.