Security components troubleshooting tips

Security components troubleshooting tips

This document explains basic resources and steps for diagnosing security-related issues in WebSphere Application Server. Basic resources and steps for diagnosing security-related issues in WebSphere Application Server include:

The following security-related problems are addressed elsewhere in the information center:

If none of these steps solves the problem, check to see if the problem is identified and documented using the links in Diagnosing and fixing problems: Resources for learning.

If you do not see a problem that resembles yours, or if the information provided does not solve your problem, contact IBM support for further assistance.

For an overview of WebSphere Application Server security components such as Secure Authentication Services (SAS) and how they work, see Getting started with security.

Log filesWhen troubleshooting the security component, browse the Java Virtual Machine (JVM) logs for the server that hosts the resource you are trying to access. The following is a sample of messages you would expect to see from a server in which the security service has started successfully:

SASRas        A CWWSA0001I: Security configuration initialized. 
SASRas        A CWWSA0002I: Authentication protocol: CSIV2/IBM 
SASRas        A CWWSA0003I: Authentication mechanism: SWAM 
SASRas        A CWWSA0004I: Principal name: MYHOSTNAME/aServerID 
SASRas        A CWWSA0005I: SecurityCurrent registered. 
SASRas        A CWWSA0006I: Security connection interceptor initialized. 
SASRas        A CWWSA0007I: Client request interceptor registered. 
SASRas        A CWWSA0008I: Server request interceptor registered. 
SASRas        A CWWSA0009I: IOR interceptor registered. 
NameServerImp I CWNMS0720I: Do Security service listener registration. 
SecurityCompo A CWSCJ0242A: Security service is starting 
UserRegistryI A CWSCJ0136I: Custom Registry:com.ibm.ws.security.registry.nt.
NTLocalDomainRegistryImpl has been initialized 
SecurityCompo A CWSCJ0202A: Admin application initialized successfully 
SecurityCompo A CWSCJ0203A: Naming application initialized successfully 
SecurityCompo A CWSCJ0204A: Rolebased authorizer initialized successfully 
SecurityCompo A CWSCJ0205A: Security Admin mBean registered successfully 
SecurityCompo A CWSCJ0243A: Security service started successfully 
SecurityCompo A CWSCJ0210A: Security enabled true 

The following is an example of messages from a server which cannot start the security service, in this case because the administrative user ID and password given to communicate with the user registry is wrong, or the user registry itself is down or misconfigured:
SASRas        A CWWSA0001I: Security configuration initialized. 
SASRas        A CWWSA0002I: Authentication protocol: CSIV2/IBM 
SASRas        A CWWSA0003I: Authentication mechanism: SWAM 
SASRas        A CWWSA0004I: Principal name: MYHOSTNAME/aServerID 
SASRas        A CWWSA0005I: SecurityCurrent registered. 
SASRas        A CWWSA0006I: Security connection interceptor initialized. 
SASRas        A CWWSA0007I: Client request interceptor registered. 
SASRas        A CWWSA0008I: Server request interceptor registered. 
SASRas        A CWWSA0009I: IOR interceptor registered. 
NameServerImp I CWNMS0720I: Do Security service listener registration. 

SecurityCompo A CWSCJ0242A: Security service is starting 
UserRegistryI A CWSCJ0136I: Custom Registry:com.ibm.ws.security.
registry.nt.NTLocalDomainRegistryImpl has been initialized 
Authenticatio E CWSCJ4001E: Login failed for badID/<null> 
javax.security.auth.login.LoginException: authentication failed: bad user/password 
The following is an example of messages from a server for which Lightweight Directory Access Protocol (LDAP) has been specified as the security mechanism, but the LDAP keys have not been properly configured:
SASRas        A CWWSA0001I: Security configuration initialized. 
SASRas        A CWWSA0002I: Authentication protocol: CSIV2/IBM 
SASRas        A CWWSA0003I: Authentication mechanism: LTPA 
SASRas        A CWWSA0004I: Principal name: MYHOSTNAME/anID 
SASRas        A CWWSA0005I: SecurityCurrent registered. 
SASRas        A CWWSA0006I: Security connection interceptor initialized. 
SASRas        A CWWSA0007I: Client request interceptor registered. 
SASRas        A CWWSA0008I: Server request interceptor registered. 
SASRas        A CWWSA0009I: IOR interceptor registered. 
NameServerImp I CWNMS0720I: Do Security service listener registration. 
SecurityCompo A CWSCJ0242A: Security service is starting 
UserRegistryI A CWSCJ0136I: Custom Registry:com.ibm.ws.security.registry.nt.
NTLocalDomainRegistryImpl has been initialized 
SecurityServe E CWSCJ0237E: One or more vital LTPAServerObject configuration 
attributes are null or not available. The attributes and values are password : 
LTPA password does exist, expiration time 30, private key <null>, public key <null>, 
and shared key <null>.
A problem with the Secure Sockets Layer (SSL) configuration might lead to the following message. Ensure that the keystore location and keystore passwords are valid. Also, ensure the keystore has a valid personal certificate and that the personal certificate public key or certificate authority (CA) root has been extracted on put into the truststore.
SASRas        A CWWSA0001I: Security configuration initialized. 
SASRas        A CWWSA0002I: Authentication protocol: CSIV2/IBM 
SASRas        A CWWSA0003I: Authentication mechanism: SWAM 
SASRas        A CWWSA0004I: Principal name: MYHOSTNAME/aServerId 
SASRas        A CWWSA0005I: SecurityCurrent registered. 
SASRas        A CWWSA0006I: Security connection interceptor initialized. 
SASRas        A CWWSA0007I: Client request interceptor registered. 
SASRas        A CWWSA0008I: Server request interceptor registered. 
SASRas        A CWWSA0009I: IOR interceptor registered. 
SASRas        E CWWSA0026E: [SecurityTaggedComponentAssistorImpl.register] 
Exception connecting object to the ORB.  Check the SSL configuration to ensure  that the SSL keyStore and trustStore properties are set properly.  If the problem 
persists, contact support for assistance. org.omg.CORBA.OBJ_ADAPTER: 
ORB_CONNECT_ERROR (5) - couldn't get Server Subcontract  minor code: 
4942FB8F  completed: No 

Using SDSFWhen troubleshooting the security component, use System Display and Search Facility (SDSF) to browse logs for the server that hosts the resource you are trying to access. The following sample of messages helps you see from a server in which the security service has started successfully:

 +BBOM0001I com_ibm_security_SAF_unauthenticated: WSGUEST.
 +BBOM0001I com_ibm_security_SAF_EJBROLE_Audit_Messages_Suppress: 0.
 +BBOM0001I com_ibm_userRegistries_type: security:LocalOSUserRegistry.
 +BBOM0001I com_ibm_userRegistries_CustomUserRegistry_realm: NOT SET, 278
 DEFAULT=CustomRealm.
 +BBOM0001I com_ibm_userRegistries_LDAPUserRegistry_realm: NOT SET, 279
 DEFAULT=LDAPRealm.
 +BBOM0001I com_ibm_ws_logging_zos_errorlog_format_cbe: NOT SET, 280
 DEFAULT=0.
 +BBOM0001I com_ibm_CSI_claim_ssl_sys_v2_timeout: NOT SET, DEFAULT=100.
 +BBOM0001I com_ibm_CSI_claim_ssl_sys_v3_timeout: 600.
 +BBOM0001I com_ibm_CSI_claimClientAuthenticationtype: 283
 +BBOM0001I com_ibm_CSI_claimClientAuthenticationRequired: 0.
 +BBOM0001I com_ibm_CSI_claimClientAuthenticationSupported: 1.
 +BBOM0001I com_ibm_CSI_claimIdentityAssertionSupported: 0.
 +BBOM0001I com_ibm_CSI_claimIdentityAssertionTypeCert: 0.
 +BBOM0001I com_ibm_CSI_claimIdentityAssertionTypeDN: 0.
 +BBOM0001I com_ibm_CSI_claimIdentityAssertionTypeSAF: 0.
 +BBOM0001I com_ibm_CSI_claimKeyringName: WASKeyring.
 +BBOM0001I com_ibm_CSI_claimMessageConfidentialityRequired: 0.
 +BBOM0001I com_ibm_CSI_claimMessageIntegrityRequired: NOT SET, 292
 DEFAULT=1.
 +BBOM0001I com_ibm_CSI_claimMessageIntegritySupported: NOT SET, 293
 DEFAULT=1.
 +BBOM0001I com_ibm_CSI_claimSecurityCipherSuiteList: NOT SET.
 +BBOM0001I com_ibm_CSI_claimSecurityLevel: HIGH.
 +BBOM0001I com_ibm_CSI_claimStateful: 1.
 +BBOM0001I com_ibm_CSI_claimTransportAssocSSLTLSRequired: 0.
 +BBOM0001I com_ibm_CSI_claimTransportAssocSSLTLSSupported: 1.
 +BBOM0001I com_ibm_CSI_claimTLClientAuthenticationRequired: 0.
 +BBOM0001I com_ibm_CSI_claimTLClientAuthenticationSupported: 1.
 +BBOM0001I com_ibm_CSI_perform_ssl_sys_v2_timeout: NOT SET, 301
 DEFAULT=100.
 +BBOM0001I com_ibm_CSI_perform_ssl_sys_v3_timeout: 600.
 +BBOM0001I com_ibm_CSI_performClientAuthenticationtype: 303
 +BBOM0001I com_ibm_CSI_performIdentityAssertionRequired: 0.
 +BBOM0001I com_ibm_CSI_performIdentityAssertionSupported: 0.
 +BBOM0001I com_ibm_CSI_performKeyringName: WASKeyring.
 +BBOM0001I com_ibm_CSI_performMessageConfidentialityRequired: 0.
 +BBOM0001I com_ibm_CSI_performMessageConfidentialitySupported: 1.
 +BBOM0001I com_ibm_CSI_performMessageIntegrityRequired: 1.
 +BBOM0001I com_ibm_CSI_performMessageIntegritySupported: 1.
 +BBOM0001I com_ibm_CSI_performSecurityCipherSuiteList: NOT SET.
 +BBOM0001I com_ibm_CSI_performSecurityLevel: HIGH.
 +BBOM0001I com_ibm_CSI_performStateful: 1.
 +BBOM0001I com_ibm_CSI_performTransportAssocSSLTLSRequired: 0.
 +BBOM0001I com_ibm_CSI_performTransportAssocSSLTLSSupported: 1.
 +BBOM0001I com_ibm_CSI_performTLClientAuthenticationRequired: 0.
 +BBOM0001I com_ibm_CSI_performTLClientAuthenticationSupported: 0.
 +BBOM0001I security_disable_daemon_ssl: NOT SET, DEFAULT=0.
 +BBOM0001I security_kerberos_allowed: 0.
 +BBOM0001I security_local_identity: WSGUEST.
 +BBOM0001I security_remote_identity: WSGUEST.
 +BBOM0001I security_sslKeyring: NOT SET. 
 +BBOM0001I security_sslType1: 0.
 +BBOM0001I security_userid_passticket_allowed: 1.
 +BBOM0001I security_userid_password_allowed: 0.
 +BBOM0001I security_zOS_domainName: NOT SET.
 +BBOM0001I security_zOS_domainType: 0.
 +BBOM0001I security_zSAS_ssl_repertoire: SY1/DefaultIIOPSSL.
 +BBOM0001I security_EnableRunAsIdentity: 0.
 +BBOM0001I security_EnableSyncToOSThread: 0.
 +BBOM0001I server_configured_system_name: SY1.
 +BBOM0001I server_generic_short_name: BBOC001.
 +BBOM0001I server_generic_uuid:  457
 *** Message beginning with BBOO0222I apply to Java within *** 
 *** WebSphere Application Server Security *** 
 +BBOO0222I: SECJ6004I: Security Auditing is disabled.
 +BBOO0222I: SECJ0215I: Successfully set JAAS login provider 631
 configuration class to com.ibm.ws.security.auth.login.Configuration.
 +BBOO0222I: SECJ0136I: Custom 632
 Registry:com.ibm.ws.security.registry.zOS.SAFRegistryImpl has been initialized  +BBOO0222I: SECJ0157I: Loaded Vendor AuthorizationTable: 633
 com.ibm.ws.security.core.SAFAuthorizationTableImpl 

