added missing fields to saml details page (#2033)

fixes: #1945
This commit is contained in:
Erik Jan de Wit 2022-02-17 13:51:32 +01:00 committed by GitHub
parent 5413a87011
commit ebeceefcbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 50 additions and 1 deletions

View file

@ -52,6 +52,24 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
return (
<div className="pf-c-form pf-m-horizontal">
<FormGroup
label={t("serviceProviderEntityId")}
fieldId="kc-service-provider-entity-id"
labelIcon={
<HelpItem
helpText="identity-providers-help:serviceProviderEntityId"
fieldLabelId="identity-providers:serviceProviderEntityId"
/>
}
>
<TextInput
type="text"
name="config.entityId"
data-testid="serviceProviderEntityId"
id="kc-service-provider-entity-id"
ref={register()}
/>
</FormGroup>
<FormGroup
label={t("ssoServiceUrl")}
labelIcon={

View file

@ -9,12 +9,20 @@ import { TextField } from "../component/TextField";
import { DisplayOrder } from "../component/DisplayOrder";
import { useParams } from "react-router";
import type { IdentityProviderParams } from "../routes/IdentityProvider";
import { FormattedLink } from "../../components/external-link/FormattedLink";
import { useRealm } from "../../context/realm-context/RealmContext";
import environment from "../../environment";
import "./saml-general-settings.css";
export const SamlGeneralSettings = ({ id }: { id: string }) => {
const { t } = useTranslation("identity-providers");
const { realm } = useRealm();
const { tab } = useParams<IdentityProviderParams>();
const { register, errors } = useFormContext();
const { register, errors, watch } = useFormContext();
const alias = watch("alias");
return (
<>
@ -51,6 +59,23 @@ export const SamlGeneralSettings = ({ id }: { id: string }) => {
<TextField field="displayName" label="displayName" />
<DisplayOrder />
<FormGroup
label={t("endpoints")}
fieldId="endpoints"
labelIcon={
<HelpItem
helpText="identity-providers-help:alias"
fieldLabelId="identity-providers:alias"
/>
}
className="keycloak__identity-providers__saml_link"
>
<FormattedLink
title={t("samlEndpointsLabel")}
href={`${environment.authUrl}/realms/${realm}/broker/${alias}/endpoint/descriptor`}
isInline
/>
</FormGroup>
</>
);
};

View file

@ -0,0 +1,3 @@
.keycloak__identity-providers__saml_link > .pf-c-form__group-control {
padding-top: var(--pf-c-form--m-horizontal__group-label--md--PaddingTop);
}

View file

@ -10,6 +10,7 @@ export default {
"The client secret registered with the identity provider. This field is able to obtain its value from vault, use ${vault.ID} format.",
displayOrder:
"Number defining the order of the providers in GUI (for example, on the Login page). The lowest number will be applied first.",
endpoints: "Shows the configuration of the Service Provider endpoint",
useDiscoveryEndpoint:
"If this setting is enabled, the discovery endpoint will be used to fetch the provider config. Keycloak can load the config from the endpoint and automatically update the config if the source has any updates",
discoveryEndpoint:

View file

@ -39,6 +39,8 @@ export default {
clientId: "Client ID",
clientSecret: "Client Secret",
displayOrder: "Display order",
endpoints: "Endpoints",
samlEndpointsLabel: "SAML 2.0 Service Provider Metadata",
createSuccess: "Identity provider successfully created",
createError: "Could not create the identity provider: {{error}}",
orderDialogIntro: