From 05eeec53efc083751892107d9f7b0d21ff0dec7e Mon Sep 17 00:00:00 2001
From: Adrian Bastyr
Date: Wed, 19 Jan 2022 17:49:13 +0100
Subject: [PATCH 1/5] CSR
Signed-off-by: Adrian Bastyr
---
CHANGELOG.md | 1 +
workflows/files/ZWECER01.properties | 63 ++++++
workflows/files/ZWECER01.xml | 318 ++++++++++++++++++++++++++++
3 files changed, 382 insertions(+)
create mode 100644 workflows/files/ZWECER01.properties
create mode 100644 workflows/files/ZWECER01.xml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 71ea314fab..a1f37fa66a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,7 @@ All notable changes to the Zowe Installer will be documented in this file.
## `Unreleased`
- Updated ZWEWRF03 workflow to be up to date with the installed software
+- Added ZWECER01 workflow to allow the user to generate a CSR (certificate sign request)
## `1.25.0`
### New features and enhancements
diff --git a/workflows/files/ZWECER01.properties b/workflows/files/ZWECER01.properties
new file mode 100644
index 0000000000..106d4e967f
--- /dev/null
+++ b/workflows/files/ZWECER01.properties
@@ -0,0 +1,63 @@
+# certificate_label
+# Label: Certificate Label
+# Abstract: Label of the certificate to be used for the request
+# Category: General
+# Description:
+# Specifies the label of the certificate that is used to obtain the distinguished name and public key for the request
+certificate_label=
+
+# output_dataset
+# Label: Output Dataset
+# Abstract: Dataset that will contain the CSR
+# Category: General
+# Description:
+# Specifies the name of the data set into which the certificate request is written. The data set must not already exist
+output_dataset=
+
+# esm
+# Label: Security Manager
+# Abstract: Please specify your security management software
+# Category: General
+# Description:
+# Please specify the ESM system you are using on your system
+# Choices: RACF,TSS,ACF2
+esm=RACF
+
+# racf_acid
+# Label: RACF ACID
+# Abstract: [ ID(certificate-owner) | SITE | CERTAUTH ]
+# Category: RACF
+# Description:
+# Specifies that the specified certificate is either a user certificate associated with the specified user ID,
+# a site certificate, or a certificate-authority certificate.
+# If you do not specify ID, SITE, or CERTAUTH, the default is ID,
+# and certificate-owner defaults to the user ID of the command issuer.
+# If more than one keyword is specified, the last specified keyword is processed and
+# the others are ignored by TSO command parse processing.
+# Choices: ID(certificate-owner),SITE,CERTAUTH
+racf_acid=
+
+# tss_acid
+# Label: TSS ACID
+# Abstract: acid|CERTAUTH|CERTSITE
+# Category: TSS
+# Description:
+# ACID that should be used for the CSR creation
+# Choices: CERTAUTH,CERTSITE
+tss_acid=
+
+# acf2_acid
+# Label: ACF2 ACID
+# Abstract: Your USERID
+# Category: ACF2
+# Description:
+# Please specify the user ID to be used for the certificate creation
+acf2_acid=
+
+# uss_output_folder
+# Label: CSR USS output folder
+# Abstract: USS folder which will contain the resulting .csr file
+# Category: General
+# Description:
+# This folder will contain the resulting request.csr file which can be signed by your CA authority.
+uss_output_folder=/tmp/
\ No newline at end of file
diff --git a/workflows/files/ZWECER01.xml b/workflows/files/ZWECER01.xml
new file mode 100644
index 0000000000..cd16a461e7
--- /dev/null
+++ b/workflows/files/ZWECER01.xml
@@ -0,0 +1,318 @@
+
+
+true
+
+
+ zowe_create_csr
+ Create CSR request
+ Use this workflow to create a certificate sign request
+ ###ZOWE_VERSION###
+ Zowe
+
+
+
+
+ Label of the certificate to be used for the request
+ Specifies the label of the certificate that is used to obtain the distinguished name and public key for the request
+ General
+
+
+
+
+
+
+
+ Dataset that will contain the CSR
+ Specifies the name of the data set into which the certificate request is written. The data set must not already exist
+ General
+
+ DSNAME
+
+
+
+
+
+ Please specify your security management software
+ Please specify the ESM system you are using on your system
+ General
+
+
+ RACF
+ TSS
+ ACF2
+ RACF
+
+
+
+
+ [ ID(certificate-owner) | SITE | CERTAUTH ]
+ Specifies that the specified certificate is either a user certificate associated with the specified user ID,
+ a site certificate, or a certificate-authority certificate.
+ If you do not specify ID, SITE, or CERTAUTH, the default is ID,
+ and certificate-owner defaults to the user ID of the command issuer.
+ If more than one keyword is specified, the last specified keyword is processed and
+ the others are ignored by TSO command parse processing.
+ RACF
+
+ ^(ID\([^ )]+\)|SITE|CERTAUTH)?$
+ Wrong syntax of the value
+ ID(certificate-owner)
+ SITE
+ CERTAUTH
+
+
+
+
+ acid|CERTAUTH|CERTSITE
+ ACID that should be used for the CSR creation
+ TSS
+
+ ^(CERTAUTH|CERTSITE|[A-Z0-9#$@]{1,8})$
+ Wrong syntax of the value
+ CERTAUTH
+ CERTSITE
+
+
+
+
+ Your USERID
+ Please specify the user ID to be used for the certificate creation
+ ACF2
+
+ USERID
+
+
+
+
+ USS folder which will contain the resulting .csr file
+ This folder will contain the resulting request.csr file which can be signed by your CA authority.
+ General
+
+ ^\/([^\/]+\/)+$
+ Path must start and end with a slash, eg: /tmp/
+ /tmp/
+
+
+
+
+ Define variables for execution
+ Use this step to define the variables for the execution
+
+ Define general variables
+ Define variables that are common for all security systems.
+
+
+
+
+
+
+ Run this step to define the common variables and specify which security system you want to use.
+ 1
+ Security Administrator
+ true
+ false
+
+
+
+ Define RACF variables
+ Use this step to define the variables for RACF
+
+
+ 1 == 1
+ Always true
+
+
+ Skip if RACF wasn't selected
+ ${instance-esm} != "RACF"
+ skipped
+
+
+
+
+ Use this step to define the variables for RACF.
+ 1
+ Security Administrator
+ true
+ false
+
+
+
+ Define TSS variables
+ Use this step to define the variables for TSS.
+
+
+ 1 == 1
+ Always true
+
+
+ Skip if TSS wasn't selected
+ ${instance-esm} != "TSS"
+ skipped
+
+
+
+
+ Use this step to define the variables for TSS.
+ 1
+ Security Administrator
+ true
+ false
+
+
+
+ Define ACF2 variables
+ Use this step to define the variables for ACF2.
+
+
+ 1 == 1
+ Always true
+
+
+ Skip if ACF2 wasn't selected
+ ${instance-esm} != "ACF2"
+ skipped
+
+
+
+
+ Use this step to define the variables for ACF2.
+ 1
+ Security Administrator
+ true
+ false
+
+
+
+
+ Generate CSR
+ These steps will generate the CSR for a specific security system.
+
+ Generate CSR RACF
+ Generates the CSR using RACF
+
+
+ 1 == 1
+ Always true
+
+
+ Skip if ESM isn't RACF
+ ${instance-esm} != "RACF"
+ skipped
+
+
+
+
+ This step will generate the CSR request into the ${instance-output_dataset}
+ 1
+ Security Administrator
+ true
+ false
+
+ //RACFCMD1 EXEC PGM=IKJEFT01
+//SYSTSPRT DD SYSOUT=*
+//SYSTSIN DD *
+RACDCERT GENREQ ( +
+ LABEL('${instance-certificate_label}') ) +
+ #if(${instance-racf_acid} and "${instance-racf_acid}" != "")
+ ${instance-racf_acid} +
+ #end
+ DSN('${instance-output_dataset}')
+/*
+ JCL
+ 80
+
+
+
+
+ Generate CSR TSS
+ Generates the CSR using TSS
+
+
+ 1 == 1
+ Always true
+
+
+ Skip if ESM isn't TSS
+ ${instance-esm} != "TSS"
+ skipped
+
+
+
+
+ This step will generate the CSR request into the ${instance-output_dataset}
+ 1
+ Security Administrator
+ true
+ false
+
+ //TSSCMD01 EXEC PGM=IKJEFT01
+//SYSTSPRT DD SYSOUT=*
+//SYSTSIN DD *
+TSS GENREQ(${instance-tss_acid}) +
+ DCDSN('${instance-output_dataset}') +
+ LABLCERT('${instance-certificate_label}')
+/*
+ JCL
+ 80
+
+
+
+
+ Generate CSR ACF2
+ Generates the CSR using ACF2
+
+
+ 1 == 1
+ Always true
+
+
+ Skip if ESM isn't ACF2
+ ${instance-esm} != "ACF2"
+ skipped
+
+
+
+
+ This step will generate the CSR request into the ${instance-output_dataset}
+ 1
+ Security Administrator
+ true
+ false
+
+ //ACF2CMD1 EXEC PGM=ACFBATCH
+//SYSPRINT DD SYSOUT=*
+//SYSIN DD *
+SET PROFILE(USER) DIV(CERTDATA)
+GENREQ ${instance-acf2_acid} +
+ DSNAME('${instance-output_dataset}') +
+ LABEL('instance-certificate_label')
+/*
+ JCL
+ 80
+
+
+
+
+
+ Convert CSR data set to the USS file
+ Converts the CSR data set to the USS file.
+
+
+
+ Copies the CSR to the ${instance-uss_output_folder}request.csr
+ 1
+ Security Administrator
+ true
+ false
+
+ set -e
+set -x
+
+mkdir -m 775 -p '${instance-uss_output_folder}'
+cp "//'${instance-output_dataset}'" '${instance-uss_output_folder}request.csr'
+ shell-JCL
+ 1024
+
+
+
+
\ No newline at end of file
From d26b94b00c87db4b61f5ec1ea51315810bf975d5 Mon Sep 17 00:00:00 2001
From: Adrian Bastyr
Date: Wed, 19 Jan 2022 18:22:30 +0100
Subject: [PATCH 2/5] Making sure RACF ACID is also required
Signed-off-by: Adrian Bastyr
---
workflows/files/ZWECER01.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/workflows/files/ZWECER01.xml b/workflows/files/ZWECER01.xml
index cd16a461e7..efbe27a563 100644
--- a/workflows/files/ZWECER01.xml
+++ b/workflows/files/ZWECER01.xml
@@ -128,7 +128,7 @@
-
+ Use this step to define the variables for RACF.1Security Administrator
From 02722e26e693f61510537b6b0e6d60bca7568a3d Mon Sep 17 00:00:00 2001
From: Adrian Bastyr
Date: Wed, 19 Jan 2022 18:24:09 +0100
Subject: [PATCH 3/5] RACF ACID value is actually not required
Signed-off-by: Adrian Bastyr
---
workflows/files/ZWECER01.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/workflows/files/ZWECER01.xml b/workflows/files/ZWECER01.xml
index efbe27a563..cd16a461e7 100644
--- a/workflows/files/ZWECER01.xml
+++ b/workflows/files/ZWECER01.xml
@@ -128,7 +128,7 @@
-
+ Use this step to define the variables for RACF.1Security Administrator
From ae135183b4ab28a6028c284e464f071fd7558573 Mon Sep 17 00:00:00 2001
From: Adrian Bastyr
Date: Thu, 20 Jan 2022 10:40:47 +0100
Subject: [PATCH 4/5] Fix of the missing curly braces
Signed-off-by: Adrian Bastyr
---
workflows/files/ZWECER01.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/workflows/files/ZWECER01.xml b/workflows/files/ZWECER01.xml
index cd16a461e7..2fba40b9e9 100644
--- a/workflows/files/ZWECER01.xml
+++ b/workflows/files/ZWECER01.xml
@@ -285,7 +285,7 @@ TSS GENREQ(${instance-tss_acid}) +
SET PROFILE(USER) DIV(CERTDATA)
GENREQ ${instance-acf2_acid} +
DSNAME('${instance-output_dataset}') +
- LABEL('instance-certificate_label')
+ LABEL('${instance-certificate_label}')
/*
JCL80
From b87671b8d986c7f6f4d5777c46925a015e5b9d1c Mon Sep 17 00:00:00 2001
From: Adrian Bastyr
Date: Thu, 20 Jan 2022 16:05:57 +0100
Subject: [PATCH 5/5] Added extra documentation information for GENREQ
Signed-off-by: Adrian Bastyr
---
workflows/files/ZWECER01.xml | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/workflows/files/ZWECER01.xml b/workflows/files/ZWECER01.xml
index 2fba40b9e9..eac6f27a27 100644
--- a/workflows/files/ZWECER01.xml
+++ b/workflows/files/ZWECER01.xml
@@ -202,7 +202,9 @@
- This step will generate the CSR request into the ${instance-output_dataset}
+ This step uses the RACDCERT GENREQ command
]]>
1Security Administratortrue
@@ -239,7 +241,8 @@ RACDCERT GENREQ ( +
- This step will generate the CSR request into the ${instance-output_dataset}
+ TSS command GENREQ is used here.]]>1Security Administratortrue
@@ -299,7 +302,8 @@ GENREQ ${instance-acf2_acid} +
- Copies the CSR to the ${instance-uss_output_folder}request.csr
+ This step uses ACF2 command GENREQ]]>1Security Administratortrue