ENG-3009: Fix Edit SSO Provider Save button always disabled#7739
Draft
ENG-3009: Fix Edit SSO Provider Save button always disabled#7739
Conversation
In edit mode, the Yup validation schema required client_id and client_secret, but the GET endpoint intentionally omits these sensitive fields from responses. This made the form permanently invalid, disabling the Save button even after editing other fields. - Converts the validation schema to a factory function parameterized on isEditMode; credentials are optional when editing an existing provider - Strips empty credential fields from the PATCH payload so the backend can preserve existing encrypted values (see companion fidesplus PR #3284) - Removes the asterisk required indicator from credential inputs in edit mode Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
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.
Ticket ENG-3009
Description Of Changes
Fixes a bug where the Save button in
EditSSOProviderModalwas permanently disabled after creating an SSO provider. Users could not save any edits to an existing provider.Root cause: The GET endpoint intentionally omits
client_idandclient_secretfrom responses (sensitive fields). The Yup validation schema required both, so the form was always invalid — disabling the Save button even after editing other fields likename.The fix makes credentials optional in edit mode via a validation schema factory, removes the required asterisk from credential fields in edit mode, and strips empty credential values from the PATCH payload so the backend (companion PR ethyca/fidesplus#3284) can preserve the existing encrypted values.
Code Changes
SSOProviderFormValidationSchematogetSSOProviderFormValidationSchema(isEditMode)factory inSSOProviderForm.tsx;client_idandclient_secretarerequiredonly in create modeconst isEditMode = !!openIDProviderand threaded it through form validation, submit handler, andisRequiredprops on credential inputsclient_id/client_secretfrom the PATCH payload before submission so the backend preserves existing encrypted valuesSteps to Confirm
client_idandclient_secretNamefieldPre-Merge Checklist
CHANGELOG.mdupdated