inspec / inspec-azure

InSpec Azure Resource Pack
https://www.inspec.io/
Other
97 stars 80 forks source link

Adding Logging Enabled Check to Azure Key Vault #644

Closed jnikles1 closed 2 years ago

jnikles1 commented 2 years ago

Signed-off-by: Justin Nikles justin.nikles@sap.com

Description

Adds a check specifically for the AuditEvent log setting, which is set to true when logging is enabled https://docs.microsoft.com/en-us/azure/key-vault/general/howto-logging?tabs=azure-cli#enable-logging

Issues Resolved

List any existing issues this PR resolves, or any Discourse or StackOverflow discussion that's relevant

Check List

jnikles1 commented 2 years ago

the diagnostic_settings_logs method doesn't sufficiently report whether logging is enabled or not. If any setting in the log block that is returned is not enabled (whether it signals that logging is enabled or not) the array reports a false flag. For this reason, the additional method was added to specifically check the field which signals that logging is enabled.

jnikles1 commented 2 years ago

hi @sathish-progress - thanks for the suggestion. It's now implemented as suggested