Gallery › Machine Learning › Azure built-in policies
[Preview]: Configure code signing for training code for specified Azure Machine Learning computes
Doesn't convert yet Policy Disabled Mode Microsoft.MachineLearningServices.Data Version 6.4.0-preview Preview
Provide code signing for training code in specified Azure Machine Learning computes and can be assigned at the workspace. For more information, visit https://aka.ms/amlpolicydoc.
ConvertTo-Bylaw can't convert this policy yet:
- BYL6002 Its mode, Microsoft.MachineLearningServices.Data, is a resource provider mode, which language version 1.0 doesn't support.
Azure Policy JSONAllowedSigningKey_EnforceSetting.json · 205 lines
{
"properties": {
"displayName": "[Preview]: Configure code signing for training code for specified Azure Machine Learning computes",
"policyType": "BuiltIn",
"mode": "Microsoft.MachineLearningServices.Data",
"description": "Provide code signing for training code in specified Azure Machine Learning computes and can be assigned at the workspace. For more information, visit https://aka.ms/amlpolicydoc.",
"metadata": {
"version": "6.4.0-preview",
"category": "Machine Learning",
"preview": true
},
"version": "6.4.0-preview",
"parameters": {
"computeNames": {
"type": "Array",
"metadata": {
"displayName": "Compute names where Azure Machine Learning jobs run",
"description": "List of compute names where this policy should be applied. Example: 'cpu-cluster;gpu-cluster'. If no value is provided to this parameter, policy is applicable to all computes."
},
"defaultValue": []
},
"computeType": {
"type": "String",
"metadata": {
"displayName": "Compute type for the compute where Azure ML jobs run",
"description": "Compute type name. If Any is selected, the policy is applicable to any compute types."
},
"allowedValues": [
"MachineLearningCompute",
"AzureDataFactory",
"HDInsight",
"SynapseSpark",
"ComputeInstance",
"ManagedEndpoint",
"Singularity",
"Automatic",
"Any"
],
"defaultValue": "Any"
},
"isIsolatedNetwork": {
"type": "String",
"metadata": {
"displayName": "Is the compute in isolated network",
"description": "Only applicable for MachineLearningCompute type. \"Yes: apply the policy to computes in isolated network\". \"No: apply the policy to computes that are out of isolated network\". \"Any: apply the policy regardless of if the compute is in isolated network or not\". If compute type is not MachineLearningCompute, the value set for this parameter will be ignored."
},
"allowedValues": [
"Yes",
"No",
"Any"
],
"defaultValue": "Any"
},
"trustIPProtectedComponent": {
"type": "String",
"metadata": {
"displayName": "allow Intellectual Property Protected component job to run and honor component service validation result for IP Protected job",
"description": "\"Yes: Honor component IP protected validation result\". \"No: Do not honor component IP protected validation result\". \"None: Apply the policy regardless it is IP Protected job or not\"."
},
"allowedValues": [
"Yes",
"No",
"None"
],
"defaultValue": "None"
},
"signingKey": {
"type": "String",
"metadata": {
"displayName": "PGP public key",
"description": "Public key text in PGP public key format, with newline characters encoded as string literals \"\\r\" and \"\\n\"."
}
},
"optionalSecondSigningKey": {
"type": "String",
"metadata": {
"displayName": "Second PGP public key",
"description": "Public key text in PGP public key format, with newline characters encoded as string literals \"\\r\" and \"\\n\". This is another allowed signing key that is used only for the special case of Aether module import into Azure Machine Learning."
},
"defaultValue": ""
},
"tags": {
"type": "Array",
"metadata": {
"displayName": "Tags applied to compute",
"description": "Assign a list of tags to match with the tags provided with the compute in the job. The policy is applied only if all tags match {e.g. [ \"tagKey:tagValue\", ... ]"
},
"defaultValue": []
},
"effect": {
"type": "String",
"defaultValue": "enforceSetting",
"allowedValues": [
"enforceSetting",
"disabled"
],
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy."
}
}
},
"policyRule": {
"if": {
"allOf": [
{
"anyOf": [
{
"field": "Microsoft.MachineLearningServices.Data/workspaces/computeName",
"in": "[parameters('computeNames')]"
},
{
"value": "[length(parameters('computeNames'))]",
"equals": 0
}
]
},
{
"anyOf": [
{
"value": "[parameters('computeType')]",
"equals": "Any"
},
{
"field": "Microsoft.MachineLearningServices.Data/workspaces/computeType",
"equals": "[parameters('computeType')]"
}
]
},
{
"anyOf": [
{
"allOf": [
{
"field": "Microsoft.MachineLearningServices.Data/workspaces/computeType",
"equals": "MachineLearningCompute"
},
{
"anyOf": [
{
"value": "[parameters('isIsolatedNetwork')]",
"equals": "Any"
},
{
"field": "Microsoft.MachineLearningServices.Data/workspaces/isIsolatedNetwork",
"equals": "[parameters('isIsolatedNetwork')]"
}
]
}
]
},
{
"field": "Microsoft.MachineLearningServices.Data/workspaces/computeType",
"notEquals": "MachineLearningCompute"
}
]
},
{
"allOf": [
{
"anyOf": [
{
"value": "[length(parameters('tags'))]",
"notEquals": 0
},
{
"value": "[length(field('Microsoft.MachineLearningServices.Data/workspaces/tags[*]'))]",
"equals": 0
}
]
},
{
"count": {
"field": "Microsoft.MachineLearningServices.Data/workspaces/tags[*]",
"where": {
"field": "Microsoft.MachineLearningServices.Data/workspaces/tags[*]",
"in": "[parameters('tags')]"
}
},
"equals": "[length(parameters('tags'))]"
}
]
}
]
},
"then": {
"effect": "[parameters('effect')]",
"details": {
"setting": {
"name": "signingKeys",
"value": {
"allowedList": "[createArray(parameters('signingKey'), parameters('optionalSecondSigningKey'))]",
"trustIPProtectedComponent": "[parameters('trustIPProtectedComponent')]"
}
}
}
}
},
"versions": [
"6.4.0-PREVIEW"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/6a6f7384-63de-11ea-bc55-0242ac130003",
"name": "6a6f7384-63de-11ea-bc55-0242ac130003"
}Source: built-in-policies/policyDefinitions/Machine Learning/AllowedSigningKey_EnforceSetting.json in Azure/azure-policy, under the MIT licence.
Bylaw