Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typeconversion #7

Open
wants to merge 13 commits into
base: release-1.0
Choose a base branch
from
19 changes: 19 additions & 0 deletions .github/workflows/keyfactor-bootstrap-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Keyfactor Bootstrap Workflow

on:
workflow_dispatch:
pull_request:
types: [opened, closed, synchronize, edited, reopened]
push:
create:
branches:
- 'release-*.*'

jobs:
call-starter-workflow:
uses: keyfactor/actions/.github/workflows/starter.yml@v2
secrets:
token: ${{ secrets.V2BUILDTOKEN}}
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
27 changes: 0 additions & 27 deletions .github/workflows/keyfactor-extension-generate-readme.yml

This file was deleted.

140 changes: 0 additions & 140 deletions .github/workflows/keyfactor-extension-release.yml

This file was deleted.

5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ Bug Fixes

1.0.2
Skip processing enrollment fields that are not marked as "required" or "optional" in the validation policy.
Handle retries for rate-limited requests.
Handle retries for rate-limited requests.

1.0.4
Bugfix for data type conversions
42 changes: 40 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,45 @@

# GlobalSign Atlas AnyGateway
## Ca-gateway

This integration allows for the Synchronization, Enrollment, and Revocation of TLS Certificates from the GlobalSign Atlas platform.

***
#### Integration status: Production - Ready for use in production environments.

## About the Keyfactor AnyCA Gateway DCOM Connector

This repository contains an AnyCA Gateway Connector, which is a plugin to the Keyfactor AnyGateway. AnyCA Gateway Connectors allow Keyfactor Command to be used for inventory, issuance, and revocation of certificates from a third-party certificate authority.

## Support for GlobalSign Atlas AnyGateway

GlobalSign Atlas AnyGateway is supported by Keyfactor for Keyfactor customers. 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](../../issues)** tab. If you want to contribute actual bug fixes or proposed enhancements, use the **[Pull requests](../../pulls)** tab.

---


---





## Keyfactor AnyCA Gateway Framework Supported
The Keyfactor gateway framework implements common logic shared across various gateway implementations and handles communication with Keyfactor Command. The gateway framework hosts gateway implementations or plugins that understand how to communicate with specific CAs. This allows you to integrate your third-party CAs with Keyfactor Command such that they behave in a manner similar to the CAs natively supported by Keyfactor Command.




This gateway extension was compiled against version 21.5.1 of the AnyCA Gateway DCOM Framework. You will need at least this version of the framework Installed. If you have a later AnyGateway Framework Installed you will probably need to add binding redirects in the CAProxyServer.exe.config file to make things work properly.


[Keyfactor CAGateway Install Guide](https://software.keyfactor.com/Guides/AnyGateway_Generic/Content/AnyGateway/Introduction.htm)



---


# Introduction
This AnyGateway plug-in enables issuance, revocation, and synchronization of certificates from GlobalSign's Atlas platform.
# Prerequisites
Expand Down Expand Up @@ -165,3 +201,5 @@ There are no specific Changes for the ServiceSettings section. Refer to the AnyG
"PartialScanPeriodMinutes": 240
}
```


17 changes: 14 additions & 3 deletions globalsign-atlas-cagateway/GlobalSignAtlasCAConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Org.BouncyCastle.Asn1.X509;

using System;
using System.CodeDom;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
Expand Down Expand Up @@ -67,6 +68,16 @@ public override EnrollmentResult Enroll(string csr, string subject, Dictionary<s
/// <returns></returns>
public override EnrollmentResult Enroll(ICertificateDataReader certificateDataReader, string csr, string subject, Dictionary<string, string[]> san, EnrollmentProductInfo productInfo, PKIConstants.X509.RequestFormat requestFormat, RequestUtilities.EnrollmentType enrollmentType)
{
Logger.Trace("Enrollment parameters:");
Logger.Trace($"CSR: {csr}");
Logger.Trace($"Subject: {subject}");
if (san.ContainsKey("dns"))
{
Logger.Trace($"DNS SANs: {string.Join(",", san["dns"])}");
}
Logger.Trace($"Product: {productInfo.ProductID}");
Logger.Trace($"Product Params: {string.Join(";", productInfo.ProductParameters.Select(p => p.Key.ToString() + "=" + p.Value.ToString()))}");

Dictionary<string, object> connectionInfo = ConfigProvider.CAConnectionData;
AtlasClient client = CreateClient(connectionInfo);
Enroll enrollData = new Enroll();
Expand Down Expand Up @@ -248,9 +259,9 @@ public override EnrollmentResult Enroll(ICertificateDataReader certificateDataRe
{
enrollData.Sig.HashAlgorithm = "SHA-256";
}

int pickupDelay = connectionInfo.ContainsKey(AtlasConstants.PICKUP_DELAY) ? (int)connectionInfo[AtlasConstants.PICKUP_DELAY] : 5;
int pickupRetries = connectionInfo.ContainsKey(AtlasConstants.PICKUP_RETRIES) ? (int)connectionInfo[AtlasConstants.PICKUP_RETRIES] : 5;
int pickupDelay = connectionInfo.ContainsKey(AtlasConstants.PICKUP_DELAY) ? Convert.ToInt32(connectionInfo[AtlasConstants.PICKUP_DELAY]) : 5;
int pickupRetries = connectionInfo.ContainsKey(AtlasConstants.PICKUP_RETRIES) ? Convert.ToInt32(connectionInfo[AtlasConstants.PICKUP_RETRIES]) : 5;

var response = client.RequestNewCertificate(enrollData, pickupDelay, pickupRetries);
if (response.Status != PKIConstants.Microsoft.RequestDisposition.ISSUED)
Expand Down
11 changes: 8 additions & 3 deletions integration-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"$schema": "https://keyfactor.github.io/integration-manifest-schema.json",
"integration_type": "ca-gateway",
"name": "GlobalSign Atlas AnyGateway",
"status": "prototype",
"description": "This integration allows for the Synchronization, Enrollment, and Revocation of TLS Certificates from the GlobalSign Atlas platform."
}
"status": "production",
"description": "This integration allows for the Synchronization, Enrollment, and Revocation of TLS Certificates from the GlobalSign Atlas platform.",
"link_github": true,
"update_catalog": true,
"support_level": "kf-supported",
"release_dir": "globalsign-atlas-cagateway\\bin\\Release",
"gateway_framework": "21.5.1"
}
8 changes: 1 addition & 7 deletions README.md.tpl → readme_source.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
# {{ name }}
## {{ integration_type | capitalize }}

{{ description }}

***
# Introduction
This AnyGateway plug-in enables issuance, revocation, and synchronization of certificates from GlobalSign's Atlas platform.
# Prerequisites
Expand Down Expand Up @@ -164,4 +158,4 @@ There are no specific Changes for the ServiceSettings section. Refer to the AnyG
"FullScanPeriodHours": 24,
"PartialScanPeriodMinutes": 240
}
```
```
Loading