Skip to content

Commit d5760d2

Browse files
Merge pull request #59 from Keyfactor/certtags_null_check_69522_doc_updates
Certtags null check 69522 doc updates
2 parents 78a58df + 884d932 commit d5760d2

9 files changed

+1071
-1007
lines changed

README.md

Lines changed: 340 additions & 322 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

0 commit comments

Comments
 (0)