Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AutoPR datafactory/resource-manager] [DataFactory]Add sensitive fields extracted from connection string in swagger for AKV reference #3730

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@
from .azure_table_source_py3 import AzureTableSource
from .copy_source_py3 import CopySource
from .lookup_activity_py3 import LookupActivity
from .delete_activity_py3 import DeleteActivity
from .sql_server_stored_procedure_activity_py3 import SqlServerStoredProcedureActivity
from .custom_activity_reference_object_py3 import CustomActivityReferenceObject
from .custom_activity_py3 import CustomActivity
Expand Down Expand Up @@ -647,6 +648,7 @@
from .azure_table_source import AzureTableSource
from .copy_source import CopySource
from .lookup_activity import LookupActivity
from .delete_activity import DeleteActivity
from .sql_server_stored_procedure_activity import SqlServerStoredProcedureActivity
from .custom_activity_reference_object import CustomActivityReferenceObject
from .custom_activity import CustomActivity
Expand Down Expand Up @@ -1069,6 +1071,7 @@
'AzureTableSource',
'CopySource',
'LookupActivity',
'DeleteActivity',
'SqlServerStoredProcedureActivity',
'CustomActivityReferenceObject',
'CustomActivity',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ class AzureBlobStorageLinkedService(LinkedService):
with sasUri, serviceEndpoint property. Type: string, SecureString or
AzureKeyVaultSecretReference.
:type connection_string: object
:param account_key: The Azure key vault secret reference of accountKey in
connection string.
:type account_key:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param sas_uri: SAS URI of the Azure Blob Storage resource. It is mutually
exclusive with connectionString, serviceEndpoint property.
:type sas_uri: ~azure.mgmt.datafactory.models.SecretBase
exclusive with connectionString, serviceEndpoint property. Type: string,
SecureString or AzureKeyVaultSecretReference.
:type sas_uri: object
:param sas_token: The Azure key vault secret reference of sasToken in sas
uri.
:type sas_token:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param service_endpoint: Blob service endpoint of the Azure Blob Storage
resource. It is mutually exclusive with connectionString, sasUri property.
:type service_endpoint: str
Expand Down Expand Up @@ -71,7 +80,9 @@ class AzureBlobStorageLinkedService(LinkedService):
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'},
'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'SecretBase'},
'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'},
'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'},
'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'},
'service_endpoint': {'key': 'typeProperties.serviceEndpoint', 'type': 'str'},
'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'},
'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'},
Expand All @@ -82,7 +93,9 @@ class AzureBlobStorageLinkedService(LinkedService):
def __init__(self, **kwargs):
super(AzureBlobStorageLinkedService, self).__init__(**kwargs)
self.connection_string = kwargs.get('connection_string', None)
self.account_key = kwargs.get('account_key', None)
self.sas_uri = kwargs.get('sas_uri', None)
self.sas_token = kwargs.get('sas_token', None)
self.service_endpoint = kwargs.get('service_endpoint', None)
self.service_principal_id = kwargs.get('service_principal_id', None)
self.service_principal_key = kwargs.get('service_principal_key', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,18 @@ class AzureBlobStorageLinkedService(LinkedService):
with sasUri, serviceEndpoint property. Type: string, SecureString or
AzureKeyVaultSecretReference.
:type connection_string: object
:param account_key: The Azure key vault secret reference of accountKey in
connection string.
:type account_key:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param sas_uri: SAS URI of the Azure Blob Storage resource. It is mutually
exclusive with connectionString, serviceEndpoint property.
:type sas_uri: ~azure.mgmt.datafactory.models.SecretBase
exclusive with connectionString, serviceEndpoint property. Type: string,
SecureString or AzureKeyVaultSecretReference.
:type sas_uri: object
:param sas_token: The Azure key vault secret reference of sasToken in sas
uri.
:type sas_token:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param service_endpoint: Blob service endpoint of the Azure Blob Storage
resource. It is mutually exclusive with connectionString, sasUri property.
:type service_endpoint: str
Expand Down Expand Up @@ -71,18 +80,22 @@ class AzureBlobStorageLinkedService(LinkedService):
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'},
'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'SecretBase'},
'account_key': {'key': 'typeProperties.accountKey', 'type': 'AzureKeyVaultSecretReference'},
'sas_uri': {'key': 'typeProperties.sasUri', 'type': 'object'},
'sas_token': {'key': 'typeProperties.sasToken', 'type': 'AzureKeyVaultSecretReference'},
'service_endpoint': {'key': 'typeProperties.serviceEndpoint', 'type': 'str'},
'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'},
'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'},
'tenant': {'key': 'typeProperties.tenant', 'type': 'object'},
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'str'},
}

def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, sas_uri=None, service_endpoint: str=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential: str=None, **kwargs) -> None:
def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, account_key=None, sas_uri=None, sas_token=None, service_endpoint: str=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential: str=None, **kwargs) -> None:
super(AzureBlobStorageLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs)
self.connection_string = connection_string
self.account_key = account_key
self.sas_uri = sas_uri
self.sas_token = sas_token
self.service_endpoint = service_endpoint
self.service_principal_id = service_principal_id
self.service_principal_key = service_principal_key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class AzureMySqlLinkedService(LinkedService):
:param connection_string: Required. The connection string. Type: string,
SecureString or AzureKeyVaultSecretReference.
:type connection_string: object
:param password: The Azure key vault secret reference of password in
connection string.
:type password:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param encrypted_credential: The encrypted credential used for
authentication. Credentials are encrypted using the integration runtime
credential manager. Type: string (or Expression with resultType string).
Expand All @@ -55,11 +59,13 @@ class AzureMySqlLinkedService(LinkedService):
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'},
'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'},
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'},
}

def __init__(self, **kwargs):
super(AzureMySqlLinkedService, self).__init__(**kwargs)
self.connection_string = kwargs.get('connection_string', None)
self.password = kwargs.get('password', None)
self.encrypted_credential = kwargs.get('encrypted_credential', None)
self.type = 'AzureMySql'
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class AzureMySqlLinkedService(LinkedService):
:param connection_string: Required. The connection string. Type: string,
SecureString or AzureKeyVaultSecretReference.
:type connection_string: object
:param password: The Azure key vault secret reference of password in
connection string.
:type password:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param encrypted_credential: The encrypted credential used for
authentication. Credentials are encrypted using the integration runtime
credential manager. Type: string (or Expression with resultType string).
Expand All @@ -55,11 +59,13 @@ class AzureMySqlLinkedService(LinkedService):
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'},
'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'},
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'},
}

def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, encrypted_credential=None, **kwargs) -> None:
def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, encrypted_credential=None, **kwargs) -> None:
super(AzureMySqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs)
self.connection_string = connection_string
self.password = password
self.encrypted_credential = encrypted_credential
self.type = 'AzureMySql'
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class AzurePostgreSqlLinkedService(LinkedService):
:param connection_string: An ODBC connection string. Type: string,
SecureString or AzureKeyVaultSecretReference.
:type connection_string: object
:param password: The Azure key vault secret reference of password in
connection string.
:type password:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param encrypted_credential: The encrypted credential used for
authentication. Credentials are encrypted using the integration runtime
credential manager. Type: string (or Expression with resultType string).
Expand All @@ -54,11 +58,13 @@ class AzurePostgreSqlLinkedService(LinkedService):
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'},
'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'},
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'},
}

def __init__(self, **kwargs):
super(AzurePostgreSqlLinkedService, self).__init__(**kwargs)
self.connection_string = kwargs.get('connection_string', None)
self.password = kwargs.get('password', None)
self.encrypted_credential = kwargs.get('encrypted_credential', None)
self.type = 'AzurePostgreSql'
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class AzurePostgreSqlLinkedService(LinkedService):
:param connection_string: An ODBC connection string. Type: string,
SecureString or AzureKeyVaultSecretReference.
:type connection_string: object
:param password: The Azure key vault secret reference of password in
connection string.
:type password:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param encrypted_credential: The encrypted credential used for
authentication. Credentials are encrypted using the integration runtime
credential manager. Type: string (or Expression with resultType string).
Expand All @@ -54,11 +58,13 @@ class AzurePostgreSqlLinkedService(LinkedService):
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'},
'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'},
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'},
}

def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, encrypted_credential=None, **kwargs) -> None:
def __init__(self, *, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, connection_string=None, password=None, encrypted_credential=None, **kwargs) -> None:
super(AzurePostgreSqlLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs)
self.connection_string = connection_string
self.password = password
self.encrypted_credential = encrypted_credential
self.type = 'AzurePostgreSql'
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class AzureSqlDatabaseLinkedService(LinkedService):
:param connection_string: Required. The connection string. Type: string,
SecureString or AzureKeyVaultSecretReference.
:type connection_string: object
:param password: The Azure key vault secret reference of password in
connection string.
:type password:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param service_principal_id: The ID of the service principal used to
authenticate against Azure SQL Database. Type: string (or Expression with
resultType string).
Expand Down Expand Up @@ -65,6 +69,7 @@ class AzureSqlDatabaseLinkedService(LinkedService):
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'},
'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'},
'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'},
'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'},
'tenant': {'key': 'typeProperties.tenant', 'type': 'object'},
Expand All @@ -74,6 +79,7 @@ class AzureSqlDatabaseLinkedService(LinkedService):
def __init__(self, **kwargs):
super(AzureSqlDatabaseLinkedService, self).__init__(**kwargs)
self.connection_string = kwargs.get('connection_string', None)
self.password = kwargs.get('password', None)
self.service_principal_id = kwargs.get('service_principal_id', None)
self.service_principal_key = kwargs.get('service_principal_key', None)
self.tenant = kwargs.get('tenant', None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ class AzureSqlDatabaseLinkedService(LinkedService):
:param connection_string: Required. The connection string. Type: string,
SecureString or AzureKeyVaultSecretReference.
:type connection_string: object
:param password: The Azure key vault secret reference of password in
connection string.
:type password:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param service_principal_id: The ID of the service principal used to
authenticate against Azure SQL Database. Type: string (or Expression with
resultType string).
Expand Down Expand Up @@ -65,15 +69,17 @@ class AzureSqlDatabaseLinkedService(LinkedService):
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'},
'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'},
'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'},
'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'},
'tenant': {'key': 'typeProperties.tenant', 'type': 'object'},
'encrypted_credential': {'key': 'typeProperties.encryptedCredential', 'type': 'object'},
}

def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None:
def __init__(self, *, connection_string, additional_properties=None, connect_via=None, description: str=None, parameters=None, annotations=None, password=None, service_principal_id=None, service_principal_key=None, tenant=None, encrypted_credential=None, **kwargs) -> None:
super(AzureSqlDatabaseLinkedService, self).__init__(additional_properties=additional_properties, connect_via=connect_via, description=description, parameters=parameters, annotations=annotations, **kwargs)
self.connection_string = connection_string
self.password = password
self.service_principal_id = service_principal_id
self.service_principal_key = service_principal_key
self.tenant = tenant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ class AzureSqlDWLinkedService(LinkedService):
SecureString or AzureKeyVaultSecretReference. Type: string, SecureString
or AzureKeyVaultSecretReference.
:type connection_string: object
:param password: The Azure key vault secret reference of password in
connection string.
:type password:
~azure.mgmt.datafactory.models.AzureKeyVaultSecretReference
:param service_principal_id: The ID of the service principal used to
authenticate against Azure SQL Data Warehouse. Type: string (or Expression
with resultType string).
Expand Down Expand Up @@ -66,6 +70,7 @@ class AzureSqlDWLinkedService(LinkedService):
'annotations': {'key': 'annotations', 'type': '[object]'},
'type': {'key': 'type', 'type': 'str'},
'connection_string': {'key': 'typeProperties.connectionString', 'type': 'object'},
'password': {'key': 'typeProperties.password', 'type': 'AzureKeyVaultSecretReference'},
'service_principal_id': {'key': 'typeProperties.servicePrincipalId', 'type': 'object'},
'service_principal_key': {'key': 'typeProperties.servicePrincipalKey', 'type': 'SecretBase'},
'tenant': {'key': 'typeProperties.tenant', 'type': 'object'},
Expand All @@ -75,6 +80,7 @@ class AzureSqlDWLinkedService(LinkedService):
def __init__(self, **kwargs):
super(AzureSqlDWLinkedService, self).__init__(**kwargs)
self.connection_string = kwargs.get('connection_string', None)
self.password = kwargs.get('password', None)
self.service_principal_id = kwargs.get('service_principal_id', None)
self.service_principal_key = kwargs.get('service_principal_key', None)
self.tenant = kwargs.get('tenant', None)
Expand Down
Loading