Repository navigation
[2.0] Fixes #37056: keep expired IdP certificates at startup and the SAML browser callback (backport #38219) - #38441
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved 🔴 High risk 1 closed / 1 findingsKeeping expired IdP signing certificates trusted at runtime changes the SAML authentication boundary, so retired keys could continue authenticating users. Keeps expired IdP certificates at server startup and separates the SAML browser callback from the ACS URL on save, with a configured authorizer class and request filter now preserved. Resolved the case where an already-corrupted config kept the ACS URL as the browser callback on re-save. No open issues found. ✅ 1 closed✅ Bug: Already-corrupted configs keep ACS URL as browser callback on re-save
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
Describe your changes:
Fixes #37056
This brings the last SAML fixes from #38219 to the 2.0 branch. #38197 already backported an earlier version of #38219, so 2.0 still has two problems that main and 2.1 (#38302) no longer have:
/api/v1/saml/acs(the yaml default), a login started without a redirect parameter ended on that servlet, which only accepts POST.Changes, cherry-picked from #38219:
Adapted for 2.0:
EmailFirstUserProvisionerandit-it.jsonparts were dropped (not on 2.0).TestLoginAccountChecksandTestLoginServicekeep 2.0's versions (main only addedfinal).mockStaticforSecurityConfigurationManager, since 2.0 has nosetCurrentAuthConfig.SSO.constant.test.ts, so that is the file updated.Added after review (main: #38488): a callback saved as the ACS URL is replaced on save (base path kept), and the form no longer changes the saved snapshot, so the repair reaches the PATCH, and a custom authorizer is no longer reset. The
idpX509Certificatedescription says expired keys stay trusted.Related: #38317 (2.0.10 migration and IdP certificate check) touches the same files; whichever merges second may need a rebase.
Type of change:
High-level design:
Cherry-pick of the final fix commit and the test fix from #38219, with the adaptations above.
Tests:
Unit tests
SamlSettingsHolderTest(newinitializesLiveSettingsWhenAllSavedIdpCertificatesHaveExpired,preservesExplicitlyConfiguredKeysAtRuntime),SSOUtils.test.ts,SSO.constant.test.ts.SamlSettingsHolderTest,SamlValidatorTest,SamlResponseValidatorTest, allTestLogin*Test,QueryCostRecordIndexTest,BasicAuthenticatorConfirmationTest: 175 tests, all passing.SettingsSsoandSSOUtilsJest, 407 passing; the callback cases fail without the fix.Integration, ingestion and Playwright tests: not applicable.
UI screen recording / screenshots:
Not applicable: only the label of an existing field is translated.
Checklist:
Fixes #37056above.Summary by Gitar
classNameandcontainerRequestFilterincleanupAuthorizerConfigThis will update automatically on new commits.


Confidence Score: 5/5
The PR appears safe to merge; no new blocking issues were found.Summary
The PR keeps configured SAML signing certificates available at startup and separates the browser callback from the ACS URL.
No new actionable issues were found in the changes since the previous review. Keeping expired signing keys is intentional: manerow explains that administrators must remove retired keys explicitly.
Reviews (10) · Last reviewed commit: "Keep a configured authorizer class and r..." · Reviewed by Greptile