Skip to content

shannonlowder.com

Menu
  • About
  • Biml Interrogator Demo
  • Latest Posts
Menu

SSIS Parameters and Sensitive Information

Posted on August 21, 2017November 14, 2022 by slowder

One of the questions I get when teaching others how to use Biml is how do you deal with sensitive information like usernames and passwords in your Biml Solution. No one wants to leave this information in plain text in a solution.  You need access to it while interrogating your sources and destination connections for metadata.  You also need it while Biml creates your SSIS packages since SSIS uses SELECT to read the metadata during design time to gather its metadata.  If you lock away that sensitive information too tightly, you won’t be effective while building your solutions.

In the end, you’ll have to compromise between security and efficacy.

One of my go-to solutions is using Package or Project Parameters.  While this isn’t completely secure, it does allow you to control access across multiple environments and multiple deployments.  I’d like to share an example from my Biml repository on GitHub. You can find this code in the ParametersAndConnections folder. You’ll find a BimlStudio and a BimlExpress solution there.  For this blog, I’ll cover this code from the BimlExpress solution.

Open \Biml\ParametersAndConnections\BimlExpress\ParametersAndConnections_BE\ParametersAndConnections_BE.sln and you’ll see an empty solution with a single BimlScript: BimlScript.biml.  Open that script and you’ll see connections defined at the top.

Notice I’ve hard coded the connection strings for all four connections: ADONET_AdventureWorks_Package, ADONET_AdventureWorks_Project, OLEDB_AdventureWorks_Package, and OLEDB_AdventureWorks_Project.  While most are using integrated security, ADONET_AdventureWorks_Package is not.  It’s using username and password, and you can see both in plain text.

Even if I had separated my connections into a separate biml file, and made that biml file a parameterized BimlScript that took username and password. Then stored the username and password into an encrypted table, developers would still be able to get the password into plain text.  Simply call the parameterized BimlScript, and write the output to a file using the GetBiml() function.

If we didn’t allow the BimlScript to get the password plain text, we wouldn’t be able to use the connection node(s) for later parts of our Biml Solution.  Thus the compromise has to come somewhere.

Next in BimlScript.biml, we build a single package.  You can see in lines 20 – 29 and 34 – 35, that I’ve tested a few different scenarios. The Connections node in the Packages\Package node is where we start using Project Parameters.

Feel free to try different combinations of Parameters here and generate your own resulting packages.  As long as you are referencing Project Parameters named: ADONET_ConnectionString, OLEDB_ConnectionString, DatabaseName, UserName, or Password, you’ll be ok. If you want to create more Project Parameters, you have to create those manually when using BimlExpress.  Adding them in the Projects\PackageProject\Parameters node will not add them to the Project.params file in this solution.  Feel free to test it and see for yourself.

There are no current plans to add this to BimlExpress at this time.  This code will work from BimlStudio, adding new parameters to a generated SSIS project.

As you test using different Parameters to affect the different connections, you should find two things that make you stop and wonder.  First, you cannot affect Project Connections with Project Parameters through BimlScript.  I believe this is functioning as intended since you would configure Project Connections at runtime by passing the updated values through [catalog].set_execution_parameter_value.

Second, when you update a password through Parameters and Expressions, the password does not show up in the Connection Manager dialog box, yet at run time the package succeeds!

This is due to oddness in SSIS.  If your Package and Project have the same protection level (EncryptSensitiveWithUserKey or EncryptSensitiveWithPassword) The Connection Manager doesn’t show the password, even when you save it.  But when you Test Connection or run the package, the password is there.  That same behavior is there when using Biml to create your Packages.

In the end, you’ll have to pick the amount of security you implement in your Biml Solution, just as you did in your SSIS solution.  Just be sure you and the business are OK with the risks.  While Biml is newer than most all of your ETL techniques, it doesn’t prevent you from using those old techniques, it simply allows you to use them as a framework instead of manually.  Hopefully, this example shows how simple it is to use those older techniques for masking sensitive information.

 

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Recent Posts

  • A New File Interrogator
  • Using Generative AI in Data Engineering
  • Getting started with Microsoft Fabric
  • Docker-based Spark
  • Network Infrastructure Updates

Recent Comments

  1. slowder on Data Engineering for Databricks
  2. Alex Ott on Data Engineering for Databricks

Archives

  • July 2023
  • June 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • October 2018
  • August 2018
  • May 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • September 2017
  • August 2017
  • June 2017
  • March 2017
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • August 2013
  • July 2013
  • June 2013
  • February 2013
  • January 2013
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • August 2011
  • July 2011
  • June 2011
  • May 2011
  • April 2011
  • March 2011
  • February 2011
  • January 2011
  • December 2010
  • November 2010
  • October 2010
  • September 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • November 2007
  • October 2007
  • September 2007
  • August 2007
  • July 2007
  • June 2007
  • May 2007
  • April 2007
  • March 2007
  • February 2007
  • January 2007
  • December 2006
  • November 2006
  • October 2006
  • September 2006
  • August 2006
  • July 2006
  • June 2006
  • May 2006
  • April 2006
  • March 2006
  • February 2006
  • January 2006
  • December 2005
  • November 2005
  • October 2005
  • September 2005
  • August 2005
  • July 2005
  • June 2005
  • May 2005
  • April 2005
  • March 2005
  • February 2005
  • January 2005
  • November 2004
  • September 2004
  • August 2004
  • July 2004
  • April 2004
  • March 2004
  • June 2002

Categories

  • Career Development
  • Data Engineering
  • Data Science
  • Infrastructure
  • Microsoft SQL
  • Modern Data Estate
  • Personal
  • Random Technology
  • uncategorized
© 2025 shannonlowder.com | Powered by Minimalist Blog WordPress Theme