Skip to content

Commit f314a08

Browse files
authored
Merge pull request Netflix#5330 from jtschladen/jschladen/fix-tag-check
Fix check for tags in IAM certs
2 parents 02e1c69 + da88661 commit f314a08

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lemur/plugins/lemur_aws/iam.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,15 @@ def _filter_ignored_certificates(certificates, **kwargs):
288288
filtered_certificates = []
289289

290290
for cert in certificates:
291-
# Get the ARN for the certificate
292-
cert_arn = cert.get("ServerCertificateMetadata", {}).get("Arn")
293-
if not cert_arn:
291+
# Get the certificate name for the certificate
292+
cert_name = cert.get("ServerCertificateMetadata", {}).get("ServerCertificateName")
293+
if not cert_name:
294294
filtered_certificates.append(cert)
295295
continue
296296

297297
try:
298298
# Get tags for the certificate
299-
tags_response = client.list_tags_for_resource(ResourceName=cert_arn)
299+
tags_response = client.list_server_certificate_tags(ServerCertificateName=cert_name)
300300
tags = tags_response.get("Tags", [])
301301

302302
# If the certificate has any ignore tags, skip it

0 commit comments

Comments
 (0)