Create a Key Ring and Certificates in IBM RACF

Configure the key ring and generate certificates in IBM RACF to enable the TLS connection between
Topology
and the client browser.
Required roles: security administrator
This article provides instruction for IBM RACF that enable you to generate a key ring and store a certificate in the key ring. This certificate is required to enable TLS encryption between
Topology
and the client browser.

Generate a Key Ring and Connect a Certificate

A key ring (also known as z/OS key ring or SAF key ring) is a collection of digital certificates that are associated with an individual user. Key rings provide enhanced security over file key stores because they are managed and protected by an external security manager.

Prerequisites

  • This article requires that the user is familiar with IBM RACF. For more information about available IBM RACF commands, see the IBM RACF documentation.
  • The user ID that runs the STC for the
    Topology
    API server. The examples in this article use the TPLSTC user ID, according to the instructions for the required
    Topology
    user IDs.
  • The authorization to add certificates to the CERTAUTH virtual key ring.
  • Required privileges to the FACILITY class to set up the key ring and certificates:
    • IRR.DIGTCERT.ADD - READ access is required for your own user ID. CONTROL access is required to add CERTSITE or CERTAUTH certificate.
    • IRR.DIGTCERT.ADDRING - READ access is required for your own user ID. UPDATE access is required to create key ring for another user ID.
    • IRR.DIGTCERT.CONNECT - READ access is required for your own user ID. CONTROL access is required to connect CERTSITE or CERTAUTH certificate.
    • IRR.DIGTCERT.GENCERT - READ access is required for your own user ID. CONTROL access is required to sign with CERTSITE or CERTAUTH certificate.
    • IRR.DIGTCERT.GENREQ - READ access is required for your own user ID. CONTROL access is required to generate request based on CERTSITE or CERTAUTH certificate.
  • Required privileges to the FACILITY class to read the key ring and certificates:
    • IRR.DIGTCERT.LIST - READ access is required for your user ID. CONTROL access is required to list CERTSITE or CERTAUTH certificates.
    • IRR.DIGTCERT.LISTRING - READ access is required for your user ID. UPDATE access is required to list and read key rings for another user ID.

Generate the Key Ring and the Certificate

In this procedure, you generate a key ring and an unsigned certificate. You also sign the certificate using a Certification Authority of your choice.
  1. Generate the key ring.
    Example:
    RACDCERT ID(TPLSTC) ADDRING(TOPORING)
    The key ring is generated.
  2. Generate the certificate.
    Example:
    RACDCERT GENCERT ID(TPLSTC) SUBJECTSDN( CN('CA Topology') OU('Mainframe Department') O('Example Inc.') L('Prague') S('Prague') C('CZ') ) ALTNAME(DOMAIN('topology.example.com')) KEYUSAGE(HANDSHAKE) SIZE(2048) WITHLABEL('Topology Certificate unsigned')
    The certificate is generated.
  3. Generate a certificate signing request (CSR) for your certificate.
    Example:
    RACDCERT GENREQ(LABEL('Topology Certificate unsigned')) ID(TPLSTC) DSN('TOPORING.CERTU')
    The certificate signing request is generated and stored in the data set that you specified in the DSN parameter.
  4. Download the CSR from the data set generated in step 3 and send it to a Certificate Authority (CA). The CA signs your request, encrypts it with a private key, and sends you a validated certificate. The CA also sends you a root CA certificate and, sometimes, one or more intermediate certificates.
  5. Allocate two data sets to store your signed certificate and the root certificate. Use the same format as the output data set in step 2 (TOPORING.CERTU):
    RECFM=VB LRECL=84
    .
    If the Certificate Authority provides also the intermediate certificates, allocate additional data sets to store the intermediate certificates.
    Example:
    TOPORING.CERT
    The data set that stores your signed certificate.
    TOPORING.ROOTCERT
    The data set that stores the root certificate.
    (Optional) TOPORING.INTCERT
    The data set that stores the intermediate certificate.
  6. Upload the signed certificate files to the data sets allocated in step 5.
    You have obtained and stored your signed certificate and a root certificate.

Connect the Signed Certificates to the Key Ring and the IDs

  1. Add your signed certificate to your user ID. Specify the data set that stores your signed certificate.
    Example:
    RACDCERT ADD('TOPORING.CERT') ID(TPLSTC) TRUST WITHLABEL('Topology Certificate')
    The certificate is connected to your user ID and paired with a private key.
  2. Add your signed certificate to the key ring that you generated in step 1 of the previous procedure.
    Example:
    In this example, the first reference to the TPLSTC user ID specifies the owner of the key ring. The second reference specifies the owner of the signed certificate.
    RACDCERT ID(TPLSTC) CONNECT(ID(TPLSTC) LABEL('Topology Certificate') RING(TOPORING) USAGE(PERSONAL) DEFAULT)
    The CA certificate is connected to your key ring.
  3. Connect the root CA certificate to the CERTAUTH virtual key ring.
    If the root certificate is already connected to CERTAUTH virtual key ring, you can skip this step.
    Example:
    RACDCERT ADD('TOPORING.ROOTCERT') CERTAUTH TRUST WITHLABEL('DigiCert Global Root CA')
    The root CA certificate is connected to the CERTAUTH virtual key ring.
  4. Add the root CA certificate to your key ring:
    Example:
    RACDCERT ID(TPLSTC) CONNECT(CERTAUTH LABEL('DigiCert Global Root CA') RING(TOPORING) USAGE(CERTAUTH))
    The root CA certificate is connected to your key ring.
  5. (Optional) If you received intermediate certificates, repeat steps 3 and 4 to add the intermediate certificates to the CERTAUTH virtual key ring and to your key ring. Specify the appropriate data sets that contain the intermediate certificates.
  6. (Optional) If the DIGTCERT class is RACLISTed, refresh the class to activate your changes. Issue the following command:
    SETROPTS RACLIST(DIGTCERT) REFRESH
    You successfully stored the certificates in your key ring and connected them to your user ID and to the CERTAUTH virtual key ring.

List the Key Ring Content

To list the certificates owned by a user ID, issue the following RACF command:
Example:
RACDCERT LIST ID(TPLSTC)
A list of certificates assigned to the user ID appears.
Digital certificate information for user TPLSTC: Label: Topology on AAA000 Certificate ID: 1abC2de+FghI3jkLmnO4pqRstU5vwXyz Status: TRUST Start Date: 2021/02/14 19:00:00 End Date: 2022/02/22 18:59:59 Serial Number: >000A00A000A00A000A00A000A00A0< Issuer's Name: >CN=Company.OU=www.company.com.O=Company Inc.C=US< Subject's Name: >CN=*.company.net.O=Company Inc.L=City.SP=State.C=US< Subject's AltNames: Domain: *.company.net Signing Algorithm: sha256RSA Key Usage: HANDSHAKE Key Type: RSA Key Size: 2048 Private Key: YES Ring Associations: Ring Owner: TPLSTC Ring: >TOPORING<