Configuring JBossWS Web Services security to use JBoss Security Domains Ovidiu Feodorov 12/14/2010 This document explains how to configure a native-stack JBossWS Web Service and the associated client to take advantage of new configuration features introduced with the JBossSX/JBossWS code changes described by Case 00390063. Since Case 00390063, it is possible to configure a native-stack Web Service in such a way that no keystore/truststore details (except conventional key labels, and not actual key aliases) are present in the the JBossWS security configuration files. This feature can be used when it is necessary to isolate operational environment security configuration details such as key store and trust store locations, passwords and key aliases from JBossWS configuration files bundled with deployment artifacts produced by a separate development organization. The deployment artifacts refer to a series of conventional names - the JNDI name of a JAAS security domain and a set of labels that designate keys and certificates used to sign/encrypt the WS message. The operations group has the freedom to declare different security configuration details for different environments, without changing the deployment artifacts. Configuring the Web Service and the associated client involves the following steps: 1. Configuration of the JAAS Security Domain ------------------------------------------------------- The security domain must declare the keystore and truststore URLs, as usual, as well as two new elements: 1.1 A service authorization token This service authorization token establishes the trust between the JAAS security domain and the WS layer that requests private keys from the JAAS security domain. It is declared as follows: abc123 The same service authorization token must be present in the configuration of the WS layer, as shown below. 1.2 A label-to-key-alias map The mapping is necessary to prevent the need of specifying actual key aliases in the WS layer configuration. The labels are conventional names given to keys/certificates with specific purposes: web-services-signature-key=secret_key_alias_1 web-services-encryption-certificate=certificate_alias_1 The labels will also be present in the configuration of the WS layer. 1.3 Complete JAAS security domain configuration example. A complete JAAS security domain that uses JKS keystores/truststores and includes the elements introduced above, follows: JKS password file:///sys_apps_01/JBoss/jboss-eap-5.1-reference/server/reference/conf/props/test-keystore.jks JKS file:///sys_apps_01/JBoss/jboss-eap-5.1-reference/server/reference/conf/props/test-truststore.jks password abc123 web-services-signature-key=secret_key_alias_1 web-services-encryption-certificate=certificate_alias_1 2. Configuration of the WS layer ------------------------------------------------------------------- 2.1 The jboss-wsse-client.xml configuration file should specify the JNDI name of the JAAS security domain and key/certificate labels as follows: 2.2 The jboss-wsse-server.xml configuration file should specify the JNDI name of the JAAS security domain and key/certificate labels as follows: Notes: --------------------------------------------------------------------------------------------- The solution described by Case 00390063 has the following limitations: 1. The private keys and the public certificates must be available in the same key store. 2. The JBossWS stack that comes with JBoss EAP 5.1.0 exhibits a defect requiring to bundle the client-side security configuration file jboss-wsse-client.xml under WEB-INF/classes/WEB-INF instead of WEB-INF, as it would have been expected. ----------------------------------------------------------------------------------------------------