+

Search Tips   |   Advanced Search

(ZOS) RACF keyring setup


Use Java to create a RACFInputStream for a RACF keystore

During the SSL authentication process, WebSphere Application Server considers a certificate that connects as a PERSONAL certificate as a KeyEntry. Use the certificate as an end-user certificate in an SSL handshake because the private key is available.

WAS considers a certificate that connects as a CERTAUTH certificate as a TrustedCertEntry and treats the certificate as a Certificate Authority (CA). Keyrings require certificates that connect as PERSONAL and CA certificates that connect as CERTAUTH. Certificates that connect as SITE are not supported in this release.

A RACF keyring that a JSSE client and server can use for both trust and key information is shown in the following sample code:

We must add the certification path provider to your Java environment to construct certificate chains from certificates that WAS reads from the Resource Access Control Facility (RACF). Add the following line to your java.security file provider list:

If one of the RACF certificates fails to load, the keystore is not loaded. Remove any unwanted certificates from the keyring.

The RACFInputStream contains three parameters:

The following code example shows the RACFInputStream script passing in a user ID, a ring ID, and a null password directly:

In the previous example, the system property user.name is referenced to provide the userID that WAS passes to RACF. This example is not typical.

For more information about running the RACFInputStream script, see the document z/OS Unique Considerations for the Java 2 SDK, Standard Edition, v 6.0. A link to this z/OS document is provided in the Related Links section of this topic.


Access a RACFInputStream using URLStreamHandler

In this release, we can access data through user-defined classes with the URLStreamHandler object. WAS can define the classes that access the data with the system property java.protocol.handler.pkgs. To access data that resides in a Service Authorization Facility (SAF) RACF keyring, use the safkeyring URL with the associated classes.

To use the URLStreamHandler class to create a RACFInputStream, define the following Java property :

If we are using the IBM Java Cryptography Extension (IBMJCE) provider to provide cryptographic support, set the property to the following value:

If we are using the IBMJCE4758 provider to provide cryptographic support, set the property to the following value:

Use a URL to specify a stream handler in the java.policy file. The jarsigner utility also accepts a URL for the -keystore parameter. When certificates from a RACF keyring verify signed jar files, we can specify that WAS must use the keyring as an input stream to the keystore in the java.policy file, as shown in the following example code:

In this example,

The Java Virtual Machine (JVM) must be started with the java.protocol.handler.pkgs property set to one of the values described previously, so that WAS can call the appropriate URLStreamHandler. The following example shows the jarsigner utility using a safkeyring URL:

For more information on inserting or updating information in the RACF External Security Manager, refer to the RACDCERT command in the following publications:

  • Secure specific application servers
  • z/OS Unique Considerations for the Java 2 SDK, Standard Edition, v 6.0