GoogleCloudPlatform / policy-library

A library of constraint templates and sample constraints for Constraint Framework tools
Apache License 2.0
223 stars 129 forks source link

Service Account Key Age policy has a bug #413

Open hussainak opened 2 years ago

hussainak commented 2 years ago

Google SA keys have an expiration for year 10,000. The rego for https://github.com/GoogleCloudPlatform/policy-library/blob/master/policies/templates/gcp_iam_restrict_service_account_key_age_v1.yaml uses time.parse_rfc3339_ns method that does not work beyonf the year 2600ish. Please see the fix below:

https://play.openpolicyagent.org/p/cbOS7WYfnC