Fix MSSQL compatibility with Azure SQL#11555
Conversation
Removes a query from the MSSQL plugin that checks that a Server Login exists before attempting to change its password. This behavior is incompatible with SQL Server instances that rely on contained users and that do not allow cross-database queries, as is the case with Azure SQL Databases. The deletion of this query does not materially impact the behavior, as attempting to change the password for an inexistent login (on a regular SQL Server instance) will result in an error message that states that the user either does not exist (or the Vault user does not have permission to change its password). If the Vault user is a contained user, then the "root rotation statements" parameter can be modified to alter the password of a `user` rather than a `login` (`ALTER USER vault WITH PASSWORD ...`). Fixes hashicorp#10806
|
@austingebauer Any chance you could get this reviewed/merged? (We're still on v1.4.7, which has a couple of vulnerabilities, because later versions can't currently handle rotation of MSSQL contained users' credentials. It corrects a change introduced with #9062) |
|
Hi, @g-psantos. Thanks for making me aware of this issue and opening a PR. I will be having a look at this. |
|
Hi @g-psantos, Thanks for opening the issue and the PR! A PR to include support for contained DBs in root rotation and lease revocation was recently put up here: #12839 This PR includes support for contained DBs in the MSSQL plugin, and based on a |
…to release/1.21.x+ent into ce/release/1.21.x (hashicorp#11555) * [VAULT-41294] docker: build OCI container images (hashicorp#11545) (hashicorp#11553) This change does a few things that might not be obvious: - We stop requesting the previous runner image. This will result in us using Docker 29 instead of 28. With this comes changes in our container build system, most notably that container images are now exported as OCI images. Every container runtime that we support also supports OCI images so this ought to have no meaningful impact to downstream users. One noticeable change is that the image layers are now compressed so the final image size on disk will be considerably smaller than before. - Upgrade `hashicorp/action-setup-enos` to the latest version. This is not strictly required for this change but as we just released a new version of the CLI it makes sense to update it here. We should also note that recently we released a new version of `terraform-provider-enos` which contains necessary for this change as our docker and kind resources needed to be updated handle OCI and Docker exported images. Previously they relied on files that existed only in Docker images. Signed-off-by: Ryan Cragun <me@ryan.ec> Co-authored-by: Ryan Cragun <me@ryan.ec>
Fixes #10806
Removes a query from the MSSQL plugin that checks that a Server Login exists before attempting to change its password. This behavior is incompatible with SQL Server instances that rely on contained users and that do not allow cross-database queries, as is the case with Azure SQL Databases.
Additionally, some other engines (such as MySQL) do not check that a user exists before attempting to change its password, which suggests that this behavior is not essential.
The deletion of this query does not materially impact the behavior, as attempting to change the password for a nonexistent login (on a regular SQL Server instance) will result in an error message:
If the Vault user is a contained user, then the "root rotation statements" parameter can be modified to alter the password of a
userrather than alogin: