Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Use properties files to manage system configuration > Manage specific configuration objects using properties files > Work with security properties files


Work with LDAP properties files

We can use properties files to create, modify, or delete LDAP user registry properties.

Determine the changes to make tothe LDAP configuration or its configuration objects.

Start wsadmin.sh.

To start wsadmin using the Jython language, run the wsadmin -lang Jython command from the bin directory of the server profile.

Use a properties file, you can create, modify, or delete a LDAP user registry object.

Run administrative commands using wsadmin to create or change a properties file for a LDAP user registry, validate the properties, and apply them to the configuration.

Actions for LDAP user registry properties files. We can create, modify, and delete LDAP properties.

Action Procedure
create Set required properties and then run the applyConfigProperties command.
modify Edit properties and then run the applyConfigProperties command..
delete Run deleteConfigProperties to delete a property. If the deleted property has a default value, the property is set to the default value.

To delete the entire LDAPUserRegistry object, uncomment #DELETE=true and then run the deleteConfigProperties command.

create Property Not applicable
delete Property Not applicable

Optionally, you can use interactive mode with the commands:

AdminTask.command_name('-interactive')


Procedure

  1. Create a properties file for a LDAPUserRegistry object.

    1. Set LDAPUserRegistry properties as needed.

      Open an editor on an LDAPUserRegistry properties file. Modify the Environment Variables section to match the system and set any property value that needs to be changed.

      An example LDAPUserRegistry properties file follows. The example file creates an IBM_DIRECTORY_SERVER type LDAP registry. The properties differ for different types of LDAP registry. The LDAP registry type is used as a key to identify various configured LDAP registries. Ensure that there is only one LDAP registry configuration for each type of LDAP registry.

      #
      # Header
      #
      ResourceType=LDAPUserRegistry
      ImplementingResourceType=Security
      ResourceId=Cell=!{cellName}:Security=:LDAPUserRegistry=type#IBM_DIRECTORY_SERVER
      #DELETE=true
      #
      
      #
      #Properties
      #
      useRegistryRealm=false #boolean,default(false)
      serverPassword="{xor}"
      sslConfig=
      primaryAdminId=
      useRegistryServerId=false #boolean,default(false)
      limit=0 #integer,default(0)
      searchTimeout=120 #long,default(0)
      bindPassword=
      serverId=
      realm=
      baseDN=
      ignoreCase=true #boolean,default(false)
      type=IBM_DIRECTORY_SERVER #ENUM(NETSCAPE|DOMINO502|CUSTOM|ACTIVE_DIRECTORY|NDS|IBM_DIRECTORY_SERVER|
      IPLANET|SECUREWAY),default(IBM_DIRECTORY_SERVER)
      reuseConnection=true #boolean,default(false)
      sslEnabled=false #boolean,default(false)
      monitorInterval=0 #long,default(0)
      bindDN=
      
      
      #
      # Header LDAPSearchFilter Section
      #
      ResourceType=LDAPSearchFilter
      ImplementingResourceType=Security
      ResourceId=Cell=!{cellName}:Security=:LDAPUserRegistry=type#IBM_DIRECTORY_SERVER:LDAPSearchFilter=
      AttributeInfo=searchFilter
      #
      
      #
      #Properties
      #
      krbUserFilter="(&(krbPrincipalName=%v)(objectclass=ePerson))"
      groupMemberIdMap="ibm-allGroups:member;ibm-allGroups:uniqueMember"
      certificateFilter=
      userIdMap="*:uid"
      userFilter="(&(uid=%v)(objectclass=ePerson))"
      groupIdMap="*:cn"
      groupFilter="(&(cn=%v)(|(objectclass=groupOfNames)(objectclass=groupOfUniqueNames)))"
      certificateMapMode=EXACT_DN #ENUM(CERTIFICATE_FILTER|EXACT_DN),default(EXACT_DN)
      
      #
      # Header EndPoint
      #
      ResourceType=EndPoint
      ImplementingResourceType=Security
      ResourceId=Cell=!{cellName}:Security=:LDAPUserRegistry=type#IBM_DIRECTORY_SERVER:EndPoint=
      AttributeInfo=hosts
      #
      
      #
      #Properties
      #
      port=389 #integer,required,default(0)
      host= #required
      
      
      EnvironmentVariablesSection
      #Environment Variables
      cellName=myCell
      
    2. Run applyConfigProperties to create or change a LDAP user registry configuration.

      Run the applyConfigProperties command applies the properties file to the configuration. In this Jython example, the optional -reportFileName parameter produces a report named report.txt:

      AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt '])
      

  2. Modify an existing properties file.

    1. Obtain a properties file for the LDAPUserRegistry object to change.

      We can extract a properties file for a LDAPUserRegistry object using the extractConfigProperties command.

    2. Open the properties file in an editor and change the properties as needed.

      Ensure that the environment variables in the properties file match the system.

    3. Run applyConfigProperties.

  3. If you no longer need the LDAP user registry object or an existing property, you can delete the entire LDAP object or one or more properties.

    • To delete the entire object, specify DELETE=true in the header section of the properties file and run the deleteConfigProperties command; for example:
      AdminTask.deleteConfigProperties('[-propertiesFileName myObjectType.props -reportFileName report.txt]')
      

    • To delete one or more properties, specify only the properties to be deleted in the properties file and then run the deleteConfigProperties command.


Results

We can use the properties file to configure and manage the LDAP object and its properties.


What to do next

Save the changes to the configuration.
Enable global security and configuring federated user registries using properties files
Extract properties files using wsadmin.sh
Create server, cluster, application, or authorization group objects using properties files and wsadmin scripting
Delete server, cluster, application, or authorization group objects using properties files


Related


PropertiesBasedConfiguration command group using wsadmin.sh

+

Search Tips   |   Advanced Search