Skip to content

Commit 0be2825

Browse files
authored
Initial (#1) (#2)
* initial release
1 parent 0c20738 commit 0be2825

35 files changed

+1968
-491
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Keyfactor Bootstrap Workflow
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
types: [opened, closed, synchronize, edited, reopened]
7+
push:
8+
create:
9+
branches:
10+
- 'release-*.*'
11+
12+
jobs:
13+
call-starter-workflow:
14+
uses: keyfactor/actions/.github/workflows/starter.yml@v3
15+
secrets:
16+
token: ${{ secrets.V2BUILDTOKEN}}
17+
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
18+
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
19+
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
20+
scan_token: ${{ secrets.SAST_TOKEN }}

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
1.0.0
2+
Inital Release. Support for Enroll, Sync, and Revocation.

README.md

Lines changed: 99 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,124 @@
1-
# cpr-cagateway-template
1+
<h1 align="center" style="border-bottom: none">
2+
Sectigo Certificate Manager Gateway AnyCA Gateway REST Plugin
3+
</h1>
24

3-
## Template for new CA Gateway integrations
5+
<p align="center">
6+
<!-- Badges -->
7+
<img src="https://img.shields.io/badge/integration_status-production-3D1973?style=flat-square" alt="Integration Status: production" />
8+
<a href="https://github.com/Keyfactor/sectigo-scm-caplugin/releases"><img src="https://img.shields.io/github/v/release/Keyfactor/sectigo-scm-caplugin?style=flat-square" alt="Release" /></a>
9+
<img src="https://img.shields.io/github/issues/Keyfactor/sectigo-scm-caplugin?style=flat-square" alt="Issues" />
10+
<img src="https://img.shields.io/github/downloads/Keyfactor/sectigo-scm-caplugin/total?style=flat-square&label=downloads&color=28B905" alt="GitHub Downloads (all assets, all releases)" />
11+
</p>
412

5-
### Use this repository to create new integrations for new CA Gateway integration types.
13+
<p align="center">
14+
<!-- TOC -->
15+
<a href="#support">
16+
<b>Support</b>
17+
</a>
18+
·
19+
<a href="#requirements">
20+
<b>Requirements</b>
21+
</a>
22+
·
23+
<a href="#installation">
24+
<b>Installation</b>
25+
</a>
26+
·
27+
<a href="#license">
28+
<b>License</b>
29+
</a>
30+
·
31+
<a href="https://github.com/orgs/Keyfactor/repositories?q=anycagateway">
32+
<b>Related Integrations</b>
33+
</a>
34+
</p>
635

736

8-
1. [Use this repository](#using-the-repository)
9-
1. [Update the integration-manifest.json](#updating-the-integration-manifest.json)
10-
1. [Add Keyfactor Bootstrap Workflow (keyfactor-bootstrap-workflow.yml)](#add-bootstrap)
11-
1. [Create required branches](#create-required-branches)
12-
1. [Replace template files/folders](#replace-template-files-and-folders)
13-
1. [Create initial prerelease](#create-initial-prerelease)
14-
---
37+
The Sectigo AnyCA Gateway REST plugin extends the capabilities of the Sectigo Certificate Manager to Keyfactor Command via the Keyfactor AnyCA Gateway REST. The plugin represents a fully featured AnyCA REST Plugin with the following capabilies:
38+
* SSL Certificate Synchronization
39+
* Sync can be filtered by any available SSL Certificate List filter defined by the Cert Manager API
40+
* All Sync jobs are treated as a full sync because the Cert Manager API does not allow for filtering based on a date/time stamp
41+
* Certificates will only syncronize once. If a certificate is found based on Serial Number for the managed CA, and its status is unchanged, it will be skipped for subsequent syncs to minimize impact on Cert Manager API load
42+
* SSL Certificate Enrollment
43+
* Note about organizations. The organization for enrollment is selected based on the Organization subject field, as well as any Department specified in the template configuration. If a department is specified, and that department exists within the organization and is valid for issuing certs, the department ID will be used. If no department is specified, the organization ID will be used if the organization is valid for issuing certs. If the organization/department are not valid for issuing certs, the enrollment will fail, as that is a required field for Sectigo.
44+
* SSL Certificate Revocation
1545

16-
#### Using the repository
17-
1. Select the ```Use this template``` button at the top of this page
18-
1. Update the repository name following [these guidelines](https://keyfactorinc.sharepoint.com/sites/IntegrationWiki/SitePages/GitHub-Processes.aspx#repository-naming-conventions)
19-
1. All repositories must be in lower-case
20-
1. General pattern: company-product-type
21-
1. e.g. hashicorp-vault-orchestator
22-
1. Click the ```Create repository``` button
46+
## Compatibility
2347

24-
---
48+
The Sectigo Certificate Manager Gateway AnyCA Gateway REST plugin is compatible with the Keyfactor AnyCA Gateway REST 24.2.0 and later.
2549

26-
#### Updating the integration-manifest.json
50+
## Support
51+
The Sectigo Certificate Manager Gateway AnyCA Gateway REST plugin is supported by Keyfactor for Keyfactor customers. If you have a support issue, please open a support ticket with your Keyfactor representative. If you have a support issue, please open a support ticket via the Keyfactor Support Portal at https://support.keyfactor.com.
2752

28-
*The following properties must be updated in the integration-manifest.json*
53+
> To report a problem or suggest a new feature, use the **[Issues](../../issues)** tab. If you want to contribute actual bug fixes or proposed enhancements, use the **[Pull requests](../../pulls)** tab.
2954
30-
Clone the repository locally, use vsdev.io, or the GitHub online editor to update the file.
55+
## Requirements
3156

32-
* "name": "Friendly name for the integration"
33-
* This will be used in the readme file generation and catalog entries
34-
* "description": "Brief description of the integration."
35-
* This will be used in the readme file generation
36-
* If the repository description is empty this value will be used for the repository description upon creating a release branch
37-
* "release_dir": "PATH\\\TO\\\BINARY\\\RELEASE\\\OUTPUT\\\FOLDER"
38-
* Path separators can be "\\\\" or "/"
39-
* Be sure to specify the release folder name. This can be found by running a Release build and noting the output folder
40-
* Example: "AzureAppGatewayOrchestrator\\bin\\Release"
41-
* "gateway_framework": "" string denoting the required command gateway framework version
42-
---
57+
For each Organization/Department you plan on using through the gateway, in your Sectigo portal, go to that Organization, select Certificate Settings -> SSL Certificates, and check the "Enable Web/REST API" checkbox.
58+
In addition, for the admin account you plan to use, make sure it has the API admin type selected in the portal.
4359

44-
#### Add Bootstrap
45-
Add Keyfactor Bootstrap Workflow (keyfactor-bootstrap-workflow.yml). This can be copied directly from the workflow templates or through the Actions tab
46-
* Directly:
47-
1. Create a file named ```.github\workflows\keyfactor-bootstrap-workflow.yml```
48-
1. Copy the contents of [keyfactor/.github/workflow-templates/keyfactor-bootstrap-workflow.yml](https://raw.githubusercontent.com/Keyfactor/.github/main/workflow-templates/keyfactor-bootstrap-workflow.yml) into the file created in the previous step
49-
* Actions tab:
50-
1. Navigate to the [Actions tab](./actions) in the new repository
51-
1. Click the ```New workflow``` button
52-
1. Find the ```Keyfactor Bootstrap Workflow``` and click the ```Configure``` button
53-
1. Click the ```Commit changes...``` button on this screen and the next to add the bootstrap workflow to the main branch
54-
55-
A new build will run the tasks of a *Push* trigger on the main branch
60+
## Installation
5661

57-
*Ensure there are no errors during the workflow run in the Actions tab.*
62+
1. Install the AnyCA Gateway REST per the [official Keyfactor documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/InstallIntroduction.htm).
5863

59-
---
64+
2. On the server hosting the AnyCA Gateway REST, download and unzip the latest [Sectigo Certificate Manager Gateway AnyCA Gateway REST plugin](https://github.com/Keyfactor/sectigo-scm-caplugin/releases/latest) from GitHub.
6065

61-
#### Create required branches
62-
1. Create a release branch from main: release-1.0
63-
1. Create a dev branch from the starting with the devops id in the format ab#\<DevOps-ID>, e.g. ab#53535.
64-
1. For the cleanest pull request merge, create the dev branch from the release branch.
65-
1. Optionally, add a suffix to the branch name indicating initial release. e.g. ab#53535-initial-release
66+
3. Copy the unzipped directory (usually called `net6.0`) to the Extensions directory:
6667

67-
---
68+
```shell
69+
Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net6.0\Extensions
70+
```
6871

72+
> The directory containing the Sectigo Certificate Manager Gateway AnyCA Gateway REST plugin DLLs (`net6.0`) can be named anything, as long as it is unique within the `Extensions` directory.
6973

70-
#### Replace template files and folders
71-
1. Replace the contents of readme_source.md
72-
1. Create a CHANGELOG.md file in the root of the repository indicating ```1.0: Initial release```
73-
1. Replace the SampleOrchestratorExtension.sln solution file and SampleOrchestratorExtension folder with your new orchestrator dotnet solution
74-
1. Push your updates to the dev branch (ab#xxxxx)
74+
4. Restart the AnyCA Gateway REST service.
7575

76-
---
76+
5. Navigate to the AnyCA Gateway REST portal and verify that the Gateway recognizes the Sectigo Certificate Manager Gateway plugin by hovering over the ⓘ symbol to the right of the Gateway on the top left of the portal.
7777

78+
## Configuration
7879

79-
#### Create initial prerelease
80-
1. Create a pull request from the dev branch to the release-1.0 branch
80+
1. Follow the [official AnyCA Gateway REST documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCA-Gateway.htm) to define a new Certificate Authority, and use the notes below to configure the **Gateway Registration** and **CA Connection** tabs:
8181

82+
* **Gateway Registration**
8283

83-
----
84+
In order to enroll for certificates the Keyfactor Command server must trust the trust chain. Once you set your Root and/or Subordinate CA in your Sectigo account, make sure to download and import the certificate chain into the Command Server certificate store
8485

85-
When the repository is ready for SE Demo, change the following property:
86-
* "status": "pilot"
86+
* **CA Connection**
8787

88-
When the integration has been approved by Support and Delivery teams, change the following property:
89-
* "status": "production"
88+
Populate using the configuration fields collected in the [requirements](#requirements) section.
9089

91-
If the repository is ready to be published in the public catalog, the following properties must be updated:
92-
* "update_catalog": true
93-
* "link_github": true
90+
* **ApiEndpoint** - The Sectigo API endpoint to connect to. There are a few possible values, depending on your Sectigo account configuration. NOTE: If doing Certificate Auth, the endpoint should end in /private/
91+
* **CustomerUri** - This is a static value that represents the Sectigo account name. This can be found as part of the portal login URL. Ex: https://hard.cert-manager.com/customer/{CustomerUri}
92+
* **AuthType** - This value must be either Password or Certificate. It will determine which credentials are used to connect to the API. NOTE: Certificate Auth will not work properly if there is a proxy doing TLS inspection.
93+
* **Username** - This is the username associated with the API login and will determine the security role in the Certificate Manager platform.
94+
* **Password** - If AuthType is set to Password, this is the password associated with the API login. Ignored for Certificate AuthType.
95+
* **ClientCertificate** - If AuthType is set to Certificate, this is the certificate the Gateway will use to authenticate to the API.
96+
* **PickupRetries** - This setting determines the number of times the service will attempt to download a certificate after successful enrollment. If the certificate cannot be downloaded during this period it will be picked up during the next sync.
97+
* **PickupDelay** - This is the number of seconds between retries. Be aware that the total # of retries times the number of seconds will be the maximum amount of time the Command portal will be occupied during enrollment. If the duration is too long, the request may timeout and cause unexpected results.
98+
* **PageSize** - This is the number of records that will be processed per API call during a sync.
99+
* **ExternalRequestorFieldName** - If you wish to be able to specify at enroll-time a requestor email address for enrollment notifications, first define a requestor field name in this setting. Afterwards, you can create a custom Enrollment Field in Command with that same name, and supply the email address in that enrollment field. If no custom requestor field is provided, the API will use the email address of the API user itself.
100+
* **SyncFilterProfileId** - Comma-separated list of profile IDs to filter the sync on. If not provided, all certificates will be returned.
101+
* **ForceCompleteSync** - By default, the sync only updates database records if the status of the certificate has changed. Set this to true to force all records to sync/update.
102+
* **Enabled** - Flag to Enable or Disable gateway functionality. Disabling is primarily used to allow creation of the CA prior to configuration information being available.
103+
104+
2. When defining templates, the product IDs are unique to your Sectigo account. Log in to your Sectigo portal and go to your product types, and you should be able to retrieve the ID numbers there.
105+
106+
3. Follow the [official Keyfactor documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCA-Keyfactor.htm) to add each defined Certificate Authority to Keyfactor Command and import the newly defined Certificate Templates.
107+
108+
4. In Keyfactor Command (v12.3+), for each imported Certificate Template, follow the [official documentation](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/Configuring%20Template%20Options.htm) to define enrollment fields for each of the following parameters:
109+
110+
* **MultiDomain** - This flag lets Keyfactor know if the certificate can contain multiple domain names. Depending on the setting, the SAN entries of the request will change to support Sectigo requirements.
111+
* **Organization** - If the organization name is provided here, the Sectigo gateway will use that organization name in requests instead of whatever is in the O= field in the request subject.
112+
* **Department** - If your Sectigo account is using department-level products, put the appropriate department name here. Previously, this was alternatively supplied in the OU= subject field, which is now deprecated.
113+
114+
115+
116+
117+
118+
## License
119+
120+
Apache License 2.0, see [LICENSE](LICENSE).
121+
122+
## Related Integrations
123+
124+
See all [Keyfactor Any CA Gateways (REST)](https://github.com/orgs/Keyfactor/repositories?q=anycagateway).

cagateway-template/APIProxy/ProductNameBaseCall.cs

Lines changed: 0 additions & 27 deletions
This file was deleted.

cagateway-template/Client/ProductNameClient.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

cagateway-template/Constants.cs

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)