Monitoring key vault secret/cert expiry

Dan 176 Reputation points
2023-09-01T11:50:59.8166667+00:00

Hi,

I am currently looking into configuring alerting for some key vaults when certs/secrets etc are close to expiry. I am currently looking at the solution presented here: https://learn.microsoft.com/en-us/azure/key-vault/general/event-grid-logicapps

This seems like a really great solution, but what I am currently struggling with is how to manage this at scale. Do I really need to create a new event topic and logic app for each new key vault that is deployed? Or is there a way to configure this in such a way that all key vaults can send data to the same event grid topic and the single logic app will pick this up?

I'm really hoping I am missing something simple here.

If this is the case and there is no way to deploy this at scale, does anyone know of a suitable solution for this? My other thoughts were a PowerShell function that would query the secrets etc and add the details to a log analytics table, which could then use azure monitor to Alert.

Either way these seem far to complex for something that should be quite simple.

Thanks!

Azure Key Vault
Azure Key Vault
An Azure service that is used to manage and protect cryptographic keys and other secrets used by cloud apps and services.
1,150 questions
Azure Event Grid
Azure Event Grid
An Azure event routing service designed for high availability, consistent performance, and dynamic scale.
325 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Stanislav Zhelyazkov 21,521 Reputation points MVP
    2023-09-01T12:06:42.7966667+00:00

    Hi,

    I do not know what this logic app offers but have you looked at using Azure Policy? Using Policy data in Azure resource graph you can create alerts.

    Please "Accept the answer" if the information helped you. This will help us and others in the community as well.