Add componentId to LDAP provider test connection/authorization (#2038)

* add componentId to test calls and fix help ids

* rm ID default
This commit is contained in:
mfrances17 2022-02-17 09:43:52 -05:00 committed by GitHub
parent 6427a15d1b
commit e8e64798ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 59 additions and 56 deletions

View file

@ -95,8 +95,8 @@ export default function CustomProviderSettings() {
label={t("consoleDisplayName")}
labelIcon={
<HelpItem
helpText="users-federation-help:consoleDisplayNameHelp"
fieldLabelId="users-federation:consoleDisplayName"
helpText="user-federation-help:consoleDisplayNameHelp"
fieldLabelId="user-federation:consoleDisplayName"
/>
}
helperTextInvalid={t("validateName")}

View file

@ -64,8 +64,8 @@ export const KerberosSettingsRequired = ({
label={t("consoleDisplayName")}
labelIcon={
<HelpItem
helpText="users-federation-help:consoleDisplayNameHelp"
fieldLabelId="users-federation:consoleDisplayName"
helpText="user-federation-help:consoleDisplayNameHelp"
fieldLabelId="user-federation:consoleDisplayName"
/>
}
fieldId="kc-console-display-name"
@ -119,8 +119,8 @@ export const KerberosSettingsRequired = ({
label={t("kerberosRealm")}
labelIcon={
<HelpItem
helpText="users-federation-help:kerberosRealmHelp"
fieldLabelId="users-federation:kc-kerberos-realm"
helpText="user-federation-help:kerberosRealmHelp"
fieldLabelId="user-federation:kc-kerberos-realm"
/>
}
fieldId="kc-kerberos-realm"
@ -150,8 +150,8 @@ export const KerberosSettingsRequired = ({
label={t("serverPrincipal")}
labelIcon={
<HelpItem
helpText="users-federation-help:serverPrincipalHelp"
fieldLabelId="users-federation:serverPrincipal"
helpText="user-federation-help:serverPrincipalHelp"
fieldLabelId="user-federation:serverPrincipal"
/>
}
fieldId="kc-server-principal"
@ -181,8 +181,8 @@ export const KerberosSettingsRequired = ({
label={t("keyTab")}
labelIcon={
<HelpItem
helpText="users-federation-help:keyTabHelp"
fieldLabelId="users-federation:keyTab"
helpText="user-federation-help:keyTabHelp"
fieldLabelId="user-federation:keyTab"
/>
}
fieldId="kc-key-tab"
@ -210,8 +210,8 @@ export const KerberosSettingsRequired = ({
label={t("debug")}
labelIcon={
<HelpItem
helpText="users-federation-help:debugHelp"
fieldLabelId="users-federation:debug"
helpText="user-federation-help:debugHelp"
fieldLabelId="user-federation:debug"
/>
}
fieldId="kc-debug"
@ -238,8 +238,8 @@ export const KerberosSettingsRequired = ({
label={t("allowPasswordAuthentication")}
labelIcon={
<HelpItem
helpText="users-federation-help:allowPasswordAuthenticationHelp"
fieldLabelId="users-federation:allowPasswordAuthentication"
helpText="user-federation-help:allowPasswordAuthenticationHelp"
fieldLabelId="user-federation:allowPasswordAuthentication"
/>
}
fieldId="kc-allow-password-authentication"
@ -266,8 +266,8 @@ export const KerberosSettingsRequired = ({
label={t("editMode")}
labelIcon={
<HelpItem
helpText="users-federation-help:editModeKerberosHelp"
fieldLabelId="users-federation:editMode"
helpText="user-federation-help:editModeKerberosHelp"
fieldLabelId="user-federation:editMode"
/>
}
isRequired
@ -306,8 +306,8 @@ export const KerberosSettingsRequired = ({
label={t("updateFirstLogin")}
labelIcon={
<HelpItem
helpText="users-federation-help:updateFirstLoginHelp"
fieldLabelId="users-federation:updateFirstLogin"
helpText="user-federation-help:updateFirstLoginHelp"
fieldLabelId="user-federation:updateFirstLogin"
/>
}
fieldId="kc-update-first-login"

View file

@ -35,8 +35,8 @@ export const LdapSettingsAdvanced = ({
label={t("enableLdapv3Password")}
labelIcon={
<HelpItem
helpText="users-federation-help:enableLdapv3PasswordHelp"
fieldLabelId="users-federation:enableLdapv3Password"
helpText="user-federation-help:enableLdapv3PasswordHelp"
fieldLabelId="user-federation:enableLdapv3Password"
/>
}
fieldId="kc-enable-ldapv3-password"
@ -63,8 +63,8 @@ export const LdapSettingsAdvanced = ({
label={t("validatePasswordPolicy")}
labelIcon={
<HelpItem
helpText="users-federation-help:validatePasswordPolicyHelp"
fieldLabelId="users-federation:validatePasswordPolicy"
helpText="user-federation-help:validatePasswordPolicyHelp"
fieldLabelId="user-federation:validatePasswordPolicy"
/>
}
fieldId="kc-validate-password-policy"
@ -91,8 +91,8 @@ export const LdapSettingsAdvanced = ({
label={t("trustEmail")}
labelIcon={
<HelpItem
helpText="users-federation-help:trustEmailHelp"
fieldLabelId="users-federation:trustEmail"
helpText="user-federation-help:trustEmailHelp"
fieldLabelId="user-federation:trustEmail"
/>
}
fieldId="kc-trust-email"

View file

@ -50,6 +50,8 @@ const convertFormToSettings = (form: UseFormMethods) => {
settings[key] = Array.isArray(value) ? value[0] : "";
});
settings["componentId"] = get(form.getValues(), "id");
return settings;
};
@ -105,8 +107,8 @@ export const LdapSettingsConnection = ({
label={t("connectionURL")}
labelIcon={
<HelpItem
helpText="users-federation-help:consoleDisplayConnectionUrlHelp"
fieldLabelId="users-federation:connectionURL"
helpText="user-federation-help:consoleDisplayConnectionUrlHelp"
fieldLabelId="user-federation:connectionURL"
/>
}
fieldId="kc-console-connection-url"
@ -135,8 +137,8 @@ export const LdapSettingsConnection = ({
label={t("enableStartTls")}
labelIcon={
<HelpItem
helpText="users-federation-help:enableStartTlsHelp"
fieldLabelId="users-federation:enableStartTls"
helpText="user-federation-help:enableStartTlsHelp"
fieldLabelId="user-federation:enableStartTls"
/>
}
fieldId="kc-enable-start-tls"
@ -163,8 +165,8 @@ export const LdapSettingsConnection = ({
label={t("useTruststoreSpi")}
labelIcon={
<HelpItem
helpText="users-federation-help:useTruststoreSpiHelp"
fieldLabelId="users-federation:useTruststoreSpi"
helpText="user-federation-help:useTruststoreSpiHelp"
fieldLabelId="user-federation:useTruststoreSpi"
/>
}
fieldId="kc-use-truststore-spi"
@ -197,8 +199,8 @@ export const LdapSettingsConnection = ({
label={t("connectionPooling")}
labelIcon={
<HelpItem
helpText="users-federation-help:connectionPoolingHelp"
fieldLabelId="users-federation:connectionPooling"
helpText="user-federation-help:connectionPoolingHelp"
fieldLabelId="user-federation:connectionPooling"
/>
}
fieldId="kc-connection-pooling"
@ -224,8 +226,8 @@ export const LdapSettingsConnection = ({
label={t("connectionTimeout")}
labelIcon={
<HelpItem
helpText="users-federation-help:connectionTimeoutHelp"
fieldLabelId="users-federation:consoleTimeout"
helpText="user-federation-help:connectionTimeoutHelp"
fieldLabelId="user-federation:consoleTimeout"
/>
}
fieldId="kc-console-connection-timeout"
@ -251,8 +253,8 @@ export const LdapSettingsConnection = ({
label={t("bindType")}
labelIcon={
<HelpItem
helpText="users-federation-help:bindTypeHelp"
fieldLabelId="users-federation:bindType"
helpText="user-federation-help:bindTypeHelp"
fieldLabelId="user-federation:bindType"
/>
}
fieldId="kc-bind-type"
@ -291,8 +293,8 @@ export const LdapSettingsConnection = ({
label={t("bindDn")}
labelIcon={
<HelpItem
helpText="users-federation-help:bindDnHelp"
fieldLabelId="users-federation:bindDn"
helpText="user-federation-help:bindDnHelp"
fieldLabelId="user-federation:bindDn"
/>
}
fieldId="kc-console-bind-dn"
@ -316,8 +318,8 @@ export const LdapSettingsConnection = ({
label={t("bindCredentials")}
labelIcon={
<HelpItem
helpText="users-federation-help:bindCredentialsHelp"
fieldLabelId="users-federation:bindCredentials"
helpText="user-federation-help:bindCredentialsHelp"
fieldLabelId="user-federation:bindCredentials"
/>
}
fieldId="kc-console-bind-credentials"

View file

@ -107,14 +107,15 @@ export const LdapSettingsGeneral = ({
label={t("consoleDisplayName")}
labelIcon={
<HelpItem
helpText="users-federation-help:consoleDisplayNameHelp"
fieldLabelId="users-federation:consoleDisplayName"
helpText="user-federation-help:consoleDisplayNameHelp"
fieldLabelId="user-federation:consoleDisplayName"
/>
}
fieldId="kc-console-display-name"
isRequired
>
{/* These hidden fields are required so data object written back matches data retrieved */}
<TextInput hidden type="text" id="kc-console-id" name="id" />
<TextInput
hidden
type="text"
@ -161,8 +162,8 @@ export const LdapSettingsGeneral = ({
label={t("vendor")}
labelIcon={
<HelpItem
helpText="users-federation-help:vendorHelp"
fieldLabelId="users-federation:vendor"
helpText="user-federation-help:vendorHelp"
fieldLabelId="user-federation:vendor"
/>
}
fieldId="kc-vendor"

View file

@ -41,8 +41,8 @@ export const LdapSettingsKerberosIntegration = ({
label={t("allowKerberosAuthentication")}
labelIcon={
<HelpItem
helpText="users-federation-help:allowKerberosAuthenticationHelp"
fieldLabelId="users-federation:allowKerberosAuthentication"
helpText="user-federation-help:allowKerberosAuthenticationHelp"
fieldLabelId="user-federation:allowKerberosAuthentication"
/>
}
fieldId="kc-allow-kerberos-authentication"
@ -71,8 +71,8 @@ export const LdapSettingsKerberosIntegration = ({
label={t("kerberosRealm")}
labelIcon={
<HelpItem
helpText="users-federation-help:kerberosRealmHelp"
fieldLabelId="users-federation:kerberosRealm"
helpText="user-federation-help:kerberosRealmHelp"
fieldLabelId="user-federation:kerberosRealm"
/>
}
fieldId="kc-kerberos-realm"
@ -102,8 +102,8 @@ export const LdapSettingsKerberosIntegration = ({
label={t("serverPrincipal")}
labelIcon={
<HelpItem
helpText="users-federation-help:serverPrincipalHelp"
fieldLabelId="users-federation:serverPrincipal"
helpText="user-federation-help:serverPrincipalHelp"
fieldLabelId="user-federation:serverPrincipal"
/>
}
fieldId="kc-server-principal"
@ -133,8 +133,8 @@ export const LdapSettingsKerberosIntegration = ({
label={t("keyTab")}
labelIcon={
<HelpItem
helpText="users-federation-help:keyTabHelp"
fieldLabelId="users-federation:keyTab"
helpText="user-federation-help:keyTabHelp"
fieldLabelId="user-federation:keyTab"
/>
}
fieldId="kc-key-tab"
@ -164,8 +164,8 @@ export const LdapSettingsKerberosIntegration = ({
label={t("debug")}
labelIcon={
<HelpItem
helpText="users-federation-help:debugHelp"
fieldLabelId="users-federation:debug"
helpText="user-federation-help:debugHelp"
fieldLabelId="user-federation:debug"
/>
}
fieldId="kc-debug"
@ -194,8 +194,8 @@ export const LdapSettingsKerberosIntegration = ({
label={t("useKerberosForPasswordAuthentication")}
labelIcon={
<HelpItem
helpText="users-federation-help:useKerberosForPasswordAuthenticationHelp"
fieldLabelId="users-federation:useKerberosForPasswordAuthentication"
helpText="user-federation-help:useKerberosForPasswordAuthenticationHelp"
fieldLabelId="user-federation:useKerberosForPasswordAuthentication"
/>
}
fieldId="kc-use-kerberos-password-authentication"