General approach for troubleshooting security-related issuesWhen troubleshooting security-related problems, the following questions are very helpful:

Does the problem occur when security is disabled?

This question is a good litmus test to determine that a problem is security related. However, just because a problem only occurs when security is enabled does not always make it a security problem. More troubleshooting is necessary to ensure the problem is really security-related.

Did security seem to initialize properly?

A lot of security code is visited during initialization. So you can see problems there first if the problem is configuration related.

The following sequence of messages that are generated in the SystemOut.log indicate normal code initialization of an application server. This sequence varies based on the configuration, but the messages are similar:

SASRas        A CWWSA0001I: Security configuration initialized. 
SASRas        A CWWSA0002I: Authentication protocol: CSIV2/IBM 
SASRas        A CWWSA0003I: Authentication mechanism: SWAM 
SASRas        A CWWSA0004I: Principal name: BIRKT20/pbirk 
SASRas        A CWWSA0005I: SecurityCurrent registered. 
SASRas        A CWWSA0006I: Security connection interceptor initialized. 
SASRas        A CWWSA0007I: Client request interceptor registered. 
SASRas        A CWWSA0008I: Server request interceptor registered. 
SASRas        A CWWSA0009I: IOR interceptor registered. 
NameServerImp I CWNMS0720I: Do Security service listener registration. 
SecurityCompo A CWSCJ0242A: Security service is starting 
UserRegistryI A CWSCJ0136I: Custom Registry:com.ibm.ws.security.registry.nt.
NTLocalDomainRegistryImpl has been initialized 
SecurityCompo A CWSCJ0202A: Admin application initialized successfully 
SecurityCompo A CWSCJ0203A: Naming application initialized successfully 
SecurityCompo A CWSCJ0204A: Rolebased authorizer initialized successfully 
SecurityCompo A CWSCJ0205A: Security Admin mBean registered successfully 
SecurityCompo A CWSCJ0243A: Security service started successfully 

SecurityCompo A CWSCJ0210A: Security enabled true 

The following sequence of messages generated in the SDSF active log indicate normal code initialization of an application server. Non-security messages have been removed from the sequence that follows. This sequence will vary based on the configuration, but the messages are similar:
 Trace: 2005/05/06 17:27:31.539 01 t=8E96E0 c=UNK key=P8 (13007002)
   ThreadId: 0000000a 
   FunctionName: printProperties 
   SourceId: com.ibm.ws390.orb.CommonBridge    Category: AUDIT
   ExtendedMessage: BBOJ0077I java.security.policy = 
                    /WebSphere/V6R0M0/AppServer/profiles/default/pr  Trace: 2005/05/06 17:27:31.779 01 t=8E96E0 c=UNK key=P8 (13007002) 
   ThreadId: 0000000a    FunctionName: printProperties 
   SourceId: com.ibm.ws390.orb.CommonBridge 
   Category: AUDIT 
   ExtendedMessage: BBOJ0077I java.security.auth.login.config = 
                    /WebSphere/V6R0M0/AppServer/profiles/default/pr  Trace: 2005/05/06 17:27:40.892 01 t=8E96E0 c=UNK key=P8 (13007002)  
   ThreadId: 0000000a  
   FunctionName: com.ibm.ws.security.core.SecurityDM 
   SourceId: com.ibm.ws.security.core.SecurityDM  
   Category: INFO  
   ExtendedMessage: BBOO0222I: SECJ0231I: The Security component's FFDC Diagnostic 
                    Module com.ibm.ws.security.core.Secur  red successfully: true. 
 Trace: 2005/05/06 17:27:40.892 01 t=8E96E0 c=UNK key=P8 (0000000A) 
   Description: Log Boss/390 Error 
   from filename: ./bborjtr.cpp    at line: 932  
   error message: BBOO0222I: SECJ0231I: The Security component's FFDC Diagnostic 
                  Module com.ibm.ws.security.core.Securit  red successfully: true. 
 Trace: 2005/05/06 17:27:41.054 01 t=8E96E0 c=UNK key=P8 (13007002) 
   ThreadId: 0000000a  
   FunctionName: com.ibm.ws.security.audit.AuditServiceImpl 
   SourceId: com.ibm.ws.security.audit.AuditServiceImpl 
   Category: AUDIT  
   ExtendedMessage: BBOO0222I: SECJ6004I: Security Auditing is disabled. 
 Trace: 2005/05/06 17:27:41.282 01 t=8E96E0 c=UNK key=P8 (13007002) 
   ThreadId: 0000000a 
   FunctionName: com.ibm.ws.security.core.distSecurityComponentImpl  
   SourceId: com.ibm.ws.security.core.distSecurityComponentImpl    
   Category: INFO 
   ExtendedMessage: BBOO0222I: SECJ0309I: Java 2 Security is disabled.  
 Trace: 2005/05/06 17:27:41.282 01 t=8E96E0 c=UNK key=P8 (0000000A)   
   Description: Log Boss/390 Error    
   from filename: ./bborjtr.cpp 
   at line: 932 
   error message: BBOO0222I: SECJ0309I: Java 2 Security is disabled.   
 Trace: 2005/05/06 17:27:42.239 01 t=8E96E0 c=UNK key=P8 (13007002)  
   ThreadId: 0000000a  
   FunctionName: com.ibm.ws.security.auth.login.Configuration   
   SourceId: com.ibm.ws.security.auth.login.Configuration   
   Category: AUDIT 
   ExtendedMessage: BBOO0222I: SECJ0215I: Successfully set JAAS login provider 
                    configuration class to com.ibm.ws.securit  Configuration.  
 Trace: 2005/05/06 17:27:42.253 01 t=8E96E0 c=UNK key=P8 (13007002)  
   ThreadId: 0000000a  
   FunctionName: com.ibm.ws.security.core.distSecurityComponentImpl 
   SourceId: com.ibm.ws.security.core.distSecurityComponentImpl  
   Category: INFO
   ExtendedMessage: BBOO0222I: SECJ0212I: WCCM JAAS configuration information 
                    successfully pushed to login provider clas  Trace: 2005/05/06 17:27:42.254 01 t=8E96E0 c=UNK key=P8 (0000000A)   
   Description: Log Boss/390 Error   
   from filename: ./bborjtr.cpp  
   at line: 932 
   error message: BBOO0222I: SECJ0212I: WCCM JAAS configuration information 
                  successfully pushed to login provider class.
 Trace: 2005/05/06 17:27:42.306 01 t=8E96E0 c=UNK key=P8 (13007002) 
   ThreadId: 0000000a  
   FunctionName: com.ibm.ws.security.core.distSecurityComponentImpl 
   SourceId: com.ibm.ws.security.core.distSecurityComponentImpl  
   Category: INFO
   ExtendedMessage: BBOO0222I: SECJ0240I: Security service initialization 
                    completed successfully  
 Trace: 2005/05/06 17:27:42.306 01 t=8E96E0 c=UNK key=P8 (0000000A)   
   Description: Log Boss/390 Error 
   from filename: ./bborjtr.cpp 
   at line: 932  
   error message: BBOO0222I: SECJ0240I: Security service initialization 
                  completed successfully 
 Trace: 2005/05/06 17:27:42.952 01 t=8E96E0 c=UNK key=P8 (13007002)  
   ThreadId: 0000000a  
   FunctionName: com.ibm.ws.objectpool.ObjectPoolService  
   SourceId: com.ibm.ws.objectpool.ObjectPoolService   
   Category: INFO
   ExtendedMessage: BBOO0222I: OBPL0007I: Object Pool Manager service is disabled.  
 Trace: 2005/05/06 17:27:53.512 01 t=8E96E0 c=UNK key=P8 (13007002)  
   ThreadId: 0000000a   
   FunctionName: com.ibm.ws.security.registry.UserRegistryImpl   
   SourceId: com.ibm.ws.security.registry.UserRegistryImpl    
   Category: AUDIT  
   ExtendedMessage: BBOO0222I: SECJ0136I: Custom 
                    Registry:com.ibm.ws.security.registry.zOS.SAFRegistryImpl 
                    has been init  Trace: 2005/05/06 17:27:55.229 01 t=8E96E0 c=UNK key=P8 (13007002)   
   ThreadId: 0000000a  
   FunctionName: com.ibm.ws.security.role.PluggableAuthorizationTableProxy 
   SourceId: com.ibm.ws.security.role.PluggableAuthorizationTableProxy  
   Category: AUDIT 
   ExtendedMessage: BBOO0222I: SECJ0157I: Loaded Vendor AuthorizationTable: 
                    com.ibm.ws.security.core.SAFAuthorizationTab  Trace: 2005/05/06 17:27:56.481 01 t=8E96E0 c=UNK key=P8 (13007002) 
   ThreadId: 0000000a   
   FunctionName: com.ibm.ws.security.core.distSecurityComponentImpl  
   SourceId: com.ibm.ws.security.core.distSecurityComponentImpl 
   Category: INFO   
   ExtendedMessage: BBOO0222I: SECJ0243I: Security service started successfully   
 Trace: 2005/05/06 17:27:56.481 01 t=8E96E0 c=UNK key=P8 (0000000A) 
   Description: Log Boss/390 Error   
   from filename: ./bborjtr.cpp 
   at line: 932   
   error message: BBOO0222I: SECJ0243I: Security service started successfully  
 Trace: 2005/05/06 17:27:56.482 01 t=8E96E0 c=UNK key=P8 (13007002)  
   ThreadId: 0000000a 
   FunctionName: com.ibm.ws.security.core.distSecurityComponentImpl  
   SourceId: com.ibm.ws.security.core.distSecurityComponentImpl   
   Category: INFO 
   ExtendedMessage: BBOO0222I: SECJ0210I: Security enabled true  
 Trace: 2005/05/06 17:27:56.483 01 t=8E96E0 c=UNK key=P8 (0000000A)   
   Description: Log Boss/390 Error   
   from filename: ./bborjtr.cpp 
   at line: 932  
   error message: BBOO0222I: SECJ0210I: Security enabled true  

