DRIVERS-2987 Restrict access to Azure VMs #514
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Restrict access to Azure VMs. Resolves DRIVERS-2987.
Tested CSFLE with C driver: https://spruce.mongodb.com/version/66fc4490ce827200070347f9
Tested CSFLE+OIDC with Go driver: https://spruce.mongodb.com/patch/66fc50fb3bc93e0007ef36a2
Background & Motivation
azure vm create documents:
Though the private SSH key is expected to be secured, this PR disables the default open port to follow recommendations noted in DRIVERS-2987.
Every script that may
ssh
to the Azure VM sets the IP of the network security group. I expect the setup script (create-and-setup-vm.sh
) may run on a different Evergreen host scripts used to test (run-command.sh
) if Evergreen task groups are used.After setting an IP, the
retry-with-backoff.sh
script is to wait untilssh
succeeds. The defaultATTEMPTS
was increased to 10 due to an observed failure on retry.Adding
-n
tossh
The
-n
parameter is added tossh
commands to prevent reading from stdin.This appears to solve an observed issue testing with the C driver: The
shell.exec
would abruptly stop after running an Azure KMS script. Example logs indicate:https://docs.devprod.prod.corp.mongodb.com/evergreen/Project-Configuration/Project-Commands#shellexec notes: