Skip to content

Commit

Permalink
Fix UI Issues with SAML Connection Configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachin-Mamoru authored Nov 24, 2024
1 parent 2dc243d commit 30fcb93
Showing 1 changed file with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ export interface SamlPropertiesInterface {
attributeConsumingServiceIndex?: string;
AuthnContextComparisonLevel?: string;
IsAssertionEncrypted?: boolean;
IncludeCert?: boolean;
IncludeNameIDPolicy?:boolean;
AuthnContextClassRef?: string;
}

Expand Down Expand Up @@ -252,10 +254,15 @@ export const SamlAuthenticatorSettingsForm: FunctionComponent<SamlSettingsFormPr
key: "ISArtifactResolveReqSigned" }
),
ISArtifactResponseSigned: findPropVal<string>({ defaultValue: "string", key: "ISArtifactResponseSigned" }),
IncludeAuthnContext: findPropVal<string>({ defaultValue: "string", key: "IncludeAuthnContext" }),
ForceAuthentication: findPropVal<string>({ defaultValue: "string", key: "ForceAuthentication" }),

Check warning on line 258 in features/admin.connections.v1/components/edit/forms/authenticators/saml-authenticator-form.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected object keys to be in ascending order. 'ForceAuthentication' should be before 'IncludeAuthnContext'
ResponseAuthnContextClassRef: findPropVal<string>({ defaultValue: "string", key: "ResponseAuthnContextClassRef" }),

Check warning on line 259 in features/admin.connections.v1/components/edit/forms/authenticators/saml-authenticator-form.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

This line has a length of 127. Maximum allowed is 120
ISAuthnReqSigned: findPropVal<boolean>({ defaultValue: false, key: "ISAuthnReqSigned" }),

Check warning on line 260 in features/admin.connections.v1/components/edit/forms/authenticators/saml-authenticator-form.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected object keys to be in ascending order. 'ISAuthnReqSigned' should be before 'ResponseAuthnContextClassRef'
IdPEntityId: findPropVal<string>({ defaultValue: "", key: "IdPEntityId" }),
IncludeProtocolBinding: findPropVal<boolean>({ defaultValue: false, key: "IncludeProtocolBinding" }),
IsAssertionEncrypted: findPropVal<boolean>({ defaultValue: false, key: "IsAssertionEncrypted" }),
IncludeNameIDPolicy: findPropVal<boolean>({ defaultValue: false, key: "IncludeNameIDPolicy" }),

Check warning on line 264 in features/admin.connections.v1/components/edit/forms/authenticators/saml-authenticator-form.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected object keys to be in ascending order. 'IncludeNameIDPolicy' should be before 'IsAssertionEncrypted'
IncludeCert : findPropVal<boolean>({ defaultValue: false, key: "IncludeCert" }),

Check warning on line 265 in features/admin.connections.v1/components/edit/forms/authenticators/saml-authenticator-form.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected object keys to be in ascending order. 'IncludeCert' should be before 'IncludeNameIDPolicy'
/**
* `IsAuthnRespSigned` is by default set to true when creating the SAML IdP so,
* always the value will be true. Keeping this here to indicate for the user and
Expand All @@ -279,7 +286,8 @@ export const SamlAuthenticatorSettingsForm: FunctionComponent<SamlSettingsFormPr
SSOUrl: findPropVal<string>({ defaultValue: "", key: "SSOUrl" }),
SignatureAlgorithm: findPropVal<string>({ defaultValue: "RSA with SHA256", key: "SignatureAlgorithm" }),
commonAuthQueryParams: findPropVal<string>({ defaultValue: "", key: "commonAuthQueryParams" }),
customAuthnContextClassRef: findPropVal<string>({ defaultValue: "", key: "CustomAuthnContextClassRef" }),
CustomAuthnContextClassRef: findPropVal<string>({ defaultValue: "", key: "CustomAuthnContextClassRef" }),

Check warning on line 289 in features/admin.connections.v1/components/edit/forms/authenticators/saml-authenticator-form.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected object keys to be in ascending order. 'CustomAuthnContextClassRef' should be before 'commonAuthQueryParams'
AttributeConsumingServiceIndex: findPropVal<string>({ defaultValue: "", key: "AttributeConsumingServiceIndex" }),

Check warning on line 290 in features/admin.connections.v1/components/edit/forms/authenticators/saml-authenticator-form.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

This line has a length of 125. Maximum allowed is 120

Check warning on line 290 in features/admin.connections.v1/components/edit/forms/authenticators/saml-authenticator-form.tsx

View workflow job for this annotation

GitHub Actions / ⬣ ESLint (STATIC ANALYSIS) (lts/*, 8.7.4)

Expected object keys to be in ascending order. 'AttributeConsumingServiceIndex' should be before 'CustomAuthnContextClassRef'
/**
* https://github.com/wso2/product-is/issues/17004
*/
Expand All @@ -300,6 +308,8 @@ export const SamlAuthenticatorSettingsForm: FunctionComponent<SamlSettingsFormPr
setIsArtifactBindingEnabled(initialFormValues.ISArtifactBindingEnabled);
setFormValues({ ...initialFormValues });
setIsEnableAssetionEncryption(initialFormValues.IsAssertionEncrypted);
setIncludeNameIDPolicy(initialFormValues.IncludeNameIDPolicy);
setIncludeCert(initialFormValues.IncludeCert);

const initiallySelectedAuthnContextClasses: DropdownChild[] = initialFormValues.AuthnContextClassRef?.split(",")
.map(
Expand Down Expand Up @@ -844,7 +854,8 @@ export const SamlAuthenticatorSettingsForm: FunctionComponent<SamlSettingsFormPr
<Field.Dropdown
required={ false }
name="AuthnContextComparisonLevel"
defaultValue={ initialFormValues?.AuthnContextComparisonLevel }
value={ formValues?.AuthnContextComparisonLevel }
defaultValue={ formValues?.AuthnContextComparisonLevel }
placeholder={ t(`${ I18N_TARGET_KEY }.authContextComparisonLevel.placeholder`) }
ariaLabel={ t(`${ I18N_TARGET_KEY }.authContextComparisonLevel.ariaLabel`) }
data-testid={ `${ testId }-authContextComparisonLevel-field` }
Expand Down

0 comments on commit 30fcb93

Please sign in to comment.