I am building an Integration Services Project in VS 2019.
I have added a Project Connection Manager for an OLE DB/SQL Server.
I have configured the connection string using project parameters. (Project.params
file).
Then I changed the project parameter to use "Configurations", in order to apply different values based on the active configuration.
In the Project Property settings, the protection level is set to "EncryptSensitiveWithUserKey".
However, if I examine the .dtproj file, both connection strings (Dev and "Azure") are stored unencrypted. This is a concern, as I want to be able to include the .dtproj file in a repository.
Am I doing something wrong? If it's not possible this way, how else can I securely "save" two connection strings in the project for different configurations?
CodePudding user response:
As the protection level is set to EncryptSensitiveWithUserKey
, you should configure the project parameters as Sensitive
. To do so, click on the Project.params
file in the "Solution Explorer"
Then, set the parameter as sensitive. The parameter value will be masked immediately as shown in the image below:
Also, let us check the project.params
file in the solution directory.
If we open the file using a text editor, we can check that the parameter value is encrypted.
Update
As the OP mentioned in the comments, setting the connection string parameter as sensitive led to the following exception:
The expression will not be evaluated because it contains sensitive parameter variable "$Project::ConnectionString". Verify that the expression is used properly and that it protects the sensitive information. ".