%3CLINGO-SUB%20id%3D%22lingo-sub-1394193%22%20slang%3D%22en-US%22%3EIntro%20-%20SQL%20Server%20Transparent%20Data%20Encryption%20and%20Extensible%20Key%20Management%20Using%20Azure%20Key%20Vault%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1394193%22%20slang%3D%22en-US%22%3E%3CP%3EWelcome%20to%20my%20blog%20series%20on%20setting%20up%20%3CSTRONG%3ESQL%20Server%20TDE%20to%20use%20Azure%20Key%20Vault%3C%2FSTRONG%3E.%3C%2FP%3E%0A%3CP%3EI%E2%80%99m%20a%20Program%20Manager%20with%20the%20Azure%20SQL%20Security%20Team%20%2F%20Product%20Group%20and%20I%20will%20walk%20you%20through%20the%20process%20of%20configuring%20the%20various%20services%2C%20features%20and%20products%20to%20encrypt%20your%20SQL%20Server%20databases.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESetting%20up%20TDE%20to%20use%20Azure%20Key%20Vault%20(AKV)%20can%20be%20a%20complex%20process%20which%20has%20been%20made%20even%20more%20challenging%20due%20to%20limited%20documentation%2C%20challenging%20online%20instructions%20and%20multiple%20steps%20using%204%20different%20products%3A%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3ESQL%20Server%20Connector%20for%20Microsoft%20Azure%20Key%20Vault%20(aka%3A%20SQL%20Server%20Connector)%3C%2FLI%3E%0A%3CLI%3EAzure%20Active%20Directory%20(aka%3A%20AAD)%3C%2FLI%3E%0A%3CLI%3EAzure%20Key%20Vault%20(aka%3A%20AKV)%3C%2FLI%3E%0A%3CLI%3ESQL%20Server%20(SQL%20Server%202008%20or%20later)%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EIn%20this%20blog%20I%20will%20guide%20you%20through%20setup%20of%20TDE%20and%20Extensible%20Key%20Management%20(EKM)%20using%20Azure%20Key%20Vault%20via%20either%20the%20Azure%20Portal%20or%20PowerShell%20and%20of%20course%20SQL%20Server%20(SQLCMD).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markdown%22%3E%3CCODE%3E%5BNOTE%5D%20%0AThis%20blog%20pertains%20to%3A%0A%20%20%20*%20SQL%20Server%20On-Prem%20%0A%20%20%20*%20Azure%20SQL%20VM%20(IaaS)%20instances%0A%0AThis%20blog%20is%20NOT%20applicable%20for%3A%0A%20%20%20*%20SQL%20Server%20Managed%20Instance%20(MI)%20%0A%20%20%20*%20Azure%20SQL%20DB%20(PaaS)%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPart%20-%20Intro%3C%2FSTRONG%3E%20of%20a%204%20part%20blog%20series%3A%3C%2FP%3E%0A%3CP%3EThis%20blog%20will%20walk%20you%20through%204%20steps%20and%20%3CSTRONG%3Etwo%20separate%20ways%26nbsp%3B%3C%2FSTRONG%3Eof%20setting%20up%20TDE%20using%20EKM%20(Extensible%20key%20Management)%20using%20Azure%20Key%20Vault%3A%3C%2FP%3E%0A%3CP%3ENote%3B%20EKM%20is%20the%20model%2FAPI%20by%20which%20a%203rd%20party%20can%20register%20a%20custom%20provider%20with%20SQL%20Server%20to%20do%20key%20management.%20SQL%20Connector%20is%20the%20provider%20that%20you%20can%20install%20on%20your%20SQL%20Server.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPart%201%3A%20Install%20SQL%20Server%20Connector%20for%20Microsoft%20Azure%20Key%20Vault%3C%2FSTRONG%3E%20(aka%3A%20SQL%20Server%20Connector)%20(-ERR%3AREF-NOT-FOUND-Blog%20Part%201)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPart%202%3A%20Configure%20Azure%20Active%20Directory%3C%2FSTRONG%3E%20(aka%3A%20AAD)%20-%20select%20either%20path%20(Azure%20Portal%20or%20PowerShell%20%E2%80%93%20not%20both)%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3Ea.%20Azure%20Portal%3A%20this%20path%20will%20walk%20through%20each%20screen%20in%20the%20Azure%20Portal%20(%3CU%3EBlog%20Part%3A%20AP2%3C%2FU%3E)%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3Eor%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3Eb.%20PowerShell%3A%20This%20path%20will%20walk%20through%20each%20PowerShell%20command%20(%3CU%3EBlog%20Part%3A%20PS2%3C%2FU%3E)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPart%203%3A%20Configure%20Azure%20Key%20Vault%20(aka%3A%20AKV)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3Ea.%20Azure%20Portal%3A%20this%20path%20will%20walk%20through%20each%20screen%20in%20the%20Azure%20Portal%20(%3CU%3EBlog%20Part%3A%20AP3%3C%2FU%3E)%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3Eor%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3Eb.%20PowerShell%3A%20This%20path%20will%20walk%20through%20each%20PowerShell%20command%20(%3CU%3EBlog%20Part%3A%20PS2%3C%2FU%3E)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markdown%22%3E%3CCODE%3ENote%3A%20The%20entire%20process%20can%20be%20scripted%20in%20PowerShell%20(including%20the%20SQL%20Server%20portion)%0Athat%20takes%20advantage%20of%20the%20variables%20used%20in%20PowerShell%20that%20are%20passed%20on%20to%20SQLCMD.%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EPart%204%3A%20The%20SQL%20Server%20configuration%3C%2FSTRONG%3E%20steps%20are%20the%20same%20regardless%20of%20the%20method%20of%20setting%20up%20Azure%20Active%20Directory%20(AAD)%20and%20Azure%20Key%20Vault%20(AKV).%20Configuring%20SQL%20Server%20database%20with%20TDE%20to%20use%20Azure%20Key%20Vault%20will%20be%20a%20final%20blog%20post%20(%3CU%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fsql-server%2Fsql-server-transparent-data-encryption-and-extensible-key%2Fba-p%2F1427692%22%20target%3D%22_self%22%3EBlog%20Part%204%3C%2FA%3E%3C%2FU%3E)%20that%20builds%20off%20the%20previous%20blogs.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22EKM_Intro.png%22%20style%3D%22width%3A%20658px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F194545iCE6667198A99C382%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22EKM_Intro.png%22%20alt%3D%22EKM_Intro.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EBefore%20You%20Start%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ETo%20use%20Azure%20Key%20Vault%20with%20your%20SQL%20Server%2C%20there%20are%20a%20few%20prerequisites%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EYou%20must%20have%20an%20-ERR%3AREF-NOT-FOUND-Azure%20subscription%3C%2FLI%3E%0A%3CLI%3EInstall%20the%20latest%26nbsp%3B-ERR%3AREF-NOT-FOUND-Azure%20PowerShell%26nbsp%3B(5.2.0%20or%20higher).%3C%2FLI%3E%0A%3CLI%3EIf%20using%20PowerShell%20-%20Install%20Azure%20AD%20PowerShell%20module%3C%2FLI%3E%0A%3CUL%3E%0A%3CLI%3EInstall-Module%20AzureAD%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CLI%3EFamiliarize%20yourself%20with%20the%20principals%20of%20EKM%20storage%20using%20the%20Azure%20Key%20Vault%20by%20reviewing%26nbsp%3B-ERR%3AREF-NOT-FOUND-Extensible%20Key%20Management%20Using%20Azure%20Key%20Vault%20(SQL%20Server).%3C%2FLI%3E%0A%3CLI%3EHave%20the%20appropriate%20version%20of%20the%20Visual%20Studio%20C%2B%2B%20redistributable%20installed%20based%20on%20the%20version%20of%20SQL%20Server%20that%20you%20are%20running%3A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CTABLE%20width%3D%22654%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22196.667px%22%3E%0A%3CP%3E%3CSTRONG%3ESQL%20Server%20Version%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22455.556px%22%3E%0A%3CP%3E%3CSTRONG%3ERedistributable%20Install%20Link%3C%2FSTRONG%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22196.667px%22%3E%0A%3CP%3E2008%2C%202008%20R2%2C%202012%2C%202014%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22455.556px%22%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fdownload%2Fdetails.aspx%3Fid%3D40784%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVisual%20C%2B%2B%20Redistributable%20Packages%20for%20Visual%20Studio%202013%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22196.667px%22%3E%0A%3CP%3E2016%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22455.556px%22%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fdownload%2Fdetails.aspx%3Fid%3D48145%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVisual%20C%2B%2B%20Redistributable%20for%20Visual%20Studio%202015%3C%2FA%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20continue%20(after%20complying%20with%20the%20prerequisites)%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EFollow%20the%20-ERR%3AREF-NOT-FOUND-Part%3A%201%20blog%20that%20describes%20how%20to%20download%20and%20install%20the%20SQL%20Server%20Connector%20for%20Microsoft%20Azure%20Key%20Vault.%3C%2FLI%3E%0A%3CLI%3E%3CSPAN%20class%3D%22TextRun%20SCXW49845265%20BCX0%22%20data-contrast%3D%22none%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW49845265%20BCX0%22%3ENext%20select%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW49845265%20BCX0%22%20data-contrast%3D%22none%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW49845265%20BCX0%22%3Eone%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW49845265%20BCX0%22%20data-contrast%3D%22none%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW49845265%20BCX0%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Epath%20to%20use%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW49845265%20BCX0%22%20data-contrast%3D%22none%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW49845265%20BCX0%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Eeither%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TextRun%20SCXW49845265%20BCX0%22%20data-contrast%3D%22none%22%3E%3CSPAN%20class%3D%22NormalTextRun%20SCXW49845265%20BCX0%22%3E%3A%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22EOP%20SCXW49845265%20BCX0%22%20data-ccp-props%3D%22%7B%26quot%3B134233117%26quot%3B%3Atrue%2C%26quot%3B134233118%26quot%3B%3Atrue%2C%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335551550%26quot%3B%3A1%2C%26quot%3B335551620%26quot%3B%3A1%2C%26quot%3B335559685%26quot%3B%3A1020%2C%26quot%3B335559740%26quot%3B%3A240%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%0A%3CUL%20class%3D%22lia-list-style-type-circle%22%3E%0A%3CLI%3Ethe%20Azure%20Portal%20(-ERR%3AREF-NOT-FOUND-Part%3A%20AP2%20%26amp%3B%20-ERR%3AREF-NOT-FOUND-Part%3A%20AP3)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%20class%3D%22lia-indent-padding-left-60px%22%3Eor%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%20style%3D%22list-style-type%3A%20none%3B%22%3E%0A%3CUL%20class%3D%22lia-list-style-type-circle%22%3E%0A%3CLI%3EPowerShell%20(-ERR%3AREF-NOT-FOUND-Part%3A%20PS2)%2C%20follow%20the%20step-by-step%20instructions%20for%20either%20option%20(not%20both).%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FLI%3E%0A%3CLI%3EOnce%20Azure%20Active%20Directory%20and%20Azure%20Key%20Vault%20are%20setup%20then%20follow%20the%20final%20blog%20for%20step-by-step%20configuration%20of%20SQL%20Server%20TDE%20(-ERR%3AREF-NOT-FOUND-Part%3A%204).%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3E%3CSTRONG%3ENext%20Step%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3ENow%20that%20you%20have%20completed%20the%20basic%20configuration.%20Follow%20the%20path%20to%20either%20setup%20Azure%20Active%20Directory%20(AAD)%20and%20Azure%20Key%20Vault%20(AKV)%20using%20the%20%3CFONT%20color%3D%22%23800080%22%3E%3CSTRONG%3EAzure%20Portal%3C%2FSTRONG%3E%3C%2FFONT%3E%20or%20%3CFONT%20color%3D%22%23008000%22%3E%3CSTRONG%3EPowerShell%3C%2FSTRONG%3E%20%3C%2FFONT%3Emethod%20(you%20only%20need%20to%20use%20one%20or%20the%20other%2C%20not%20both).%3C%2FP%3E%0A%3CTABLE%20width%3D%22700%22%3E%0A%3CTBODY%3E%0A%3CTR%3E%0A%3CTD%20colspan%3D%222%22%20width%3D%22616.667px%22%20height%3D%2255px%22%20class%3D%22lia-align-center%22%3ESQL%20Server%20Transparent%20Data%20Encryption%20and%20Extensible%20Key%20Management%20Using%20Azure%20Key%20Vault%20%E2%80%93%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fsql-server%2Fsql-server-transparent-data-encryption-and-extensible-key%2Fba-p%2F1427692%22%20target%3D%22_self%22%3EIntro%3C%2FA%3E%20%26nbsp%3B(this%20document)%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20colspan%3D%222%22%20width%3D%22616.667px%22%20height%3D%2255px%22%20class%3D%22lia-align-center%22%3E%0A%3CP%3E%3CFONT%20color%3D%22%23993300%22%3ESQL%20Server%20Connector%20for%20Microsoft%20Azure%20Key%20Vault%20(aka%3A%20SQL%20Server%20Connector)%20%E2%80%93%20%3CU%3EPart%3A%201%3C%2FU%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22295.556px%22%20height%3D%2230px%22%20class%3D%22lia-align-center%22%3E%0A%3CP%3E%3CFONT%20color%3D%22%23800080%22%3E%3CSTRONG%3EAzure%20Portal%20Method%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20width%3D%22321.111px%22%20height%3D%2230px%22%20class%3D%22lia-align-center%22%3E%0A%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E%3CSTRONG%3EPowerShell%20Method%3C%2FSTRONG%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22295.556px%22%20height%3D%2271px%22%3E%0A%3CP%3E%3CFONT%20color%3D%22%23800080%22%3ESet%20up%20an%20Azure%20Active%20Directory%20Service%20Principal%20%E2%80%93%20%3CU%3EPart%3A%20AP2%3C%2FU%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3CTD%20rowspan%3D%222%22%20width%3D%22321.111px%22%20height%3D%22111px%22%3E%0A%3CP%3E%3CFONT%20color%3D%22%23339966%22%3ESetup%20Azure%20Active%20Directory%20Service%20Principal%20and%20%26nbsp%3BAzure%20Key%20Vault%20(one%20script)%20%E2%80%93%20%3CU%3EPart%3A%20PS2%3C%2FU%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3CP%3E%3CFONT%20color%3D%22%23339966%22%3E%3CEM%3EThis%20script%20combines%20Part%3A%20AP2%20%26amp%3B%20Part%3AAP3%3C%2FEM%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20width%3D%22295.556px%22%20height%3D%2240px%22%3E%0A%3CP%3E%3CFONT%20color%3D%22%23800080%22%3ECreate%20an%20Azure%20Key%20Vault%20%E2%80%93%20%3CU%3EPart%3A%20AP3%3C%2FU%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3CTR%3E%0A%3CTD%20colspan%3D%222%22%20width%3D%22616.667px%22%20height%3D%2230px%22%3E%0A%3CP%20class%3D%22lia-align-center%22%3E%3CFONT%20color%3D%22%23000080%22%3EConfigure%20SQL%20Server%20TDE%20EKM%20using%20AKV%20%E2%80%93%20%3CU%3EPart%3A%204%3C%2FU%3E%3C%2FFONT%3E%3C%2FP%3E%0A%3C%2FTD%3E%0A%3C%2FTR%3E%0A%3C%2FTBODY%3E%0A%3C%2FTABLE%3E%0A%3CH2%20id%3D%22toc-hId--1350775301%22%20id%3D%22toc-hId--1350775301%22%3EConclusion%3C%2FH2%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3EConfiguring%20SQL%20Server%20TDE%20with%20EKM%20to%20use%20Azure%20Key%20Vault%20is%20a%20complex%20process%20that%20can%20be%20simplified%20using%20a%20few%20PowerShell%20and%20SQLCMD%20scripts.%3C%2FSPAN%3E%3CSPAN%20data-contrast%3D%22none%22%3E%3FPlease%20take%20your%20time%20and%20work%20though%20the%20blogs%20one%20step%20at%20a%20time.%20Skipping%20a%20step%20may%20cause%20undesirable%20results.%20Please%20share%20your%20comments%20as%20you%20work%20through%20the%20different%20parts.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335551550%26quot%3B%3A1%2C%26quot%3B335551620%26quot%3B%3A1%2C%26quot%3B335559685%26quot%3B%3A300%2C%26quot%3B335559740%26quot%3B%3A240%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3EYou%20can%20find%20the%20example%20PowerShell%20solution%20in%20the%26nbsp%3B%3C%2FSPAN%3E%3CSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3Eattached%20scripts%20below%3C%2FSPAN%3E%3C%2FSTRONG%3E%3CSPAN%20data-contrast%3D%22none%22%3E.%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335551550%26quot%3B%3A1%2C%26quot%3B335551620%26quot%3B%3A1%2C%26quot%3B335559685%26quot%3B%3A300%2C%26quot%3B335559740%26quot%3B%3A240%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20data-contrast%3D%22none%22%3ESee%20you%20at%20the%20next%20blog%20(-ERR%3AREF-NOT-FOUND-Part%3A%201)%3C%2FSPAN%3E%3CSPAN%20data-ccp-props%3D%22%7B%26quot%3B201341983%26quot%3B%3A0%2C%26quot%3B335551550%26quot%3B%3A1%2C%26quot%3B335551620%26quot%3B%3A1%2C%26quot%3B335559685%26quot%3B%3A300%2C%26quot%3B335559740%26quot%3B%3A240%7D%22%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAdrian%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESee%20Also%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%3CU%3E-ERR%3AREF-NOT-FOUND-Extensible%20Key%20Management%20Using%20Azure%20Key%20Vault%3CBR%20%2F%3E%3C%2FU%3E-ERR%3AREF-NOT-FOUND-SQL%20Server%20Connector%20Maintenance%20%26amp%3B%20Troubleshooting%3C%2FP%3E%0A%3CP%3E%3CU%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fitops-talk-blog%2Fpowershell-basics-how-to-create-an-azure-ad-app-registration%2Fba-p%2F811570%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3EPowerShell%20Basics%3A%20How%20to%20Create%20an%20Azure%20AD%20App%20Registration%3C%2FA%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EDownload%20the%20PowerShell%20and%20SQLCMD%20scripts%20here%3A%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1394193%22%20slang%3D%22en-US%22%3E%3CP%3EPart%20-%20Intro%20of%20a%204-part%20blog%20series%3A%3C%2FP%3E%0A%3CP%3ESetting%20up%20Transparent%20Data%20Encryption%20(TDE)%20and%20EKM%20(Extensible%20Key%20Management)%20to%20use%20Azure%20Key%20Vault%20(AKV)%20can%20be%20a%20complex%20process%26nbsp%3B%3CSPAN%20class%3D%22TrackChangeTextInsertion%20TrackedChange%20%20BCX0%20SCXW169968492%22%3E%3CSPAN%20class%3D%22TextRun%20%20BCX0%20SCXW169968492%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20%20BCX0%20SCXW169968492%22%3Ewhich%20has%20been%20made%20even%20more%20challenging%20due%20to%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3CSPAN%20class%3D%22TrackChangeTextInsertion%20TrackedChange%20%20BCX0%20SCXW169968492%22%3E%3CSPAN%20class%3D%22TextRun%20%20BCX0%20SCXW169968492%22%20data-contrast%3D%22auto%22%3E%3CSPAN%20class%3D%22NormalTextRun%20%20BCX0%20SCXW169968492%22%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%3C%2FSPAN%3E%20limited%20documentation%2C%20cryptic%20instructions%20and%20multiple%20steps%20using%204%20different%20products%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3ESQL%20Server%20Connector%20for%20Microsoft%20Azure%20Key%20Vault%20(aka%3A%20SQL%20Server%20Connector)%3C%2FLI%3E%0A%3CLI%3EAzure%20Active%20Directory%20(aka%3A%20AAD)%3C%2FLI%3E%0A%3CLI%3EAzure%20Key%20Vault%20(aka%3A%20AKV)%3C%2FLI%3E%0A%3CLI%3ESQL%20Server%20(SQL%20Server%202008%20or%20later)%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3EHowever%2C%20this%20blog%20will%20attempt%20to%20make%20it%20easy%20to%20setup%20TDE%20and%20EKM%20using%20Azure%20Key%20Vault%20via%20either%20the%20Azure%20Portal%20or%20PowerShell%20and%20of%20course%20SQL%20Server%20(TSQL).%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1394193%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%20Active%20Directory%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Edevelopment%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EEKM%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExtensible%20Key%20Management%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESecurity%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESQL%20Connector%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESQL%20Security%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Etde%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ETransparent%20Data%20Encryption%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Welcome to my blog series on setting up SQL Server TDE to use Azure Key Vault.

I’m a Program Manager with the Azure SQL Security Team / Product Group and I will walk you through the process of configuring the various services, features and products to encrypt your SQL Server databases.

 

Setting up TDE to use Azure Key Vault (AKV) can be a complex process which has been made even more challenging due to limited documentation, challenging online instructions and multiple steps using 4 different products:

  1. SQL Server Connector for Microsoft Azure Key Vault (aka: SQL Server Connector)
  2. Azure Active Directory (aka: AAD)
  3. Azure Key Vault (aka: AKV)
  4. SQL Server (SQL Server 2008 or later)

In this blog I will guide you through setup of TDE and Extensible Key Management (EKM) using Azure Key Vault via either the Azure Portal or PowerShell and of course SQL Server (SQLCMD).

 

[NOTE] 
This blog pertains to:
   * SQL Server On-Prem 
   * Azure SQL VM (IaaS) instances

This blog is NOT applicable for:
   * SQL Server Managed Instance (MI) 
   * Azure SQL DB (PaaS)

 

Part - Intro of a 4 part blog series:

This blog will walk you through 4 steps and two separate ways of setting up TDE using EKM (Extensible key Management) using Azure Key Vault:

Note; EKM is the model/API by which a 3rd party can register a custom provider with SQL Server to do key management. SQL Connector is the provider that you can install on your SQL Server.

 

Part 1: Install SQL Server Connector for Microsoft Azure Key Vault (aka: SQL Server Connector) (Blog Part 1)

 

Part 2: Configure Azure Active Directory (aka: AAD) - select either path (Azure Portal or PowerShell – not both)

a. Azure Portal: this path will walk through each screen in the Azure Portal (Blog Part: AP2)

or

b. PowerShell: This path will walk through each PowerShell command (Blog Part: PS2)

 

Part 3: Configure Azure Key Vault (aka: AKV)

a. Azure Portal: this path will walk through each screen in the Azure Portal (Blog Part: AP3)

or

b. PowerShell: This path will walk through each PowerShell command (Blog Part: PS2)

 

Note: The entire process can be scripted in PowerShell (including the SQL Server portion)
that takes advantage of the variables used in PowerShell that are passed on to SQLCMD.

 

Part 4: The SQL Server configuration steps are the same regardless of the method of setting up Azure Active Directory (AAD) and Azure Key Vault (AKV). Configuring SQL Server database with TDE to use Azure Key Vault will be a final blog post (Blog Part 4) that builds off the previous blogs.

EKM_Intro.png

Before You Start 

To use Azure Key Vault with your SQL Server, there are a few prerequisites:

SQL Server Version

Redistributable Install Link

2008, 2008 R2, 2012, 2014