Is there a stack trace or exception printed in the system log file?

A single stack trace tells a lot about the problem. What code initiated the code that failed? What is the failing component? Which class did the failure actually come from? Sometimes the stack trace is all that is needed to solve the problem and it can pinpoint the root cause. Other times, it can only give us a clue, and can actually be misleading. When support analyzes a stack trace, they can request additional trace if it is not clear what the problem is. If it seems to be security-related and the solution cannot be determined from the stack trace or problem description, you are asked to gather the following trace specification: SASRas=all=enabled:com.ibm.ws.security.*=all=enabled from all processes involved.

Is this a distributed security problem or a local security problem?

  • If the problem is local, that is the code involved does not make a remote method invocation, then troubleshooting is isolated to a single process. It is important to know when a problem is local versus distributed because the behavior of the object request broker (ORB), among other components, is different between the two. When a remote method invocation takes place, an entirely different security code path is entered.

  • When you know that the problem involves two or more servers, the techniques of troubleshooting change. You need to trace all the servers involved simultaneously so that the trace shows the client and server sides of the problem. Make sure the timestamps on all machines match as closely as possible so that you can find the request and reply pair from two different processes. Enable both Secure Authentication Services (SAS) or z/SAS and Security trace using the trace specification: SASRas=all=enabled:com.ibm.ws.security.*=all=enabled.

    For more information on enabling trace, see Enabling trace.

    For more information on enabling trace, see Working with Trace.

Is the problem related to authentication or authorization?

Most security problems fall under one of these two categories. Authentication is the process of determining who the caller is. Authorization is the process of validating that the caller has the proper authority to invoke the requested method. When authentication fails, typically this failure is related to either the authentication protocol, authentication mechanism or user registry. When authorization fails, this is usually related to the application bindings from assembly and deployment and to the caller's identity who is accessing the method and the roles that are required by the method.

Is this a Web or EJB request?

Web requests have a completely different code path than Enterprise JavaBeans (EJB) requests. Different security features exist for Web requests than for EJB requests, requiring a completely different body of knowledge to resolve. For example, when using the Lightweight Third-Party Authentication (LTPA) authentication mechanism, the single sign-on feature (SSO) is available for Web requests but not for EJB requests. Web requests involve HTTP header information that is not required by EJB requests due to the protocol differences. Also, the Web container or servlet engine is involved in the entire process. Any of these components can be involved in the problem and all require consideration during troubleshooting, based on the type of request and where the failure occurs.

Secure EJB requests heavily involve the ORB and Naming components since they flow over the RMI/IIOP protocol. In addition, when Workload Manager (WLM) is enabled, other behavior changes in the code can be observed. All of these components interact closely for security to work properly in this environment. At times,
trace in any or all of these components might be necessary to troubleshoot problems in this area.

The trace specification to begin with is SASRas=all=enabled:com.ibm.ws.security.*=all=enabled. ORB trace is also very beneficial when the SAS/Security trace does not seem to pinpoint the problem.

Does the problem seem to be related to the Secure Sockets Layer (SSL)?

SSL is a totally distinct separate layer of security. Troubleshooting SSL problems is usually separate from troubleshooting authentication and authorization problems, and you have many considerations. Usually, SSL problems are first-time setup problems because the configuration can be difficult. Each client must contain the signer certificate of the server. During mutual authentication, each server must contain the client's signer certificate. Also, there can be protocol differences (SSLv3 vs. Transport Layer Security (TLS)), and listener port problems related to stale Interoperable Object References (IORs), that is IORs from a server, that reflect the port prior to the server restarting. For SSL problems, sometimes you get a request for an SSL trace to determine what is happening with the SSL handshake. The SSL handshake is the process that occurs when a client opens a socket to a server. If anything goes wrong with the key exchange, cipher exchange, and so on, the handshake fails and the socket is not valid. Tracing JSSE (the SSL implementation that is used in WebSphere Application Server) involves the following steps:

  • Set the following system property on the client and server processes: -Djavax.net.debug=true. For the server, add the system property to the Generic JVM Arguments property of the Java virtual machine settings page.

  • Turn on ORB trace as well.

  • Recreate the problem.

    The SystemOut.log of both processes contain the JSSE trace. You can find trace similar to the following example:

    SSLConnection: install <com.ibm.sslite.e@3ae78375> 
    
    >> handleHandshakeV2 <com.ibm.sslite.e@3ae78375> 
    >> handshakeV2 type = 1 
    >> clientHello: SSLv2. 
    SSL client version: 3.0 
    ... 
    ... 
    ... 
    JSSEContext: handleSession[Socket[addr=null,port=0,localport=0]] 
    
    << sendServerHello.
    SSL version: 3.0 
    SSL_RSA_WITH_RC4_128_MD5 
    HelloRandom 
    ... 
    ... 
    ... 
    << sendCertificate. 
    << sendServerHelloDone. 
    >> handleData <com.ibm.sslite.e@3ae78375> 
    
    >> handleHandshake <com.ibm.sslite.e@3ae78375> 
    >> handshakeV3 type = 16 
    
    >> clientKeyExchange. 
    >> handleData <com.ibm.sslite.e@3ae78375> 
    >> handleChangeCipherSpec <com.ibm.sslite.e@3ae78375> 
    >> handleData <com.ibm.sslite.e@3ae78375> 
    
    >> handleHandshake <com.ibm.sslite.e@3ae78375> 
    >> handshakeV3 type = 20 
    >> finished. 
    << sendChangeCipherSpec. 
    << sendFinished. 
    

Trace securityThe classes that implement WebSphere Application Server security are:

To view detailed information on the run time behavior of security, enable trace on the following components and review the output:

Fine tuning SAS traces:

If a subset of classes need to be traced for the SAS/CSIv2 component, a system property can be specified with the class names comma separated: com.ibm.CORBA.securityTraceFilter=SecurityConnectionInterceptorImpl, VaultImpl, ...

Fine tuning Security traces:

If a subset of packages need to be traced, specify a trace specification more detailed than com.ibm.ws.security.*=all=enabled. For example, to trace just dynamic policy code, you can specify com.ibm.ws.security.policy.*=all=enabled. To disable dynamic policy trace, you can specify com.ibm.ws.security.policy.*=all=disabled.

Configuring CSIv2, or z/SAS Trace Settings

Situations arise where reviewing trace for the CSIv2 and z/SAS authentication protocols can assist in troubleshooting difficult problems. This section describes how to enable to CSIv2 and z/SAS trace.

Enabling Server-Side CSIv2 and z/SAS Trace

To enable z/SAS trace in an application server, complete the following:

  • Add the trace specification, SASRas=all=enabled, to the server.xml file or add it to the Trace settings within the administrative console.

  • Typically it is best to also trace the authorization security runtime in addition to the authentication protocol run time. To do this, use the following two trace specifications in combination: SASRas=all=enabled:com.ibm.ws.security.*=all=enabled.

  • When troubleshooting a connection type problem, it is beneficial to trace both CSIv2 and SAS or CSIv2 and z/SAS and the ORB. To do this, use the following three trace specifications: SASRas=all=enabled:com.ibm.ws.security.*=all=enabled:ORBRas=all=enabled.

  • In addition to adding these trace specifications, for ORB trace there are a couple of system properties that also need to be set. Go to the ORB settings in the administrative console and add the following two properties: com.ibm.CORBA.Debug=true and com.ibm.CORBA.CommTrace=true.

Configuring CSIv2, or SAS Trace Settings

Situations arise where reviewing trace for the CSIv2 or SAS authentication protocols can assist in troubleshooting difficult problems. This section describes how to enable to CSIv2 and SAS trace.

Enabling Client-Side CSIv2 and SAS Trace

To enable CSIv2 and SAS trace on a pure client, the following steps need to be taken:

  • Edit the file TraceSettings.properties in the /WebSphere/AppServer/properties directory.

  • In this file, change traceFileName= to point to the path in which you want the ouput file created. Make sure you put a double backslash (\\) between each subdirectory. For example, traceFileName=c:\\WebSphere\\AppServer\\logs\\sas_client.log

  • In this file, add the trace specification string: SASRas=all=enabled. Any additional trace strings can be added on separate lines.

  • Point to this file from within your client application. On the Java command line where you launch the client, add the following system property: -DtraceSettingsFile=TraceSettings.properties.

    Note: Do not give the fully qualified path to the TraceSettings.properties file. Make sure that the TraceSettings.properties file is in your class path.

To enable CSIv2 and SAS trace on a pure client, the following steps need to be taken:

  • Edit the file TraceSettings.properties in the /WebSphere/AppServer/properties directory. For example, edit profile_root/properties/TraceSettings.properties.

  • In this file, change traceFileName= to point to the path in which you want the output file created. For example, traceFileName=profile_root/profile1/logs/sas_client.

  • n this file, add the trace specification string: SASRas=all=enabled. Any additional trace strings can be added on separate lines.

  • Point to this file from within your client application. On the Java command line where you launch the client, add the following system property: -DtraceSettingsFile=TraceSettings.properties.

    Note: Do not give the fully qualified path to the TraceSettings.properties file. Make sure that the TraceSettings.properties file is in your class path.

Enabling Server-Side CSIv2 and SAS Trace

To enable SAS trace in an application server, complete the following:

  • Add the trace specification, SASRas=all=enabled, to the server.xml file or add it to the Trace settings within the WebConsole GUI.

  • Typically it is best to also trace the authorization security runtime in addition to the authentication protocol runtime. To do this, use the following two trace specifications in combination: SASRas=all=enabled:com.ibm.ws.security.*=all=enabled.

  • When troubleshooting a connection type problem, it is beneficial to trace both CSIv2 and SAS or CSIv2 and z/SAS and the ORB. To do this, use the following three trace specifications: SASRas=all=enabled:com.ibm.ws.security.*=all=enabled:ORBRas=all=enabled.

  • In addition to adding these trace specifications, for ORB trace there are a couple of system properties that also need to be set. Go to the ORB settings in the GUI and add the following two properties: com.ibm.CORBA.Debug=true and com.ibm.CORBA.CommTrace=true.

CSIv2 CORBA minor codes

Whenever exceptions occur within the security code on either the client or server, the eventual exception becomes a Common
Object Request Broker Architecture (CORBA) exception. Any exception that occurs gets embedded in a CORBA exception because the CORBA architecture is used by the security service for its own inter-process communication. CORBA exceptions are generic and indicate a problem in communication between two components. CORBA minor codes are more specific and indicate the underlying reason that a component could not complete a request.

The following shows the CORBA minor codes that a client can expect to receive after running a security-related request such as authentication. It also includes the CORBA exception type that the minor code appears in.

The following exception shows an example of a CORBA exception where the minor code is 49424300 and indicates Authentication Failure. Typically, a descriptive message is also included in the exception to assist in troubleshooting the problem. Here, the detailed message is: "Exception caught invoking authenticateBasicAuthData from SecurityServer for user jdoe. Reason: com.ibm.WebSphereSecurity.AuthenticationFailedException" which indicates that the authentication failed for user jdoe.

The completed field in the exception indicates whether the method was completed or not. In the case of a NO_PERMISSION, never invoke the message; therefore it is always completed:No. Other exceptions that are caught on the server side can have a completed status of "Maybe" or "Yes".

org.omg.CORBA.NO_PERMISSION: Caught WSSecurityContextException in 
WSSecurityContext.acceptSecContext(), 
reason: Major Code[0] Minor Code[0] Message[Exception caught invoking 
authenticateBasicAuthData from SecurityServer for user jdoe.  Reason: 
com.ibm.WebSphereSecurity.AuthenticationFailedException]  minor code: 49424300 
completed: No 

at com.ibm.ISecurityLocalObjectBaseL13Impl.PrincipalAuthFailReason.
map_auth_fail_to_minor_code(PrincipalAuthFailReason.java:83) 
        at com.ibm.ISecurityLocalObjectBaseL13Impl.CSIServerRI.receive_request                (CSIServerRI.java:1569) 
        at com.ibm.rmi.pi.InterceptorManager.iterateReceiveRequest               (InterceptorManager.java:739) 
        at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:398) 
        at com.ibm.rmi.iiop.ORB.process(ORB.java:313) 
        at com.ibm.CORBA.iiop.ORB.process(ORB.java:1581) 
        at com.ibm.rmi.iiop.GIOPConnection.doWork(GIOPConnection.java:1827) 
        at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:81) 
        at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:91) 
        at com.ibm.ws.util.CachedThread.run(ThreadPool.java:149) 

The following table shows the CORBA minor codes which a client can expect to receive after running a security-related request such as authentication. It also includes the CORBA exception type that the minor code would appear in.

