Sun Java System Application Server Platform Edition 8.1 2005Q2 Update 2 Administration Guide

- Previous: To delete a message security provider
- Next: Setting the Request and Response Policy for the Application Client Configuration

## To enable message security for application clients

The message protection policies of client providers must be configured such that they are equivalent to the message protection policies of the server-side providers they will be interacting with. This is already the case for the providers configured (but not enabled) when the Application Server is installed.

To enable message security for client applications, modify the Application Server specific configuration for the application client container.

1. Stop any client applications that depend on the client container descriptor.

2. In a text editor, open the Sun application client container descriptor, located in domain-dir`/config/sun-acc.xml.`

3. Add the `default-client-provider` element to the file to enable the default client provider in the application client.

   The other code is provided to show where the code to enable message security for client applications should be located. The other code may differ slightly in your installation. Do not change it.

       <client-container>
         <target-server name="your-host" address="your-host"
             port="your-port"/>
         <log-service file="" level="WARNING"/>
         <message-security-config auth-layer="SOAP"
             default-client-provider="ClientProvider">
           <provider-config
               class-name="com.sun.enterprise.security.jauth.ClientAuthModule"
               provider-id="ClientProvider" provider-type="client">
             <request-policy auth-source="sender"/>
             <response-policy/>
               <property name="security.config"
                 value="C:/Sun/AppServer/lib/appclient/wss-client-config.xml"/>
           </provider-config>
         </message-security-config>
       </client-container>

   The message security provider configured in the client container will also require access to private keys and trusted certificates. This is accomplished by defining appropriate values for the following system properties in the application client startup script.

       -Djavax.net.ssl.keyStore

       -Djavax.net.ssl.trustStore

##### See Also

- To enable providers for message security

- To configure a message security provider

- Creating a Message Security Provider

- To delete a message security configuration

- To delete a message security provider

- Previous: To delete a message security provider
- Next: Setting the Request and Response Policy for the Application Client Configuration

- © 2010, Oracle Corporation and/or its affiliates