How to configure client certificate authentication with RACF

Configure a IBM® z/OS® Connect Server to perform authentication of the identity in a TLS client certificate, mapping the certificate to a RACF® user ID, and then granting that user ID authority to access IBM z/OS Connect resources.

zosConnect-3.0 Applies to zosConnect-3.0.

This task is applicable when z/OS Connect is used as an API requester.

Before you begin

About this task

This task assumes that RACF is used as security manager. If you are using an alternative External Security Manager, refer to the appropriate product documentation for the equivalent commands.

You use RACF certificate name filtering, also called user ID mapping, to map the TLS client certificate to a RACF user ID. You then configure z/OS Connect to perform authentication by using a TLS client certificate.

During authentication, z/OS Connect calls RACF to perform the mapping resulting in the mapped RACF user ID being the authenticated user ID.

Note: Authentication is not enforced unless the appSecurity-2.0 feature is configured.

Procedure

  1. Activate the RACF DIGTNMAP class to allow certificate name filters to be created or changed.
    Enter the following RACF command.
    SETROPTS CLASSACT(DIGTNMAP) RACLIST(DIGTNMAP)
  2. Map the TLS client certificate to a RACF user ID.
    Enter the following command to use RACF certificate name filtering to map the client certificate to a RACF user ID.
    RACDCERT MAP ID(EMPLOY1) SDNFILTER('CN=myClient.host.com.O=IBM.C=US') WITHLABEL('ClientCertEMPLOY1')
    The command uses the following values:
    • EMPLOY1 is the RACF user ID to which the client certificate is to be mapped.
    • CN=myClient.host.com.O=IBM.C=US is the subject distinguished name filter that corresponds to the client certificate subject's distinguished name value of CN=myClient.host.com, O=IBM, C=US. The syntax of the SDNFILTER is significant, use periods to separate the components of the distinguished name and remove any spaces between DN components.
    • ClientCertEMPLOY1 is a label for the mapping.
    For the full syntax of the RACDCERT MAP command, see RACDCERT MAP (Create mapping) in the z/OS documentation.
  3. Refresh the DIGTNMAP RACF class.
    For the changes to take effect, enter the following RACF command.
    SETROPTS RACLIST(DIGTNMAP) REFRESH
  4. Ensure that the server is configured to require authentication for the request by configuring the appSecurity-2.0 feature.
    For example,
        <featureManager>
            <feature>appSecurity-2.0</feature>
        </featureManager>
  5. Configure the server to perform authentication by using the TLS client certificate.
    Set CLIENT_CERT as the authentication method by adding the following element to the configuration file:
    <webAppSecurity overrideHttpAuthMethod="CLIENT_CERT"/>
    Warning: Setting this authentication method means that a client certificate is expected for authentication on all requests to this z/OS Connect Server. If other requests require basic authentication instead, the server can be configured to fail-over to use basic authentication when no client certificate is present on the request by also specifying the following configuration element.
    <webAppSecurity allowFailOverToBasicAuth="true" />
  6. Start, or restart z/OS Connect if it was already running, to pick up the changes that are made to the RACF class profiles.

Results

The TLS client certificate is mapped to a RACF user ID, and is authorized to access z/OS Connect.