Create a Certificate and Key Ring in RACF

Configure the key ring and generate certificates in IBM RACF to enable the TLS connection between the product and the client browser.
Required roles: security administrator
This article provides instructions 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 the
Alert Insights
and the Zowe API Mediation Layer. You can Use a Self-signed Certificate that you generate yourself, or you can Use a Certificate Authority to sign a certificate that you generate using RACF.

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
    Alert Insights
    . The examples in this article use the CAACPROC user ID.
  • The user ID of the Zowe API ML. The examples in this article use the ZAPIUSER user ID.
  • The name of the Zowe API ML key ring. The examples in this article use the ZAPIRING key ring.
  • The authorization to add certificates to the Zowe API ML keyring.
  • The authorization to add certificates to CERTAUTH ACID.
  • 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 a CERTSITE or CERTAUTH certificate.
    • IRR.DIGTCERT.ADDRING - READ access is required for your own user ID. UPDATE access is required to create a 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.
  • (Optional) The knowledge and ability to generate a self-signed certificate.

Use a Self-signed Certificate

In this procedure, you generate a self-signed certificate and a key ring, then connect the certificate to the key ring and your user ID.
  1. Generate the self-signed certificate. This step assumes that you have the knowledge and ability to generate a self-signed certificate.
  2. Generate the key ring.
    Example:
    RACDCERT ID(CAACPROC) ADDRING(ACCRING)
    The key ring is generated.
  3. Allocate a data set to store your keystore with your self-signed certificate and its private key using the following format:
    RECFM=VB LRECL=84
    .
    Example:
    CAACPROC.KEYSTORE
    The data set that stores your keystore with your self-signed certificate and its private key.
  4. Upload the keystore file to the data set that you allocated in the previous step.
    You have obtained and stored your self-signed certificate.
  5. Add your self-signed certificate to your user ID. Specify the data set that stores your keystore.
    Example:
    RACDCERT ADD('CAACPROC.KEYSTORE') ID(CAACPROC) TRUST WITHLABEL('ACCCERT') PASSWORD('
    password
    ')
    The self-signed certificate is connected to your user ID and paired with a private key.
  6. Add your self-signed certificate to the key ring that you generated in step 2.
    Example:
    In this example, the first reference to the CAACPROC user ID specifies the owner of the key ring. The second reference specifies the owner of the signed certificate.
    RACDCERT ID(CAACPROC) CONNECT(ID(CAACPROC) LABEL('ACCCERT') RING(ACCRING) USAGE(PERSONAL) DEFAULT)
    The self-signed certificate is connected to your key ring.
  7. (Conditional) If Zowe API ML is not configured to use key ring, skip this step. Add the self-signed certificate to the Zowe API ML key ring:
    Example:
    RACDCERT ID(ZAPIPROC) CONNECT(CERTAUTH LABEL('SelfSigned ACC Certificate') RING(ZAPIRING) USAGE(CERTAUTH))
    The self-signed certificate is connected to the Zowe API ML key ring.
  8. (Conditional) 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 self-signed certificate in your key ring and the Zowe API ML key ring and connected it to your user ID.

Use a Certificate Authority

In this procedure, you generate a key ring and an unsigned certificate. You also sign the certificate using a Certification Authority of your choice and connect it to the key ring and your user ID.
  1. Generate the key ring.
    Example:
    RACDCERT ID(CAACPROC) ADDRING(ACCRING)
    The key ring is generated.
  2. Generate the certificate. You specify the common name of the certificate using the CN keyword. You use this common name later to create the required
    Alert Insights
    service account.
    Example:
    RACDCERT GENCERT ID(CAACPROC) SUBJECTSDN( CN('ACCUser') OU('Mainframe Department') O('Example Inc.') L('Pittsburgh') S('PA') C('US') ) ALTNAME(DOMAIN('acc.example.com')) KEYUSAGE(HANDSHAKE) SIZE(2048) WITHLABEL('ACC Certificate unsigned')
    The certificate is generated.
  3. Generate a certificate signing request (CSR) for your certificate.
    Example:
    RACDCERT GENREQ(LABEL('ACC Certificate unsigned')) ID(CAACPROC) DSN('ACCRING.CERTU')
    The certificate signing request is generated and stored in the dataset 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.
    You must request that the certificate be signed specifically with extended key usage for ‘Client Authentication’ (OID ‘1.3.6.1.5.5.7.3.2’). Otherwise
    Alert Insights
    will not accept the certificate.
  5. Allocate two datasets to store your signed certificate and the root certificate. Use the same format as the output data set in step 2 (ACCRING.CERTU):
    RECFM=VB LRECL=84
    .
    If the Certificate Authority also provides the intermediate certificates, allocate extra data sets to store the intermediate certificates.
    Example:
    CAACPROC.CERT
    The data set that stores your signed certificate.
    CAACPROC.ROOTCERT
    The data set that stores the root certificate.
    (Conditional) CAACPROC.INTCERT
    The data set that stores the intermediate certificate.
  6. Upload the signed certificate files to the data sets allocated in the previous step.
    You have obtained and stored your signed certificate and a root certificate.
  7. Add your signed certificate to your user ID. Specify the data set that stores your signed certificate.
    Example:
    RACDCERT ADD('CAACPROC.CERT') ID(CAACPROC) TRUST WITHLABEL('ACCCERT')
    The certificate is connected to your user ID and paired with a private key.
  8. Add your signed certificate to the key ring that you generated in step 1.
    Example:
    In this example, the first reference to the CAACPROC user ID specifies the owner of the key ring. The second reference specifies the owner of the signed certificate.
    RACDCERT ID(CAACPROC) CONNECT(ID(CAACPROC) LABEL('ACCCERT') RING(ACCRING) USAGE(PERSONAL) DEFAULT)
    The CA certificate is connected to your key ring.
  9. Connect the root CA certificate to the CERTAUTH ACID.
    If the root certificate is already connected to CERTAUTH ACID, you can skip this step.
    Example:
    RACDCERT ADD('CAACPROC.ROOTCERT') CERTAUTH TRUST WITHLABEL('DigiCert Global Root CA')
    The root CA certificate is connected to the CERTAUTH ACID.
  10. Add the root CA certificate to your key ring:
    Example:
    RACDCERT ID(CAACPROC) CONNECT(CERTAUTH LABEL('DigiCert Global Root CA') RING(ACCRING) USAGE(CERTAUTH))
    The root CA certificate is connected to your key ring.
  11. (Conditional) If Zowe API ML is not configured to use key ring, skip this step. Add the root CA certificate to the Zowe API ML key ring:
    Example:
    RACDCERT ID(ZAPIUSER) CONNECT(CERTAUTH LABEL('DigiCert Global Root CA') RING(ZAPIRING) USAGE(CERTAUTH))
    The root CA certificate is connected to the Zowe API ML key ring.
  12. (Conditional) If you received intermediate certificates, repeat steps 3, 4 and 5 to add the intermediate certificates to the CERTAUTH ACID, your key ring and the Zowe API ML key ring. Specify the appropriate data sets that contain the intermediate certificates.
  13. (Conditional) 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 the Zowe API ML keyring and connected them to your user ID and to the CERTAUTH ACID.

List the Key Ring Content

To list the certificates owned by a user ID, issue the following RACF command:
Example:
RACDCERT LIST ID(CAACPROC)
A list of certificates assigned to the user ID appears.
Digital certificate information for user CAACPROC: Label: ACC on MVSDE63 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.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: CAACPROC Ring: >ACCRING<