Debug Authentication Errors with CSI Tool

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:

  1. Copy the csi-core.jar file, the csi-tool.jar file, and the csi-<provider referenced in the configuration file>.jar file from the SAP Mobile Platform installation directory, such as C:\SAP\MobilePlatform\Servers\UnwiredServer\lib\ext, to a separate, temporary directory.
  2. Execute the CSI tool command from the separate directory.
  3. When the authentication fails, review the log output to troubleshoot the authentication failure.

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.

Note: SAP discourages editing the security configuration file. Only use the CSI tool to debug errors in security configuration that passed validation in SAP Control Center for SAP Mobile Platform.