Table 1.
Minor code name Minor code value (in hex) Exception type (all in the package of org.omg.CORBA .*) Minor code description Retry performed (when authenticationRetryEnabled = true)
AuthenticationFailed 49424300 NO_PERMISSION This code is a generic authentication failed error. It does not give any details about whether or not the user ID or password is valid. Some user registries can choose to use this type of error code, others can choose to use the next three types that are more specific. Yes
InvalidUserid 49424301 NO_PERMISSION This code occurs when the registry returns bad user ID. Yes
InvalidPassword 49424302 NO_PERMISSION This code occurs when the registry returns a bad password. Yes
InvalidSecurityCredentials 49424303 NO_PERMISSION This is a generic error indicating that the credentials are bad for some reason. It might be that the right attributes are not set. Yes, if client has BasicAuth credential (token based credential was rejected in the first place).
InvalidRealm 49424304 NO_PERMISSION This code occurs when the REALM in the token received from the client does not match the server's current realm. No
ValidationFailed 49424305 NO_PERMISSION A validation failure occurs when a token is sent from the client or server to a target server but the token format or the expiration is not valid. Yes, if client has BasicAuth credential (token based credential was rejected in the first place).
CredentialTokenExpired 49424306 NO_PERMISSION This code is more specific about why the validation failed. In this case, the token has an absolute lifetime and the lifetime has expired. Therefore, it is no longer a valid token and cannot be used. Yes, if client has BasicAuth credential (token based credential was rejected in the first place).
InvalidCredentialToken 49424307 NO_PERMISSION This is more specific about why the validation failed. In this case, the token cannot be decrypted or the data within the token is not readable. Yes, if client has BasicAuth credential (token based credential was rejected in the first place).
SessionDoesNotExist 49424308 NO_PERMISSION This indicates that the CSIv2 session does not exist on the server. Typically, a retry occurs automatically and successfully creates a new session. Yes
SessionConflictingEvidence 49424309 NO_PERMISSION This indicates that a session already exists on the server that matches the context_id sent over by the client. However, the information provided by the client for this EstablishContext message is different from the information originally provided to establish the session. Yes
SessionRejected 4942430A NO_PERMISSION This indicates that the session referenced by the client has been previously rejected by the server. Yes
SecurityServerNotAvailable 4942430B NO_PERMISSION This error occurs when the server cannot contact the local or remote security server in order to authenticate or validate. No
InvalidIdentityToken 4942430C NO_PERMISSION This error indicates that identity cannot be obtained from the identity token when Identity Assertion is enabled. No
IdentityServerNotTrusted 4942430D NO_PERMISSION This indicates that the server ID of the sending server is not on the target server's trusted principal list. No
InvalidMessage 4942430E NO_PERMISSION This indicates that the CSIv2 message format is not valid for the receiving server. No
AuthenticationNotSupported 49421090 NO_PERMISSION This error occurs when a mechanism does not support authentication (very rare). No
InvalidSecurityMechanism 49421091 NO_PERMISSION This is used to indicate that the specified security mechanism is not known. No
CredentialNotAvailable 49421092 NO_PERMISSION This indicates a credential is not available when it is required. No
SecurityMechanismNotSupported 49421093 NO_PERMISSION This error occurs when a security mechanism that is specified in the CSIv2 token is not implemented on the server. No
ValidationNotSupported 49421094 NO_PERMISSION This error occurs when a mechanism does not support validation, such as LocalOS. This error does not occur since the LocalOS credential is not a forwardable credential, therefore, validation never needs to be called on this credential. No
CredentialTokenNotSet 49421095 NO_PERMISSION This is used to indicate that the token inside the credential is null. No
ServerConnectionFailed 494210A0 COMM_FAILURE This error is used when a connection attempt fails. Yes (via ORB retry)
CorbaSystemException 494210B0 INTERNAL This code is a generic CORBA specific exception in system code. No
JavaException 494210B1 INTERNAL This is a generic error that indicated that an unexpected Java exception occurred. No
ValueIsNull 494210B2 INTERNAL This code is used to indicate that a value or parameter that passed in is null. No
EffectivePolicyNotPresent 494210B3 INTERNAL This indicates that an effective policy object for CSIv2 is not present. This object is used to determine what security configuration features are specified. No
NullPointerException 494210B4 INTERNAL This code is used to indicate that a NullPointerException is caught in the runtime. No
ErrorGettingClassInstance 494210B5 INTERNAL This indicates a problem loading a class dynamically. No
MalFormedParameters 494210B6 INTERNAL This indicates parameters are not valid. No
DuplicateSecurityAttributeType 494210B7 INTERNAL This indicates a duplicate credential attribute that is specified during the set_attributes operation. No
MethodNotImplemented 494210C0 NO_IMPLEMENT This indicates that a method invoked is not implemented. No
GSSFormatError 494210C5 BAD_PARAM This code indicates that a Generic Security Services (GSS) encoding or decoding routine has created an exception. No
TagComponentFormatError 494210C6 BAD_PARAM This code indicates that a tag component cannot be read properly. No
InvalidSecurityAttributeType 494210C7 BAD_PARAM This code indicates an attribute type specified during the set_attributes operation is not a valid type. No
SecurityConfigError 494210CA INITIALIZE This code indicates a problem exists between the client and server configuration. No

For current information available from IBM Support on known problems and their resolution, see the IBM Support page.

IBM Support has documents that can save you time gathering information needed to resolve this problem. Before opening a PMR, see the IBM Support page.


 

Related tasks


Troubleshooting security configurations

Related reference

Troubleshoot the installation

Searchable topic ID: rtrb_securitycomp