Skip to content

Commit a8ae44b

Browse files
author
Keyfactor
committed
Update generated docs
1 parent 6518ce5 commit a8ae44b

File tree

1 file changed

+20
-17
lines changed

1 file changed

+20
-17
lines changed

README.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Before continuing, ensure that the following requirements are met:
4545
- `/Status/Endpoints`
4646
- `/Enrollment/CSR`
4747
- `/MetadataFields`
48+
- `/EnrollmentPatterns` (Keyfactor Command 25.1 and above)
4849
- Kubernetes >= v1.19
4950
- [Kubernetes](https://kubernetes.io/docs/tasks/tools/), [Minikube](https://minikube.sigs.k8s.io/docs/start/), [Kind](https://kind.sigs.k8s.io/docs/user/quick-start/), etc.
5051
> You must have permission to create [Custom Resource Definitions](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) in your Kubernetes cluster.
@@ -91,10 +92,11 @@ Command Issuer enrolls certificates by submitting a POST request to the Command
9192

9293
If your security policy requires fine-grain access control, Command Issuer requires the following Access Rules:
9394

94-
| Global Permissions | Permission Model (Version Two) | Permission Model (Version One) |
95-
|-----------------------------------------|---|---|
96-
| Metadata > Types > Read | `/metadata/types/read/` | `CertificateMetadataTypes:Read` |
97-
| Certificates > Enrollment > Csr | `/certificates/enrollment/csr/` | `CertificateEnrollment:EnrollCSR` |
95+
| Global Permissions | Permission Model (Version Two) | Permission Model (Version One) | Notes
96+
|-----------------------------------------|---|---|--|
97+
| Metadata > Types > Read | `/metadata/types/read/` | `CertificateMetadataTypes:Read` | |
98+
| Certificates > Enrollment > Csr | `/certificates/enrollment/csr/` | `CertificateEnrollment:EnrollCSR` | |
99+
| Enrollment Patterns > Read (Optional) | `/enrollment_pattern/read/` | N/A | Required if using `EnrollmentPatternName` |
98100

99101
> Documentation for [Version Two Permission Model](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/SecurityRolePermissions.htm#VersionTwoPermissionModel) and [Version One Permission Model](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/SecurityRolePermissions.htm#VersionOnePermissionModel)
100102
@@ -206,10 +208,6 @@ kubectl -n command-issuer-system create secret generic command-secret \
206208
207209
This section has moved. Please refer to [this link](./docs/ambient-providers/azure.md) for documentation on configuring ambient credentials with AKS.
208210
209-
## Google Kubernetes Engine (GKE) Workload Identity
210-
211-
This section has moved. Please refer to [this link](./docs/ambient-providers/google.md) for documentation on configuring ambient credentials with GKE.
212-
213211
# CA Bundle
214212
215213
If the Command API is configured to use a self-signed certificate or with a certificate whose issuer isn't widely trusted, the CA certificate must be provided as a Kubernetes secret.
@@ -232,6 +230,7 @@ For example, ClusterIssuer resources can be used to issue certificates for resou
232230
export COMMAND_CA_LOGICAL_NAME="<certificateAuthorityName>"
233231
export CERTIFICATE_TEMPLATE_SHORT_NAME="<certificateTemplateShortName>"
234232
export ENROLLMENT_PATTERN_NAME="<enrollmentPatternName>"
233+
export ENROLLMENT_PATTERN_ID="<enrollmentPatternId>"
235234
```
236235

237236
The `spec` field of both the Issuer and ClusterIssuer resources use the following fields:
@@ -243,9 +242,9 @@ For example, ClusterIssuer resources can be used to issue certificates for resou
243242
| caSecretName | (optional) The name of the Kubernetes secret containing the CA certificate. Required if the Command API uses a self-signed certificate or it was signed by a CA that is not widely trusted. |
244243
| certificateAuthorityLogicalName | The logical name of the Certificate Authority to use in Command. For example, `Sub-CA` |
245244
| certificateAuthorityHostname | (optional) The hostname of the Certificate Authority specified by `certificateAuthorityLogicalName`. This field is usually only required if the CA in Command is a DCOM (MSCA-like) CA. |
246-
| enrollmentPatternId | The ID of the [Enrollment Pattern](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/Enrollment-Patterns.htm) to use when this Issuer/ClusterIssuer enrolls CSRs. **Supported by Keyfactor Command 25.1 and above**. If `certificateTemplate` and `enrollmentPatternName` are both specified, the enrollment pattern parameter will take precedence. If `enrollmentPatternId` and `enrollmentPatternName` are both specified, `enrollmentPatternId` will take precedence. Enrollment will fail if the specified template is not compatible with the enrollment pattern. |
247-
| enrollmentPatternName | The Name of the [Enrollment Pattern](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/Enrollment-Patterns.htm) to use when this Issuer/ClusterIssuer enrolls CSRs. **Supported by Keyfactor Command 25.1 and above**. If `certificateTemplate` and `enrollmentPatternName` are both specified, the enrollment pattern parameter will take precedence. If `enrollmentPatternId` and `enrollmentPatternName` are both specified, `enrollmentPatternId` will take precedence. Enrollment will fail if the specified template is not compatible with the enrollment pattern. |
248-
| certificateTemplate | The Short Name of the Certificate Template to use when this Issuer/ClusterIssuer enrolls CSRs. **Deprecated in favor of [Enrollment Patterns](https://software.keyfactor.com/Core-OnPrem/Current/Content/WebAPI/KeyfactorAPI/Enrollment-Patterns.htm) as of Keyfactor Command 25.1**. If `certificateTemplate` and `enrollmentPatternName` are both specified, the enrollment pattern parameter will take precedence. Enrollment will fail if the specified template is not compatible with the enrollment pattern. |
245+
| enrollmentPatternId | The ID of the [Enrollment Pattern](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/Enrollment-Patterns.htm) to use when this Issuer/ClusterIssuer enrolls CSRs. **Supported by Keyfactor Command 25.1 and above**. If `certificateTemplate` and `enrollmentPatternId` are both specified, the enrollment pattern parameter will take precedence. If `enrollmentPatternId` and `enrollmentPatternName` are both specified, `enrollmentPatternId` will take precedence. Enrollment will fail if the specified certificate template is not compatible with the enrollment pattern. |
246+
| enrollmentPatternName | The Name of the [Enrollment Pattern](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/Enrollment-Patterns.htm) to use when this Issuer/ClusterIssuer enrolls CSRs. **Supported by Keyfactor Command 25.1 and above**. If `certificateTemplate` and `enrollmentPatternName` are both specified, the enrollment pattern parameter will take precedence. If `enrollmentPatternId` and `enrollmentPatternName` are both specified, `enrollmentPatternId` will take precedence. Enrollment will fail if the specified certificate template is not compatible with the enrollment pattern. If using `enrollmentPatternName`, your security role must have `/enrollment_pattern/read/` permission. |
247+
| certificateTemplate | The Short Name of the Certificate Template to use when this Issuer/ClusterIssuer enrolls CSRs. **Deprecated in favor of [Enrollment Patterns](https://software.keyfactor.com/Core-OnPrem/Current/Content/WebAPI/KeyfactorAPI/Enrollment-Patterns.htm) as of Keyfactor Command 25.1**. If `certificateTemplate` and either `enrollmentPatternName` or `enrollmentPatternId` are specified, the enrollment pattern parameter will take precedence. Enrollment will fail if the specified certificate template is not compatible with the enrollment pattern. |
249248
| scopes | (Optional) Required if using ambient credentials with Azure AKS. If using ambient credentials, these scopes will be put on the access token generated by the ambient credentials' token provider, if applicable. |
250249
| audience | (Optional) If using ambient credentials, this audience will be put on the access token generated by the ambient credentials' token provider, if applicable. Google's ambient credential token provider generates an OIDC ID Token. If this value is not provided, it will default to `command`. |
251250
@@ -272,8 +271,9 @@ For example, ClusterIssuer resources can be used to issue certificates for resou
272271
273272
# certificateAuthorityHostname: "$COMMAND_CA_HOSTNAME" # Uncomment if required
274273
certificateAuthorityLogicalName: "$COMMAND_CA_LOGICAL_NAME"
275-
enrollmentPatternName: "$ENROLLMENT_PATTERN_NAME" # Only supported on Keyfactor Command 25.1 and above.
276-
# certificateTemplate: "$CERTIFICATE_TEMPLATE_SHORT_NAME" # Uncomment if required
274+
enrollmentPatternId: "$ENROLLMENT_PATTERN_ID" # Only supported on Keyfactor Command 25.1 and above.
275+
certificateTemplate: "$CERTIFICATE_TEMPLATE_SHORT_NAME" # Required if using Keyfactor Command 24.4 and below.
276+
# enrollmentPatternName: "$ENROLLMENT_PATTERN_NAME" # Only supported on Keyfactor Command 25.1 and above.
277277
# scopes: "openid email https://example.com/.default" # Uncomment if required
278278
# audience: "https://your-command-url.com" # Uncomment if desired
279279
EOF
@@ -299,8 +299,9 @@ For example, ClusterIssuer resources can be used to issue certificates for resou
299299
300300
# certificateAuthorityHostname: "$COMMAND_CA_HOSTNAME" # Uncomment if required
301301
certificateAuthorityLogicalName: "$COMMAND_CA_LOGICAL_NAME"
302-
enrollmentPatternName: "$ENROLLMENT_PATTERN_NAME" # Only supported on Keyfactor Command 25.1 and above.
303-
# certificateTemplate: "$CERTIFICATE_TEMPLATE_SHORT_NAME" # Uncomment if required
302+
enrollmentPatternId: "$ENROLLMENT_PATTERN_ID" # Only supported on Keyfactor Command 25.1 and above.
303+
certificateTemplate: "$CERTIFICATE_TEMPLATE_SHORT_NAME" # Required if using Keyfactor Command 24.4 and below.
304+
# enrollmentPatternName: "$ENROLLMENT_PATTERN_NAME" # Only supported on Keyfactor Command 25.1 and above.
304305
# scopes: "openid email https://example.com/.default" # Uncomment if required
305306
# audience: "https://your-command-url.com" # Uncomment if desired
306307
EOF
@@ -349,7 +350,7 @@ spec:
349350
request: <csr>
350351
```
351352
352-
> All fields in Command Issuer and ClusterIssuer `spec` can be overridden by applying Kubernetes Annotations to Certificates _and_ CertificateRequests. See [runtime customization for more](docs/annotations.md)
353+
> All fields in Command Issuer and ClusterIssuer `spec` can be overridden by applying Kubernetes Annotations to Certificates _and_ CertificateRequests. See [runtime customization for more](#overriding-the-issuerclusterissuer-spec-using-kubernetes-annotations-on-certificaterequest-resources)
353354
354355
## Approving Certificate Requests
355356
@@ -371,12 +372,13 @@ kubectl get secret command-certificate -o jsonpath='{.data.tls\.crt}' | base64 -
371372
372373
## Overriding the Issuer/ClusterIssuer `spec` using Kubernetes Annotations on CertificateRequest Resources
373374
374-
Command Issuer allows you to override the `certificateAuthorityHostname`, `certificateAuthorityLogicalName`, `certificateTemplate`, and `enrollmentPatternName` by setting Kubernetes Annotations on CertificateRequest resources. This may be useful if certain enrollment scenarios require a different Certificate Authority or Certificate Template, but you don't want to create a new Issuer/ClusterIssuer.
375+
Command Issuer allows you to override the `certificateAuthorityHostname`, `certificateAuthorityLogicalName`, `certificateTemplate`, `enrollmentPatternName`, and `enrollmentPatternId` by setting Kubernetes Annotations on CertificateRequest resources. This may be useful if certain enrollment scenarios require a different Certificate Authority or Certificate Template, but you don't want to create a new Issuer/ClusterIssuer.
375376

376377
- `command-issuer.keyfactor.com/certificateAuthorityHostname` overrides `certificateAuthorityHostname`
377378
- `command-issuer.keyfactor.com/certificateAuthorityLogicalName` overrides `certificateAuthorityLogicalName`
378379
- `command-issuer.keyfactor.com/certificateTemplate` overrides `certificateTemplate`
379380
- `command-issuer.keyfactor.com/enrollmentPatternName` overrides `enrollmentPatternName`
381+
- `command-issuer.keyfactor.com/enrollmentPatternId` overrides `enrollmentPatternId`. Needs to be in string format.
380382

381383
> cert-manager copies Annotations set on Certificate resources to the corresponding CertificateRequest.
382384

@@ -390,6 +392,7 @@ Command Issuer allows you to override the `certificateAuthorityHostname`, `certi
390392
> kind: Certificate
391393
> metadata:
392394
> annotations:
395+
> command-issuer.keyfactor.com/enrollmentPatternId: "1234"
393396
> command-issuer.keyfactor.com/enrollmentPatternName: "Kubernetes Enrollment Pattern"
394397
> command-issuer.keyfactor.com/certificateTemplate: "Ephemeral2day"
395398
> command-issuer.keyfactor.com/certificateAuthorityLogicalName: "InternalIssuingCA1"

0 commit comments

Comments
 (0)