Skip to content

feat(frontend): validate SAML certificate via backend dry run (#4739) - #4938

Merged
ishaiboro merged 1 commit into
release-3.0from
saml-certificate-dryrun-release-3.0
Nov 12, 2026
Merged

ishaiboro merged 1 commit into
release-3.0from
saml-certificate-dryrun-release-3.0

Conversation

@ishaiboro

Copy link
Copy Markdown
Contributor

Backport of #4739 to release-3.0.

Replaces the client-side SAML certificate validation with the backend dry run (POST /api/v1/idps for a new IdP, PUT /api/v1/idps/{alias} for an existing one). The server's expiration date and errors are shown in the UI, and nothing is saved while validating. Removes the node-forge dependency.

The backend side is already on release-3.0 (#4741 and the nil-error validation response). The cherry-pick applied cleanly. vue-tsc passes and the related tests pass (90).

Closes #4133

🤖 Generated with Claude Code

* feat(frontend): validate SAML certificate via backend dry run

Replace client-side certificate parsing in the SAML settings with the
identity-manager dryRun validation, and show the returned expiration
details and validation errors in the UI.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* feat(frontend): use update dry run when validating an existing SAML IdP

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* refactor(frontend): route SAML dry-run validation through idpCommon

Move the dry-run result mapping into idpCommon.validateSamlMetadata so the
SAML fields component and the onboarding step share one seam, fix the
onboarding tests that still mocked the removed client-side helper, and
drop the now unused client-side certificate parser.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* feat(frontend): always validate SAML metadata with the update dry run

A rejected update still returns the parsed config with the certificate
expiration date, while a rejected create returns only an error message.
Validate new and existing IdPs through PUT with dryRun so the date is
always available.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* fix(frontend): don't flash a certificate error while SAML metadata is validating

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* feat(frontend): validate new SAML IdPs with POST dry run and existing ones with PUT

The backend now returns the parsed config with the certificate expiration
date for a rejected create as well, so both endpoints behave the same.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* chore(frontend): remove unused node-forge dependencies

They were only used by the removed client-side certificate parser.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* chore(frontend): trim comments to the non-obvious why

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* fix(frontend): keep backend rejections for unexpired certificates and ignore the zero expiration date

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* fix(frontend): address review feedback on SAML certificate dry run

Skip the dry run for stored metadata on mount, handle file read errors,
stop treating an unknown expiration date as expired, and align with
existing helpers and model naming.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* refactor(frontend): use a dryRun flag on addIdp and updateIdp

Replace validateSamlCertificate with a dryRun parameter on the existing
methods. A dry run rethrows the raw error so the 400 body keeps the parsed
certificate expiration date, and idp-common reads it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* fix(frontend): hide the stored certificate message once the SAML URL is replaced

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* refactor(frontend): move SAML validation fallback messages to errorMessages

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

* chore(frontend): trim comments to the non-obvious why

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>

---------

Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
(cherry picked from commit cae27cc)
Signed-off-by: ishai.borovoy <iborovoy@nvidia.com>
@ishaiboro
ishaiboro requested a review from a team as a code owner November 11, 2026 15:08
@coderabbitai

coderabbitai Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@ishaiboro
ishaiboro merged commit 85b8d4e into release-3.0 Nov 12, 2026
22 checks passed
@ishaiboro
ishaiboro deleted the saml-certificate-dryrun-release-3.0 branch November 12, 2026 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants