You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
This issue applies to standalone DSC, not the OMS build.
To replicate the issue:
Use the most recent version of the Azure DSC VM extension to register a VM with an Azure Automation DSC pull server
Assign to the node a DSC mof which uses a custom resource
The configuration will fail, and checking /var/opt/omi/log/dscdetailed.log will reveal the error is caused by signature validation failing on the custom resource
Based on the code in dsc/engine/ca/CAInfrastructure/WebPullClient.c it looks like this behavior is not intentional:
Note that the default behavior, if BUILD_OMS is not defined, is to not validate module signatures. This makes sense because I believe it matches the Windows DSC behavior, and also the DSC extension does not provide any method of importing a PGP key to the DSC keychain, so it would be difficult to use custom resources if the default behavior was to validate signatures. Somehow though the default behavior is to validate signatures, even though using the DSC extension to register a node to a pull server results in DisableModuleSignatureValidation = NULL in the metaconfig. If I had to guess, I'd say that MI_Instance_GetElement is actually returning MI_RESULT_OK even if DisableModuleSignatureValidation = NULL, and value.boolean == MI_FALSE in this case. However, there is no code to handle value.boolean == MI_FALSE, so the value of verifyFlag is never set beyond its initialization. You can see that verifyFlag is properly initialized, and it is set to "1", which is sensible in a way because that's secure by default.
This default behavior looks unintentional, and it is a problem for my team because we need to use custom resources with DSC for Linux. Apart from custom resources just being useful in some respects, we need to use them because the builtin nxScript resource will break on hardened images (since it tries to execute a script in /tmp, which for security reasons is mounted as noexec on hardened images).
Just let me know if you have any questions.
Thanks,
Matthew
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This issue applies to standalone DSC, not the OMS build.
To replicate the issue:
Based on the code in dsc/engine/ca/CAInfrastructure/WebPullClient.c it looks like this behavior is not intentional:
Note that the default behavior, if BUILD_OMS is not defined, is to not validate module signatures. This makes sense because I believe it matches the Windows DSC behavior, and also the DSC extension does not provide any method of importing a PGP key to the DSC keychain, so it would be difficult to use custom resources if the default behavior was to validate signatures. Somehow though the default behavior is to validate signatures, even though using the DSC extension to register a node to a pull server results in DisableModuleSignatureValidation = NULL in the metaconfig. If I had to guess, I'd say that MI_Instance_GetElement is actually returning MI_RESULT_OK even if DisableModuleSignatureValidation = NULL, and value.boolean == MI_FALSE in this case. However, there is no code to handle value.boolean == MI_FALSE, so the value of verifyFlag is never set beyond its initialization. You can see that verifyFlag is properly initialized, and it is set to "1", which is sensible in a way because that's secure by default.
This default behavior looks unintentional, and it is a problem for my team because we need to use custom resources with DSC for Linux. Apart from custom resources just being useful in some respects, we need to use them because the builtin nxScript resource will break on hardened images (since it tries to execute a script in /tmp, which for security reasons is mounted as noexec on hardened images).
Just let me know if you have any questions.
Thanks,
Matthew
The text was updated successfully, but these errors were encountered: