Application Integration (On-Premises) : Administering the Software AG Infrastructure : Working with Web Services : Configure Web Service Security : Configure Client Authentication : Implement Password Callback Handlers : com.softwareag.wsstack.pwcb.LdapPasswordCallbackHandler
com.softwareag.wsstack.pwcb.LdapPasswordCallbackHandler
The password callback handler retrieves identifier-password pairs from an LDAP server and then loads the pairs which can be used to find the needed password for a particular identifier. To retrieve data from the server, you set the URL of the LDAP server as well as some more properties in the handler. These properties are passed to the handler in a common properties file.
You can provide a common properties file to the callback handler by specifying the location of the common properties file in the web service archive. In the services.xml file, you add a PWCBLDAPPropFile parameter, which is set to point to the location of the properties file. The location of the file can be any valid path from which the handler can load the file (for example, conf/my-ldap.properties).
<serviceGroup>
<service name="Sample_Web_Service">
<parameter name="PWCBLDAPPropFileLocation"> common_prop_file_location
</parameter>...
</service>
</serviceGroup>
If you do not specify a properties file in the services.xml file, the password callback handler is configured to use a default properties file (ldap.properties) from the root directory.
The file may be also placed in a Java archive (.jar file) which resides in the WEB-INF/lib (for example, pwcb-server.jar) or directly in WEB-INF/classes directory. If the password callback handler does not discover the properties file in a pre-set directory, or in the root directory of the web service archive, it searches for the file in a central location on the class path of the handler and loads the properties file as a resource. If this process is unsuccessful, a FileNotFoundException is thrown.
The same password callback handler is also available at the client side if there is no service archive. Then, presumably, the configuration file is ldap.properties and is searched on the class path of the client. Then it is loaded as a resource.
If you do not provide an explicit properties file in the services.xml file, the password callback handler is configured to use a default properties file (ldap.properties) from the root directory.
The file may be also placed in a Java archive (.jar file) that resides in the WEB-INF/lib (for example, pwcb-server.jar) or directly in the WEB-INF/classes directory. If the password callback handler does not discover the properties file in a pre-set directory, or in the root directory of the web service archive, it searches for the file in a central location on the class path of the handler and loads the properties file as a resource. If this process is unsuccessful, a FileNotFoundException is thrown.
The same password callback handler is also available at the client side if there is no service archive. Then, presumably, the configuration file is ldap.properties and is searched on the class path of the client. Then it is loaded as a resource.
Copyright © 2015- 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback