Make sure that the following properties are set in the clients JVM:
10-30 Oracle Fusion Middleware Security and Administrators Guide for Web Services
c.
By default, SSL in enabled on Oracle HTTP Server. The default https port is 4443. For more information on configuring this port, see Configuring SSL in
Oracle Fusion Middleware in Oracle Fusion Middleware Administrators Guide.
d.
Restart Oracle HTTP Server. For more information, see Configuring SSL in Oracle Fusion Middleware in
Oracle Fusion Middleware Administrators Guide.
2.
Create a wallet as described at Managing Keystores, Wallets, and Certificates in Oracle Fusion Middleware Administrators Guide and replace the default wallet. The
default wallet is located in the ORACLE_INSTANCEconfigOHSohs_ namekeystoresdefault directory. See
Example 10–2 for sample commands
for creating a wallet.
Example 10–2 Sample Commands for One-Way SSL
.orapki wallet create -wallet wallet_location -pwd welcome1 -auto_login .orapki wallet display -wallet wallet_location -pwd welcome1
.orapki cert display -cert wallet_locationohs.crt .orapki wallet add -wallet wallet_location -keysize 512 -dn CN=host_
name
,OU=st,O=owsm,L=N,ST=delhi,C=IN -self_signed -validity 700 -serial_num 20 -cert wallet_locationohs.crt -user_
cert -pwd welcome1 .orapki wallet display -wallet wallet_location -pwd welcome1
JAVA_HOME
binkeytool -import -trustcacerts -file ohs.crt -alias sslcert -keystore client_keystore.jks -storepass welcome1
3.
In the Oracle WebLogic Administration Console, perform the following:
a.
Navigate to the Servers page in the Environment tab.
b.
Click Adminserver and in Configuration, select General.
c.
In the Advanced section, check the following: WebLogic Plug-In Enabled, and Client Cert Proxy Enabled.
d.
Save the changes.
e.
Set the same parameters for the SOA server. For more information, see Server: Configuration: General in the Oracle
WebLogic Server Administration Console Help. To modify the client to use one-way server authentication mode, create a JSE client
from the Web service using JDeveloper. Modify the parameters and properties as described in
Example 10–3 .
Example 10–3 JSE Client Using SSL
public static void mainString [] args {
class1Service = new Class1Service; SecurityPolicyFeature[] securityFeatures =
new SecurityPolicyFeature[] { new SecurityPolicyFeatureoraclewss_ saml_token_over_ssl_client_policy };
Class1 class1 = class1Service.getClass1PortsecurityFeatures; BindingProvider class1.getRequestContext.putBindingProvider.ENDPOINT_
ADDRESS_PROPERTY,
Setting Up Your Environment for Policies 10-31
https:host:4443myWlsServiceClass1Port; BindingProvider class1.getRequestContext.putBindingProvider.USERNAME_
PROPERTY, weblogic; System.setPropertyjavax.net.ssl.trustStore,D:\\OWSM_
QA\\11g\\PS2\\OHS\\wallet\\client_keystore.jks; System.setPropertyjavax.net.ssl.trustStorePassword,welcome1;
System.setPropertyjavax.net.ssl.trustStoreType,JKS; System.setPropertyweblogic.security.SSL.ignoreHostnameVerification ,
true; System.setPropertyjava.protocol.handler.pkgs,
com.sun.net.ssl.internal.www.protocol; System.setPropertyjavax.net.debug,all;
System.out.printlnCall to the SSL service...; String response1 = class1.sayHellotest;
System.out.printlnResponse = + response1; }
Two-Way SSL
For more information on the Oracle WSM policies that require two-way SSL configuration, see
Which Policies Require You to Configure Two-Way SSL? on
page 10-23. To use two-way SSL, you need to:
1.
Configure the Oracle HTTP Server as follows:
a.
In the file ORACLE_INSTANCEconfigOHSohs_namessl.conf, configure Oracle HTTP Server as a Web proxy and specify the list of URLs you
want to access as shown in Example 10–4
.
Example 10–4 Specifying URLs in ssl.conf
added properties for configuring OHS as webproxy IfModule weblogic_module
WebLogicHost host WebLogicPort port
SecureProxy Off WlProxySSL On
Debug ALL WlLogFile tmpweblogic.log
the location attributes list the urls you want to access via OHS Location myWlsService
SetHandler weblogic-handler WebLogicHost host
WeblogicPort port Location
b.
In the same file, set the following properties under virtual host configuration to ensure the client certificate information is sent to the WebLogic Server:
SSLVerifyClient optional SSLOptions +StdEnvVars +ExportCertData
SSLOptions +ExportCertData is a mod_ssl directive that ensures certificate-related information is sent to WebLogic Server. SSLOptions
10-32 Oracle Fusion Middleware Security and Administrators Guide for Web Services
+StdEnvVars +ExportCertData ensures that SSL-related information is sent.
c.
By default, SSL in enabled on Oracle HTTP Server. The default https port is 4443. For more information on configuring this port, see Configuring SSL in
Oracle Fusion Middleware in Oracle Fusion Middleware Administrators Guide.
d.
Restart Oracle HTTP Server. For more information, see Configuring SSL in Oracle Fusion Middleware in
Oracle Fusion Middleware Administrators Guide.
2.
Create a wallet as described at Managing Keystores, Wallets, and Certificates in Oracle Fusion Middleware Administrators Guide and replace the default wallet. The
default wallet is located in the ORACLE_INSTANCEconfigOHSohs_ namekeystoresdefault directory. See
Example 10–5 for sample
commands.
Example 10–5 Sample Commands for Two-Way SSL
JAVA_HOME binkeytool -genkey -alias twowayssl -keyalg RSA
-keystore twowaykeystore.jks -storepass welcome1 -validity 700 .orapki wallet add -wallet wallet_location -cert
wallet_locationtwowayssl.crt -trusted_cert -pwd welcome1
3.
In the Oracle WebLogic Administration Console, perform the following:
a.
Navigate to the Servers page in the Environment tab.
b.
Click Adminserver and in Configuration, select General.
c.
In the Advanced section, check the following: WebLogic Plug-In Enabled, and Client Cert Proxy Enabled.
d.
Save the changes.
e.
Set the same parameters for the SOA server. For more information, see Server: Configuration: General in the Oracle
WebLogic Server Administration Console Help. To modify the client to use two-way mutual authentication mode SSL, create a JSE
client from the Web service using JDeveloper. Modify the parameters and properties as described in
Example 10–6 .
Example 10–6 JSE Client Using SSL
public static void mainString [] args {
class1Service = new Class1Service; SecurityPolicyFeature[] securityFeatures =
new SecurityPolicyFeature[] { new SecurityPolicyFeatureoraclewss_ username_token_over_ssl_client_policy };
Class1 class1 = class1Service.getClass1PortsecurityFeatures; BindingProvider class1.getRequestContext.putBindingProvider.ENDPOINT_
ADDRESS_PROPERTY, https:host:4443myWlsServiceClass1Port;
BindingProvider class1.getRequestContext.putBindingProvider.USERNAME_ PROPERTY, weblogic;
BindingProvider class1.getRequestContext.putBindingProvider.PASSWORD_ PROPERTY, welcome1;
System.setPropertyjavax.net.ssl.trustStore,D:\\OWSM_
Setting Up Your Environment for Policies 10-33
QA\\11g\\PS2\\OHS\\wallet\\twowaykeystore.jks; System.setPropertyjavax.net.ssl.trustStorePassword,welcome1;
System.setPropertyjavax.net.ssl.trustStoreType,JKS; System.setPropertyjavax.net.ssl.keyStore,D:\\OWSM_
QA\\11g\\PS2\\OHS\\wallet\\twowaykeystore.jks; System.setPropertyjavax.net.ssl.keyStorePassword,welcome1;
System.setPropertyjavax.net.ssl.keyStoreType,JKS; System.setPropertyweblogic.security.SSL.ignoreHostnameVerification ,
true; System.setPropertyjava.protocol.handler.pkgs,
com.sun.net.ssl.internal.www.protocol; System.setPropertyjavax.net.debug,all;
System.out.printlnCall to the SSL service...; String response1 = class1.sayHellotest;
System.out.printlnResponse = + response1; }
Using Hardware Security Modules With Oracle WSM
Hardware security modules HSM are certified to operate with Oracle Advanced Security. These modules provide a secure way to store keys and off-load
cryptographic processing.
Using SafeNet Luna SA With Oracle WSM for Key Storage
SafeNet Luna SA is a network-attached, HSM featuring cryptographic processing and hardware key management for applications. Luna SA is designed to protect critical
cryptographic keys across a wide range of security applications.
Some key advantages of using Luna SA with Oracle WSM are:
■
Network shareability
■
Most secure with keys always in hardware
■
FIPS validated
By default, Oracle Web Services Manager Oracle WSM uses Java Key Store JKS for key storage. Keys and certificates required by Oracle WSM for cryptographic
operations are fetched from a keystore file. When Luna SA is available in-network, it can be leveraged by Oracle WSM for key storage purposes and cryptographic
operations.
This section includes the following topics:
■
About Installing and Configuring the Luna SA HSM Client on page 10-34
■
Configuring the JRE Used By Oracle WSM on page 10-34
■
Logging On to Luna SA on page 10-34
■
Copying Keys and Certificates from JKS to Luna SA on page 10-35
■
Configuring Oracle WSM to Use Luna SA on page 10-35
Note: You must contact your SafeNet representative to obtain
certified hardware and software to use with Oracle Advanced Security.
10-34 Oracle Fusion Middleware Security and Administrators Guide for Web Services
About Installing and Configuring the Luna SA HSM Client
The Luna SA HSM client needs to be installed on the host that has a running instance of Oracle WSM. Then the Luna SA HSM client will communicate with an available
Luna SA HSM network. However, this section does not cover Luna SA client installation, nor does it cover the Luna SA network installation and setup, which are
out of scope for this document. Instead, you should refer to the Luna SA documentation for those instructions, at
http:www.safenet-inc.comProductsDetail.aspx?id=2147483853te rms=search
. Before you installing the Luna SA HSM client, verify the following checklist:
■
You already have Luna SA installed and available in you network.
■
You are logged in as root or as a user that has installation permission.
■
You have a Luna SA client installation CD or software image.
■
You have all required passwords for Luna SA, including an administrator password and a partition password.
Configuring the JRE Used By Oracle WSM
After installing the Luna SA client, you need to configure the JRE that will be used by the Oracle WSM setup.
1.
Copy the following JAR files from the usrlunasajsplib directory to the JAVA_HOMEjrelibext directory:
■
LunaJCASP.jar
■
LunaJCESP.jar
2.
Copy the libLunaAPI.so file to the java.library.path.
3.
Edit the JAVA_HOMEjrelibsecurityjava.security file to include two Luna providers.
At the end of the security.providers list add these two Luna providers: security.provider.n=com.chrysalisits.crypto.LunaJCAProvider
security.provider.n+1=com.chrysalisits.cryptox.LunaJCEProvider where
n specifies the preference order that determines the order in which providers are searched for requested algorithms when no specific provider is requested. The
order is 1-based; 1 is the most preferred, followed by 2, and so on.
Logging On to Luna SA
Before you can use Luna SA with Oracle WSM, you must log on to the Luna SA server. This is one-time process that creates a Luna log-in session on the client machine. This
session remains active until the client or server machine is rebooted, or when someone explicitly logs out of the Luna session.
Note: You must contact your SafeNet representative to have the
hardware security module, and to acquire the necessary library. These tasks must be performed before you can use an Luna SA
hardware security module with Oracle WSM
Setting Up Your Environment for Policies 10-35
You must use the salogin utility to log in. The salogin utility establishes a connection between the client and the HSM partition for a particular application. It
takes an application ID as an argument. This application id consists of two parts: a high and a low ID.
Before invoking the salogin utility, you need to add an entry to the Chrystoki.conf file, which registers the application ID. The Chrystoki.conf file
is usually found in the etc directory. This is also a one-time process.
1.
Edit the etcChrystoki.conf file by adding the application ID to the end of file. For example:
Misc = { AppIdMajor=major id;
AppIdMinor=minor id; }
2.
Log into the Luna SA server, by entering: salogin -o -s partition number -i AppIdMajor:AppIdMinor -v -p
partition_password This opens a session for the application ID you provided. The salogin is in the
usrlunasabin directory.
3.
To log out of the Luna SA server, enter: salogin -c -s slot number -i AppIdMajor:AppIdMinor
Copying Keys and Certificates from JKS to Luna SA
If keys and certificates are currently in the JKS, then you need to move all keys and certificates to LunaSA. You can use the cmu script provided by LunaSA for importing
keys and certificates.
■
The cmu importKey command imports an RSA|DSA private key from a file onto an HSM. Supports PKCS12RSA, PKCS8RSADSA, or PKCS1RSA.
■
The cmu import command imports an X.509 certificate from a file onto an HSM.
Configuring Oracle WSM to Use Luna SA
As part of configuring Oracle WSM to use Luna SA, the keystore type has to be changed to Luna from the default Java Key Store JKS value.
Follow these steps to configure the keystore type: