Tune security configurations

Tune security configurations

Performance issues typically involve trade-offs between function and speed. Usually, the more function and the more processing that are involved, the slower the performance. Consider what type of security is necessary and what you can disable in your environment. For example, if your application servers are running in a Virtual Private Network (VPN), consider whether you can disable Secure Sockets Layer (SSL). If you have a lot of users, can they be mapped to groups and then associated to your Java 2 Platform, Enterprise Edition (J2EE) roles? These questions are things to consider when designing your security infrastructure.

Consider the following recommendations for the tuning general security

Consider the following steps to tune Common Secure Interoperability version 2 (CSIv2)

  1. Consider using Secure Sockets Layer (SSL) client certificates instead of a user ID and password to authenticate Java clients. Because you are already making the SSL connection, using mutual authentication adds little overhead while it removes the service context that contains the user ID and password completely.

  2. If you send a large amount of data that is not very security sensitive, reduce the strength of your ciphers. The more data you have to bulk encrypt and the stronger the cipher, the longer this action takes. If the data is not sensitive, do not waste your processing with 128-bit ciphers.

  3. Consider putting only an asterisk (*) in the trusted server ID list (meaning trust all servers) when you use identity assertion for downstream delegation. Use SSL mutual authentication between servers to provide this trust. Adding this extra step in the SSL handshake performs better than having to fully authenticate the upstream server and check the trusted list. When an asterisk (*) is used, the identity token is trusted. The SSL connection trusts the server through client certificate authentication.

  4. Ensure that stateful sessions are enabled for CSIv2. This is the default, but requires authentication only on the first request and on any subsequent token expirations.

  5. If you are communicating only with WebSphere Application Server Version 5 or higher servers, make the Active Authentication Protocol CSI, instead of CSI and SAS. This action removes an interceptor invocation for every request on both the client and server sides.

  6. For a pure Java client, you can disable the creation of server sockets used for Object Request Broker (ORB) callbacks. Do this step only if you are communicating with servers running WebSphere Application Server, Version 5 or later.

    1. In the sas.client.props file, add com.ibm.CSI.claimTransportAssocSSLTLSRequired=false and com.ibm.CSI.claimTransportAssocSSLTLSSupported=false.

    2. Set the active protocol to csiv2 instead of both in the sas.client.props file. * The protocol property changes to com.ibm.CSI.protocol=csiv2.

Consider the following steps to tune Lightweight Directory Access Protocol (LDAP) authentication

  1. In the administration console, click Security > Global security .

  2. Select Reuse Connections in the WebSphere Application Server LDAP User Registry configuration.

  3. Under User registries , click LDAP.

  4. Select the Ignore case for authorization option in the WebSphere Application Server LDAP User Registry configuration, when case-sensitivity is not important.

  5. Select the Reuse connection option.

  6. Use the cache features that your LDAP server supports.

  7. Choose either the IBM Tivoli Directory Server or SecureWay directory type, if you are using an IBM Tivoli Directory Server. The IBM Tivoli Directory Server yields improved performance because it is programmed to use the new group membership attributes to improve group membership searches. However, authorization must be case insensitive to use IBM Tivoli Directory Server.

  8. Choose either iPlanet Directory Server (also known as Sun ONE) or Netscape as the directory if you are an iPlanet Directory user. Using the iPlanet Directory Server directory can increase performance in group membership lookup. However, use Role only for group mechanisms.

Consider the following steps to tune Web authentication:

  1. Increase the cache and token timeout if you feel your environment is secure enough. The Web authentication information is stored in these caches and as long as the authentication information is in the cache, the login module is not invoked to authenticate the user. This supports subsequent requests to reuse the credentials that are already created. A disadvantage of increasing the token timeout is the exposure of having a token stolen and providing the thief more time to hack into the system before the token expires.

    See the article Security cache properties for a list of these properties.

  2. Enable single singon (SSO). SSO is available only when you select LTPA as the authentication mechanism in the Global Security panel. When you select SSO, a single authentication to one application server is enough to make requests to multiple application servers in the same SSO domain.

  3. Disable the Web Inbound Security Attribute Propagation option on the SSO panel if the function is not required. In some cases, having the function enabled can improves performance. This improvement is most likely for higher volume cases where a considerable number of user registry calls reduces performance. In other cases, having the feature disabled can improve performance. This improvement is most likely when the user registry calls do not take considerable resources.

Consider the following steps to tune authorization

  1. Map your users to groups in the user registry. Associate the groups with your Java 2 Platform, Enterprise Edition (J2EE) roles. This association greatly improves performance when the number of users increases.

  2. Judiciously assign method-permissions for enterprise beans. For example, you can use the *.jsp URL pattern to apply the same authentication data constraints to indicate all JavaServer Pages (JSP) files. For a given URL, the exact match in the deployment descriptor takes precedence over the longest path match. Use the *.jsp, *.do, *.html extension match if no exact matches exist and longest path matches exist for a given URL in the security constraints.

  3. Judiciously assign security-constraints for servlets. For example, you can use the URL pattern *.jsp to apply the same authentication data constraints to indicate all JSP files. For a given URL, the exact match in the deployment descriptor takes precedence over the longest path match. Use the extension match (*.jsp, *.do, *.html) if there is no exact match and longest path match for a given URL in the security constraints.

ResultYou always have a trade off between performance, features, and security. Security typically adds more processing time to your requests, but for a good reason. Not all security features are required in your environment. When you decide to tune security, create a benchmark before making any change to ensure that the change is improving performance.

 

What to do next

In a large scale deployment, performance is very important. Running benchmark measurements with different combinations of features can help you to determine the best performance versus the benefit of configuration for your environment. Continue to run benchmarks if anything changes in your environment, to help determine the impact of these changes.



Sub-topics

Secure Sockets Layer performance tips

Tuning security

Related tasks

Tuning, hardening, and maintaining

Searchable topic ID: tsec_tune