MWI: Fix certificate parsing in tbot identity facade's Expiry()#57063
Merged
timothyb89 merged 1 commit intomasterfrom Jul 23, 2025
Merged
MWI: Fix certificate parsing in tbot identity facade's Expiry()#57063timothyb89 merged 1 commit intomasterfrom
Expiry()#57063timothyb89 merged 1 commit intomasterfrom
Conversation
The `Expiry()` function was trying to parse DER-encoded data in the `tls.Certificate` as PEM, causing a silent failure. This method was not used until #56927 but failed every time as it was trying to parse certificates using the wrong encoding type.
This was referenced Jul 23, 2025
strideynet
approved these changes
Jul 23, 2025
boxofrad
approved these changes
Jul 23, 2025
timothyb89
added a commit
that referenced
this pull request
Jul 23, 2025
The `Expiry()` function was trying to parse DER-encoded data in the `tls.Certificate` as PEM, causing a silent failure. This method was not used until #56927 but failed every time as it was trying to parse certificates using the wrong encoding type.
timothyb89
added a commit
that referenced
this pull request
Jul 23, 2025
The `Expiry()` function was trying to parse DER-encoded data in the `tls.Certificate` as PEM, causing a silent failure. This method was not used until #56927 but failed every time as it was trying to parse certificates using the wrong encoding type.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 23, 2025
…57060) * MWI: Fall back to registering without an existing auth client This tweaks joining logic to allow clients that provided an existing auth client (i.e. bots, used to verify bot instance IDs between cert refreshes) to fall back to not using that auth client if said client appears to be broken. It attempts to perform a ping, and if the ping fails, proceeds as if no existing client was provided. * Explicitly check for an expired identity during renewal This adds an explicit check for an expired identity during renewal. If expired, the existing auth client will not be used. * Revert changes to the join client * Linter appeasement * Tweak warning message on expired identity renewal * Add note about future improvements and tweak logged warning * MWI: Fix identity facade's `Expiry()` certificate parsing (#57063) The `Expiry()` function was trying to parse DER-encoded data in the `tls.Certificate` as PEM, causing a silent failure. This method was not used until #56927 but failed every time as it was trying to parse certificates using the wrong encoding type.
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 28, 2025
…57062) * MWI: Fall back to registering without an existing auth client This tweaks joining logic to allow clients that provided an existing auth client (i.e. bots, used to verify bot instance IDs between cert refreshes) to fall back to not using that auth client if said client appears to be broken. It attempts to perform a ping, and if the ping fails, proceeds as if no existing client was provided. * Explicitly check for an expired identity during renewal This adds an explicit check for an expired identity during renewal. If expired, the existing auth client will not be used. * Revert changes to the join client * Linter appeasement * Tweak warning message on expired identity renewal * Add note about future improvements and tweak logged warning * MWI: Fix identity facade's `Expiry()` certificate parsing (#57063) The `Expiry()` function was trying to parse DER-encoded data in the `tls.Certificate` as PEM, causing a silent failure. This method was not used until #56927 but failed every time as it was trying to parse certificates using the wrong encoding type.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Expiry()function was trying to parse DER-encoded data in thetls.Certificateas PEM, causing a silent failure. This method was evidently not used until #56927 but failed every time as it was trying to parse certificates using the wrong encoding type.Backport note: I'll manually cherry pick this into #57060 and #57062