microsoft / microsoft/sql-server-samples
Setup script in the "Always Encrypted" demo fails
Nobody has claimed this yet.
- Dominant language
- PowerShell
- Stars
- 11.2k
- Forks
- 9.1k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 14
Description
Hello,
I tried to deploy the “always encrypted with secure enclave” demo, and got two errors during running the setup script
- line 27.
$userObjectId = $(Get-AzADUser -UserPrincipalName $userName).Idalways return empty string, which will fail subsequent commands. Changing the code to$userObjectId = $(Get-AzADUser -SignedIn).Idworks. Not sure why UserPrincipalName doesn't work for me, but at least this is not blocking. - line 117.
$cmkSettings = New-SqlAzureKeyVaultColumnMasterKeySettings -KeyURL $key.Key.Kid -AllowEnclaveComputationsfails with error likeNew-SqlAzureKeyVaultColumnMasterKeySettings: The given key 'AZURE_KEY_VAULT' was not present in the dictionary.The command works if we remove the -AllowEnclaveComputations option but it is not what we want.
So I could not encrypted the columns in the table.
I tried to deploy the demo in both Mac and linux, same error. I don't have a Window machine. So I couldn't use the SSMS to configure "Always encrypted". The Azure Data Studio doesn't support configuring "Always Encrypted"
Any suggestion on how to fix the second error above?
Thanks
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with samples/features/security/always-encrypted-with-secure-enclaves/azure-sql-database/setup/setup.ps1 and reproduce the failures at lines 27 and 117 on the affected platforms. Check the referenced Az and SQL Azure Key Vault commands first; done means the setup script completes and the demo columns can be encrypted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, powershell, sql
- Domain
- cloud, databases, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100