Support · Requirements · Installation · License · Related Integrations
The Google Cloud Platform (GCP) CA Services (CAS) AnyCA Gateway REST plugin extends the capabilities of connected GCP CAS CAs to Keyfactor Command via the Keyfactor AnyCA Gateway REST. The plugin represents a fully featured AnyCA REST Plugin with the following capabilies:
- CA Sync:
- Download all certificates issued by connected Enterprise tier CAs in GCP CAS (full sync).
- Download all certificates issued by connected Enterprise tier CAs in GCP CAS issued after a specified time (incremental sync).
- Certificate enrollment for all published GCP Certificate SKUs:
- Support certificate enrollment (new keys/certificate).
- Support auto-enrollment (subject/SANs outside of the CSR)
- Certificate revocation:
- Request revocation of a previously issued certificate.
🚧 Disclaimer
The GCP CAS AnyCA Gateway REST plugin is not supported for DevOps Tier Certificate Authority Pools.
DevOps tier CA Pools don't offer listing, describing, or revoking certificates.
The GCP CAS AnyCA Gateway REST plugin is compatible with the Keyfactor AnyCA Gateway REST 24.2 and later.
The GCP CAS 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.
To report a problem or suggest a new feature, use the Issues tab. If you want to contribute actual bug fixes or proposed enhancements, use the Pull requests tab.
The GCP CAS AnyCA Gateway REST plugin connects to and authenticates with GCP CAS implicitly using Application Default Credentials. This means that all authentication-related configuration of the GCP CAS AnyCA Gateway REST plugin is implied by the environment where the AnyCA Gateway REST itself is running.
Please refer to Google's documentation to configure ADC on the server running the AnyCA Gateway REST.
The easiest way to configure ADC for non-production environments is to use User Credentials.
For production environments that use an ADC method requiring the
GOOGLE_APPLICATION_CREDENTIALS
environment variable, you must ensure the following:
- The service account that the AnyCA Gateway REST runs under must have read permission to the GCP credential JSON file.
- You must set the
GOOGLE_APPLICATION_CREDENTIALS
environment variable for the Windows Service running the AnyCA Gateway REST using the Windows registry editor.
- Refer to the HKLM\SYSTEM\CurrentControlSet\Services Registry Tree docs
If the selected ADC mechanism is Service Account Key, it's recommended that a custom role is created that has the following minimum permissions:
privateca.certificateTemplates.list
privateca.certificateTemplates.use
privateca.certificateAuthorities.get
privateca.certificates.create
privateca.certificates.get
privateca.certificates.list
privateca.certificates.update
The built-in CA Service Operation Manager
roles/privateca.caManager
role can also be used, but is more permissive than a custom role with the above permissions.
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 GCP CAS, and import them into the appropriate certificate store on the AnyCA Gateway REST server.
- 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.
- 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.
The root CA and intermediate CAs must be trusted by both the Command server and AnyCA Gateway REST server.
-
Install the AnyCA Gateway REST per the official Keyfactor documentation.
-
On the server hosting the AnyCA Gateway REST, download and unzip the latest GCP CAS AnyCA Gateway REST plugin from GitHub.
-
Copy the unzipped directory (usually called
net6.0
) to the Extensions directory:Program Files\Keyfactor\AnyCA Gateway\AnyGatewayREST\net6.0\Extensions
The directory containing the GCP CAS AnyCA Gateway REST plugin DLLs (
net6.0
) can be named anything, as long as it is unique within theExtensions
directory. -
Restart the AnyCA Gateway REST service.
-
Navigate to the AnyCA Gateway REST portal and verify that the Gateway recognizes the GCP CAS plugin by hovering over the ⓘ symbol to the right of the Gateway on the top left of the portal.
-
Follow the official AnyCA Gateway REST documentation to define a new Certificate Authority, and use the notes below to configure the Gateway Registration and CA Connection tabs:
-
Gateway Registration
The Gateway Registration tab configures the root or issuing CA certificate for the respective CA in GCP CAS. The certificate selected here should be the issuing CA identified in the Root CA Configuration step.
If you have several CAs in GCP CAS, you must define an individual Certificate Authority for each CA in the AnyCA Gateway REST.
-
CA Connection
Populate using the configuration fields collected in the requirements section.
- LocationId - The GCP location ID where the project containing the target GCP CAS CA is located. For example, 'us-central1'.
- ProjectId - The GCP project ID where the target GCP CAS CA is located
- CAPool - The CA Pool ID in GCP CAS to use for certificate operations. If the CA Pool has resource name
projects/my-project/locations/us-central1/caPools/my-pool
, this field should be set tomy-pool
- CAId - The CA ID of a CA in the same CA Pool as CAPool. For example, to issue certificates from a CA with resource name
projects/my-project/locations/us-central1/caPools/my-pool/certificateAuthorities/my-ca
, this field should be set tomy-ca
. - Enabled - Flag to Enable or Disable gateway functionality. Disabling is primarily used to allow creation of the CA prior to configuration information being available.
-
-
Define Certificate Profiles and Certificate Templates 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.
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.
Certificate Profiles and Templates define how certificates are issued through Google CAS.
- Each Certificate Profile corresponds to a Certificate Template in Google CAS.
- The AnyCA Gateway REST plugin fetches all available Google CAS Certificate Templates and maps them as Product IDs in Keyfactor Gateway.
Google CAS Certificate Template Keyfactor Product ID Usage ServerCertificate
ServerCertificate
Server authentication ClientAuth
ClientAuth
Client authentication ClientAuthCert
ClientAuthCert
Custom client authentication CSROnly
CSROnly
CSR-based issuance None (No Template Used) Default
Uses CA-level settings Note: If
Default
is selected, Google CAS will issue certificates based on CA settings rather than a specific template. -
Follow the official Keyfactor documentation to add each defined Certificate Authority to Keyfactor Command and import the newly defined Certificate Templates.
This guide provides a step-by-step approach to setting up Google Certificate Authority Service (CAS) and integrating it with Keyfactor for certificate enrollment. Since Google CAS does not extract metadata from Certificate Signing Requests (CSRs), certificate templates must be defined in CAS to allow Keyfactor to request certificates correctly. While templates are preferred, they are not required—if the Default Product ID is used, certificates will be generated based on the CA settings instead of a template.
gcloud services enable privateca.googleapis.com
gcloud privateca roots create my-root-ca \
--location=us-central1 \
--key-algorithm=rsa-pkcs1-4096-sha256 \
--subject="CN=My Root CA, O=My Organization, C=US" \
--use-preset-profile=ROOT_CA_DEFAULT \
--bucket=my-ca-bucket
Certificate Key Usage and Extended Key Usage define how the certificates issued by the CA can be used. These must be set at the CA policy level or within a certificate template.
Create a CA policy file (ca-policy.json
):
{
"baselineValues": {
"keyUsage": {
"baseKeyUsage": {
"digitalSignature": true,
"keyEncipherment": true
},
"extendedKeyUsage": {
"serverAuth": true,
"clientAuth": true
}
}
}
}
Apply the policy when creating the CA:
gcloud privateca roots create my-root-ca \
--location=us-central1 \
--key-algorithm=rsa-pkcs1-4096-sha256 \
--subject="CN=My Root CA, O=My Organization, C=US" \
--use-preset-profile=ROOT_CA_DEFAULT \
--bucket=my-ca-bucket \
--ca-policy=ca-policy.json
If using a certificate template, create a policy file (cert-template-policy.json
):
{
"predefinedValues": {
"keyUsage": {
"baseKeyUsage": {
"digitalSignature": true,
"keyEncipherment": true
},
"extendedKeyUsage": {
"serverAuth": true,
"clientAuth": true
}
}
}
}
Create the template:
gcloud privateca templates create my-cert-template \
--location=us-central1 \
--policy-file=cert-template-policy.json
If a template is not used, certificates will be generated directly based on CA settings.
- CSR is only used for the private key proof-of-possession.
- All certificate metadata (e.g., Subject, SANs) must be provided via configuration files or templates.
- Additional fields in the CSR are ignored by Google CAS.
openssl req -new -newkey rsa:2048 -nodes -keyout my-key.pem -out my-csr.pem -subj "/CN=ignored.example.com"
{
"lifetime": "2592000s",
"subjectConfig": {
"subject": {
"commonName": "mydomain.com",
"organization": "My Organization",
"countryCode": "US"
},
"subjectAltName": {
"dnsNames": ["mydomain.com", "www.mydomain.com"]
}
},
"keyUsage": {
"baseKeyUsage": {
"digitalSignature": true,
"keyEncipherment": true
},
"extendedKeyUsage": {
"serverAuth": true
}
}
}
gcloud privateca certificates create my-cert \
--issuer-pool=my-root-ca \
--csr my-csr.pem \
--config-file cert-config.json \
--location=us-central1
- Google CAS does not extract metadata from CSRs.
- Keyfactor prefers enrollment of certificates via predefined templates to ensure all attributes (e.g., Subject, SANs) are correctly applied.
- Prevents unauthorized data injection via CSRs.
- If no template is used, certificates will be issued based on CA settings using the Default Product ID.
Create a certificate template policy file (keyfactor-template-policy.json
):
{
"predefinedValues": {
"keyUsage": {
"baseKeyUsage": {
"digitalSignature": true,
"keyEncipherment": true
},
"extendedKeyUsage": {
"serverAuth": true,
"clientAuth": true
}
}
},
"identityConstraints": {
"allowSubjectPassthrough": true,
"allowSubjectAltNamesPassthrough": true
}
}
Create the template:
gcloud privateca templates create keyfactor-template \
--location=us-central1 \
--policy-file=keyfactor-template-policy.json
If using the Default Product ID in Keyfactor, Google CAS will generate certificates directly from CA settings without requiring a template.
This test validates that a certificate enrollment request from Keyfactor Command is successfully processed by Google CAS when no Subject Alternative Names (SANs) are provided.
- Navigate to Keyfactor Command → Enrollment.
- Fill in the following details:
- Common Name (CN):
www.nosanstest.com
- Key Algorithm: RSA
- Key Size: 2048
- Certificate Authority: Auto-Select
- Common Name (CN):
- Ensure no Subject Alternative Names (SANs) are added.
- Select Direct Download as the Certificate Delivery Format.
- Click Enroll.
- Verify the certificate issuance in Keyfactor Command.
- Validate the certificate details in Google CAS.
✅ The certificate should be issued via Google CAS. ✅ The certificate should be downloaded into Keyfactor Command. ✅ The certificate should be published to Google CAS.
✅ The certificate was successfully issued and downloaded in Keyfactor Command. ✅ The certificate was correctly published and appears in Google CAS.
This test validates that Keyfactor Command can enroll a certificate with multiple SAN types, including DNS, IP, and email, and that it is correctly processed by Google CAS.
- Navigate to Keyfactor Command → Enrollment.
- Fill in the following details:
- Common Name (CN):
www.differentsans.com
- Key Algorithm: RSA
- Key Size: 2048
- Certificate Authority: Auto-Select
- Common Name (CN):
- Add the following Subject Alternative Names (SANs):
- DNS:
differentsans.com
- IP:
127.0.0.1
- IP:
127.0.0.2
- Email:
[email protected]
- DNS:
- Select Direct Download as the Certificate Delivery Format.
- Click Enroll.
- Verify the certificate issuance in Keyfactor Command.
- Validate the certificate details in Google CAS.
✅ The certificate should be issued with the specified SANs. ✅ The certificate should be downloaded into Keyfactor Command. ✅ The certificate should be published to Google CAS.
✅ The certificate was successfully issued and downloaded in Keyfactor Command. ✅ The certificate was correctly published in Google CAS, with all SANs properly applied.
This test validates that when using the Google Default Template, the certificate issuance follows CA-level settings rather than a specific template.
- Navigate to Keyfactor Command → Enrollment.
- Fill in the following details:
- Common Name (CN):
www.usecasettings.com
- Key Algorithm: RSA
- Key Size: 2048
- Template:
AnyCA (Default)
- Certificate Authority: Auto-Select
- Common Name (CN):
- Ensure no Subject Alternative Names (SANs) are added.
- Select Direct Download as the Certificate Delivery Format.
- Click Enroll.
- Verify the certificate issuance in Keyfactor Command.
- Validate the certificate details in Google CAS.
✅ The certificate should be issued using the CA-level settings. ✅ The certificate should be downloaded into Keyfactor Command. ✅ The certificate should be published to Google CAS.
✅ The certificate was successfully issued and downloaded in Keyfactor Command. ✅ The certificate was correctly published in Google CAS, following CA-level settings.
This test validates that when using Keyfactor's Windows Enrollment Gateway, the certificate issuance follows the expected Active Directory Enrollment Policy settings for client authentication. The enrolled certificate should include the correct template information, key usage, and extensions as defined in Active Directory Certificate Services (ADCS). The enrollment process is performed via the Microsoft Management Console (MMC).
- Open the Microsoft Management Console (MMC) and navigate to Certificates - Current User → Personal → Certificates.
- Right-click on Certificates, go to All Tasks, and select Request New Certificate....
- In the Certificate Enrollment Wizard, select the Active Directory Enrollment Policy.
- Select the ClientAuthCert template.
- Ensure the following settings are applied:
- Common Name (CN): Retrieved from Active Directory (e.g.,
kfadmin
) - Key Algorithm: RSA
- Key Size: 2048
- Template:
ClientAuthCert
- Certificate Authority: Auto-Select
- Application Policies:
- Secure Email
- Encrypting File System
- Client Authentication
- Extensions Included:
- Application Policies
- Basic Constraints
- Certificate Template Information
- Issuance Policies
- Key Usage
- Common Name (CN): Retrieved from Active Directory (e.g.,
- Click Enroll.
- Verify the certificate issuance in Keyfactor Command.
- Open the issued certificate in MMC and validate:
- Certificate Template Information matches
ClientAuthCert
. - Object Identifier (OID):
1.3.6.1.4.1.311.21.8.4181979.15981577.14434469.15789051.5877270.183.12847830.8177055
- Major Version Number: 100
- Minor Version Number: 10
- Key Usage: Digital Signature, Key Encipherment
- Subject Alternative Name (SAN): Includes
[email protected]
and[email protected]
- SHA-256 Fingerprint:
f917786fa2519d277238cb2da06b457a771562aad3ded1729b6c9ffde0d65ee
- Certificate Template Information matches
- Validate the certificate details in Google Private CA to confirm it was correctly registered.
✅ The certificate should be issued using the ClientAuthCert template. ✅ The certificate should be downloaded into the Windows Certificate Store via MMC. ✅ The certificate should be published to Keyfactor Command. ✅ The certificate should be registered in Google Private CA. ✅ The certificate should include correct template information, extensions, and metadata.
✅ The certificate was successfully issued and installed in Windows Certificate Store via MMC. ✅ The certificate was correctly published in Keyfactor Command. ✅ The certificate was correctly registered in Google Private CA, following the expected template settings. ✅ The certificate includes the correct template information, key usage, and extensions.
This test ensures that all certificates issued by the Google Private CA are successfully inventoried into Keyfactor Command and that the total number of certificates matches between the two systems.
- Log in to Keyfactor Command.
- Navigate to Inventory → Certificate Authority Synchronization.
- Select the configured Google Private CA integration.
- Click Sync Now to start the certificate inventory process.
- Once the sync completes, navigate to Certificates → Search.
- Retrieve the total number of certificates inventoried from Google CAS.
- Log in to Google Private CA.
- Navigate to Certificates and retrieve the total number of issued certificates.
- Compare the count from Google CAS with the count in Keyfactor Command.
✅ The total number of certificates in Google Private CA should match the number inventoried in Keyfactor Command. ✅ All certificates should appear in Keyfactor Command with the correct metadata.
✅ The certificate count in Keyfactor Command matches the count in Google Private CA. ✅ All certificates were successfully inventoried with accurate metadata.
Test Case 6: Renew Certificate from Keyfactor Command and Ensure a New Certificate is Generated in Google CAS
This test validates that when a certificate is renewed from Keyfactor Command, a new certificate is generated and registered in Google Private CA.
- Log in to Keyfactor Command.
- Navigate to Certificates → Search and locate the certificate that needs renewal.
- Click on the certificate and select Renew Certificate.
- Choose Auto-Select CA and confirm the renewal request.
- Verify that a new certificate has been issued in Keyfactor Command.
- Log in to Google Private CA.
- Navigate to Certificates and ensure a new certificate instance appears with a new serial number.
- Compare the renewed certificate’s details in Google CAS with Keyfactor Command.
- Validate the SHA-256 fingerprint of the renewed certificate to ensure uniqueness.
✅ The certificate should be renewed in Keyfactor Command. ✅ A new certificate with a unique serial number should appear in Google Private CA. ✅ The renewed certificate should match the expected template and metadata.
✅ The certificate was successfully renewed in Keyfactor Command. ✅ A new certificate was generated in Google Private CA with a new serial number. ✅ The metadata and template settings match expected values.
This test ensures that certificates can be revoked from Keyfactor Command, using all available revocation reasons, and that the revocation is correctly applied in Google Private CA.
- Log in to Keyfactor Command.
- Navigate to Certificates → Search and locate the certificate to be revoked.
- Click on the certificate and select Revoke Certificate.
- Choose each revocation reason and confirm the revocation:
- Reason Unspecified
- Key Compromised
- CA Compromised
- Affiliation Changed
- Superseded
- Cessation Of Operation
- Certificate Hold
- Remove From Hold
- Verify that the certificate is marked as revoked in Keyfactor Command.
- Log in to Google Private CA and ensure the certificate is revoked with the selected reason.
Apache License 2.0, see LICENSE.
See all Keyfactor Any CA Gateways (REST).