New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search SubjectAlternativeNames when finding cert #529
Conversation
remove expired cert check as we don't need it now we have a cert status filter, add tests
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
} | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed the code around checking for expired certs because we don't need it with the cert status filter on line 6. Then I refactored what was left of the code.
I completely removed the call to describeCertificate
because I realised all the details are already available from the summary list, so the extra API call is redundant.
for (const currCert of certificates) { | ||
const allDomainsForCert = [ | ||
currCert.DomainName, | ||
...(currCert.SubjectAlternativeNameSummaries || []), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is where we include alt names in the search.
return; | ||
} | ||
throw new Error("Programmer error: didn't add new test mock data"); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't need this because it was related to the separate API call to check expiries.
Fixes (no ticket)
Description of Issue Fixed
Changes proposed in this pull request: