Skip to content

Commit 3641e96

Browse files
authored
Merge pull request #61 from Keyfactor/release-3.1
Release 3.1.8
2 parents 615394a + cba7e44 commit 3641e96

16 files changed

+804
-594
lines changed

.github/workflows/keyfactor-bootstrap-workflow.yml renamed to .github/workflows/keyfactor-release-workflow.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Keyfactor Bootstrap Workflow
1+
name: Keyfactor Release Workflow
22

33
on:
44
workflow_dispatch:
@@ -11,9 +11,10 @@ on:
1111

1212
jobs:
1313
call-starter-workflow:
14-
uses: keyfactor/actions/.github/workflows/starter.yml@v2
14+
uses: keyfactor/actions/.github/workflows/starter.yml@v3.1.2
1515
secrets:
1616
token: ${{ secrets.V2BUILDTOKEN}}
1717
APPROVE_README_PUSH: ${{ secrets.APPROVE_README_PUSH}}
1818
gpg_key: ${{ secrets.KF_GPG_PRIVATE_KEY }}
1919
gpg_pass: ${{ secrets.KF_GPG_PASSPHRASE }}
20+

AzureKeyVault.sln

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AzureKeyVault", "AzureKeyVa
77
EndProject
88
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{AB1BF579-FBD3-4F59-BBF2-7B973B9AD1DB}"
99
ProjectSection(SolutionItems) = preProject
10+
docsource\akv.md = docsource\akv.md
1011
CHANGELOG.md = CHANGELOG.md
12+
docsource\content.md = docsource\content.md
1113
create_sp_azure.md = create_sp_azure.md
1214
integration-manifest.json = integration-manifest.json
13-
readme_source.md = readme_source.md
1415
EndProjectSection
1516
EndProject
1617
Global

AzureKeyVault/AzureKeyVault.csproj

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

3-
<PropertyGroup>
4-
<TargetFramework>netcoreapp3.1</TargetFramework>
3+
<PropertyGroup>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<AssemblyName>Keyfactor.Extensions.Orchestrators.AKV</AssemblyName>
66
<RootNamespace>Keyfactor.Extensions.Orchestrator.AzureKeyVault</RootNamespace>
77
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
8-
<SignAssembly>false</SignAssembly>
98
<Copyright />
109
<PackageLicenseExpression>https://apache.org/licenses/LICENSE-2.0</PackageLicenseExpression>
11-
<PackageLicenseFile></PackageLicenseFile>
12-
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
10+
<PackageLicenseFile></PackageLicenseFile>
11+
<AppendTargetFrameworkToOutputPath>true</AppendTargetFrameworkToOutputPath>
1312
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
1413
</PropertyGroup>
1514

AzureKeyVault/Jobs/Management.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public JobResult ProcessJob(ManagementJobConfiguration config)
3939
FailureMessage = "Invalid Management Operation"
4040
};
4141

42-
var tagsJSON = config.JobProperties["CertificateTags"].ToString();
42+
var tagsJSON = config.JobProperties["CertificateTags"]?.ToString();
4343

4444
switch (config.OperationType)
4545
{

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
- 3.1.8
2+
- Fixed bug where enrollment would fail if the CertificateTags field was not defined as an entry parameter
3+
- Convert to .net6/8 dual build
4+
- Update README to use doctool
5+
16
- 3.1.7
27
- Added support for Azure KeyVault Certificate Metadata via Entry Parameters
38
- Fixed issue where an error would be returned during Inventory if 0 certificates were found
49
- Converted to BouncyCastle crypto libraries
5-
- Convert to .net6/8 dual build
6-
- Update README to use doctool
10+
711

812
- 3.1.6
913
- Preventing CertStore parameters from getting used if present but empty.

README.md

Lines changed: 457 additions & 253 deletions
Large diffs are not rendered by default.

create_sp_azure.md

Lines changed: 49 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,43 @@
11
1) Log into [your azure portal](https://portal.azure.com)
22

3-
1) Navigate to [Azure active directory](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview) in the portal.
3+
1) Navigate
4+
to [Azure active directory](https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/Overview) in
5+
the portal.
46

57
1) Select "App registrations" from the menu.
68

79
1) Click "+ New registration"
810

911
1) Give it a name such as "keyfactor-akv" and leave the first radio button selected
1012

11-
![App Registration Overview](/Images/app-registration.PNG)
13+
![App Registration Overview](/Images/app-registration.PNG)
1214

1315
1) Once the entity has been created, you should be directed to the overview view.
1416

15-
![App Registration Overview](/Images/managed-app-link.png)
17+
![App Registration Overview](/Images/managed-app-link.png)
1618

1719
1) From here, copy the _Directory (tenant) ID_.
1820

19-
1) Click on the underlined link above. You should see the managed application details that look similar to the below screen shot.
21+
1) Click on the underlined link above. You should see the managed application details that look similar to the below
22+
screen shot.
2023

21-
![App registration object Id](/Images/objectId.png)
24+
![App registration object Id](/Images/objectId.png)
2225

2326
1) Copy the _Application (client) ID_
2427

25-
1) Now we have a App registration and values for _Directory (tenant) ID_, _Application (client) ID_. These will be used by the integration for authentication to Azure.
28+
1) Now we have a App registration and values for _Directory (tenant) ID_, _Application (client) ID_. These will be used
29+
by the integration for authentication to Azure.
2630

27-
1) (Optional) If creating a multi-tenant service principal, the following AzureAD Powershell command must be run in each tenant:
31+
1) (Optional) If creating a multi-tenant service principal, the following AzureAD Powershell command must be run in each
32+
tenant:
2833
``` Powershell
2934
New-AzADServicePrincipal -ApplicationId <Application ID>
3035
```
3136

3237
#### Assign Permissions
3338

34-
In order to be able to discover and create new Azure Keyvault certificate stores, the app principal that we created must be provided with the "Keyvault Administrator" role at the _Resource Group_ level.[^1]
39+
In order to be able to discover and create new Azure Keyvault certificate stores, the app principal that we created must
40+
be provided with the "Keyvault Administrator" role at the _Resource Group_ level.[^1]
3541
_If there are multiple resource groups that will contain Key Vaults to be managed, you should repeat for each._
3642

3743
Here are the steps for assigning this role.
@@ -40,76 +46,93 @@ Here are the steps for assigning this role.
4046
1) Select "Access control (IAM)" from the left menu.
4147
1) Click "Add", then "Add Role Assignment" to create a new role assignment
4248

43-
![Resource Group Add Role](/Images/resource-group-add-role.PNG)
49+
![Resource Group Add Role](/Images/resource-group-add-role.PNG)
4450
1) Search and Select the "Key Vault Administrator" role.
4551
1) Search and Select the principal we created.
4652

47-
![Select Principal](/Images/rg-role-select-principal.PNG)
53+
![Select Principal](/Images/rg-role-select-principal.PNG)
4854
1) Click "Review and Assign" and save the role assignment.
4955

50-
[^1]: If discovery and create store functionality are not neeeded, it is also possible to manage individual certificate stores without the need to provide resource group level authority. The steps to do assign permissions for an individual Azure Keyvault are described [here](#assign-permissions-for-an-individual-key-vault-via-access-policy) for vaults using Access Policy based permissions and [here](#assign-permissions-for-an-individual-key-vault-via-rbac) for Individual Key Vaults using Role-Based Access Control (RBAC).
56+
[^1]: If discovery and create store functionality are not neeeded, it is also possible to manage individual certificate
57+
stores without the need to provide resource group level authority. The steps to do assign permissions for an individual
58+
Azure Keyvault are described [here](#assign-permissions-for-an-individual-key-vault-via-access-policy) for vaults using
59+
Access Policy based permissions and [here](#assign-permissions-for-an-individual-key-vault-via-rbac) for Individual Key
60+
Vaults using Role-Based Access Control (RBAC).
5161

5262
#### Assign Permissions for an Individual Key Vault via RBAC
5363

54-
If you only need to manage a single instance of a Key Vault and do not require creation and discovery of new Key Vaults, you can provision access to the specific instance without needing to provide the service principal the "Keyvault Administrator" role at the resource group level.
64+
If you only need to manage a single instance of a Key Vault and do not require creation and discovery of new Key Vaults,
65+
you can provision access to the specific instance without needing to provide the service principal the "Keyvault
66+
Administrator" role at the resource group level.
5567

56-
Follow the below steps in order to provide management access for our service principal to a specific instance of a Key Vault:
68+
Follow the below steps in order to provide management access for our service principal to a specific instance of a Key
69+
Vault:
5770

5871
1) Navigate to the Azure Portal and then to your instance of the Azure Keyvault
5972

6073
1) Go to "Access control (IAM)" in the navigation menu for the Key vault.
6174

6275
1) Click on "Add role assignment"
6376

64-
![Vault RBAC](/Images/vault-rbac.png)
77+
![Vault RBAC](/Images/vault-rbac.png)
6578

66-
1) Find the Keyvault Administrator role in the list. Select it and click "Next"
79+
1) Find the Keyvault Administrator role in the list. Select it and click "Next"
6780

68-
![Vault RBAC KVAdmin](/Images/vault-rbac-kvadmin.png)
81+
![Vault RBAC KVAdmin](/Images/vault-rbac-kvadmin.png)
6982

7083
1) On the next screen, click "Select members" and then search for the service principal we created above.
7184

72-
![Vault RBAC principal](/Images/vault-rbac-principal.png)
85+
![Vault RBAC principal](/Images/vault-rbac-principal.png)
7386

7487
1) Select the service principal, click "select", and then "Next"
7588

7689
1) On the final screen, you should see something similar to the following:
7790

78-
![Vault RBAC final](/Images/vault-rbac-final.png)
91+
![Vault RBAC final](/Images/vault-rbac-final.png)
7992

80-
1) Click "Review + assign" to finish assigning the role of Keyvault Administrator for this Key Vault to our service principal account.
93+
1) Click "Review + assign" to finish assigning the role of Keyvault Administrator for this Key Vault to our service
94+
principal account.
8195

8296
#### Assign Permissions for an Individual Key Vault via Access Policy
8397

84-
Access to an Azure Key Vault instance can be granted via Role Based Access Control (RBAC) or with class Azure Resource Access Policies. The below steps are for provisioning access to a single instance of a Key Vault using Access Policies. If you are using RBAC at the resource group level (necessary for discovery and creating new Key Vaults via Keyfactor) we recommend following RBAC (above). Alternatively, you will need to assign explicit permissions to the service principal for any Key Vault that is using Access Policy for Access Control if the Key Vault should be managed with Keyfactor.
98+
Access to an Azure Key Vault instance can be granted via Role Based Access Control (RBAC) or with class Azure Resource
99+
Access Policies. The below steps are for provisioning access to a single instance of a Key Vault using Access Policies.
100+
If you are using RBAC at the resource group level (necessary for discovery and creating new Key Vaults via Keyfactor) we
101+
recommend following RBAC (above). Alternatively, you will need to assign explicit permissions to the service principal
102+
for any Key Vault that is using Access Policy for Access Control if the Key Vault should be managed with Keyfactor.
85103

86-
Following the below steps will provide our service principal with the ability to manage keys in an existing vault, without providing it the elevated permissions required for discovering existing vaults or creating new ones. If you've completed the steps in the previous section for the resource group that contains the Key Vault(s) you would like to manage and the Key Vault(s) are using RBAC, the below steps are not necessary.
104+
Following the below steps will provide our service principal with the ability to manage keys in an existing vault,
105+
without providing it the elevated permissions required for discovering existing vaults or creating new ones. If you've
106+
completed the steps in the previous section for the resource group that contains the Key Vault(s) you would like to
107+
manage and the Key Vault(s) are using RBAC, the below steps are not necessary.
87108

88109
1) Navigate to the Azure Portal and then to your instance of the Azure Keyvault.
89110

90111
1) Go to "Access Policies" in the navigation menu for the Key vault.
91112

92113
1) Click "+ Add Access Policy"
93114

94-
1) In the first drop-down, you can select "Certificate Management". This will select all certificate management permissions.
115+
1) In the first drop-down, you can select "Certificate Management". This will select all certificate management
116+
permissions.
95117

96-
![Permission List](/Images/cert-mgmt-perm-list.PNG)
118+
![Permission List](/Images/cert-mgmt-perm-list.PNG)
97119

98120
1) Click "Select Principal" to open the search pane.
99121

100122
1) Find the Application Registration we created above, select it, and click "Select".
101123

102-
![Select Principal](/Images/select-principal.PNG)
124+
![Select Principal](/Images/select-principal.PNG)
103125

104126
1) Leave "Authorized application" unselected.
105127

106128
1) Click "Add".
107129

108-
1) After you are redirected to the "Access policies" view, you should see the App Registration listed under "APPLICATION".
130+
1) After you are redirected to the "Access policies" view, you should see the App Registration listed under "
131+
APPLICATION".
109132

110133
1) Click "Save" at the top of this view.
111134

112-
![Select Principal](/Images/save-access-policy.PNG)
135+
![Select Principal](/Images/save-access-policy.PNG)
113136

114137
#### Generate an Access Token
115138

docsource/akv.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
## Overview
2+
3+
The Azure Keyvault Certificate Store Type is designed to integrate with Microsoft Azure Key Vault, enabling users to
4+
manage and automate the lifecycle of cryptographic certificates stored in Azure Key Vault through Keyfactor Command.
5+
This Certificate Store Type represents the connection and configuration necessary to interact with specific instances of
6+
Azure Key Vault, allowing for operations such as inventory, addition, removal, and discovery of certificates and
7+
certificate stores.
8+
9+
This integration leverages Azure's robust security infrastructure, utilizing OAuth-based authentication methods
10+
including Service Principals, User Assigned Managed Identities, and System Assigned Managed Identities. This ensures
11+
that only authorized entities can manage the certificates stored within the Key Vault.
12+
13+
While this Certificate Store Type provides a powerful means of managing certificates, there are some important caveats
14+
to consider. For example, if your instance of Azure Key Vault utilizes private or custom endpoints, or is hosted outside
15+
of the Azure Public cloud (e.g., Government, China, Germany instances), certain functions like discovery job
16+
functionality may not be supported. Additionally, the configuration of access control through Azure's Role Based Access
17+
Control (RBAC) or classic Access Policies must be meticulously managed to ensure sufficient permissions for the
18+
orchestrator to perform its tasks.
19+
20+
The integration does not require a specific SDK, as it interacts with Azure services directly through their APIs.
21+
However, ensuring that the orchestrator has network access to Azure endpoints is crucial for smooth operation. Being
22+
mindful of these caveats and limitations will help ensure successful deployment and use of the Azure Keyvault
23+
Certificate Store Type within your organization’s security framework.
24+

0 commit comments

Comments
 (0)