You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/automation/shared-resources/certificates.md
+28-30Lines changed: 28 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
---
2
-
title: Manage certificate in Azure Automation
3
-
description: Certificates are securely stored in Azure Automation so that runbooks or DSC configurations can access them to authenticate against Azure and third-party resources. This article explains the details of certificates and how to work with them in both textual and graphical authoring.
2
+
title: Manage certificates in Azure Automation
3
+
description: Azure Automation securely stores certificates, so that runbooks or DSC configurations can access them to authenticate against Azure and third-party resources. This article explains the details of certificates, and how to work with them in both textual and graphical authoring.
4
4
services: automation
5
5
ms.service: automation
6
6
ms.subservice: shared-capabilities
@@ -13,39 +13,39 @@ manager: carmonm
13
13
14
14
# Manage certificates in Azure Automation
15
15
16
-
Certificates are stored securely in Azure Automation so they can be accessed by runbooks or DSC configurations using the [Get-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Get-AzAutomationCertificate?view=azps-3.7.0) activity for Azure Resource Manager resources. Secure certificate storage allows you to create runbooks and DSC configurations that use certificates for authentication or add them to Azure or third-party resources.
16
+
Azure Automation securely stores certificates, so they can be accessed by runbooks or DSC configurations by using the [Get-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Get-AzAutomationCertificate?view=azps-3.7.0) activity for Azure Resource Manager resources. Secure certificate storage allows you to create runbooks and DSC configurations that use certificates for authentication, or add them to Azure or third-party resources.
17
17
18
-
Secure assets in Azure Automation include credentials, certificates, connections, and encrypted variables. These assets are encrypted and stored in Azure Automation using a unique key that is generated for each automation account. This key is stored in a system-managed Key Vault. Before storing a secure asset, the key is loaded from Key Vault and then used to encrypt the asset. This process is managed by Azure Automation.
18
+
Secure assets in Azure Automation include credentials, certificates, connections, and encrypted variables. Automation encrypts and stores these assets by using a unique key that is generated for each automation account. This key is stored in a system-managed key vault. Before you store a secure asset, you load the key from Key Vault, and you encrypt the asset. Automation manages this process.
19
19
20
20
>[!NOTE]
21
-
>This article has been updated to use the new Azure PowerShell Az module. You can still use the AzureRM module, which will continue to receive bug fixes until at least December 2020. To learn more about the new Az module and AzureRM compatibility, see [Introducing the new Azure PowerShell Az module](https://docs.microsoft.com/powershell/azure/new-azureps-module-az?view=azps-3.5.0). For Az module installation instructions on your Hybrid Runbook Worker, see [Install the Azure PowerShell Module](https://docs.microsoft.com/powershell/azure/install-az-ps?view=azps-3.5.0). For your Automation account, you can update your modules to the latest version using [How to update Azure PowerShell modules in Azure Automation](../automation-update-azure-modules.md).
21
+
>This article shows you how to use the Azure PowerShell Az module. You can still use the AzureRM module. To learn more about the Az module and AzureRM compatibility, see [Introducing the new Azure PowerShell Az module](https://docs.microsoft.com/powershell/azure/new-azureps-module-az?view=azps-3.5.0). For Az module installation instructions on your Hybrid Runbook Worker, see [Install the Azure PowerShell module](https://docs.microsoft.com/powershell/azure/install-az-ps?view=azps-3.5.0). For your Automation account, you can update your modules to the latest version by using [How to update Azure PowerShell modules in Azure Automation](../automation-update-azure-modules.md).
22
22
23
23
## Az PowerShell cmdlets
24
24
25
-
For Az, the cmdlets in the following table are used to create and manage automation credential assets with Windows PowerShell. They ship as part of the [Az.Automation module](/powershell/azure/overview), which is available for use in Automation runbooks and DSC configurations.
25
+
For Az, you use the cmdlets in the following table to create and manage automation credential assets with Windows PowerShell. They ship as part of the [Az.Automation module](/powershell/azure/overview), which is available for use in Automation runbooks and DSC configurations.
26
26
27
27
|Cmdlet |Description|
28
28
| --- | ---|
29
29
|[Add-AzureCertificate](/powershell/module/servicemanagement/azure/add-azurecertificate)|Uploads a service certificate for the specified cloud service.|
30
-
|[Get-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Get-AzAutomationCertificate?view=azps-3.7.0)|Retrieves information about a certificate to use in a runbook or DSC configuration. You can only retrieve the certificate itself using the `Get-AutomationCertificate` activity.|
31
-
|[New-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/New-AzAutomationCertificate?view=azps-3.7.0)|Creates a new certificate in Azure Automation.|
32
-
|[Remove-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Remove-AzAutomationCertificate?view=azps-3.7.0)|Removes a certificate from Azure Automation.|
33
-
|[Set-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Set-AzAutomationCertificate?view=azps-3.7.0)|Sets the properties for an existing certificate including uploading the certificate file and setting the password for a **.pfx** file.|
30
+
|[Get-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Get-AzAutomationCertificate?view=azps-3.7.0)|Retrieves information about a certificate to use in a runbook or DSC configuration. You can only retrieve the certificate itself by using the `Get-AutomationCertificate` activity.|
31
+
|[New-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/New-AzAutomationCertificate?view=azps-3.7.0)|Creates a new certificate in Automation.|
32
+
|[Remove-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Remove-AzAutomationCertificate?view=azps-3.7.0)|Removes a certificate from Automation.|
33
+
|[Set-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Set-AzAutomationCertificate?view=azps-3.7.0)|Sets the properties for an existing certificate, including uploading the certificate file and setting the password for a **.pfx** file.|
34
34
35
35
## Activities
36
36
37
-
The activities in the following table are used to access certificates in a runbook and DSC configurations.
37
+
Use the activities in the following table to access certificates in a runbook and DSC configurations.
38
38
39
39
| Activities | Description |
40
40
|:---|:---|
41
41
|`Get-AutomationCertificate`|Gets a certificate to use in a runbook or DSC configuration. Returns a [System.Security.Cryptography.X509Certificates.X509Certificate2](/dotnet/api/system.security.cryptography.x509certificates.x509certificate2) object.|
42
42
43
43
> [!NOTE]
44
-
> You should avoid using variables in the `Name` parameter of `Get-AutomationCertificate` in a runbook or DSC configuration. Use of variables in this parameter complicates the discovery of dependencies between runbooks or DSC configurations and Automation variables at design time.
44
+
> You should avoid using variables in the `Name` parameter of `Get-AutomationCertificate` in a runbook or DSC configuration. Such variables complicate the discovery of dependencies between runbooks or DSC configurations and Automation variables at design time.
45
45
46
-
## Python 2 functions
46
+
## Python 2 function
47
47
48
-
The function in the following table is used to access certificates in a Python 2 runbook.
48
+
Use the function in the following table to access certificates in a Python 2 runbook.
49
49
50
50
| Function | Description |
51
51
|:---|:---|
@@ -54,18 +54,16 @@ The function in the following table is used to access certificates in a Python 2
54
54
> [!NOTE]
55
55
> You must import the `automationassets` module at the beginning of your Python runbook to access the asset functions.
56
56
57
-
## Creating a new certificate
57
+
## Create a new certificate
58
58
59
-
When you create a new certificate, you upload a .cer or .pfx file to Azure Automation. If you mark the certificate as exportable, then you can transfer it out of the Azure Automation certificate store. If it isn't exportable, then it can only be used for signing within the runbook or DSC configuration. Azure Automation requires the certificate to have the provider **Microsoft Enhanced RSA and AES Cryptographic Provider**.
59
+
When you create a new certificate, you upload a .cer or .pfx file to Automation. If you mark the certificate as exportable, then you can transfer it out of the Automation certificate store. If it isn't exportable, then it can only be used for signing within the runbook or DSC configuration. Automation requires the certificate to have the provider **Microsoft Enhanced RSA and AES Cryptographic Provider**.
60
60
61
61
### Create a new certificate with the Azure portal
62
62
63
-
1. From your Automation account, click **Assets** to open the Assets page.
64
-
2. Select **Certificates** to open the Certificates page.
65
-
3. Click **Add a certificate** at the top of the page.
66
-
4. Type a name for the certificate in the **Name** field.
67
-
5. To browse for a **.cer** or **.pfx** file, click **Select a file** under **Upload a certificate file**. If you select a **.pfx**file, specify a password and indicate if it can be exported.
68
-
6. Click **Create** to save the new certificate asset.
63
+
1. From your Automation account, select **Assets** > **Certificates** > **Add a certificate**..
64
+
1. In the **Name** field, type a name for the certificate.
65
+
1. To browse for a **.cer** or **.pfx** file, under **Upload a certificate file**, choose **Select a file**. If you select a **.pfx** file, specify a password and indicate if it can be exported.
66
+
1. Select **Create** to save the new certificate asset.
To use a certificate, use the `Get-AutomationCertificate` activity. You can't use the [Get-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Get-AzAutomationCertificate?view=azps-3.7.0) cmdlet, since it returns information about the certificate asset but not the certificate itself.
126
+
To use a certificate, use the `Get-AutomationCertificate` activity. You can't use the [Get-AzAutomationCertificate](https://docs.microsoft.com/powershell/module/Az.Automation/Get-AzAutomationCertificate?view=azps-3.7.0) cmdlet. This cmdlet returns information about the certificate asset, but not the certificate itself.
Add a `Get-AutomationCertificate` activity to a graphical runbook by right-clicking on the certificate in the Library pane and selecting **Add to canvas**.
142
+
Add a `Get-AutomationCertificate` activity to a graphical runbook by right-clicking on the certificate in the **Library** pane, and selecting **Add to canvas**.
145
143
146
-

144
+

147
145
148
146
The following image shows an example of using a certificate in a graphical runbook. This is the same as the preceding example that shows how to add a certificate to a cloud service from a textual runbook.

151
149
152
150
### Python 2 example
153
151
154
-
The following example shows how to access certificates in Python2 runbooks.
152
+
The following example shows how to access certificates in Python 2 runbooks.
155
153
156
154
```python
157
155
# get a reference to the Azure Automation certificate
@@ -163,4 +161,4 @@ print cert
163
161
164
162
## Next steps
165
163
166
-
-To learn more about working with links to control the logical flow of activities performed by your runbook, see [Links in graphical authoring](../automation-graphical-authoring-intro.md#links-and-workflow).
164
+
To learn more about working with links to control the logical flow of activities performed by your runbook, see [Links in graphical authoring](../automation-graphical-authoring-intro.md#links-and-workflow).
0 commit comments