fix(2-networking-a-fedramp): encrypt NVA boot disk with the vdss KMS key - #211
Open
AloysJehwin wants to merge 1 commit into
Open
fix(2-networking-a-fedramp): encrypt NVA boot disk with the vdss KMS key#211AloysJehwin wants to merge 1 commit into
AloysJehwin wants to merge 1 commit into
Conversation
The stage creates a vdss-keyring/default HSM key and grants cryptoKeyEncrypterDecrypter to the NVA service account and the VDSS host project compute service agent, but never references the key, so the NVA boot disks stay Google-managed. The IL5 stage uses the identically-named key on its bastion and NGFW disks. Fixes google#193 Signed-off-by: Aloys Jehwin <aloysjehwin@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #193
The FedRAMP High/Moderate networking stage builds a
vdss-keyringHSM key and grantsroles/cloudkms.cryptoKeyEncrypterDecrypterto both the NVA service account and the VDSS host project's compute service agent — and then nothing ever uses it. The NVA boot disks come up Google-managed, so those grants have no effect and the appliance disks aren't CMEK-encrypted.The IL5 stage next door creates the identically-named key and actually wires it up, on the bastion disks and the NGFW VMs. This just brings the a-fedramp stage in line by passing the key to the NVA template.
I used the same top-level
encryptionblock the IL5 bastion uses rather than reaching intoboot_disk, since that's the module's supported surface. Worth noting the NVA setscreate_template = true, so I checked the template path specifically —compute-vm's templatediskblock emitsdisk_encryption_key { kms_key_self_link }whenevervar.encryptionis non-null, so the boot disk does get encrypted here. (Theencrypt_bootfield on that variable is declared but never read anywhere in the module, so it doesn't gate this.)No new variables and no change to the key, keyring or IAM — the grants that were already there are what makes this work.