Use the CSI tool to debug security configuration errors that are encountered during user authentication but have passed validation in SAP Control Center for SAP Mobile Platform.
Use the CSI tool to debug authentication failures and validate your security configuration outside the SAP Mobile Platform environment.
To debug authentication failures:
Delete any references to SUP-specific providers, including SUPAuthorizer, SUPAttributer, and SUPHttpPropertiesRetrieverLoginModule, from the copied configuration files.
Add dependencies for a specific provider to the CLASSPATH. For example, for HttpAuthLoginModule the dependencies are httpClient, commons codec (wrapped in sup-server.jar) and commons logging (httpclient dependency):
java -Dcom.sybase.security.BootstrapConfigurationFile="absolute_path_to_the_csibootstrap.properties" -cp csi-tool.jar;csi-core.jar;csi-http.jar;sup-server.jar;commons-logging-1.1.1.jar -Djava.util.logging.config.file=logging.properties com.sybase.security.tools.CSILauncher csi.diag.authenticate --USERNAME "test_user" --PASSWORD "test_password" --CONFIG_FILE "absolute_path_of_the_configuration_xml_file"
The csi.diag.authenticate task initializes the PasswordCallback to allow the password to be retrieved only once. The configuration file being tested can only contain one login module; if more than one provider is stacked, the rest of the providers cannot get the password. Therefore, include only the login module that is causing the authentication failure in the configuration to troubleshoot the root cause.
CSI uses Java logging API. The following example shows how to configure logging.properties to obtain FINEST level log messages from the classes in the com.sybase.security.ldap package while setting the log level for rest of the CSI classes to INFO. Use this configuration to debug authentication failures with LDAP providers. You can also use this configuration to debug errors encountered when looking up user roles from the LDAP repository. The value debug.log for the property java.util.logging.FileHandler.pattern should be the path to the log file.
java -Djava.util.logging.config.file=logging.properties -jar csi-tool.jar csi.diag.authenticate --USERNAME "test_username" --PASSWORD "test_password" --CONFIG_FILE "absolute_path_of_the_configuration_xml_file"
Where logging.properties contains the following:
handlers=java.util.logging.ConsoleHandler, java.util.logging.FileHandler .level=INFO com.sybase.security.ldap.level=FINEST java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter java.util.logging.FileHandler.level=FINEST java.util.logging.FileHandler.pattern=debug.log
CSI uses the Java logging API. For more information refer to Java logging configuration information at http://docs.oracle.com/javase/6/docs/technotes/guides/logging/index.html.