Skip to content

Commit 698d5b8

Browse files
Merge 5863e7b into 17debae
2 parents 17debae + 5863e7b commit 698d5b8

5 files changed

Lines changed: 326 additions & 198 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,2 @@
1-
# v2.0.0
2-
* Migrate `packages.config` to `PackageReference` format
3-
* Upgrade packages to support Keyfactor AnyCA Gateway DCOM v24.2
4-
* Upgrade `Keyfactor.AnyGateway.SDK` to `24.2.0-PRERELEASE-47446`
5-
* Add support for [GCP CAS Certificate Templates](https://cloud.google.com/certificate-authority-service/docs/policy-controls)
6-
* Enable configuration of CA Pool-based or CA-specific certificate enrollment. If the `CAId` is specified, certificates are enrolled with the CA specified by `CAId`. Otherwise, GCP CAS selects a CA in the CA Pool based on policy.
7-
8-
# v1.1.0
9-
- Remove template references from README
10-
- Small bug fixes
11-
121
# v1.0.0
13-
* Initial Release. Support for Google GA CA Service. Sync, Enroll, and Revocation.
2+
* Initial Release. Sync, Enroll, and Revocation.

HydrantCAProxy/HydrantIdCAPlugin.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
44
<ImplicitUsings>disable</ImplicitUsings>
55
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
66
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
@@ -18,4 +18,4 @@
1818
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
1919
</None>
2020
</ItemGroup>
21-
</Project>
21+
</Project>

README.md

Lines changed: 135 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<h1 align="center" style="border-bottom: none">
2-
HydrantId AnyCA Gateway REST Plugin
2+
HID Global AnyCA Gateway REST Plugin
33
</h1>
44

55
<p align="center">
66
<!-- Badges -->
77
<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/hydrantid-cagateway/releases"><img src="https://img.shields.io/github/v/release/Keyfactor/hydrantid-cagateway?style=flat-square" alt="Release" /></a>
9-
<img src="https://img.shields.io/github/issues/Keyfactor/hydrantid-cagateway?style=flat-square" alt="Issues" />
10-
<img src="https://img.shields.io/github/downloads/Keyfactor/hydrantid-cagateway/total?style=flat-square&label=downloads&color=28B905" alt="GitHub Downloads (all assets, all releases)" />
8+
<a href="https://github.com/Keyfactor/hydrantid-caplugin/releases"><img src="https://img.shields.io/github/v/release/Keyfactor/hydrantid-caplugin?style=flat-square" alt="Release" /></a>
9+
<img src="https://img.shields.io/github/issues/Keyfactor/hydrantid-caplugin?style=flat-square" alt="Issues" />
10+
<img src="https://img.shields.io/github/downloads/Keyfactor/hydrantid-caplugin/total?style=flat-square&label=downloads&color=28B905" alt="GitHub Downloads (all assets, all releases)" />
1111
</p>
1212

1313
<p align="center">
@@ -34,105 +34,169 @@
3434
</p>
3535

3636

37-
HydrantId operates a PKI as a service platform for customers around the globe. The AnyGateway solution for HydrantId is designed to allow Keyfactor Command:
37+
The HID Global HydrantId AnyCA Gateway REST plugin extends the capabilities of HydrantId Certificate Authority Service to Keyfactor Command via the Keyfactor AnyCA Gateway. This plugin leverages the HydrantId REST API with Hawk authentication to provide comprehensive certificate lifecycle management. The plugin represents a fully featured AnyCA Plugin with the following capabilities:
3838

39-
* CA Sync:
40-
* Download all certificates issued by connected Enterprise tier CAs in HydrantId (full sync).
41-
* Certificate enrollment for all published HydrantId Certificate SKUs:
42-
* Support certificate enrollment (new keys/certificate).
43-
* Certificate revocation:
44-
* Request revocation of a previously issued certificate.
39+
* **CA Sync**:
40+
* Download all certificates issued by the HydrantId CA
41+
* Support for incremental and full synchronization
42+
* Automatic extraction of end-entity certificates from PEM chains
43+
* **Certificate Enrollment**:
44+
* Support certificate enrollment with new key pairs
45+
* Dynamic policy (profile) discovery from the CA
46+
* Intelligent renewal vs. re-issue logic based on certificate expiration
47+
* Support for PKCS#10 CSR format
48+
* Configurable certificate validity periods
49+
* **Certificate Revocation**:
50+
* Request revocation of previously issued certificates
51+
* Support for standard CRL revocation reasons
4552

4653
## Compatibility
4754

48-
The HydrantId AnyCA Gateway REST plugin is compatible with the Keyfactor AnyCA Gateway REST 24.2 and later.
55+
The HID Global AnyCA Gateway REST plugin is compatible with the Keyfactor AnyCA Gateway REST 24.2 and later.
4956

5057
## Support
51-
The HydrantId 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.
58+
The HID Global 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.
5259

5360
> 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.
5461
5562
## Requirements
5663

57-
### 🔐 HydrantID API Key Setup Guide
64+
### HydrantId System Prerequisites
5865

59-
This guide explains how to generate and use an API Key ID and Secret in HydrantID for authenticated API access.
66+
Before configuring the AnyCA Gateway plugin, ensure the following prerequisites are met:
6067

61-
---
68+
1. **HydrantId Account**:
69+
- Active HydrantId account with API access enabled
70+
- Access to the HydrantId management portal
71+
- HydrantId Certificate Authority Service configured and operational
6272

63-
#### 📍 Where to Find API Key Management
73+
2. **API Credentials**:
74+
- HydrantId API Authentication ID (AuthId)
75+
- HydrantId API Authentication Key (AuthKey)
76+
- These credentials must have permissions for:
77+
- Certificate enrollment (CSR submission)
78+
- Certificate retrieval
79+
- Certificate revocation
80+
- Policy/profile listing
6481

65-
1. **Log in** to your HydrantID instance.
66-
- Example: https://acm-stage.hydrantid.com
82+
3. **Network Connectivity**:
83+
- Gateway server must have HTTPS access to the HydrantId API endpoint
84+
- Default endpoint format: `https://<environment>.hydrantid.com`
85+
- Example: `https://acm-stage.hydrantid.com` or `https://acm.hydrantid.com`
86+
- TLS 1.2 or higher must be supported
6787

68-
2. Click your **user profile icon** (top right) and select **"Profile"**.
88+
### Obtaining Required Configuration Information
6989

70-
3. In the **Profile** page, scroll to the section labeled `API Keys`.
90+
#### 1. HydrantId Base URL
7191

72-
---
92+
The HydrantId Base URL is the root endpoint for the HydrantId API.
7393

74-
#### ➕ Add a New API Key
94+
**Common HydrantId environments:**
95+
- Production: `https://acm.hydrantid.com`
96+
- Staging: `https://acm-stage.hydrantid.com`
97+
- Custom instances may have different URLs
7598

76-
1. Click **"ADD API KEY"** (top right of the API Keys section).
77-
2. A new API Key will be generated with:
78-
- A unique **API ID**
79-
- A **Secret API Key** — copy it immediately as it is only shown once.
99+
**To obtain your Base URL:**
100+
1. Contact your HydrantId account representative
101+
2. Check your HydrantId account documentation
102+
3. Verify the URL is accessible from the Gateway server
80103

81-
---
104+
#### 2. API Authentication Credentials
82105

83-
#### 🧾 Notes on API Keys
106+
The Gateway authenticates to HydrantId using Hawk authentication protocol with an AuthId and AuthKey pair.
84107

85-
- **ID** = what you'll pass in the HAWK `id` field
86-
- **Key** = secret used to generate HAWK signature
87-
- Each key shows `Created` and `Last Used` timestamps for traceability
108+
**Steps to obtain API credentials:**
88109

89-
---
110+
1. **Access HydrantId Portal**:
111+
- Log in to your HydrantId management portal
112+
- Navigate to API or Integration settings
90113

91-
#### 🔐 Using the API ID and Key with HAWK
114+
2. **Generate API Credentials**:
115+
- Request API credentials from your HydrantId administrator
116+
- You will receive:
117+
- **AuthId**: A unique identifier for your API client
118+
- **AuthKey**: A secret key used for HMAC-based authentication
119+
- Store these credentials securely
92120

93-
HydrantID uses [HAWK Authentication](https://github.com/hueniverse/hawk) to secure its API.
121+
3. **Verify Permissions**:
122+
- Ensure the API credentials have the following permissions:
123+
- Certificate enrollment (POST /api/v2/csr)
124+
- Certificate renewal (POST /api/v2/certificates/{id}/renew)
125+
- Certificate retrieval (GET /api/v2/certificates)
126+
- Certificate revocation (PATCH /api/v2/certificates/{id})
127+
- Policy listing (GET /api/v2/policies)
94128

95-
##### Required Fields in Authorization Header:
96-
```text
97-
Hawk id="API_ID", ts="TIMESTAMP", nonce="RANDOM", mac="HMAC_SIGNATURE"
129+
#### 3. Certificate Policies
98130

99-
### Root CA Configuration
131+
Certificate policies define the types of certificates that can be issued. The plugin automatically discovers available policies from the HydrantId system.
100132

101-
Both the Keyfactor Command and AnyCA Gateway REST servers must trust the root CA, and if applicable, any subordinate CAs for all features to work as intended. Download the CA Certificate (and chain, if applicable) from HydrantId, and import them into the appropriate certificate store on the AnyCA Gateway REST server.
133+
**Policy discovery:**
134+
- Policies are automatically retrieved when the CA is configured
135+
- Policies appear in Keyfactor Command as "Product IDs" after CA registration
136+
- Each policy represents a certificate template configured in HydrantId
102137

103-
* **Windows** - If the AnyCA Gateway REST is running on a Windows host, the root CA and applicable subordinate CAs must be imported into the Windows certificate store. The certificates can be imported using the Microsoft Management Console (MMC) or PowerShell.
104-
* **Linux** - If the AnyCA Gateway REST is running on a Linux host, the root CA and applicable subordinate CAs must be present in the root CA certificate store. The location of this store varies per distribution, but is most commonly `/etc/ssl/certs/ca-certificates.crt`. The following is documentation on some popular distributions.
105-
* [Ubuntu - Managing CA certificates](https://ubuntu.com/server/docs/install-a-root-ca-certificate-in-the-trust-store)
106-
* [RHEL 9 - Using shared system certificates](https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/securing_networks/using-shared-system-certificates_securing-networks#using-shared-system-certificates_securing-networks)
107-
* [Fedora - Using Shared System Certificates](https://docs.fedoraproject.org/en-US/quick-docs/using-shared-system-certificates/)
138+
**To view available policies:**
139+
1. Policies are retrieved automatically using the GET /api/v2/policies endpoint
140+
2. Ensure the API credentials have permissions to list policies
141+
3. Policies will be displayed during CA configuration in the Gateway
108142

109-
> The root CA and intermediate CAs must be trusted by both the Command server _and_ AnyCA Gateway REST server.
143+
#### 4. Certificate Validity Configuration
144+
145+
For each certificate template, you can configure:
146+
147+
| Parameter | Description | Example Values |
148+
|-----------|-------------|----------------|
149+
| **ValidityPeriod** | Time unit for certificate lifetime | `Days`, `Months`, `Years` |
150+
| **ValidityUnits** | Numeric value for the validity period | `365` (for days), `12` (for months), `2` (for years) |
151+
| **RenewalDays** | Days before expiration to trigger renewal vs. re-issue | `30`, `60`, `90` |
152+
153+
**Renewal vs. Re-issue Logic:**
154+
- If a certificate is within the RenewalDays window before expiration, the plugin performs a **renewal**
155+
- If a certificate is outside the RenewalDays window, the plugin performs a **re-issue** (new enrollment)
156+
157+
### Supported Revocation Reasons
158+
159+
The plugin supports the following standard CRL revocation reasons:
160+
161+
| Reason Code | Reason Name | HydrantId API Value |
162+
|-------------|-------------|---------------------|
163+
| 0 | Unspecified | `Unspecified` |
164+
| 1 | Key Compromise | `KeyCompromise` |
165+
| 2 | CA Compromise | `CaCompromise` |
166+
| 3 | Affiliation Changed | `AffiliationChanged` |
167+
| 4 | Superseded | `Superseded` |
168+
| 5 | Cessation of Operation | `CessationOfOperation` |
169+
170+
**Note**: Verify with your HydrantId administrator which revocation reasons are supported in your environment.
110171

111172
## Installation
112173

113174
1. Install the AnyCA Gateway REST per the [official Keyfactor documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/InstallIntroduction.htm).
114175

115-
2. On the server hosting the AnyCA Gateway REST, download and unzip the latest [HydrantId AnyCA Gateway REST plugin](https://github.com/Keyfactor/hydrantid-cagateway/releases/latest) from GitHub.
176+
2. On the server hosting the AnyCA Gateway REST, download and unzip the latest [HID Global AnyCA Gateway REST plugin](https://github.com/Keyfactor/hydrantid-caplugin/releases/latest) from GitHub.
177+
178+
3. Copy the unzipped directory (usually called `net6.0` or `net8.0`) to the Extensions directory:
116179

117-
3. Copy the unzipped directory (usually called `net6.0`) to the Extensions directory:
118180

119181
```shell
182+
Depending on your AnyCA Gateway REST version, copy the unzipped directory to one of the following locations:
120183
Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net6.0\Extensions
184+
Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net8.0\Extensions
121185
```
122186

123-
> The directory containing the HydrantId AnyCA Gateway REST plugin DLLs (`net6.0`) can be named anything, as long as it is unique within the `Extensions` directory.
187+
> The directory containing the HID Global AnyCA Gateway REST plugin DLLs (`net6.0` or `net8.0`) can be named anything, as long as it is unique within the `Extensions` directory.
124188

125189
4. Restart the AnyCA Gateway REST service.
126190

127-
5. Navigate to the AnyCA Gateway REST portal and verify that the Gateway recognizes the HydrantId plugin by hovering over the ⓘ symbol to the right of the Gateway on the top left of the portal.
191+
5. Navigate to the AnyCA Gateway REST portal and verify that the Gateway recognizes the HID Global plugin by hovering over the ⓘ symbol to the right of the Gateway on the top left of the portal.
128192

129193
## Configuration
130194

131195
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:
132196

133197
* **Gateway Registration**
134198

135-
The Gateway Registration tab configures the root or issuing CA certificate for the respective CA in HydrantId. The certificate selected here should be the issuing CA identified in the [Root CA Configuration](#root-ca-configuration) step.
199+
TODO Gateway Registration is a required section
136200

137201
* **CA Connection**
138202

@@ -142,29 +206,32 @@ Both the Keyfactor Command and AnyCA Gateway REST servers must trust the root CA
142206
* **HydrantIdAuthId** - The AuthId Obtained from HydrantId.
143207
* **HydrantIdAuthKey** - The AuthKey Obtained from HydrantId.
144208

145-
2. Define [Certificate Profiles](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCP-Gateway.htm) and [Certificate Templates](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/AddCA-Gateway.htm) for the Certificate Authority as required. One Certificate Profile must be defined per Certificate Template. It's recommended that each Certificate Profile be named after the Product ID.
209+
2. TODO Certificate Template Creation Step is a required section
146210

147-
The GCP CAS AnyCA Gateway REST plugin downloads all Certificate Templates in the configured GCP Region/Project and interprets them as 'Product IDs' in the Gateway Portal.
211+
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.
148212

149-
> For example, if the connected GCP project has the following Certificate Templates:
150-
>
151-
> * `ServerAuth`
152-
> * `ClientAuth`
153-
>
154-
> The `Edit Templates` > `Product ID` dialog dropdown will show the following available 'ProductIDs':
155-
>
156-
> * `Default` -> Don't use a certificate template when enrolling certificates with this Template.
157-
> * `ServerAuth` -> Use the `ServerAuth` certificate template in GCP when enrolling certificates with this Template.
158-
> * `ClientAuth` -> Use the `ClientAuth` certificate template in GCP when enrolling certificates with this Template.
213+
4. TODO Custom Enrollment Parameter Creation Step is an optional section. If this section doesn't seem necessary on initial glance, please delete it. Refer to the docs on [Confluence](https://keyfactor.atlassian.net/wiki/x/SAAyHg) for more info
159214
160-
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.
161215
162-
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:
216+
## Installation
163217
164-
* **ValidityPeriod** - The desired lifetime time period could be Days, Months or Years.
165-
* **ValidityUnits** - The desired lifetime time value some number indicating days, months or years.
166-
* **RenewalDays** - The window that determines whether it is a renewal vs a re-issue.
218+
1. Install the AnyCA Gateway REST per the [official Keyfactor documentation](https://software.keyfactor.com/Guides/AnyCAGatewayREST/Content/AnyCAGatewayREST/InstallIntroduction.htm).
219+
220+
2. On the server hosting the AnyCA Gateway REST, download and unzip the latest [HID Global HydrantId AnyCA Gateway REST plugin](https://github.com/Keyfactor/hydrantid-caplugin/releases/latest) from GitHub.
221+
222+
3. Copy the unzipped directory (usually called `net6.0` or `net8.0`) to the Extensions directory:
223+
224+
```shell
225+
Depending on your AnyCA Gateway REST version, copy the unzipped directory to one of the following locations:
226+
Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net6.0\Extensions
227+
Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net8.0\Extensions
228+
```
229+
230+
> The directory containing the HID Global HydrantId AnyCA Gateway REST plugin DLLs (`net6.0` or `net8.0`) can be named anything, as long as it is unique within the `Extensions` directory.
231+
232+
4. Restart the AnyCA Gateway REST service.
167233
234+
5. Navigate to the AnyCA Gateway REST portal and verify that the Gateway recognizes the HID Global HydrantId plugin by hovering over the ⓘ symbol to the right of the Gateway on the top left of the portal.
168235
169236
170237
## License

0 commit comments

Comments
 (0)