diff --git a/.github/workflows/keyfactor-starter-workflow.yml b/.github/workflows/keyfactor-starter-workflow.yml index 65e8b68..3a1615b 100644 --- a/.github/workflows/keyfactor-starter-workflow.yml +++ b/.github/workflows/keyfactor-starter-workflow.yml @@ -1,41 +1,29 @@ -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)" +on: + workflow_dispatch: + pull_request: + types: [opened, closed, synchronize, edited, reopened] + push: + create: + branches: + - 'release-*.*' - call-dotnet-build-and-release-workflow: - needs: [call-create-github-release-workflow] - uses: Keyfactor/actions/.github/workflows/dotnet-build-and-release.yml@main +jobs: + call-starter-workflow: + uses: keyfactor/actions/.github/workflows/starter.yml@screenshots 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: alteon-orchestrator\bin\Release # TODO: set build output directory to upload as a release, relative to checkout workspace - secrets: - token: ${{ secrets.PRIVATE_PACKAGE_ACCESS }} - - call-generate-readme-workflow: - if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' - uses: Keyfactor/actions/.github/workflows/generate-readme.yml@main + command_token_url: ${{ vars.DOCTOOL_COMMAND_TOKEN_URL }} + command_hostname: ${{ vars.DOCTOOL_COMMAND_HOSTNAME }} + command_base_api_path: ${{ vars.DOCTOOL_COMMAND_BASE_API_PATH }} 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 }} + scan_token: ${{ secrets.SAST_TOKEN }} + entra_username: ${{ secrets.DOCTOOL_ENTRA_USERNAME }} + entra_password: ${{ secrets.DOCTOOL_ENTRA_PASSWD }} + command_client_id: ${{ secrets.DOCTOOL_COMMAND_CLIENT_ID }} + command_client_secret: ${{ secrets.DOCTOOL_COMMAND_CLIENT_SECRET }} + \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..f0a8148 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,5 @@ +1.1.0 +- Add doctool and dual build for .net6/8 + +1.0.0 +- Initial Version \ No newline at end of file diff --git a/README.md b/README.md index c563492..4acb471 100644 --- a/README.md +++ b/README.md @@ -1,139 +1,291 @@ -# Orchestrator Extension for Alteon Load Balancer +

+ Alteon Load Balancer Universal Orchestrator Extension +

-The Alteon Load Balancer integration allows you to manage certificates within the Alteon Load Balancer device. +

+ +Integration Status: production +Release +Issues +GitHub Downloads (all assets, all releases) +

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

+ + + Support + + · + + Installation + + · + + License + + · + + Related Integrations + +

-## About the Keyfactor Universal Orchestrator Capability +## Overview -This repository contains a Universal Orchestrator Capability which is a plugin to the Keyfactor Universal Orchestrator. Within the Keyfactor Platform, Orchestrators are used to manage “certificate stores” — collections of certificates and roots of trust that are found within and used by various applications. +The Alteon Load Balancer integration allows you to manage certificates within the Alteon Load Balancer device. It facilitates management of both the Alteon Device SSL certificate as well as entries in the trusted root store of the Alteon Load Balancer appliance. -The Universal Orchestrator is part of the Keyfactor software distribution and is available via the Keyfactor customer portal. For general instructions on installing Capabilities, see the “Keyfactor Command Orchestrator Installation and Configuration Guide” section of the Keyfactor documentation. For configuration details of this specific Capability, see below in this readme. -The Universal Orchestrator is the successor to the Windows Orchestrator. This Capability plugin only works with the Universal Orchestrator and does not work with the Windows Orchestrator. +## Compatibility +This integration is compatible with Keyfactor Universal Orchestrator version 10.4 and later. -## Support for Orchestrator Extension for Alteon Load Balancer +## Support +The Alteon Load Balancer Universal Orchestrator extension If you have a support issue, please open a support ticket by either contacting your Keyfactor representative or via the Keyfactor Support Portal at https://support.keyfactor.com. -Orchestrator Extension for Alteon Load Balancer is supported by Keyfactor for Keyfactor customers. If you have a support issue, please open a support ticket with your Keyfactor representative. +> 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. -###### 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. -___ +## Requirements & Prerequisites +Before installing the Alteon Load Balancer Universal Orchestrator extension, we recommend that you install [kfutil](https://github.com/Keyfactor/kfutil). Kfutil is a command-line tool that simplifies the process of creating store types, installing extensions, and instantiating certificate stores in Keyfactor Command. ---- +## AlteonLB Certificate Store Type +To use the Alteon Load Balancer Universal Orchestrator extension, you **must** create the AlteonLB Certificate Store Type. This only needs to happen _once_ per Keyfactor Command instance. -## Platform Specific Notes -The Keyfactor Universal Orchestrator may be installed on either Windows or Linux based platforms. The certificate operations supported by a capability may vary based what platform the capability is installed on. The table below indicates what capabilities are supported based on which platform the encompassing Universal Orchestrator is running. -| Operation | Win | Linux | -|-----|-----|------| -|Supports Management Add|✓ |✓ | -|Supports Management Remove|✓ |✓ | -|Supports Create Store| | | -|Supports Discovery| | | -|Supports Renrollment| | | -|Supports Inventory|✓ |✓ | ---- +#### Supported Operations -## Setup and Configuration +| Operation | Is Supported | +|--------------|------------------------------------------------------------------------------------------------------------------------| +| Add | ✅ Checked | +| Remove | ✅ Checked | +| Discovery | 🔲 Unchecked | +| Reenrollment | 🔲 Unchecked | +| Create | 🔲 Unchecked | -The high level steps required to configure the Alteon Load Balancer Orchestrator extension are: +#### Store Type Creation -1) [Create the Store Type in Keyfactor](#create-the-store-type-in-keyfactor) +##### Using kfutil: +`kfutil` is a custom CLI for the Keyfactor Command API and can be used to create certificate store types. +For more information on [kfutil](https://github.com/Keyfactor/kfutil) check out the [docs](https://github.com/Keyfactor/kfutil?tab=readme-ov-file#quickstart) +
Click to expand AlteonLB kfutil details -1) [Install the Extension on the Orchestrator](#install-the-extension-on-the-orchestrator) + ##### Using online definition from GitHub: + This will reach out to GitHub and pull the latest store-type definition + ```shell + # Alteon Load Balancer + kfutil store-types create AlteonLB + ``` -1) [Create the Certificate Store](#create-the-certificate-store) + ##### Offline creation using integration-manifest file: + If required, it is possible to create store types from the [integration-manifest.json](./integration-manifest.json) included in this repo. + You would first download the [integration-manifest.json](./integration-manifest.json) and then run the following command + in your offline environment. + ```shell + kfutil store-types create --from-file integration-manifest.json + ``` +
---- -### Create the Store Type in Keyfactor +#### Manual Creation +Below are instructions on how to create the AlteonLB store type manually in +the Keyfactor Command Portal +
Click to expand manual AlteonLB details -Now we can navigate to the Keyfactor platform and create the store type for the extension. + Create a store type called `AlteonLB` with the attributes in the tables below: -1) Navigate to your instance of Keyfactor and log in with a user that has Administrator priveledges. + ##### Basic Tab + | Attribute | Value | Description | + | --------- | ----- | ----- | + | Name | Alteon Load Balancer | Display name for the store type (may be customized) | + | Short Name | AlteonLB | Short display name for the store type | + | Capability | AlteonLB | Store type name orchestrator will register with. Check the box to allow entry of value | + | Supports Add | ✅ Checked | Check the box. Indicates that the Store Type supports Management Add | + | Supports Remove | ✅ Checked | Check the box. Indicates that the Store Type supports Management Remove | + | Supports Discovery | 🔲 Unchecked | Indicates that the Store Type supports Discovery | + | Supports Reenrollment | 🔲 Unchecked | Indicates that the Store Type supports Reenrollment | + | Supports Create | 🔲 Unchecked | Indicates that the Store Type supports store creation | + | Needs Server | ✅ Checked | Determines if a target server name is required when creating store | + | Blueprint Allowed | 🔲 Unchecked | Determines if store type may be included in an Orchestrator blueprint | + | Uses PowerShell | 🔲 Unchecked | Determines if underlying implementation is PowerShell | + | Requires Store Password | 🔲 Unchecked | Enables users to optionally specify a store password when defining a Certificate Store. | + | Supports Entry Password | 🔲 Unchecked | Determines if an individual entry within a store can have a password. | -1) Click on the gear icon in the top left and navigate to "Certificate Store Types". + The Basic tab should look like this: - ![Cert Store Types Menu](/images/store-types-menu.png) + ![AlteonLB Basic Tab](docsource/images/AlteonLB-basic-store-type-dialog.png) -1) Click "Add" to open the Add Certificate Store dialog. + ##### Advanced Tab + | Attribute | Value | Description | + | --------- | ----- | ----- | + | Supports Custom Alias | Optional | Determines if an individual entry within a store can have a custom Alias. | + | Private Key Handling | Optional | This determines if Keyfactor can send the private key associated with a certificate to the store. Required because IIS certificates without private keys would be invalid. | + | PFX Password Style | Default | 'Default' - PFX password is randomly generated, 'Custom' - PFX password may be specified when the enrollment job is created (Requires the Allow Custom Password application setting to be enabled.) | -1) Name the new store type "Alteon Load Balancer" and give it the short name of "AlteonLB". + The Advanced tab should look like this: -1) The Alteon Load Balancer integration supports the following job types: _Inventory, Add, Remove_. Select from these the capabilities you would like to utilize. + ![AlteonLB Advanced Tab](docsource/images/AlteonLB-advanced-store-type-dialog.png) -1) Make sure that "Needs Server" is checked. + > For Keyfactor **Command versions 24.4 and later**, a Certificate Format dropdown is available with PFX and PEM options. Ensure that **PFX** is selected, as this determines the format of new and renewed certificates sent to the Orchestrator during a Management job. Currently, all Keyfactor-supported Orchestrator extensions support only PFX. - ![Cert Store Types Menu](/images/add-store-type.png) + ##### Custom Fields Tab + Custom fields operate at the certificate store level and are used to control how the orchestrator connects to the remote target server containing the certificate store to be managed. The following custom fields should be added to the store type: + | Name | Display Name | Description | Type | Default Value/Options | Required | + | ---- | ------------ | ---- | --------------------- | -------- | ----------- | + | ServerUsername | Server Username | Alteon user ID with sufficient permissions to manage certs in the Alteon Load Balancer. | Secret | | ✅ Checked | + | ServerPassword | Server Password | Password associated with Alteon user ID entered above. | Secret | | ✅ Checked | -1) Set the following values on the __Advanced__ tab: - 1) **Supports Custom Alias** - Optional - 1) **Private Key Handling** - Optional + The Custom Fields tab should look like this: - ![Cert Store Types Advanced](/images/store-type-advanced.png) + ![AlteonLB Custom Fields Tab](docsource/images/AlteonLB-custom-fields-store-type-dialog.png) -1) No changes are needed in the __Custom Fields__ and __Entry Parameters__ tabs. +
-### Install the Extension on the Orchestrator +## Installation -_The process for installing an extension for the universal orchestrator differs from the process of installing an extension for the Windows orchestrator. Follow the below steps to register the integration with your instance of the universal orchestrator._ +1. **Download the latest Alteon Load Balancer Universal Orchestrator extension from GitHub.** -1) Stop the Universal Orchestrator service. + Navigate to the [Alteon Load Balancer Universal Orchestrator extension GitHub version page](https://github.com/Keyfactor/alteon-orchestrator/releases/latest). Refer to the compatibility matrix below to determine whether the `net6.0` or `net8.0` asset should be downloaded. Then, click the corresponding asset to download the zip archive. - 1) Note: In Windows, this service is called "Keyfactor Orchestrator Service (Default)" + | Universal Orchestrator Version | Latest .NET version installed on the Universal Orchestrator server | `rollForward` condition in `Orchestrator.runtimeconfig.json` | `alteon-orchestrator` .NET version to download | + | --------- | ----------- | ----------- | ----------- | + | Older than `11.0.0` | | | `net6.0` | + | Between `11.0.0` and `11.5.1` (inclusive) | `net6.0` | | `net6.0` | + | Between `11.0.0` and `11.5.1` (inclusive) | `net8.0` | `Disable` | `net6.0` | + | Between `11.0.0` and `11.5.1` (inclusive) | `net8.0` | `LatestMajor` | `net8.0` | + | `11.6` _and_ newer | `net8.0` | | `net8.0` | -1) Create a folder in the "extensions" folder of the Universal Orchestrator installation folder named "AlteonLB" + Unzip the archive containing extension assemblies to a known location. - 1) example: `C:\Program Files\Keyfactor\Keyfactor Orchestrator\\_AlteonLB_ + > **Note** If you don't see an asset with a corresponding .NET version, you should always assume that it was compiled for `net6.0`. -1) Copy the build output (if you compiled from source) or the contents of the zip file (if you downloaded the pre-compiled binaries) into this folder. +2. **Locate the Universal Orchestrator extensions directory.** -1) Start the Universal Orchestrator Service + * **Default on Windows** - `C:\Program Files\Keyfactor\Keyfactor Orchestrator\extensions` + * **Default on Linux** - `/opt/keyfactor/orchestrator/extensions` +3. **Create a new directory for the Alteon Load Balancer Universal Orchestrator extension inside the extensions directory.** -### Create the certificate store + Create a new directory called `alteon-orchestrator`. + > The directory name does not need to match any names used elsewhere; it just has to be unique within the extensions directory. -Now add the certificate store that corresponds to an instance of the Alteon Load Balancer. +4. **Copy the contents of the downloaded and unzipped assemblies from __step 2__ to the `alteon-orchestrator` directory.** -The steps to do this are: +5. **Restart the Universal Orchestrator service.** -1) Navigate to "Locations > Certificate Stores" + Refer to [Starting/Restarting the Universal Orchestrator service](https://software.keyfactor.com/Core-OnPrem/Current/Content/InstallingAgents/NetCoreOrchestrator/StarttheService.htm). -1) Click "ADD" - ![Approve Cert Store](/images/add-cert-store-button.png) +6. **(optional) PAM Integration** -1) Enter the values corresponding to the Alteon Load Balancer instance. + The Alteon Load Balancer Universal Orchestrator extension is compatible with all supported Keyfactor PAM extensions to resolve PAM-eligible secrets. PAM extensions running on Universal Orchestrators enable secure retrieval of secrets from a connected PAM provider. -- **Category**: Alteon Load Balancer -- **Container**: _optional logical container in keyfactor for the certificates from this store_ -- **Client Machine**: The Alteon Load Balancer Server and port + To configure a PAM provider, [reference the Keyfactor Integration Catalog](https://keyfactor.github.io/integrations-catalog/content/pam) to select an extension and follow the associated instructions to install it on the Universal Orchestrator (remote). - - Note: The server credentials will only have to be entered once, even if adding multiple certificate stores. - - Set the credentials to those of the account with sufficient permissions to manage certs in the Alteon Load Balancer. - - Check __Use SSL__ - - The __Server Name__ should be the fully qualified URL and port of the Alteon Load Balancer instance. -![Server Credentials](/images/client-credentials.png) +> The above installation steps can be supplemented by the [official Command documentation](https://software.keyfactor.com/Core-OnPrem/Current/Content/InstallingAgents/NetCoreOrchestrator/CustomExtensions.htm?Highlight=extensions). -- **Store Path**: This value isn't used for this integration (other than to uniquely identify the cert store in certificate searches). ---- -### License +## Defining Certificate Stores -[Apache](https://apache.org/licenses/LICENSE-2.0) + +### Store Creation + +#### Manually with the Command UI + +
Click to expand details + +1. **Navigate to the _Certificate Stores_ page in Keyfactor Command.** + + Log into Keyfactor Command, toggle the _Locations_ dropdown, and click _Certificate Stores_. + +2. **Add a Certificate Store.** + + Click the Add button to add a new Certificate Store. Use the table below to populate the **Attributes** in the **Add** form. + + | Attribute | Description | + | --------- |---------------------------------------------------------| + | Category | Select "Alteon Load Balancer" or the customized certificate store name from the previous step. | + | Container | Optional container to associate certificate store with. | + | Client Machine | The Alteon Load Balancer Server and port | + | Store Path | This value isn't used for this integration (other than to uniquely identify the cert store in certificate searches). | + | Orchestrator | Select an approved orchestrator capable of managing `AlteonLB` certificates. Specifically, one with the `AlteonLB` capability. | + | ServerUsername | Alteon user ID with sufficient permissions to manage certs in the Alteon Load Balancer. | + | ServerPassword | Password associated with Alteon user ID entered above. | + +
+ + + +#### Using kfutil CLI + +
Click to expand details + +1. **Generate a CSV template for the AlteonLB certificate store** + + ```shell + kfutil stores import generate-template --store-type-name AlteonLB --outpath AlteonLB.csv + ``` +2. **Populate the generated CSV file** + + Open the CSV file, and reference the table below to populate parameters for each **Attribute**. + + | Attribute | Description | + | --------- | ----------- | + | Category | Select "Alteon Load Balancer" or the customized certificate store name from the previous step. | + | Container | Optional container to associate certificate store with. | + | Client Machine | The Alteon Load Balancer Server and port | + | Store Path | This value isn't used for this integration (other than to uniquely identify the cert store in certificate searches). | + | Orchestrator | Select an approved orchestrator capable of managing `AlteonLB` certificates. Specifically, one with the `AlteonLB` capability. | + | Properties.ServerUsername | Alteon user ID with sufficient permissions to manage certs in the Alteon Load Balancer. | + | Properties.ServerPassword | Password associated with Alteon user ID entered above. | + +3. **Import the CSV file to create the certificate stores** + + ```shell + kfutil stores import csv --store-type-name AlteonLB --file AlteonLB.csv + ``` + +
+ + +#### PAM Provider Eligible Fields +
Attributes eligible for retrieval by a PAM Provider on the Universal Orchestrator + +If a PAM provider was installed _on the Universal Orchestrator_ in the [Installation](#Installation) section, the following parameters can be configured for retrieval _on the Universal Orchestrator_. + + | Attribute | Description | + | --------- | ----------- | + | ServerUsername | Alteon user ID with sufficient permissions to manage certs in the Alteon Load Balancer. | + | ServerPassword | Password associated with Alteon user ID entered above. | + +Please refer to the **Universal Orchestrator (remote)** usage section ([PAM providers on the Keyfactor Integration Catalog](https://keyfactor.github.io/integrations-catalog/content/pam)) for your selected PAM provider for instructions on how to load attributes orchestrator-side. +> Any secret can be rendered by a PAM provider _installed on the Keyfactor Command server_. The above parameters are specific to attributes that can be fetched by an installed PAM provider running on the Universal Orchestrator server itself. + +
+ + +> The content in this section can be supplemented by the [official Command documentation](https://software.keyfactor.com/Core-OnPrem/Current/Content/ReferenceGuide/Certificate%20Stores.htm?Highlight=certificate%20store). + + + + + +## License + +Apache License 2.0, see [LICENSE](LICENSE). + +## Related Integrations + +See all [Keyfactor Universal Orchestrator extensions](https://github.com/orgs/Keyfactor/repositories?q=orchestrator). \ No newline at end of file diff --git a/alteon-orchestrator/Jobs/Inventory.cs b/alteon-orchestrator/Jobs/Inventory.cs index 258d10c..881b42f 100644 --- a/alteon-orchestrator/Jobs/Inventory.cs +++ b/alteon-orchestrator/Jobs/Inventory.cs @@ -18,17 +18,23 @@ using Keyfactor.Logging; using Keyfactor.Orchestrators.Common.Enums; using Keyfactor.Orchestrators.Extensions; +using Keyfactor.Orchestrators.Extensions.Interfaces; using Microsoft.Extensions.Logging; namespace Keyfactor.Extensions.Orchestrator.AlteonLoadBalancer.Jobs { public class Inventory : JobBase, IInventoryJobExtension { - ILogger logger = LogHandler.GetClassLogger(); + ILogger logger = LogHandler.GetClassLogger(); + + public Inventory(IPAMSecretResolver resolver) + { + _resolver = resolver; + } public JobResult ProcessJob(InventoryJobConfiguration config, SubmitInventoryUpdate submitInventoryUpdate) { - InitializeStore(config); + InitializeStore(config, logger); List certs = new List(); try diff --git a/alteon-orchestrator/Jobs/JobBase.cs b/alteon-orchestrator/Jobs/JobBase.cs index 4885408..03d7f1d 100644 --- a/alteon-orchestrator/Jobs/JobBase.cs +++ b/alteon-orchestrator/Jobs/JobBase.cs @@ -13,12 +13,14 @@ // limitations under the License. using Keyfactor.Orchestrators.Extensions; +using Keyfactor.Orchestrators.Extensions.Interfaces; +using Microsoft.Extensions.Logging; namespace Keyfactor.Extensions.Orchestrator.AlteonLoadBalancer.Jobs { public abstract class JobBase { - public string ExtensionName => "AlteonLB"; + public string ExtensionName => ""; public string Username { get; set; } @@ -26,21 +28,23 @@ public abstract class JobBase public string ServerUrl { get; set; } + public IPAMSecretResolver _resolver; + internal protected AlteonLoadBalancerClient aClient { get; set; } - public void InitializeStore(InventoryJobConfiguration config) + public void InitializeStore(InventoryJobConfiguration config, ILogger logger) { ServerUrl = config.CertificateStoreDetails.ClientMachine; - Username = config.ServerUsername; - Password = config.ServerPassword; + Username = PAMUtilities.ResolvePAMField(_resolver, logger, "Server User Name", config.ServerUsername); + Password = PAMUtilities.ResolvePAMField(_resolver, logger, "Server Password", config.ServerPassword); aClient = new AlteonLoadBalancerClient(ServerUrl, Username, Password); } - public void InitializeStore(ManagementJobConfiguration config) { + public void InitializeStore(ManagementJobConfiguration config, ILogger logger) { ServerUrl = config.CertificateStoreDetails.ClientMachine; - Username = config.ServerUsername; - Password = config.ServerPassword; + Username = PAMUtilities.ResolvePAMField(_resolver, logger, "Server User Name", config.ServerUsername); + Password = PAMUtilities.ResolvePAMField(_resolver, logger, "Server Password", config.ServerPassword); aClient = new AlteonLoadBalancerClient(ServerUrl, Username, Password); } } diff --git a/alteon-orchestrator/Jobs/Management.cs b/alteon-orchestrator/Jobs/Management.cs index 166dca7..c4e1e62 100644 --- a/alteon-orchestrator/Jobs/Management.cs +++ b/alteon-orchestrator/Jobs/Management.cs @@ -21,6 +21,7 @@ using Keyfactor.Logging; using Keyfactor.Orchestrators.Common.Enums; using Keyfactor.Orchestrators.Extensions; +using Keyfactor.Orchestrators.Extensions.Interfaces; using Microsoft.Extensions.Logging; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.OpenSsl; @@ -33,9 +34,14 @@ public class Management : JobBase, IManagementJobExtension { readonly ILogger logger = LogHandler.GetClassLogger(); + public Management(IPAMSecretResolver resolver) + { + _resolver = resolver; + } + public JobResult ProcessJob(ManagementJobConfiguration config) { - InitializeStore(config); + InitializeStore(config, logger); JobResult complete = new JobResult() { diff --git a/alteon-orchestrator/PAMUtilities.cs b/alteon-orchestrator/PAMUtilities.cs new file mode 100644 index 0000000..5014e9b --- /dev/null +++ b/alteon-orchestrator/PAMUtilities.cs @@ -0,0 +1,21 @@ +// Copyright 2021 Keyfactor +// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. +// You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 +// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions +// and limitations under the License. + +using Keyfactor.Orchestrators.Extensions.Interfaces; +using Microsoft.Extensions.Logging; + +namespace Keyfactor.Extensions.Orchestrator.AlteonLoadBalancer +{ + internal class PAMUtilities + { + internal static string ResolvePAMField(IPAMSecretResolver resolver, ILogger logger, string name, string key) + { + logger.LogDebug($"Attempting to resolve PAM eligible field {name}"); + return string.IsNullOrEmpty(key) ? key : resolver.Resolve(key); + } + } +} diff --git a/alteon-orchestrator/alteon-orchestrator.csproj b/alteon-orchestrator/alteon-orchestrator.csproj index 8f44f6b..798e3c6 100644 --- a/alteon-orchestrator/alteon-orchestrator.csproj +++ b/alteon-orchestrator/alteon-orchestrator.csproj @@ -1,22 +1,23 @@ - netstandard2.0 + net6.0;net8.0 Keyfactor.Extensions.Orchestrator.AlteonLoadBalancer Keyfactor.Extensions.Orchestrator.AlteonLB true Apache-2.0 false - true - false + disable + true + true - + diff --git a/docsource/alteonlb.md b/docsource/alteonlb.md new file mode 100644 index 0000000..0aa5d83 --- /dev/null +++ b/docsource/alteonlb.md @@ -0,0 +1 @@ +## Overview \ No newline at end of file diff --git a/docsource/content.md b/docsource/content.md new file mode 100644 index 0000000..fb5ff5f --- /dev/null +++ b/docsource/content.md @@ -0,0 +1,3 @@ +## Overview + +The Alteon Load Balancer integration allows you to manage certificates within the Alteon Load Balancer device. It facilitates management of both the Alteon Device SSL certificate as well as entries in the trusted root store of the Alteon Load Balancer appliance. \ No newline at end of file diff --git a/docsource/images/AlteonLB-advanced-store-type-dialog.png b/docsource/images/AlteonLB-advanced-store-type-dialog.png new file mode 100644 index 0000000..65b0d2f Binary files /dev/null and b/docsource/images/AlteonLB-advanced-store-type-dialog.png differ diff --git a/docsource/images/AlteonLB-basic-store-type-dialog.png b/docsource/images/AlteonLB-basic-store-type-dialog.png new file mode 100644 index 0000000..6bc116d Binary files /dev/null and b/docsource/images/AlteonLB-basic-store-type-dialog.png differ diff --git a/docsource/images/AlteonLB-custom-fields-store-type-dialog.png b/docsource/images/AlteonLB-custom-fields-store-type-dialog.png new file mode 100644 index 0000000..2c4f4e5 Binary files /dev/null and b/docsource/images/AlteonLB-custom-fields-store-type-dialog.png differ diff --git a/images/add-cert-store-button.png b/images/add-cert-store-button.png deleted file mode 100644 index 015dd8d..0000000 Binary files a/images/add-cert-store-button.png and /dev/null differ diff --git a/images/add-store-type.png b/images/add-store-type.png deleted file mode 100644 index 649bd7c..0000000 Binary files a/images/add-store-type.png and /dev/null differ diff --git a/images/alteon-certificate-store.png b/images/alteon-certificate-store.png deleted file mode 100644 index bbda227..0000000 Binary files a/images/alteon-certificate-store.png and /dev/null differ diff --git a/images/client-credentials.png b/images/client-credentials.png deleted file mode 100644 index e1f97ec..0000000 Binary files a/images/client-credentials.png and /dev/null differ diff --git a/images/store-type-advanced.png b/images/store-type-advanced.png deleted file mode 100644 index f33fbed..0000000 Binary files a/images/store-type-advanced.png and /dev/null differ diff --git a/images/store-types-menu.png b/images/store-types-menu.png deleted file mode 100644 index fc17a9c..0000000 Binary files a/images/store-types-menu.png and /dev/null differ diff --git a/integration-manifest.json b/integration-manifest.json index fe6c5d3..a8c026a 100644 --- a/integration-manifest.json +++ b/integration-manifest.json @@ -5,28 +5,57 @@ "status": "production", "support_level": "kf-supported", "update_catalog": true, + "release_dir": "alteon-orchestrator/bin/Release", + "release_project": "alteon-orchestrator/alteon-orchestrator.csproj", "link_github": true, "description": "The Alteon Load Balancer integration allows you to manage certificates within the Alteon Load Balancer device.", "about": { "orchestrator": { - "win": { - "supportsCreateStore": false, - "supportsDiscovery": false, - "supportsManagementAdd": true, - "supportsManagementRemove": true, - "supportsReenrollment": false, - "supportsInventory": true, - "platformSupport": "Unused" - }, - "linux": { - "supportsCreateStore": false, - "supportsDiscovery": false, - "supportsManagementAdd": true, - "supportsManagementRemove": true, - "supportsReenrollment": false, - "supportsInventory": true, - "platformSupport": "Unused" - } + "UOFramework": "10.4", + "pam_support": true, + "keyfactor_platform_version": "10.4", + "store_types": [ + { + "Name": "Alteon Load Balancer", + "ShortName": "AlteonLB", + "Capability": "AlteonLB", + "ClientMachineDescription": "The Alteon Load Balancer Server and port", + "StorePathDescription": "This value isn't used for this integration (other than to uniquely identify the cert store in certificate searches).", + "SupportedOperations": { + "Add": true, + "Remove": true, + "Enrollment": false, + "Discovery": false, + "Inventory": true + }, + "Properties": [ + { + "Name": "ServerUsername", + "DisplayName": "Server Username", + "Type": "Secret", + "Description": "Alteon user ID with sufficient permissions to manage certs in the Alteon Load Balancer.", + "Required": true + }, + { + "Name": "ServerPassword", + "DisplayName": "Server Password", + "Type": "Secret", + "Description": "Password associated with Alteon user ID entered above.", + "Required": true + } + ], + "PasswordOptions": { + "EntrySupported": false, + "StoreRequired": false, + "Style": "Default" + }, + "PrivateKeyAllowed": "Optional", + "ServerRequired": true, + "PowerShell": false, + "BlueprintAllowed": false, + "CustomAliasAllowed": "Optional" + } + ] } } } diff --git a/readme_source.md b/readme_source.md deleted file mode 100644 index eb715f0..0000000 --- a/readme_source.md +++ /dev/null @@ -1,90 +0,0 @@ -## Setup and Configuration - -The high level steps required to configure the Alteon Load Balancer Orchestrator extension are: - -1) [Create the Store Type in Keyfactor](#create-the-store-type-in-keyfactor) - -1) [Install the Extension on the Orchestrator](#install-the-extension-on-the-orchestrator) - -1) [Create the Certificate Store](#create-the-certificate-store) - ---- - -### Create the Store Type in Keyfactor - -Now we can navigate to the Keyfactor platform and create the store type for the extension. - -1) Navigate to your instance of Keyfactor and log in with a user that has Administrator priveledges. - -1) Click on the gear icon in the top left and navigate to "Certificate Store Types". - - ![Cert Store Types Menu](/images/store-types-menu.png) - -1) Click "Add" to open the Add Certificate Store dialog. - -1) Name the new store type "Alteon Load Balancer" and give it the short name of "AlteonLB". - -1) The Alteon Load Balancer integration supports the following job types: _Inventory, Add, Remove_. Select from these the capabilities you would like to utilize. - -1) Make sure that "Needs Server" is checked. - - ![Cert Store Types Menu](/images/add-store-type.png) - - -1) Set the following values on the __Advanced__ tab: - 1) **Supports Custom Alias** - Optional - 1) **Private Key Handling** - Optional - - ![Cert Store Types Advanced](/images/store-type-advanced.png) - -1) No changes are needed in the __Custom Fields__ and __Entry Parameters__ tabs. - -### Install the Extension on the Orchestrator - -_The process for installing an extension for the universal orchestrator differs from the process of installing an extension for the Windows orchestrator. Follow the below steps to register the integration with your instance of the universal orchestrator._ - -1) Stop the Universal Orchestrator service. - - 1) Note: In Windows, this service is called "Keyfactor Orchestrator Service (Default)" - -1) Create a folder in the "extensions" folder of the Universal Orchestrator installation folder named "AlteonLB" - - 1) example: `C:\Program Files\Keyfactor\Keyfactor Orchestrator\\_AlteonLB_ - -1) Copy the build output (if you compiled from source) or the contents of the zip file (if you downloaded the pre-compiled binaries) into this folder. - -1) Start the Universal Orchestrator Service - - -### Create the certificate store - -Now add the certificate store that corresponds to an instance of the Alteon Load Balancer. - -The steps to do this are: - -1) Navigate to "Locations > Certificate Stores" - -1) Click "ADD" - - ![Approve Cert Store](/images/add-cert-store-button.png) - -1) Enter the values corresponding to the Alteon Load Balancer instance. - -- **Category**: Alteon Load Balancer -- **Container**: _optional logical container in keyfactor for the certificates from this store_ -- **Client Machine**: The Alteon Load Balancer Server and port - - - Note: The server credentials will only have to be entered once, even if adding multiple certificate stores. - - Set the credentials to those of the account with sufficient permissions to manage certs in the Alteon Load Balancer. - - Check __Use SSL__ - - The __Server Name__ should be the fully qualified URL and port of the Alteon Load Balancer instance. - -![Server Credentials](/images/client-credentials.png) - -- **Store Path**: This value isn't used for this integration (other than to uniquely identify the cert store in certificate searches). - ---- - -### License - -[Apache](https://apache.org/licenses/LICENSE-2.0)