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

[AVM Module Issue]: Key Vault Secret Reference for Domain Join Extension #4110

Open
1 task done
Rembrandtastic opened this issue Dec 30, 2024 · 6 comments
Open
1 task done
Assignees
Labels
Class: Resource Module 📦 This is a resource module Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Security Bug 🔒 This is a security bug

Comments

@Rembrandtastic
Copy link

Check for previous/existing GitHub issues

  • I have checked for previous/existing GitHub issues

Issue Type?

Security Bug

Module Name

avm/res/compute/virtual-machine

(Optional) Module Version

No response

Description

Currently when trying to pass key vault secret references for the domain join extension into the Virtual Machine module I am given the error that this parameter is not using a secure decorator which is required for the getSecret function. This means I cannot use the domain join extension as my sensitive domain account needs to be referenced from a key vault.

Image

(Optional) Correlation Id

No response

@Rembrandtastic Rembrandtastic added Needs: Triage 🔍 Maintainers need to triage still Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue labels Dec 30, 2024

Important

The "Needs: Triage 🔍" label must be removed once the triage process is complete!

Tip

For additional guidance on how to triage this issue/PR, see the BRM Issue Triage documentation.

Copy link

@Rembrandtastic, thanks for submitting this issue for the avm/res/compute/virtual-machine module!

Important

A member of the @Azure/avm-res-compute-virtualmachine-module-owners-bicep or @Azure/avm-res-compute-virtualmachine-module-contributors-bicep team will review it soon!

@AlexanderSehr
Copy link
Contributor

AlexanderSehr commented Dec 30, 2024

Hey @Rembrandtastic,
isn't the module expecting set password via the @secure extensionDomainJoinPassword parameter?

@description('Optional. Required if name is specified. Password of the user specified in user parameter.')
@secure()
param extensionDomainJoinPassword string = ''
@description('Optional. The configuration for the [Domain Join] extension. Must at least contain the ["enabled": true] property to be executed.')
@secure()
param extensionDomainJoinConfig object = {}

being used here:

module vm_domainJoinExtension 'extension/main.bicep' = if (contains(extensionDomainJoinConfig, 'enabled') && extensionDomainJoinConfig.enabled) {
name: '${uniqueString(deployment().name, location)}-VM-DomainJoin'
params: {
virtualMachineName: vm.name
name: 'DomainJoin'
location: location
publisher: 'Microsoft.Compute'
type: 'JsonADDomainExtension'
typeHandlerVersion: extensionDomainJoinConfig.?typeHandlerVersion ?? '1.3'
autoUpgradeMinorVersion: extensionDomainJoinConfig.?autoUpgradeMinorVersion ?? true
enableAutomaticUpgrade: extensionDomainJoinConfig.?enableAutomaticUpgrade ?? false
settings: extensionDomainJoinConfig.settings
supressFailures: extensionDomainJoinConfig.?supressFailures ?? false
tags: extensionDomainJoinConfig.?tags ?? tags
protectedSettings: {
Password: extensionDomainJoinPassword
}
}
dependsOn: [
vm_aadJoinExtension
]
}

@AlexanderSehr
Copy link
Contributor

AlexanderSehr commented Dec 30, 2024

I think part of the challenge is that there is no User-defined type for the extension - and to make matters worse also not example in the max tests as there is no domain we could 'test join' the deployed VM to.
Any ideas how we could maybe work around this limitation @rahalan?

At least a UDT 'should' be possible.

Warning

Tagging the AVM Core Team (@Azure/avm-core-team-technical-bicep) due to a module owner or contributor having not responded to this issue within 3 business days. The AVM Core Team will attempt to contact the module owners/contributors directly.

Tip

  • To prevent further actions to take effect, the "Status: Response Overdue 🚩" label must be removed, once this issue has been responded to.
  • To avoid this rule being (re)triggered, the ""Needs: Triage 🔍" label must be removed as part of the triage process (when the issue is first responded to)!

@microsoft-github-policy-service microsoft-github-policy-service bot added the Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days label Jan 3, 2025
@rahalan rahalan removed Needs: Triage 🔍 Maintainers need to triage still Status: Response Overdue 🚩 When an issue/PR has not been responded to for X amount of days labels Jan 5, 2025
@rahalan
Copy link
Contributor

rahalan commented Jan 5, 2025

@Rembrandtastic thanks, will look into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Class: Resource Module 📦 This is a resource module Type: AVM 🅰️ ✌️ Ⓜ️ This is an AVM related issue Type: Security Bug 🔒 This is a security bug
Projects
Status: Needs: Triage
Development

No branches or pull requests

3 participants