Skip to content

Commit 63dcac8

Browse files
authored
Merge pull request #225 from hrabalvojta/master
Fix: CA subject generation in example
2 parents 3df202c + eba27bd commit 63dcac8

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

step-certificates/examples/certificate_authority_single_instance/ca.config

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"root_ca_name": "example-root-ca",
33
"intermediate_ca_name": "example-intermediate-ca",
44
"ca_org_name": "Example CA Org",
5+
"ca_orgunit_name": "Example OU CA Org",
56
"ca_country_name": "US",
67
"ca_locality_name": "Minnesota",
78
"ca_dns_names": [
@@ -11,4 +12,4 @@
1112
],
1213
"jwk_provisioner_name": "admin",
1314
"ca_url": "mysteprelease-step-certificates.default.svc.cluster.local"
14-
}
15+
}

step-certificates/examples/certificate_authority_single_instance/generate-values.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@
33
ROOT_CA_NAME=`jq -r '.root_ca_name' ca.config`
44
INTERMEDIATE_CA_NAME=`jq -r '.intermediate_ca_name' ca.config`
55
CA_ORG_NAME=`jq -r '.ca_org_name' ca.config`
6+
CA_ORGUNIT_NAME=`jq -r '.ca_orgunit_name' ca.config`
67
CA_COUNTRY_NAME=`jq -r '.ca_country_name' ca.config`
78
CA_LOCALITY_NAME=`jq -r '.ca_locality_name' ca.config`
89
CA_DNS_NAMES=`jq -c .ca_dns_names ca.config`
910
CA_URL=`jq -r .ca_url ca.config`
1011
JWK_PROVISIONER_NAME=`jq -r .jwk_provisioner_name ca.config`
1112

12-
export ROOT_CA_NAME INTERMEDIATE_CA_NAME CA_ORG_NAME CA_COUNTRY_NAME CA_LOCALITY_NAME CA_DNS_NAMES CA_URL JWK_PROVISIONER_NAME
13+
export ROOT_CA_NAME INTERMEDIATE_CA_NAME CA_ORG_NAME CA_ORGUNIT_NAME CA_COUNTRY_NAME CA_LOCALITY_NAME CA_DNS_NAMES CA_URL JWK_PROVISIONER_NAME
1314

1415
# Write Out Root and Intermediate Certificate Templates
1516
cat root-tls.json.tpl | envsubst | tee root-tls.json
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"subject": {
33
"commonName": "${INTERMEDIATE_CA_NAME}",
4-
"organizationName": "${CA_ORG_NAME}",
5-
"countryName": "${CA_COUNTRY_NAME}",
6-
"localityName": "${CA_LOCALITY_NAME}"
4+
"organization": "${CA_ORG_NAME}",
5+
"organizationalUnit": "${CA_ORGUNIT_NAME}",
6+
"country": "${CA_COUNTRY_NAME}",
7+
"locality": "${CA_LOCALITY_NAME}"
78
},
89
"keyUsage": [ "certSign", "crlSign" ],
910
"basicConstraints": {
1011
"isCA": true,
1112
"maxPathLen": 1
1213
}
13-
}
14+
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
{
22
"subject": {
33
"commonName": "${ROOT_CA_NAME}",
4-
"organizationName": "${CA_ORG_NAME}",
5-
"countryName": "${CA_COUNTRY_NAME}",
6-
"localityName": "${CA_LOCALITY_NAME}"
4+
"organization": "${CA_ORG_NAME}",
5+
"organizationalUnit": "${CA_ORGUNIT_NAME}",
6+
"country": "${CA_COUNTRY_NAME}",
7+
"locality": "${CA_LOCALITY_NAME}"
78
},
89
"keyUsage": [ "certSign", "crlSign" ],
910
"basicConstraints": {
1011
"isCA": true,
1112
"maxPathLen": 1
1213
}
13-
}
14+
}

0 commit comments

Comments
 (0)