Gallery › Data Factory › Azure built-in policies
Azure Data Factory linked service resource type should be in allow list
Converted Policy Audit Deny Disabled Mode All Version 1.2.0
Define the allow list of Azure Data Factory linked service types. Restricting allowed resource types enables control over the boundary of data movement. For example, restrict a scope to only allow blob storage with Data Lake Storage Gen1 and Gen2 for analytics or a scope to only allow SQL and Kusto access for real-time queries.
ConvertTo-Bylaw converted this policy, and proved that the file compiles back to the same definition.
Azure Policy JSONLinkedService_ResourceType_Audit.json · 171 lines
{
"properties": {
"displayName": "Azure Data Factory linked service resource type should be in allow list",
"policyType": "BuiltIn",
"mode": "All",
"description": "Define the allow list of Azure Data Factory linked service types. Restricting allowed resource types enables control over the boundary of data movement. For example, restrict a scope to only allow blob storage with Data Lake Storage Gen1 and Gen2 for analytics or a scope to only allow SQL and Kusto access for real-time queries.",
"metadata": {
"version": "1.2.0",
"category": "Data Factory"
},
"version": "1.2.0",
"parameters": {
"effect": {
"type": "String",
"metadata": {
"displayName": "Effect",
"description": "Enable or disable the execution of the policy"
},
"allowedValues": [
"Audit",
"Deny",
"Disabled"
],
"defaultValue": "Audit"
},
"allowedLinkedServiceResourceTypes": {
"type": "Array",
"metadata": {
"displayName": "Allowed linked service resource types",
"description": "The list of allowed linked service resource types."
},
"allowedValues": [
"AdlsGen2CosmosStructuredStream",
"AdobeExperiencePlatform",
"AdobeIntegration",
"AmazonRedshift",
"AmazonS3",
"AzureBlobFS",
"AzureBlobStorage",
"AzureDataExplorer",
"AzureDataLakeStore",
"AzureDataLakeStoreCosmosStructuredStream",
"AzureDataShare",
"AzureFileStorage",
"AzureKeyVault",
"AzureMariaDB",
"AzureMySql",
"AzurePostgreSql",
"AzureSearch",
"AzureSqlDatabase",
"AzureSqlDW",
"AzureSqlMI",
"AzureSynapseArtifacts",
"AzureTableStorage",
"Cassandra",
"CommonDataServiceForApps",
"CosmosDb",
"CosmosDbMongoDbApi",
"Db2",
"DynamicsCrm",
"FileServer",
"FtpServer",
"GitHub",
"GoogleCloudStorage",
"Hdfs",
"Hive",
"HttpServer",
"Informix",
"Kusto",
"MicrosoftAccess",
"MySql",
"Netezza",
"Odata",
"Odbc",
"Office365",
"Oracle",
"PostgreSql",
"PostgreSqlV2",
"Salesforce",
"SalesforceV2",
"SalesforceServiceCloud",
"SalesforceServiceCloudV2",
"SapBw",
"SapHana",
"SapOpenHub",
"SapTable",
"Sftp",
"SharePointOnlineList",
"Snowflake",
"SnowflakeV2",
"SqlServer",
"Sybase",
"Teradata",
"HDInsightOnDemand",
"HDInsight",
"AzureDataLakeAnalytics",
"AzureBatch",
"AzureFunction",
"AzureML",
"AzureMLService",
"MongoDb",
"GoogleBigQuery",
"GoogleBigQueryV2",
"Impala",
"ServiceNow",
"ServiceNowV2",
"Dynamics",
"AzureDatabricks",
"AmazonMWS",
"SapCloudForCustomer",
"SapEcc",
"Web",
"MongoDbAtlas",
"HBase",
"Spark",
"Phoenix",
"PayPal",
"Marketo",
"Responsys",
"SalesforceMarketingCloud",
"Presto",
"Square",
"Xero",
"Jira",
"Magento",
"Shopify",
"Concur",
"Hubspot",
"Zoho",
"Eloqua",
"QuickBooks",
"Couchbase",
"Drill",
"Greenplum",
"MariaDB",
"Vertica",
"MongoDbV2",
"OracleServiceCloud",
"GoogleAdWords",
"RestService",
"DynamicsAX",
"AzureDataCatalog",
"AzureDatabricksDeltaLake"
]
}
},
"policyRule": {
"if": {
"allOf": [
{
"field": "type",
"equals": "Microsoft.DataFactory/factories/linkedservices"
},
{
"field": "Microsoft.DataFactory/factories/linkedservices/type",
"notIn": "[parameters('allowedLinkedServiceResourceTypes')]"
}
]
},
"then": {
"effect": "[parameters('effect')]"
}
},
"versions": [
"1.2.0",
"1.1.0"
]
},
"id": "/providers/Microsoft.Authorization/policyDefinitions/6809a3d0-d354-42fb-b955-783d207c62a8",
"name": "6809a3d0-d354-42fb-b955-783d207c62a8"
}Bylaw6809a3d0-d354-42fb-b955-783d207c62a8.bylaw.ps1 · 34 lines
# Converted from LinkedService_ResourceType_Audit.json by ConvertTo-Bylaw.
Policy '6809a3d0-d354-42fb-b955-783d207c62a8' {
Properties @{
DisplayName = 'Azure Data Factory linked service resource type should be in allow list'
Description = 'Define the allow list of Azure Data Factory linked service types. Restricting allowed resource types enables control over the boundary of data movement. For example, restrict a scope to only allow blob storage with Data Lake Storage Gen1 and Gen2 for analytics or a scope to only allow SQL and Kusto access for real-time queries.'
Version = '1.2.0'
Category = 'Data Factory'
PolicyVersion = '1.2.0'
Mode = 'All'
}
Parameter Effect @{
AllowedValues = @('Audit', 'Deny', 'Disabled')
Default = 'Audit'
DisplayName = 'Effect'
Description = 'Enable or disable the execution of the policy'
}
Parameter AllowedLinkedServiceResourceTypes @{
Type = 'Array'
AllowedValues = @('AdlsGen2CosmosStructuredStream', 'AdobeExperiencePlatform', 'AdobeIntegration', 'AmazonRedshift', 'AmazonS3', 'AzureBlobFS', 'AzureBlobStorage', 'AzureDataExplorer', 'AzureDataLakeStore', 'AzureDataLakeStoreCosmosStructuredStream', 'AzureDataShare', 'AzureFileStorage', 'AzureKeyVault', 'AzureMariaDB', 'AzureMySql', 'AzurePostgreSql', 'AzureSearch', 'AzureSqlDatabase', 'AzureSqlDW', 'AzureSqlMI', 'AzureSynapseArtifacts', 'AzureTableStorage', 'Cassandra', 'CommonDataServiceForApps', 'CosmosDb', 'CosmosDbMongoDbApi', 'Db2', 'DynamicsCrm', 'FileServer', 'FtpServer', 'GitHub', 'GoogleCloudStorage', 'Hdfs', 'Hive', 'HttpServer', 'Informix', 'Kusto', 'MicrosoftAccess', 'MySql', 'Netezza', 'Odata', 'Odbc', 'Office365', 'Oracle', 'PostgreSql', 'PostgreSqlV2', 'Salesforce', 'SalesforceV2', 'SalesforceServiceCloud', 'SalesforceServiceCloudV2', 'SapBw', 'SapHana', 'SapOpenHub', 'SapTable', 'Sftp', 'SharePointOnlineList', 'Snowflake', 'SnowflakeV2', 'SqlServer', 'Sybase', 'Teradata', 'HDInsightOnDemand', 'HDInsight', 'AzureDataLakeAnalytics', 'AzureBatch', 'AzureFunction', 'AzureML', 'AzureMLService', 'MongoDb', 'GoogleBigQuery', 'GoogleBigQueryV2', 'Impala', 'ServiceNow', 'ServiceNowV2', 'Dynamics', 'AzureDatabricks', 'AmazonMWS', 'SapCloudForCustomer', 'SapEcc', 'Web', 'MongoDbAtlas', 'HBase', 'Spark', 'Phoenix', 'PayPal', 'Marketo', 'Responsys', 'SalesforceMarketingCloud', 'Presto', 'Square', 'Xero', 'Jira', 'Magento', 'Shopify', 'Concur', 'Hubspot', 'Zoho', 'Eloqua', 'QuickBooks', 'Couchbase', 'Drill', 'Greenplum', 'MariaDB', 'Vertica', 'MongoDbV2', 'OracleServiceCloud', 'GoogleAdWords', 'RestService', 'DynamicsAX', 'AzureDataCatalog', 'AzureDatabricksDeltaLake')
DisplayName = 'Allowed linked service resource types'
Description = 'The list of allowed linked service resource types.'
}
Resource 'Microsoft.DataFactory/factories/linkedservices' {
Require 'type is one of the AllowedLinkedServiceResourceTypes parameter' {
Field 'Microsoft.DataFactory/factories/linkedservices/type' | Must -BeIn (Param AllowedLinkedServiceResourceTypes)
}
}
Effect (Param Effect)
}Source: built-in-policies/policyDefinitions/Data Factory/LinkedService_ResourceType_Audit.json in Azure/azure-policy, under the MIT licence.
Bylaw