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

Release 1.1 #23

Merged
merged 24 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 16 additions & 39 deletions .github/workflows/keyfactor-starter-workflow.yml
Original file line number Diff line number Diff line change
@@ -1,42 +1,19 @@
name: Starter Workflow
on: [workflow_dispatch, push, pull_request]
name: Keyfactor Bootstrap Workflow

jobs:
call-create-github-release-workflow:
uses: Keyfactor/actions/.github/workflows/github-release.yml@main

get-manifest-properties:
runs-on: windows-latest
outputs:
update_catalog: ${{ steps.read-json.outputs.prop }}
steps:
- uses: actions/checkout@v3
- name: Read json
id: read-json
shell: pwsh
run: |
$json = Get-Content integration-manifest.json | ConvertFrom-Json
echo "::set-output name=prop::$(echo $json.update_catalog)"

call-dotnet-build-and-release-workflow:
needs: [call-create-github-release-workflow]
uses: Keyfactor/actions/.github/workflows/dotnet-build-and-release.yml@main
with:
release_version: ${{ needs.call-create-github-release-workflow.outputs.release_version }}
release_url: ${{ needs.call-create-github-release-workflow.outputs.release_url }}
release_dir: HydrantIdProxy/src/HydrantIdProxy/bin/Release # TODO: set build output directory to upload as a release, relative to checkout workspace
secrets:
token: ${{ secrets.PRIVATE_PACKAGE_ACCESS }}
on:
workflow_dispatch:
pull_request:
types: [opened, closed, synchronize, edited, reopened]
push:
create:
branches:
- 'release-*.*'

call-generate-readme-workflow:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
uses: Keyfactor/actions/.github/workflows/generate-readme.yml@main
jobs:
call-starter-workflow:
uses: keyfactor/actions/.github/workflows/starter.yml@v2
secrets:
token: ${{ secrets.APPROVE_README_PUSH }}

call-update-catalog-workflow:
needs: get-manifest-properties
if: needs.get-manifest-properties.outputs.update_catalog == 'True' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
uses: Keyfactor/actions/.github/workflows/update-catalog.yml@main
secrets:
token: ${{ secrets.SDK_SYNC_PAT }}
token: ${{ secrets.V2BUILDTOKEN}}
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
v1.1.3
- Fixed sync Issue related to API connectivity to Hydrant ID

v1.1.2
- Recompiled agains the latest gateway and Bouncy Castle Frameworks

v1.1.1
- Fixed error handing to match Hydrant new API Structure

Expand Down
4 changes: 4 additions & 0 deletions HydrantIdProxy/src/HydrantIdProxy/Client/HydrantIdClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,15 @@ public async Task GetSubmitCertificateListRequestAsync(BlockingCollection<ICerti
{
Logger.Error($"Retries Failed: {retryEx.Message}");
Logger.MethodExit(ILogExtensions.MethodLogLevel.Debug);
bc.CompleteAdding();
throw retryEx;
}
catch (HttpRequestException ex)
{
Logger.Error($"HttpRequest Failed: {ex.Message}");
Logger.MethodExit(ILogExtensions.MethodLogLevel.Debug);
bc.CompleteAdding();
throw ex;
}

Logger.MethodExit(ILogExtensions.MethodLogLevel.Debug);
Expand Down
17 changes: 14 additions & 3 deletions HydrantIdProxy/src/HydrantIdProxy/HydrantIdProxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// OR CONDITIONS OF ANY KIND, either express or implied. See the License for
// thespecific language governing permissions and limitations under the
// License.
using System;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down Expand Up @@ -182,8 +182,6 @@ public override EnrollmentResult Enroll(ICertificateDataReader certificateDataRe
int timerTries = 0;
Certificate csrTrackingResponse=null;

Certificate csrTrackingResponse=null;

switch (enrollmentType)
{
case RequestUtilities.EnrollmentType.New:
Expand Down Expand Up @@ -252,6 +250,19 @@ await HydrantIdClient.GetSubmitRenewalAsync(certificateId, renewalRequest))
if (enrollmentResponse?.ErrorReturn?.Status != "Failure")
{
timerTries = +1;
csrTrackingResponse = GetCertificateOnTimer(enrollmentResponse?.RequestStatus?.Id);
}
else
{
return new EnrollmentResult
{
Status = 30, //failure
StatusMessage = $"Enrollment Failed with error {enrollmentResponse?.ErrorReturn?.Error}"
};
}
break;
}

if(csrTrackingResponse==null && timerTries>0)
{
return new EnrollmentResult
Expand Down
29 changes: 17 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@

# HydrantId

HydrantId operates a PKI as a service platform for customers around the globe. The AnyGateway solution for HydrantId is designed to allow Keyfactor Command the ability to: - Sync certificates issued from the CA - Request new certificates from the CA - Revoke certificates directly from Keyfactor Command -Renew or Reissue Certificates from the CA

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

## About the Keyfactor AnyCA Gateway DCOM Connector

## About the Keyfactor AnyGateway CA Connector

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

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 HydrantId

HydrantId is supported by Keyfactor for Keyfactor customers. If you have a support issue, please open a support ticket with your Keyfactor representative.
HydrantId 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 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)



Expand Down Expand Up @@ -194,13 +205,6 @@ REQUIRED: The numeric value corresponding to the ValidityPeriod. For years 1 wou
}
}
```
=======
1) Command Server - Copy and Unzip the Template Setup Files located [Here](https://github.com/Keyfactor/hydrantid-cagateway/raw/main/TemplateSetup.zip)
2) Command Server - Change the Security Settings in the CaTemplateUserSecurity.csv file to the appropriate settings for Test or Production
3) Command Server - Run the CreateTemplate.ps1 file and choose option 1 to create the templates in active directory.
*Note if you get errors the URL to the API or Security is likely wrong. Make sure the API calls are run with an administrator user in KF Command*
4) Command Server - Use the Keyfactor Portal to Import the Templates created in Active Directory in step #3 above
*Note there are default values for the API Url, UserId, and Password. You will have to override the default API Questions to the appropriate values.*

### Certificate Authority Installation
1) Gateway Server - Start the Keyfactor Gateway Service
Expand All @@ -216,3 +220,4 @@ Set-KeyfactorGatewayConfig -LogicalName "HydrantId" -FilePath [path to json file
### License
[Apache](https://apache.org/licenses/LICENSE-2.0)


Binary file removed TemplateSetup.zip
Binary file not shown.
3 changes: 2 additions & 1 deletion integration-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"description": "HydrantId operates a PKI as a service platform for customers around the globe. The AnyGateway solution for HydrantId is designed to allow Keyfactor Command the ability to: - Sync certificates issued from the CA - Request new certificates from the CA - Revoke certificates directly from Keyfactor Command -Renew or Reissue Certificates from the CA",
"link_github": true,
"update_catalog": true,
"support_level": "kf-supported"
"support_level": "kf-supported",
"release_dir": "HydrantIdProxy/src/HydrantIdProxy/bin/Release"

}
7 changes: 0 additions & 7 deletions readme_source.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,6 @@ REQUIRED: The numeric value corresponding to the ValidityPeriod. For years 1 wou
}
}
```
=======
1) Command Server - Copy and Unzip the Template Setup Files located [Here](https://github.com/Keyfactor/hydrantid-cagateway/raw/main/TemplateSetup.zip)
2) Command Server - Change the Security Settings in the CaTemplateUserSecurity.csv file to the appropriate settings for Test or Production
3) Command Server - Run the CreateTemplate.ps1 file and choose option 1 to create the templates in active directory.
*Note if you get errors the URL to the API or Security is likely wrong. Make sure the API calls are run with an administrator user in KF Command*
4) Command Server - Use the Keyfactor Portal to Import the Templates created in Active Directory in step #3 above
*Note there are default values for the API Url, UserId, and Password. You will have to override the default API Questions to the appropriate values.*

### Certificate Authority Installation
1) Gateway Server - Start the Keyfactor Gateway Service
Expand Down
Loading