Fix certificate reload logic to only trigger on certificate-specific errors#3653
Fix certificate reload logic to only trigger on certificate-specific errors#3653
Conversation
…rrors Co-authored-by: jmprieur <[email protected]>
Co-authored-by: jmprieur <[email protected]>
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Outdated
Show resolved
Hide resolved
bgavrilMS
left a comment
There was a problem hiding this comment.
I recommend fixing the infinite loop instead. Retrying the cert once on a generic error seems ok.
|
Not instead. In addition: We got customer complains for retrying for a client secret. |
|
@tlupes - is this change is compatible with the new credential? I am ok to sign off if this is true. |
There is a detailed issue for that.#3654 |
…rtificateErrorCodes) for maintainability. Addresses PR feedback from Tom (#3653).
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.Identity.Web.TokenAcquisition/TokenAcquisition.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: bgavrilMS <[email protected]>
jmprieur
left a comment
There was a problem hiding this comment.
@copilot this is great.
Please rename CertificateNotWithinValidityPeriod to ClientAssertionContainsInvalidSignature (See https://github.com/AzureAD/microsoft-identity-web/pull/3653/changes#r2619663075 for context) and we will be done
…nvalidSignature Co-authored-by: jmprieur <[email protected]>
Renamed |
src/Microsoft.Identity.Web.TokenAcquisition/PublicAPI/net10.0/InternalAPI.Shipped.txt
Outdated
Show resolved
Hide resolved
neha-bhargava
left a comment
There was a problem hiding this comment.
Looks good. The new API/ Variable should only be added to the Unshipped file.
Fix Certificate Reload Logic for Invalid Client Errors
Changes Made
CertificateNotWithinValidityPeriodtoClientAssertionContainsInvalidSignatureLatest Update
Renamed the constant
CertificateNotWithinValidityPeriodtoClientAssertionContainsInvalidSignatureto better reflect that AADSTS7000274 indicates an invalid signature in the client assertion, aligning with the naming convention used for other certificate-related error codes.This ensures case-insensitive error code matching across all target frameworks and uses more accurate naming for the error codes.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.