Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #3625 - Added CMK encryption properties and updated RSV module version to latest stable release #3821

Open
wants to merge 36 commits into
base: main
Choose a base branch
from

Conversation

alexanderojala
Copy link
Contributor

@alexanderojala alexanderojala commented Nov 20, 2024

Description

Pipeline Reference

Pipeline
avm.res.recovery-services.vault

Type of Change

  • Update to CI Environment or utilities (Non-module affecting changes)
  • Azure Verified Module updates:
    • Bugfix containing backwards-compatible bug fixes, and I have NOT bumped the MAJOR or MINOR version in version.json:
      • [X ] Someone has opened a bug report issue, and I have included "Closes #{bug_report_issue_number}" in the PR description.
      • The bug was found by the module author, and no one has opened an issue to report it yet.
    • Feature update backwards compatible feature updates, and I have bumped the MINOR version in version.json.
    • Breaking changes and I have bumped the MAJOR version in version.json.
    • Update to documentation

Checklist

  • I'm sure there are no other open Pull Requests for the same update/change
  • I have run Set-AVMModule locally to generate the supporting module files.
  • My corresponding pipelines / checks run clean and green without any errors or warnings

@alexanderojala alexanderojala marked this pull request as ready for review November 20, 2024 18:41
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: Triage 🔍 Maintainers need to triage still label Nov 20, 2024
@alexanderojala alexanderojala requested review from a team as code owners November 20, 2024 18:41
@microsoft-github-policy-service microsoft-github-policy-service bot added the Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue label Nov 20, 2024
@avm-team-linter avm-team-linter bot added the Needs: Core Team 🧞 This item needs the AVM Core Team to review it label Nov 20, 2024
Copy link
Contributor

@ReneHezser ReneHezser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution. Can you please add user defined types for the newly introduced parameters, which are currently of type object?

@alexanderojala
Copy link
Contributor Author

@ReneHezser updated now

@AlexanderSehr
Copy link
Contributor

Great contribution @alexanderojala. I guess we could also link the PR to [this] issue: #3625

Added a few comments - with only the CMK one being somewhat more complex if it's the first time. Just let me know if I can be of any help (:

useSystemAssignedIdentity: empty(customerManagedKey.?userAssignedIdentityResourceId)
}
keyVaultProperties: {
keyUri: cMKKeyVault.properties.vaultUri
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to be an interesting case. @alexanderojala correct me if I'm wrong, but I read the docs like the implementation can only do auto-key-rotation and you cannot actually specify a specific key version. If the case, we actually may need a different, simplified, interface. The current one. customerManagedKeyWithAutoRotateType, would seemingly allow a user to disable the auto-key-rotation, even though the code in the module actually cannot handle that case.
@eriqua, thoughts?

If my assumption is correct, we'd just need another interface that would contain the key & key vault reference, as well as the managed identity...

Copy link
Contributor

@AlexanderSehr AlexanderSehr Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet solved 😉 Please only resolve comments if they're code suggestions. For any other, ideally the reviewer resolves them to enable a re-review. Otherwise it's a bit hard to tell what and what does not need another look.

@alexanderojala
Copy link
Contributor Author

@AlexanderSehr i have updated the CMK settings and pipeline seems to run fine now. Could you kindly review the changes?

@@ -411,6 +437,44 @@ output privateEndpoints array = [
// Definitions //
// =============== //

type customerManagedKeyType = {
Copy link
Contributor

@AlexanderSehr AlexanderSehr Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not remotely aligned with the AVM Interface for CMK: https://azure.github.io/Azure-Verified-Modules/specs/bcp/res/interfaces/#customer-managed-keys

We have a few options here. One would be that you try and merry to expectations of the RSV with the AVM interface to use the same. Next would be that I try to suggest a code change from the top of my head as part of this PR which would need to be tested and finished. Another would be that we merge this PR into a temporal branch in upstream, I apply the updates, open a new PR and have you check the changes. Last but not least, you could give me permissions in your fork to create branches and I could do the same there.
In any case, as it is right now, it is unfortunately not aligned and definitely should before the module is published. From the looks of it, there should be a fair change that we could use a variant of the AVM interface and just throw some properties out for this implementation (e.g., the key version).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much appreciated for the help, i will add you to my fork.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks @alexanderojala. I'll get to it asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Core Team 🧞 This item needs the AVM Core Team to review it Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue
Projects
None yet
3 participants