Visual C++ Redistributable Packages for Visual Studio 2013

2016

Visual C++ Redistributable for Visual Studio 2015

 

To continue (after complying with the prerequisites):

  • Follow the Part: 1 blog that describes how to download and install the SQL Server Connector for Microsoft Azure Key Vault.
  • Next select one path to use either: 

or

    • PowerShell (Part: PS2), follow the step-by-step instructions for either option (not both).
  • Once Azure Active Directory and Azure Key Vault are setup then follow the final blog for step-by-step configuration of SQL Server TDE (Part: 4).

Next Step

Now that you have completed the basic configuration. Follow the path to either setup Azure Active Directory (AAD) and Azure Key Vault (AKV) using the Azure Portal or PowerShell method (you only need to use one or the other, not both).

SQL Server Transparent Data Encryption and Extensible Key Management Using Azure Key Vault – Intro  (this document)

SQL Server Connector for Microsoft Azure Key Vault (aka: SQL Server Connector) – Part: 1

Azure Portal Method

PowerShell Method

Set up an Azure Active Directory Service Principal – Part: AP2

Setup Azure Active Directory Service Principal and  Azure Key Vault (one script) – Part: PS2

This script combines Part: AP2 & Part:AP3

Create an Azure Key Vault – Part: AP3

Configure SQL Server TDE EKM using AKV – Part: 4

Conclusion

Configuring SQL Server TDE with EKM to use Azure Key Vault is a complex process that can be simplified using a few PowerShell and SQLCMD scripts.?Please take your time and work though the blogs one step at a time. Skipping a step may cause undesirable results. Please share your comments as you work through the different parts. 

You can find the example PowerShell solution in the attached scripts below. 

 

See you at the next blog (Part: 1) 

 

Adrian

 

See Also

Extensible Key Management Using Azure Key Vault
SQL Server Connector Maintenance & Troubleshooting

PowerShell Basics: How to Create an Azure AD App Registration

 

Download the PowerShell and SQLCMD scripts here: