Back to Checks
License keys are not expired
licenses_not_expired
Service: licensesSeverity: critical
Categories:resilience
Resource Type:License
VCF license keys are active and have not expired, keeping licensed components operational.
Risk
Expired licenses may prevent deployment of new workloads, block upgrades, and put the environment into a non-compliant state, breaking availability of licensed features.
Run this check with Prowler
Run in Prowler CloudInstall
pip install --extra-index-url https://__token__:${PROWLER_REGISTRY_DOWNLOAD_API_KEY}@registry.prowler.com/simple/ "prowler-provider-vcf[runtime]"Run
prowler vcf --checks licenses_not_expiredRecommendation
Renew expired license keys immediately to restore full functionality and stay compliant with VMware / Broadcom licensing terms.
Remediation
Other
1Renew or replace expired license keys in the **SDDC Manager** UI under **Administration > Licensing**, or call `POST /v1/license-keys` on the VCF API.
Check Code
from datetime import datetime, timezone
from prowler.lib.check.models import Check
from prowler_provider_vcf.check_report import CheckReportVCF
from prowler_provider_vcf.services.licenses.licenses_client import licenses_client
class licenses_not_expired(Check):
def execute(self) -> list[CheckReportVCF]:
findings = []
now = datetime.now(timezone.utc)
for lic in licenses_client.licenses:
report = CheckReportVCF(
metadata=self.metadata(),
resource=lic,
)
if lic.status.upper() == "EXPIRED":
report.status = "FAIL"
report.status_extended = (
f"License {lic.name} ({lic.product_type}) has EXPIRED status."
)
elif lic.expiration_date and lic.expiration_date < now:
report.status = "FAIL"
report.status_extended = (
f"License {lic.name} ({lic.product_type}) expired on "
f"{lic.expiration_date.strftime('%Y-%m-%d')}."
)
else:
report.status = "PASS"
if lic.expiration_date:
report.status_extended = (
f"License {lic.name} ({lic.product_type}) is valid until "
f"{lic.expiration_date.strftime('%Y-%m-%d')}."
)
else:
report.status_extended = f"License {lic.name} ({lic.product_type}) has no expiration (perpetual)."
findings.append(report)
return findings