Skip to content

fix: use exact, case-insensitive CA name matching for signed certificate lookups - #1235

Merged
peterhaochen47 merged 2 commits into
mainfrom
TNZGOV-15664-exact-match-ca-name
Nov 18, 2026
Merged

peterhaochen47 merged 2 commits into
mainfrom
TNZGOV-15664-exact-match-ca-name

Conversation

@peterhaochen47

Copy link
Copy Markdown
Member

findAllCertificateCredentialsByCaName looks up certificates by an exact CA name, so compare with = instead of LIKE, consistent with the other exact name lookups.

findAllCertificateCredentialsByCaName looks up certificates by an exact
CA name, so compare with = instead of LIKE, consistent with the other
exact name lookups.
@peterhaochen47
peterhaochen47 force-pushed the TNZGOV-15664-exact-match-ca-name branch from 9a1a7ff to 6175ef5 Compare November 16, 2026 23:05
Comment on lines 95 to 99

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

most likely an issue pre-dating this fix, this .remove(caName) is not case-insensitive. Could potentially not remove the originating CA from the list.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch! it's unrelated to this PR, but we can address it along the way since its small, pushed an additional commit.

The CA name lookup is case-insensitive, but the CA itself was removed
from the results with a case-sensitive match, so a CA name given in
different casing could be listed among its own signed certificates.
@peterhaochen47 peterhaochen47 changed the title refactor: use equality for certificate lookup by CA name fix: use exact, case-insensitive CA name matching for signed certificate lookups Nov 17, 2026

@dlinsley dlinsley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for adding tests as well.

@github-project-automation github-project-automation Bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Nov 17, 2026
@peterhaochen47
peterhaochen47 merged commit 17c9bb7 into main Nov 18, 2026
2 checks passed
@github-project-automation github-project-automation Bot moved this from Pending Merge | Prioritized to Done in Foundational Infrastructure Working Group Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants