We use different service accounts for the different deployment environments, so Dev has Account_A and Prod has Account_B, and any test app using Account_A will not have access to Prod. Or, as another example, Account_A can have read/write permissions in Dev, but only read permissions in Prod.
Up until now there has been no source control on the database definitions, just manual scripts everywhere, and I'd like to create a SSDT solution in Azure DevOps for this. I understand how you can set up releases to handle different database names across environments (Db_Dev vs Db_Prod, for example), but I'm not able to find anything about different users & permissions across environments.
Is this possible in SSDT? As far as I can tell, I have 2 options, but I'm hoping there's a better way:
- Handle users and permissions outside of source control
- Handle them somehow in a post-deployment script.
Caveat: I'm only talking about Windows Authentication users & groups. Passwords will obviously not be going into source control.
On DevOps side, an environment is a collection of resources, such as Kubernetes clusters and virtual machines, that can be targeted by deployments from a pipeline. Typical examples of environment names are Dev, Test, QA, Staging, and Production. You can secure environments by specifying which users and pipelines are allowed to target an environment.
More details, check the following link:
https://learn.microsoft.com/en-us/azure/devops/pipelines/process/environments?view=azure-devops#security