Skip to content
New issue

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

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

Already on GitHub? # to your account

Question about secret lifetime in "Enforce recommended guardrails for Azure Key Vault" initiative #1855

Open
jdrepo opened this issue Dec 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jdrepo
Copy link

jdrepo commented Dec 4, 2024

Describe the bug

I've a question about the secret validty handling in the "Enforce recommended guardrails for Azure Key Vault" policy initiative
As far as I can see and understand the following parameters are both set to the value "90"

  • secretsActiveInDays: 90 days
    This parameter denies the creation of a secret with a lifetime greater than 90 days ( (PolicyDefinitionRefrence Id: Deny-KV-Secret-ActiveDays )

  • minimumSecretsLifeDaysBeforeExpiry: 90 days (PolicyDefinitionRefrence Id: KvSecretsLifetime)
    This parameter audits the lifetime of a secret which lifetime is shorter than 90 days (PolicyDefinitionRefrence Id: KvSecretsLifetime)
    BTW: The parameter description doesn´t fit, seems to me copy from another parameter ?

So if I deploy this policy initiative I will never be able to create a compliant secret ?

Screenshots

@jdrepo jdrepo added the bug Something isn't working label Dec 4, 2024
@Springstone
Copy link
Member

@jdrepo it can be confusing :)
We default to the policy default parameter values provided by the authors, and the intent is that customer customize these according to their organization/workload requirements.
In this yes, you can still deploy a secret (with an expiry date of less than 90 days), but the second parameter will automatically flag as not compliant, as this serves as a reminder to renew the secret before expiry.

It doesn't break anything, but you are right, you would probably not want to leave the values as they are :)

We considered reducing the minimumSecretsLifeDaysBeforeExpiry to 30 days, but decided against, as most organizations do not regularly review policy compliance as part of operations.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants