Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
theme.keycloak.v2.admin.resources.assets.ClientDetails-5c5hG1Sr.js.map Maven / Gradle / Ivy
Go to download
The user inferface to administrate the Keycloak server.
{"version":3,"file":"ClientDetails-5c5hG1Sr.js","sources":["../../../../../node_modules/.pnpm/@[email protected] /node_modules/@patternfly/react-styles/css/components/CodeBlock/code-block.mjs","../../../../../node_modules/.pnpm/@[email protected] [email protected] [email protected] [email protected] /node_modules/@patternfly/react-core/dist/esm/components/CodeBlock/CodeBlock.js","../../../../../node_modules/.pnpm/@[email protected] [email protected] [email protected] [email protected] /node_modules/@patternfly/react-core/dist/esm/components/CodeBlock/CodeBlockAction.js","../../../../../node_modules/.pnpm/@[email protected] [email protected] [email protected] [email protected] /node_modules/@patternfly/react-core/dist/esm/components/Panel/PanelHeader.js","../../../../../node_modules/.pnpm/@[email protected] [email protected] [email protected] [email protected] /node_modules/@patternfly/react-core/dist/esm/components/Text/TextList.js","../../../../../node_modules/.pnpm/@[email protected] [email protected] [email protected] [email protected] /node_modules/@patternfly/react-core/dist/esm/components/Text/TextListItem.js","../../src/components/download-dialog/DownloadDialog.tsx","../../src/clients/advanced/TokenLifespan.tsx","../../src/clients/advanced/AdvancedSettings.tsx","../../src/clients/advanced/AuthenticationOverrides.tsx","../../src/components/time-selector/TimeSelectorForm.tsx","../../src/clients/advanced/AddHostDialog.tsx","../../src/clients/advanced/ClusteringPanel.tsx","../../src/clients/advanced/ApplicationUrls.tsx","../../src/clients/advanced/FineGrainOpenIdConnect.tsx","../../src/clients/advanced/FineGrainSamlEndpointConfig.tsx","../../src/clients/advanced/OpenIdConnectCompatibilityModes.tsx","../../src/clients/AdvancedTab.tsx","../../src/clients/ClientSessions.tsx","../../src/clients/add/AccessSettings.tsx","../../src/clients/add/LoginSettingsPanel.tsx","../../src/clients/add/LogoutPanel.tsx","../../src/clients/add/SamlConfig.tsx","../../src/clients/add/SamlSignature.tsx","../../src/clients/ClientSettings.tsx","../../src/clients/authorization/KeyBasedAttributeInput.tsx","../../src/clients/authorization/AuthorizationDataModal.tsx","../../src/clients/authorization/AuthorizationEvaluateResourcePolicies.tsx","../../src/clients/authorization/AuthorizationEvaluateResource.tsx","../../src/clients/authorization/evaluate/Results.tsx","../../src/clients/authorization/AuthorizationEvaluate.tsx","../../src/clients/authorization/AuthorizationExport.tsx","../../src/clients/authorization/DetailDescription.tsx","../../src/clients/authorization/EmptyPermissionsState.tsx","../../src/clients/authorization/MoreLabel.tsx","../../src/clients/authorization/SearchDropdown.tsx","../../src/clients/authorization/Permissions.tsx","../../src/clients/authorization/Policies.tsx","../../src/clients/authorization/DetailCell.tsx","../../src/clients/authorization/Resources.tsx","../../src/clients/authorization/Scopes.tsx","../../src/clients/authorization/ImportDialog.tsx","../../src/clients/authorization/Settings.tsx","../../src/utils/useQueryPermission.ts","../../src/clients/scopes/CopyToClipboardButton.tsx","../../src/clients/credentials/ClientSecret.tsx","../../src/clients/credentials/SignedJWT.tsx","../../src/clients/credentials/X509.tsx","../../src/clients/credentials/Credentials.tsx","../../src/clients/keys/Certificate.tsx","../../src/clients/keys/StoreSettings.tsx","../../src/clients/keys/GenerateKeyDialog.tsx","../../src/clients/keys/ImportKeyDialog.tsx","../../src/clients/keys/Keys.tsx","../../src/clients/keys/ExportSamlKeyDialog.tsx","../../src/clients/keys/SamlKeysDialog.tsx","../../src/clients/keys/SamlImportKeyDialog.tsx","../../src/clients/keys/SamlKeys.tsx","../../src/clients/scopes/ClientScopes.tsx","../../src/clients/scopes/GeneratedCodeTab.tsx","../../src/clients/scopes/EvaluateScopes.tsx","../../src/clients/service-account/ServiceAccount.tsx","../../src/clients/ClientDetails.tsx"],"sourcesContent":["import './code-block.css';\nexport default {\n \"codeBlock\": \"pf-v5-c-code-block\",\n \"codeBlockActions\": \"pf-v5-c-code-block__actions\",\n \"codeBlockCode\": \"pf-v5-c-code-block__code\",\n \"codeBlockContent\": \"pf-v5-c-code-block__content\",\n \"codeBlockHeader\": \"pf-v5-c-code-block__header\",\n \"codeBlockPre\": \"pf-v5-c-code-block__pre\"\n};","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport styles from '@patternfly/react-styles/css/components/CodeBlock/code-block.mjs';\nimport { css } from '@patternfly/react-styles';\nexport const CodeBlock = (_a) => {\n var { children = null, className, actions = null } = _a, props = __rest(_a, [\"children\", \"className\", \"actions\"]);\n return (React.createElement(\"div\", Object.assign({ className: css(styles.codeBlock, className) }, props),\n actions && (React.createElement(\"div\", { className: css(styles.codeBlockHeader) },\n React.createElement(\"div\", { className: css(styles.codeBlockActions) }, actions))),\n React.createElement(\"div\", { className: css(styles.codeBlockContent) }, children)));\n};\nCodeBlock.displayName = 'CodeBlock';\n//# sourceMappingURL=CodeBlock.js.map","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport { css } from '@patternfly/react-styles';\nimport styles from '@patternfly/react-styles/css/components/CodeBlock/code-block.mjs';\nexport const CodeBlockAction = (_a) => {\n var { children = null, className } = _a, props = __rest(_a, [\"children\", \"className\"]);\n return (React.createElement(\"div\", Object.assign({ className: css(`${styles.codeBlockActions}-item`, className) }, props), children));\n};\nCodeBlockAction.displayName = 'CodeBlockAction';\n//# sourceMappingURL=CodeBlockAction.js.map","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport styles from '@patternfly/react-styles/css/components/Panel/panel.mjs';\nimport { css } from '@patternfly/react-styles';\nexport const PanelHeader = (_a) => {\n var { className, children } = _a, props = __rest(_a, [\"className\", \"children\"]);\n return (React.createElement(\"div\", Object.assign({ className: css(styles.panelHeader, className) }, props), children));\n};\nPanelHeader.displayName = 'PanelHeader';\n//# sourceMappingURL=PanelHeader.js.map","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport styles from '@patternfly/react-styles/css/components/Content/content.mjs';\nimport { css } from '@patternfly/react-styles';\nexport var TextListVariants;\n(function (TextListVariants) {\n TextListVariants[\"ul\"] = \"ul\";\n TextListVariants[\"ol\"] = \"ol\";\n TextListVariants[\"dl\"] = \"dl\";\n})(TextListVariants || (TextListVariants = {}));\nexport const TextList = (_a) => {\n var { children = null, className = '', component = TextListVariants.ul, isPlain = false } = _a, props = __rest(_a, [\"children\", \"className\", \"component\", \"isPlain\"]);\n const Component = component;\n return (React.createElement(Component, Object.assign({}, props, { className: css(isPlain && styles.modifiers.plain, className) }), children));\n};\nTextList.displayName = 'TextList';\n//# sourceMappingURL=TextList.js.map","import { __rest } from \"tslib\";\nimport * as React from 'react';\nimport { css } from '@patternfly/react-styles';\nexport var TextListItemVariants;\n(function (TextListItemVariants) {\n TextListItemVariants[\"li\"] = \"li\";\n TextListItemVariants[\"dt\"] = \"dt\";\n TextListItemVariants[\"dd\"] = \"dd\";\n})(TextListItemVariants || (TextListItemVariants = {}));\nexport const TextListItem = (_a) => {\n var { children = null, className = '', component = TextListItemVariants.li } = _a, props = __rest(_a, [\"children\", \"className\", \"component\"]);\n const Component = component;\n return (React.createElement(Component, Object.assign({}, props, { className: css(className) }), children));\n};\nTextListItem.displayName = 'TextListItem';\n//# sourceMappingURL=TextListItem.js.map","import { fetchWithError } from \"@keycloak/keycloak-admin-client\";\nimport { HelpItem, useHelp } from \"@keycloak/keycloak-ui-shared\";\nimport {\n Form,\n FormGroup,\n MenuToggle,\n ModalVariant,\n Select,\n SelectList,\n SelectOption,\n Stack,\n StackItem,\n TextArea,\n} from \"@patternfly/react-core\";\nimport { saveAs } from \"file-saver\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { useServerInfo } from \"../../context/server-info/ServerInfoProvider\";\nimport { addTrailingSlash, prettyPrintJSON } from \"../../util\";\nimport { getAuthorizationHeaders } from \"../../utils/getAuthorizationHeaders\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport { ConfirmDialogModal } from \"../confirm-dialog/ConfirmDialog\";\n\ntype DownloadDialogProps = {\n id: string;\n protocol?: string;\n open: boolean;\n toggleDialog: () => void;\n};\n\nexport const DownloadDialog = ({\n id,\n open,\n toggleDialog,\n protocol = \"openid-connect\",\n}: DownloadDialogProps) => {\n const { adminClient } = useAdminClient();\n\n const { realm } = useRealm();\n const { t } = useTranslation();\n const { enabled } = useHelp();\n const serverInfo = useServerInfo();\n\n const configFormats = serverInfo.clientInstallations![protocol];\n const [selected, setSelected] = useState(\n configFormats[configFormats.length - 1].id,\n );\n const [snippet, setSnippet] = useState();\n const [openType, setOpenType] = useState(false);\n\n const selectedConfig = useMemo(\n () => configFormats.find((config) => config.id === selected) ?? null,\n [selected],\n );\n\n const sanitizeSnippet = (snippet: string) =>\n snippet.replace(\n /.*<\\/PrivateKeyPem>/gs,\n `${t(\"privateKeyMask\")} `,\n );\n\n useFetch(\n async () => {\n if (selectedConfig?.mediaType === \"application/zip\") {\n const response = await fetchWithError(\n `${addTrailingSlash(\n adminClient.baseUrl,\n )}admin/realms/${realm}/clients/${id}/installation/providers/${selected}`,\n {\n method: \"GET\",\n headers: getAuthorizationHeaders(\n await adminClient.getAccessToken(),\n ),\n },\n );\n\n return response.arrayBuffer();\n } else {\n const snippet = await adminClient.clients.getInstallationProviders({\n id,\n providerId: selected,\n });\n if (typeof snippet === \"string\") {\n return sanitizeSnippet(snippet);\n } else {\n return prettyPrintJSON(snippet);\n }\n }\n },\n (snippet) => setSnippet(snippet),\n [id, selected],\n );\n\n // Clear snippet when selected config changes, this prevents old snippets from being displayed during fetch.\n useEffect(() => setSnippet(\"\"), [id, selected]);\n\n return (\n {\n saveAs(\n new Blob([snippet!], { type: selectedConfig?.mediaType }),\n selectedConfig?.filename,\n );\n }}\n open={open}\n toggleDialog={toggleDialog}\n variant={ModalVariant.medium}\n >\n \n \n );\n};\n","import {\n FormGroup,\n MenuToggle,\n Select,\n SelectList,\n SelectOption,\n Split,\n SplitItem,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { Controller, useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { HelpItem } from \"@keycloak/keycloak-ui-shared\";\nimport {\n TimeSelector,\n Unit,\n} from \"../../components/time-selector/TimeSelector\";\n\ntype TokenLifespanProps = {\n id: string;\n name: string;\n defaultValue?: number;\n units?: Unit[];\n};\n\nconst inherited = \"tokenLifespan.inherited\";\nconst expires = \"tokenLifespan.expires\";\n\nexport const TokenLifespan = ({\n id,\n name,\n defaultValue,\n units,\n}: TokenLifespanProps) => {\n const { t } = useTranslation();\n const [open, setOpen] = useState(false);\n\n const [focused, setFocused] = useState(false);\n const onFocus = () => setFocused(true);\n const onBlur = () => setFocused(false);\n\n const { control } = useFormContext();\n const isExpireSet = (value: string | number) =>\n typeof value === \"number\" ||\n (typeof value === \"string\" && value !== \"\") ||\n focused;\n\n return (\n }\n >\n (\n \n \n (\n setOpen(!open)}\n isExpanded={open}\n >\n {isExpireSet(field.value) ? t(expires) : t(inherited)}\n \n )}\n isOpen={open}\n onSelect={(_, value) => {\n field.onChange(value);\n setOpen(false);\n }}\n selected={isExpireSet(field.value) ? t(expires) : t(inherited)}\n >\n \n {t(inherited)} \n {t(expires)} \n \n \n \n \n \n \n \n )}\n />\n \n );\n};\n","import { HelpItem } from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n Button,\n FormGroup,\n MenuToggle,\n Select,\n SelectList,\n SelectOption,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { Controller, useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { DefaultSwitchControl } from \"../../components/SwitchControl\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { KeyValueInput } from \"../../components/key-value-form/KeyValueInput\";\nimport { MultiLineInput } from \"../../components/multi-line-input/MultiLineInput\";\nimport { TimeSelector } from \"../../components/time-selector/TimeSelector\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport useIsFeatureEnabled, { Feature } from \"../../utils/useIsFeatureEnabled\";\nimport { FormFields } from \"../ClientDetails\";\nimport { TokenLifespan } from \"./TokenLifespan\";\n\ntype AdvancedSettingsProps = {\n save: () => void;\n reset: () => void;\n protocol?: string;\n hasConfigureAccess?: boolean;\n};\n\nexport const AdvancedSettings = ({\n save,\n reset,\n protocol,\n hasConfigureAccess,\n}: AdvancedSettingsProps) => {\n const { t } = useTranslation();\n const [open, setOpen] = useState(false);\n\n const { realmRepresentation: realm } = useRealm();\n\n const isFeatureEnabled = useIsFeatureEnabled();\n const isDPoPEnabled = isFeatureEnabled(Feature.DPoP);\n\n const { control } = useFormContext();\n return (\n \n {protocol !== \"openid-connect\" && (\n \n }\n >\n (\n \"attributes.saml.assertion.lifespan\",\n )}\n defaultValue=\"\"\n control={control}\n render={({ field }) => (\n \n )}\n />\n \n )}\n {protocol === \"openid-connect\" && (\n <>\n \n \n \n \n (\n \"attributes.tls.client.certificate.bound.access.tokens\",\n )}\n label={t(\"oAuthMutual\")}\n labelIcon={t(\"oAuthMutualHelp\")}\n stringify\n />\n {isDPoPEnabled && (\n (\n \"attributes.dpop.bound.access.tokens\",\n )}\n label={t(\"oAuthDPoP\")}\n labelIcon={t(\"oAuthDPoPHelp\")}\n stringify\n />\n )}\n \n }\n >\n (\n \"attributes.pkce.code.challenge.method\",\n )}\n defaultValue=\"\"\n control={control}\n render={({ field }) => (\n (\n setOpen(!open)}\n isExpanded={open}\n >\n {[field.value || t(\"choose\")]}\n \n )}\n isOpen={open}\n onSelect={(_, value) => {\n field.onChange(value);\n setOpen(false);\n }}\n selected={field.value}\n >\n \n {[\"\", \"S256\", \"plain\"].map((v) => (\n \n {v || t(\"choose\")}\n \n ))}\n \n \n )}\n />\n \n (\n \"attributes.require.pushed.authorization.requests\",\n )}\n label={t(\"pushedAuthorizationRequestRequired\")}\n labelIcon={t(\"pushedAuthorizationRequestRequiredHelp\")}\n stringify\n />\n (\n \"attributes.client.use.lightweight.access.token.enabled\",\n )}\n label={t(\"lightweightAccessToken\")}\n labelIcon={t(\"lightweightAccessTokenHelp\")}\n stringify\n />\n\n (\n \"attributes.client.introspection.response.allow.jwt.claim.enabled\",\n )}\n label={t(\"supportJwtClaimInIntrospectionResponse\")}\n labelIcon={t(\"supportJwtClaimInIntrospectionResponseHelp\")}\n stringify\n />\n \n }\n >\n \n \n \n }\n >\n \n \n >\n )}\n \n \n {t(\"save\")}\n \n \n {t(\"revert\")}\n \n \n \n );\n};\n","import AuthenticationFlowRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/authenticationFlowRepresentation\";\nimport { ActionGroup, Button } from \"@patternfly/react-core\";\nimport { sortBy } from \"lodash-es\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { useFetch } from \"../../utils/useFetch\";\n\ntype AuthenticationOverridesProps = {\n save: () => void;\n reset: () => void;\n protocol?: string;\n hasConfigureAccess?: boolean;\n};\n\nexport const AuthenticationOverrides = ({\n protocol,\n save,\n reset,\n hasConfigureAccess,\n}: AuthenticationOverridesProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const [flows, setFlows] = useState([]);\n\n useFetch(\n () => adminClient.authenticationManagement.getFlows(),\n (flows) => {\n let filteredFlows = [\n ...flows.filter((flow) => flow.providerId !== \"client-flow\"),\n ];\n filteredFlows = sortBy(filteredFlows, [(f) => f.alias]);\n setFlows(filteredFlows);\n },\n [],\n );\n\n return (\n \n ({ key: id!, value: alias! })),\n ]}\n />\n {protocol === \"openid-connect\" && (\n ({ key: id!, value: alias! })),\n ]}\n />\n )}\n \n \n {t(\"save\")}\n \n \n {t(\"revert\")}\n \n \n \n );\n};\n","import { useController } from \"react-hook-form\";\nimport { TimeSelector, TimeSelectorProps } from \"./TimeSelector\";\n\ntype TimeSelectorFormProps = TimeSelectorProps & {\n name: string;\n};\n\nexport const TimeSelectorForm = (props: TimeSelectorFormProps) => {\n const { field } = useController(props);\n\n return ;\n};\n","import {\n AlertVariant,\n Button,\n ButtonVariant,\n Form,\n Modal,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { TextControl } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\n\ntype FormFields = {\n node: string;\n};\n\ntype AddHostDialogProps = {\n clientId: string;\n isOpen: boolean;\n onAdded: (host: string) => void;\n onClose: () => void;\n};\n\nexport const AddHostDialog = ({\n clientId: id,\n isOpen,\n onAdded,\n onClose,\n}: AddHostDialogProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const form = useForm();\n const {\n handleSubmit,\n formState: { isDirty, isValid },\n } = form;\n const { addAlert, addError } = useAlerts();\n\n async function onSubmit({ node }: FormFields) {\n try {\n await adminClient.clients.addClusterNode({\n id,\n node,\n });\n onAdded(node);\n addAlert(t(\"addedNodeSuccess\"), AlertVariant.success);\n } catch (error) {\n addError(\"addedNodeFail\", error);\n }\n\n onClose();\n }\n\n return (\n \n {t(\"save\")}\n ,\n \n {t(\"cancel\")}\n ,\n ]}\n >\n \n \n \n \n \n \n );\n};\n","import {\n AlertVariant,\n Button,\n ButtonVariant,\n ExpandableSection,\n FormGroup,\n Split,\n SplitItem,\n ToolbarItem,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { HelpItem } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { useConfirmDialog } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ListEmptyState } from \"../../components/list-empty-state/ListEmptyState\";\nimport {\n Action,\n KeycloakDataTable,\n} from \"../../components/table-toolbar/KeycloakDataTable\";\nimport { TimeSelectorForm } from \"../../components/time-selector/TimeSelectorForm\";\nimport useFormatDate, { FORMAT_DATE_AND_TIME } from \"../../utils/useFormatDate\";\nimport { AddHostDialog } from \".././advanced/AddHostDialog\";\nimport { AdvancedProps, parseResult } from \"../AdvancedTab\";\n\ntype Node = {\n host: string;\n registration: string;\n};\n\nexport const ClusteringPanel = ({\n save,\n client: { id, registeredNodes, access },\n}: AdvancedProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { addAlert, addError } = useAlerts();\n const formatDate = useFormatDate();\n\n const [nodes, setNodes] = useState(registeredNodes || {});\n const [expanded, setExpanded] = useState(false);\n const [selectedNode, setSelectedNode] = useState(\"\");\n const [addNodeOpen, setAddNodeOpen] = useState(false);\n const [key, setKey] = useState(0);\n const refresh = () => setKey(new Date().getTime());\n\n const testCluster = async () => {\n const result = await adminClient.clients.testNodesAvailable({ id: id! });\n parseResult(result, \"testCluster\", addAlert, t);\n };\n\n const [toggleDeleteNodeConfirm, DeleteNodeConfirm] = useConfirmDialog({\n titleKey: \"deleteNode\",\n messageKey: t(\"deleteNodeBody\", {\n node: selectedNode,\n }),\n continueButtonLabel: \"delete\",\n continueButtonVariant: ButtonVariant.danger,\n onConfirm: async () => {\n try {\n await adminClient.clients.deleteClusterNode({\n id: id!,\n node: selectedNode,\n });\n setNodes({\n ...Object.keys(nodes).reduce((object: any, key) => {\n if (key !== selectedNode) {\n object[key] = nodes[key];\n }\n return object;\n }, {}),\n });\n refresh();\n addAlert(t(\"deleteNodeSuccess\"), AlertVariant.success);\n } catch (error) {\n addError(\"deleteNodeFail\", error);\n }\n },\n });\n\n return (\n <>\n \n \n }\n >\n \n \n \n \n \n save()}>\n {t(\"save\")}\n \n \n \n \n \n <>\n \n {\n nodes[node] = Date.now() / 1000;\n refresh();\n }}\n onClose={() => setAddNodeOpen(false)}\n />\n setExpanded(val)}\n isExpanded={expanded}\n >\n \n Promise.resolve(\n Object.entries(nodes || {}).map((entry) => {\n return { host: entry[0], registration: entry[1] };\n }),\n )\n }\n toolbarItem={\n <>\n \n \n {t(\"testClusterAvailability\")}\n \n \n \n setAddNodeOpen(true)}\n variant={ButtonVariant.tertiary}\n >\n {t(\"registerNodeManually\")}\n \n \n >\n }\n actions={[\n {\n title: t(\"delete\"),\n onRowClick: (node) => {\n setSelectedNode(node.host);\n toggleDeleteNodeConfirm();\n },\n } as Action,\n ]}\n columns={[\n {\n name: \"host\",\n displayKey: \"nodeHost\",\n },\n {\n name: \"registration\",\n displayKey: \"lastRegistration\",\n cellFormatters: [\n (value) =>\n value\n ? formatDate(\n new Date(parseInt(value.toString()) * 1000),\n FORMAT_DATE_AND_TIME,\n )\n : \"\",\n ],\n },\n ]}\n emptyState={\n setAddNodeOpen(true)}\n />\n }\n />\n \n >\n >\n );\n};\n","import { useTranslation } from \"react-i18next\";\nimport { TextControl } from \"@keycloak/keycloak-ui-shared\";\n\ntype ApplicationUrlsProps = {\n isDisabled?: boolean;\n};\n\nexport const ApplicationUrls = (props: ApplicationUrlsProps) => {\n const { t } = useTranslation();\n\n return (\n <>\n \n \n \n >\n );\n};\n","import { ProviderRepresentation } from \"@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation\";\nimport { ActionGroup, Button, FormGroup } from \"@patternfly/react-core\";\nimport { useTranslation } from \"react-i18next\";\nimport { HelpItem, SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { MultiLineInput } from \"../../components/multi-line-input/MultiLineInput\";\nimport { useServerInfo } from \"../../context/server-info/ServerInfoProvider\";\nimport { convertAttributeNameToForm, sortProviders } from \"../../util\";\nimport { FormFields } from \"../ClientDetails\";\nimport { ApplicationUrls } from \"./ApplicationUrls\";\n\ntype FineGrainOpenIdConnectProps = {\n save: () => void;\n reset: () => void;\n hasConfigureAccess?: boolean;\n};\n\nexport const FineGrainOpenIdConnect = ({\n save,\n reset,\n hasConfigureAccess,\n}: FineGrainOpenIdConnectProps) => {\n const { t } = useTranslation();\n const providers = useServerInfo().providers;\n const clientSignatureProviders = providers?.clientSignature.providers;\n const contentEncryptionProviders = providers?.contentencryption.providers;\n const cekManagementProviders = providers?.cekmanagement.providers;\n const signatureProviders = providers?.signature.providers;\n\n const convert = (list: { [index: string]: ProviderRepresentation }) =>\n sortProviders(list).map((i) => ({ key: i, value: i }));\n\n const prependEmpty = (list: { [index: string]: ProviderRepresentation }) => [\n { key: \"\", value: t(\"choose\") },\n ...convert(list),\n ];\n\n const prependAny = (list: { [index: string]: ProviderRepresentation }) => [\n { key: \"any\", value: t(\"any\") },\n ...convert(list),\n ];\n\n const prependNone = (list: { [index: string]: ProviderRepresentation }) => [\n { key: \"none\", value: t(\"none\") },\n ...convert(list),\n ];\n\n return (\n \n \n (\n \"attributes.access.token.signed.response.alg\",\n )}\n label={t(\"accessTokenSignatureAlgorithm\")}\n labelIcon={t(\"accessTokenSignatureAlgorithmHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(clientSignatureProviders!)}\n />\n (\n \"attributes.id.token.signed.response.alg\",\n )}\n label={t(\"idTokenSignatureAlgorithm\")}\n labelIcon={t(\"idTokenSignatureAlgorithmHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(clientSignatureProviders!)}\n />\n (\n \"attributes.id.token.encrypted.response.alg\",\n )}\n label={t(\"idTokenEncryptionKeyManagementAlgorithm\")}\n labelIcon={t(\"idTokenEncryptionKeyManagementAlgorithmHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(cekManagementProviders!)}\n />\n (\n \"attributes.id.token.encrypted.response.enc\",\n )}\n label={t(\"idTokenEncryptionContentEncryptionAlgorithm\")}\n labelIcon={t(\"idTokenEncryptionContentEncryptionAlgorithmHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(contentEncryptionProviders!)}\n />\n (\n \"attributes.user.info.response.signature.alg\",\n )}\n label={t(\"userInfoSignedResponseAlgorithm\")}\n labelIcon={t(\"userInfoSignedResponseAlgorithmHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(signatureProviders!)}\n />\n (\n \"attributes.user.info.encrypted.response.alg\",\n )}\n label={t(\"userInfoResponseEncryptionKeyManagementAlgorithm\")}\n labelIcon={t(\"userInfoResponseEncryptionKeyManagementAlgorithmHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(cekManagementProviders!)}\n />\n (\n \"attributes.user.info.encrypted.response.enc\",\n )}\n label={t(\"userInfoResponseEncryptionContentEncryptionAlgorithm\")}\n labelIcon={t(\n \"userInfoResponseEncryptionContentEncryptionAlgorithmHelp\",\n )}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(contentEncryptionProviders!)}\n />\n (\n \"attributes.request.object.signature.alg\",\n )}\n label={t(\"requestObjectSignatureAlgorithm\")}\n labelIcon={t(\"requestObjectSignatureAlgorithmHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={[\n { key: \"any\", value: t(\"any\") },\n ...prependNone(clientSignatureProviders!),\n ]}\n />\n (\n \"attributes.request.object.encryption.alg\",\n )}\n label={t(\"requestObjectEncryption\")}\n labelIcon={t(\"requestObjectEncryptionHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependAny(cekManagementProviders!)}\n />\n (\n \"attributes.request.object.encryption.enc\",\n )}\n label={t(\"requestObjectEncoding\")}\n labelIcon={t(\"requestObjectEncodingHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependAny(contentEncryptionProviders!)}\n />\n (\n \"attributes.request.object.required\",\n )}\n label={t(\"requestObjectRequired\")}\n labelIcon={t(\"requestObjectRequiredHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={[\n \"not required\",\n \"request or request_uri\",\n \"request only\",\n \"request_uri only\",\n ].map((p) => ({\n key: p,\n value: t(`requestObject.${p}`),\n }))}\n />\n \n }\n >\n \n \n (\n \"attributes.authorization.signed.response.alg\",\n )}\n label={t(\"authorizationSignedResponseAlg\")}\n labelIcon={t(\"authorizationSignedResponseAlgHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(signatureProviders!)}\n />\n (\n \"attributes.authorization.encrypted.response.alg\",\n )}\n label={t(\"authorizationEncryptedResponseAlg\")}\n labelIcon={t(\"authorizationEncryptedResponseAlgHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(cekManagementProviders!)}\n />\n (\n \"attributes.authorization.encrypted.response.enc\",\n )}\n label={t(\"authorizationEncryptedResponseEnc\")}\n labelIcon={t(\"authorizationEncryptedResponseEncHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n options={prependEmpty(contentEncryptionProviders!)}\n />\n \n \n {t(\"save\")}\n \n \n {t(\"revert\")}\n \n \n \n );\n};\n","import { ActionGroup, Button } from \"@patternfly/react-core\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { TextControl } from \"@keycloak/keycloak-ui-shared\";\nimport { ApplicationUrls } from \"./ApplicationUrls\";\n\ntype FineGrainSamlEndpointConfigProps = {\n save: () => void;\n reset: () => void;\n};\n\nexport const FineGrainSamlEndpointConfig = ({\n save,\n reset,\n}: FineGrainSamlEndpointConfigProps) => {\n const { t } = useTranslation();\n return (\n \n \n \n \n \n \n \n \n \n \n\n \n \n {t(\"save\")}\n \n \n {t(\"revert\")}\n \n \n \n );\n};\n","import { ActionGroup, Button, FormGroup, Switch } from \"@patternfly/react-core\";\nimport { Controller, useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { HelpItem } from \"@keycloak/keycloak-ui-shared\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport { FormFields } from \"../ClientDetails\";\n\ntype OpenIdConnectCompatibilityModesProps = {\n save: () => void;\n reset: () => void;\n hasConfigureAccess?: boolean;\n};\n\nexport const OpenIdConnectCompatibilityModes = ({\n save,\n reset,\n hasConfigureAccess,\n}: OpenIdConnectCompatibilityModesProps) => {\n const { t } = useTranslation();\n const { control } = useFormContext();\n return (\n \n \n }\n >\n (\n \"attributes.exclude.session.state.from.auth.response\",\n )}\n defaultValue=\"\"\n control={control}\n render={({ field }) => (\n field.onChange(value.toString())}\n aria-label={t(\"excludeSessionStateFromAuthenticationResponse\")}\n />\n )}\n />\n \n \n }\n >\n (\n \"attributes.exclude.issuer.from.auth.response\",\n )}\n defaultValue=\"\"\n control={control}\n render={({ field }) => (\n field.onChange(value.toString())}\n aria-label={t(\"excludeIssuerFromAuthenticationResponse\")}\n />\n )}\n />\n \n \n }\n >\n (\n \"attributes.use.refresh.tokens\",\n )}\n defaultValue=\"true\"\n control={control}\n render={({ field }) => (\n field.onChange(value.toString())}\n aria-label={t(\"useRefreshTokens\")}\n />\n )}\n />\n \n \n }\n >\n (\n \"attributes.client_credentials.use_refresh_token\",\n )}\n defaultValue=\"false\"\n control={control}\n render={({ field }) => (\n field.onChange(value.toString())}\n aria-label={t(\"useRefreshTokenForClientCredentialsGrant\")}\n />\n )}\n />\n \n \n }\n >\n (\n \"attributes.token.response.type.bearer.lower-case\",\n )}\n defaultValue=\"false\"\n control={control}\n render={({ field }) => (\n field.onChange(value.toString())}\n aria-label={t(\"useLowerCaseBearerType\")}\n />\n )}\n />\n \n \n \n {t(\"save\")}\n \n \n {t(\"revert\")}\n \n \n \n );\n};\n","import type ClientRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientRepresentation\";\nimport type GlobalRequestResult from \"@keycloak/keycloak-admin-client/lib/defs/globalRequestResult\";\nimport { AlertVariant, PageSection, Text } from \"@patternfly/react-core\";\nimport type { TFunction } from \"i18next\";\nimport { useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { ScrollForm } from \"@keycloak/keycloak-ui-shared\";\nimport type { AddAlertFunction } from \"../components/alert/Alerts\";\nimport { convertAttributeNameToForm, toUpperCase } from \"../util\";\nimport type { FormFields, SaveOptions } from \"./ClientDetails\";\nimport { AdvancedSettings } from \"./advanced/AdvancedSettings\";\nimport { AuthenticationOverrides } from \"./advanced/AuthenticationOverrides\";\nimport { ClusteringPanel } from \"./advanced/ClusteringPanel\";\nimport { FineGrainOpenIdConnect } from \"./advanced/FineGrainOpenIdConnect\";\nimport { FineGrainSamlEndpointConfig } from \"./advanced/FineGrainSamlEndpointConfig\";\nimport { OpenIdConnectCompatibilityModes } from \"./advanced/OpenIdConnectCompatibilityModes\";\n\nexport const parseResult = (\n result: GlobalRequestResult,\n prefixKey: string,\n addAlert: AddAlertFunction,\n t: TFunction,\n) => {\n const successCount = result.successRequests?.length || 0;\n const failedCount = result.failedRequests?.length || 0;\n\n if (successCount === 0 && failedCount === 0) {\n addAlert(t(\"noAdminUrlSet\"), AlertVariant.warning);\n } else if (failedCount > 0) {\n addAlert(\n t(prefixKey + \"Success\", { successNodes: result.successRequests }),\n AlertVariant.success,\n );\n addAlert(\n t(prefixKey + \"Fail\", { failedNodes: result.failedRequests }),\n AlertVariant.danger,\n );\n } else {\n addAlert(\n t(prefixKey + \"Success\", { successNodes: result.successRequests }),\n AlertVariant.success,\n );\n }\n};\n\nexport type AdvancedProps = {\n save: (options?: SaveOptions) => void;\n client: ClientRepresentation;\n};\n\nexport const AdvancedTab = ({ save, client }: AdvancedProps) => {\n const { t } = useTranslation();\n const openIdConnect = \"openid-connect\";\n\n const { setValue } = useFormContext();\n const {\n publicClient,\n attributes,\n protocol,\n authenticationFlowBindingOverrides,\n } = client;\n\n const resetFields = (names: string[]) => {\n for (const name of names) {\n setValue(\n convertAttributeNameToForm(`attributes.${name}`),\n attributes?.[name] || \"\",\n );\n }\n };\n\n return (\n \n ,\n },\n {\n title: t(\"fineGrainOpenIdConnectConfiguration\"),\n isHidden: protocol !== openIdConnect,\n panel: (\n <>\n \n {t(\"fineGrainOpenIdConnectConfigurationHelp\")}\n \n {\n resetFields([\n \"logoUri\",\n \"policyUri\",\n \"tosUri\",\n \"access.token.signed.response.alg\",\n \"id.token.signed.response.alg\",\n \"id.token.encrypted.response.alg\",\n \"id.token.encrypted.response.enc\",\n \"user.info.response.signature.alg\",\n \"user.info.encrypted.response.alg\",\n \"user.info.encrypted.response.enc\",\n \"request.object.signature.alg\",\n \"request.object.encryption.alg\",\n \"request.object.encryption.enc\",\n \"request.object.required\",\n \"request.uris\",\n \"authorization.signed.response.alg\",\n \"authorization.encrypted.response.alg\",\n \"authorization.encrypted.response.enc\",\n ]);\n }}\n />\n >\n ),\n },\n {\n title: t(\"openIdConnectCompatibilityModes\"),\n isHidden: protocol !== openIdConnect,\n panel: (\n <>\n \n {t(\"openIdConnectCompatibilityModesHelp\")}\n \n save()}\n reset={() =>\n resetFields([\n \"exclude.session.state.from.auth.response\",\n \"use.refresh.tokens\",\n \"client_credentials.use_refresh_token\",\n \"token.response.type.bearer.lower-case\",\n ])\n }\n />\n >\n ),\n },\n {\n title: t(\"fineGrainSamlEndpointConfig\"),\n isHidden: protocol === openIdConnect,\n panel: (\n <>\n \n {t(\"fineGrainSamlEndpointConfigHelp\")}\n \n save()}\n reset={() =>\n resetFields([\n \"logoUri\",\n \"policyUri\",\n \"tosUri\",\n \"saml_assertion_consumer_url_post\",\n \"saml_assertion_consumer_url_redirect\",\n \"saml_single_logout_service_url_post\",\n \"saml_single_logout_service_url_redirect\",\n \"saml_single_logout_service_url_artifact\",\n \"saml_artifact_binding_url\",\n \"saml_artifact_resolution_service_url\",\n ])\n }\n />\n >\n ),\n },\n {\n title: t(\"advancedSettings\"),\n panel: (\n <>\n \n {t(\"advancedSettings\" + toUpperCase(protocol || \"\"))}\n \n save()}\n reset={() => {\n resetFields([\n \"saml.assertion.lifespan\",\n \"access.token.lifespan\",\n \"tls.client.certificate.bound.access.tokens\",\n \"pkce.code.challenge.method\",\n ]);\n }}\n />\n >\n ),\n },\n {\n title: t(\"authenticationOverrides\"),\n panel: (\n <>\n \n {t(\"authenticationOverridesHelp\")}\n \n save()}\n reset={() => {\n setValue(\n \"authenticationFlowBindingOverrides.browser\",\n authenticationFlowBindingOverrides?.browser,\n );\n setValue(\n \"authenticationFlowBindingOverrides.direct_grant\",\n authenticationFlowBindingOverrides?.direct_grant,\n );\n }}\n />\n >\n ),\n },\n ]}\n borders\n />\n \n );\n};\n","import type ClientRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientRepresentation\";\nimport type UserSessionRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/userSessionRepresentation\";\nimport { PageSection } from \"@patternfly/react-core\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../admin-client\";\nimport type { LoaderFunction } from \"../components/table-toolbar/KeycloakDataTable\";\nimport SessionsTable from \"../sessions/SessionsTable\";\n\ntype ClientSessionsProps = {\n client: ClientRepresentation;\n};\n\nexport const ClientSessions = ({ client }: ClientSessionsProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n\n const loader: LoaderFunction = async (\n first,\n max,\n ) => {\n const mapSessionsToType =\n (type: string) => (sessions: UserSessionRepresentation[]) =>\n sessions.map((session) => ({\n type,\n ...session,\n }));\n\n const allSessions = await Promise.all([\n adminClient.clients\n .listSessions({ id: client.id!, first, max })\n .then(mapSessionsToType(t(\"sessionsType.regularSSO\"))),\n adminClient.clients\n .listOfflineSessions({\n id: client.id!,\n first,\n max,\n })\n .then(mapSessionsToType(t(\"sessionsType.offline\"))),\n ]);\n\n return allSessions.flat();\n };\n\n return (\n \n \n \n );\n};\n","import { useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { TextControl } from \"@keycloak/keycloak-ui-shared\";\n\nimport { FixedButtonsGroup } from \"../../components/form/FixedButtonGroup\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { useAccess } from \"../../context/access/Access\";\nimport { FormFields } from \"../ClientDetails\";\nimport type { ClientSettingsProps } from \"../ClientSettings\";\nimport { LoginSettings } from \"./LoginSettings\";\n\nexport const AccessSettings = ({\n client,\n save,\n reset,\n}: ClientSettingsProps) => {\n const { t } = useTranslation();\n const { watch } = useFormContext();\n\n const { hasAccess } = useAccess();\n const isManager = hasAccess(\"manage-clients\") || client.access?.configure;\n\n const protocol = watch(\"protocol\");\n\n return (\n \n {!client.bearerOnly && }\n {protocol !== \"saml\" && (\n \n )}\n {client.bearerOnly && (\n \n )}\n \n );\n};\n","import { useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { SelectControl, TextAreaControl } from \"@keycloak/keycloak-ui-shared\";\nimport { DefaultSwitchControl } from \"../../components/SwitchControl\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { useServerInfo } from \"../../context/server-info/ServerInfoProvider\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport { FormFields } from \"../ClientDetails\";\n\nexport const LoginSettingsPanel = ({ access }: { access?: boolean }) => {\n const { t } = useTranslation();\n const { watch } = useFormContext();\n\n const loginThemes = useServerInfo().themes![\"login\"];\n const consentRequired = watch(\"consentRequired\");\n const displayOnConsentScreen: string = watch(\n convertAttributeNameToForm(\n \"attributes.display.on.consent.screen\",\n ),\n );\n\n return (\n \n ({ key: name, value: name })),\n ]}\n />\n \n (\n \"attributes.display.on.consent.screen\",\n )}\n label={t(\"displayOnClient\")}\n labelIcon={t(\"displayOnClientHelp\")}\n isDisabled={!consentRequired}\n stringify\n />\n (\n \"attributes.consent.screen.text\",\n )}\n label={t(\"consentScreenText\")}\n labelIcon={t(\"consentScreenTextHelp\")}\n isDisabled={!(consentRequired && displayOnConsentScreen === \"true\")}\n />\n \n );\n};\n","import { FormGroup, Switch } from \"@patternfly/react-core\";\nimport { Controller, useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { HelpItem, TextControl } from \"@keycloak/keycloak-ui-shared\";\n\nimport { FixedButtonsGroup } from \"../../components/form/FixedButtonGroup\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { useAccess } from \"../../context/access/Access\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport { FormFields } from \"../ClientDetails\";\nimport type { ClientSettingsProps } from \"../ClientSettings\";\n\nconst validateUrl = (uri: string | undefined, error: string) =>\n ((uri?.startsWith(\"https://\") || uri?.startsWith(\"http://\")) &&\n !uri.includes(\"*\")) ||\n uri === \"\" ||\n error;\n\nexport const LogoutPanel = ({\n save,\n reset,\n client: { access },\n}: ClientSettingsProps) => {\n const { t } = useTranslation();\n const { control, watch } = useFormContext();\n\n const { hasAccess } = useAccess();\n const isManager = hasAccess(\"manage-clients\") || access?.configure;\n\n const protocol = watch(\"protocol\");\n const frontchannelLogout = watch(\"frontchannelLogout\");\n\n return (\n \n \n }\n fieldId=\"kc-frontchannelLogout\"\n hasNoPaddingTop\n >\n (\n \n )}\n />\n \n {protocol === \"openid-connect\" && frontchannelLogout && (\n (\n \"attributes.frontchannel.logout.url\",\n )}\n label={t(\"frontchannelLogoutUrl\")}\n labelIcon={t(\"frontchannelLogoutUrlHelp\")}\n rules={{\n validate: (uri) =>\n validateUrl(uri, t(\"frontchannelUrlInvalid\").toString()),\n }}\n />\n )}\n {protocol === \"openid-connect\" && (\n <>\n (\n \"attributes.backchannel.logout.url\",\n )}\n label={t(\"backchannelLogoutUrl\")}\n labelIcon={t(\"backchannelLogoutUrlHelp\")}\n rules={{\n validate: (uri) =>\n validateUrl(uri, t(\"backchannelUrlInvalid\").toString()),\n }}\n />\n \n }\n fieldId=\"backchannelLogoutSessionRequired\"\n hasNoPaddingTop\n >\n (\n \"attributes.backchannel.logout.session.required\",\n )}\n defaultValue=\"true\"\n control={control}\n render={({ field }) => (\n field.onChange(value.toString())}\n aria-label={t(\"backchannelLogoutSessionRequired\")}\n />\n )}\n />\n \n \n }\n fieldId=\"backchannelLogoutRevokeOfflineSessions\"\n hasNoPaddingTop\n >\n (\n \"attributes.backchannel.logout.revoke.offline.tokens\",\n )}\n defaultValue=\"false\"\n control={control}\n render={({ field }) => (\n field.onChange(value.toString())}\n aria-label={t(\"backchannelLogoutRevokeOfflineSessions\")}\n />\n )}\n />\n \n >\n )}\n \n \n );\n};\n","import { Path, PathValue } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { DefaultSwitchControl } from \"../../components/SwitchControl\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport { FormFields } from \"../ClientDetails\";\n\ntype ToggleProps = {\n name: PathValue>;\n label: string;\n};\nexport const Toggle = ({ name, label }: ToggleProps) => {\n const { t } = useTranslation();\n\n return (\n \n );\n};\n\nexport const SamlConfig = () => {\n const { t } = useTranslation();\n\n return (\n \n \n \n \n \n \n \n \n \n \n );\n};\n","import { useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport { FormFields } from \"../ClientDetails\";\nimport { Toggle } from \"./SamlConfig\";\n\nconst SIGNATURE_ALGORITHMS = [\n \"RSA_SHA1\",\n \"RSA_SHA256\",\n \"RSA_SHA256_MGF1\",\n \"RSA_SHA512\",\n \"RSA_SHA512_MGF1\",\n \"DSA_SHA1\",\n] as const;\n\nconst KEYNAME_TRANSFORMER = [\"NONE\", \"KEY_ID\", \"CERT_SUBJECT\"] as const;\n\nconst CANONICALIZATION = [\n { name: \"EXCLUSIVE\", value: \"http://www.w3.org/2001/10/xml-exc-c14n#\" },\n {\n name: \"EXCLUSIVE_WITH_COMMENTS\",\n value: \"http://www.w3.org/2001/10/xml-exc-c14n#WithComments\",\n },\n {\n name: \"INCLUSIVE\",\n value: \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315\",\n },\n {\n name: \"INCLUSIVE_WITH_COMMENTS\",\n value: \"http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments\",\n },\n] as const;\n\nexport const SamlSignature = () => {\n const { t } = useTranslation();\n const { watch } = useFormContext();\n\n const signDocs = watch(\n convertAttributeNameToForm(\"attributes.saml.server.signature\"),\n );\n const signAssertion = watch(\n convertAttributeNameToForm(\n \"attributes.saml.assertion.signature\",\n ),\n );\n\n return (\n \n \n \n {(signDocs === \"true\" || signAssertion === \"true\") && (\n <>\n (\n \"attributes.saml.signature.algorithm\",\n )}\n label={t(\"signatureAlgorithm\")}\n labelIcon={t(\"signatureAlgorithmHelp\")}\n controller={{\n defaultValue: SIGNATURE_ALGORITHMS[0],\n }}\n options={[...SIGNATURE_ALGORITHMS]}\n />\n (\n \"attributes.saml.server.signature.keyinfo.xmlSigKeyInfoKeyNameTransformer\",\n )}\n label={t(\"signatureKeyName\")}\n labelIcon={t(\"signatureKeyNameHelp\")}\n controller={{\n defaultValue: KEYNAME_TRANSFORMER[0],\n }}\n options={[...KEYNAME_TRANSFORMER]}\n />\n ({\n key: value,\n value: name,\n }))}\n />\n >\n )}\n \n );\n};\n","import type ClientRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientRepresentation\";\nimport { Form } from \"@patternfly/react-core\";\nimport { useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { ScrollForm } from \"@keycloak/keycloak-ui-shared\";\nimport { ClientDescription } from \"./ClientDescription\";\nimport { FormFields } from \"./ClientDetails\";\nimport { AccessSettings } from \"./add/AccessSettings\";\nimport { CapabilityConfig } from \"./add/CapabilityConfig\";\nimport { LoginSettingsPanel } from \"./add/LoginSettingsPanel\";\nimport { LogoutPanel } from \"./add/LogoutPanel\";\nimport { SamlConfig } from \"./add/SamlConfig\";\nimport { SamlSignature } from \"./add/SamlSignature\";\n\nexport type ClientSettingsProps = {\n client: ClientRepresentation;\n save: () => void;\n reset: () => void;\n};\n\nexport const ClientSettings = (props: ClientSettingsProps) => {\n const { t } = useTranslation();\n\n const { watch } = useFormContext();\n const protocol = watch(\"protocol\");\n\n const { client } = props;\n\n return (\n \n \n \n ),\n },\n {\n title: t(\"accessSettings\"),\n panel: ,\n },\n {\n title: t(\"samlCapabilityConfig\"),\n isHidden: protocol !== \"saml\" || client.bearerOnly,\n panel: ,\n },\n {\n title: t(\"signatureAndEncryption\"),\n isHidden: protocol !== \"saml\" || client.bearerOnly,\n panel: ,\n },\n {\n title: t(\"capabilityConfig\"),\n isHidden: protocol !== \"openid-connect\" || client.bearerOnly,\n panel: ,\n },\n {\n title: t(\"loginSettings\"),\n isHidden: client.bearerOnly,\n panel: ,\n },\n {\n title: t(\"logoutSettings\"),\n isHidden: client.bearerOnly,\n panel: ,\n },\n ]}\n />\n );\n};\n","import type ResourceRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation\";\nimport { KeycloakSelect, SelectVariant } from \"@keycloak/keycloak-ui-shared\";\nimport { Button, SelectOption, TextInput } from \"@patternfly/react-core\";\nimport { MinusCircleIcon, PlusCircleIcon } from \"@patternfly/react-icons\";\nimport { Table, Tbody, Td, Th, Thead, Tr } from \"@patternfly/react-table\";\nimport { camelCase } from \"lodash-es\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { Controller, useFieldArray, useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { defaultContextAttributes } from \"../utils\";\n\nimport \"./key-based-attribute-input.css\";\n\nexport type AttributeType = {\n key?: string;\n name: string;\n custom?: boolean;\n values?: {\n [key: string]: string;\n }[];\n};\n\ntype AttributeInputProps = {\n name: string;\n selectableValues?: AttributeType[];\n resources?: ResourceRepresentation[];\n};\n\ntype ValueInputProps = {\n name: string;\n rowIndex: number;\n attribute: any;\n selectableValues?: AttributeType[];\n resources?: ResourceRepresentation[];\n};\n\nconst ValueInput = ({\n name,\n rowIndex,\n attribute,\n selectableValues,\n resources,\n}: ValueInputProps) => {\n const { t } = useTranslation();\n const { control, register, getValues } = useFormContext();\n const [isValueOpenArray, setIsValueOpenArray] = useState([false]);\n\n const toggleValueSelect = (rowIndex: number, open: boolean) => {\n const arr = [...isValueOpenArray];\n arr[rowIndex] = open;\n setIsValueOpenArray(arr);\n };\n\n const attributeValues = useMemo(() => {\n let values: AttributeType[] | undefined = [];\n\n if (selectableValues) {\n values = defaultContextAttributes.find(\n (attr) => attr.key === getValues().context?.[rowIndex]?.key,\n )?.values;\n }\n\n return values;\n }, [getValues]);\n\n const renderSelectOptionType = () => {\n const scopeValues = resources?.find(\n (resource) => resource.name === getValues().resources?.[rowIndex]?.key,\n )?.scopes;\n\n if (attributeValues?.length && !resources) {\n return attributeValues.map((attr) => (\n \n {attr.name}\n \n ));\n } else if (scopeValues?.length) {\n return scopeValues.map((scope) => (\n \n {scope.name}\n \n ));\n }\n };\n\n const getMessageBundleKey = (attributeName: string) =>\n camelCase(attributeName).replace(/\\W/g, \"\");\n\n return (\n \n {resources || attributeValues?.length ? (\n (\n toggleValueSelect(rowIndex, open)}\n isOpen={isValueOpenArray[rowIndex]}\n variant={SelectVariant.typeahead}\n typeAheadAriaLabel={t(\"selectOrTypeAKey\")}\n placeholderText={t(\"selectOrTypeAKey\")}\n selections={field.value}\n onSelect={(v) => {\n field.onChange(v);\n\n toggleValueSelect(rowIndex, false);\n }}\n >\n {renderSelectOptionType()}\n \n )}\n />\n ) : (\n \n )}\n \n );\n};\n\nexport const KeyBasedAttributeInput = ({\n name,\n selectableValues,\n resources,\n}: AttributeInputProps) => {\n const { t } = useTranslation();\n const { control, watch } = useFormContext();\n const { fields, append, remove } = useFieldArray({\n control: control,\n name,\n });\n\n const [isKeyOpenArray, setIsKeyOpenArray] = useState([false]);\n const toggleKeySelect = (rowIndex: number, open: boolean) => {\n const arr = [...isKeyOpenArray];\n arr[rowIndex] = open;\n setIsKeyOpenArray(arr);\n };\n\n useEffect(() => {\n if (!fields.length) {\n append({ key: \"\", value: \"\" }, { shouldFocus: false });\n }\n }, [fields]);\n\n const watchLastValue = watch(`${name}.${fields.length - 1}.value`, \"\");\n\n return (\n \n \n \n {t(\"key\")} \n {t(\"value\")} \n \n \n \n {fields.map((attribute, rowIndex) => (\n \n \n (\n toggleKeySelect(rowIndex, open)}\n isOpen={isKeyOpenArray[rowIndex]}\n variant={SelectVariant.typeahead}\n typeAheadAriaLabel={t(\"selectOrTypeAKey\")}\n placeholderText={t(\"selectOrTypeAKey\")}\n selections={field.value}\n onSelect={(v) => {\n field.onChange(v.toString());\n\n toggleKeySelect(rowIndex, false);\n }}\n >\n {selectableValues?.map((attribute) => (\n \n {attribute.name}\n \n ))}\n \n )}\n />\n \n \n \n remove(rowIndex)}\n aria-label={t(\"remove\")}\n >\n \n \n \n \n ))}\n \n \n {\n append({ key: \"\", value: \"\" });\n setIsKeyOpenArray([...isKeyOpenArray, false]);\n }}\n icon={ }\n isDisabled={!watchLastValue}\n data-testid=\"attribute-add-row\"\n >\n {t(\"addAttribute\", { label: t(\"attribute\") })}\n \n \n \n \n
\n );\n};\n","import type AccessTokenRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/accessTokenRepresentation\";\nimport {\n Button,\n Modal,\n ModalVariant,\n Text,\n TextArea,\n TextContent,\n TextVariants,\n} from \"@patternfly/react-core\";\nimport { useTranslation } from \"react-i18next\";\n\nimport { prettyPrintJSON } from \"../../util\";\nimport useToggle from \"../../utils/useToggle\";\n\ntype AuthorizationDataModalProps = {\n data: AccessTokenRepresentation;\n};\n\nexport const AuthorizationDataModal = ({\n data,\n}: AuthorizationDataModalProps) => {\n const { t } = useTranslation();\n const [show, toggle] = useToggle();\n\n return (\n <>\n \n {t(\"showAuthData\")}\n \n \n {t(\"authData\")} \n {t(\"authDataDescription\")} \n \n }\n onClose={toggle}\n actions={[\n \n {t(\"cancel\")}\n ,\n ]}\n >\n \n \n >\n );\n};\n","import type EvaluationResultRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/evaluationResultRepresentation\";\nimport { DecisionEffect } from \"@keycloak/keycloak-admin-client/lib/defs/policyRepresentation\";\nimport type PolicyResultRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/policyResultRepresentation\";\nimport {\n capitalize,\n DescriptionList,\n TextContent,\n TextList,\n TextListItem,\n} from \"@patternfly/react-core\";\nimport { ExpandableRowContent, Tbody, Td, Tr } from \"@patternfly/react-table\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\n\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { useParams } from \"../../utils/useParams\";\nimport type { ClientParams } from \"../routes/Client\";\nimport { toPermissionDetails } from \"../routes/PermissionDetails\";\nimport { toPolicyDetails } from \"../routes/PolicyDetails\";\n\ntype Props = {\n idx: number;\n rowIndex: number;\n outerPolicy: PolicyResultRepresentation;\n resource: EvaluationResultRepresentation;\n};\n\nexport const AuthorizationEvaluateResourcePolicies = ({\n idx,\n rowIndex,\n outerPolicy,\n resource,\n}: Props) => {\n const [expanded, setExpanded] = useState(false);\n const { t } = useTranslation();\n const { realm } = useRealm();\n const { clientId } = useParams();\n\n return (\n \n \n setExpanded((prev) => !prev),\n }}\n />\n \n \n {outerPolicy.policy?.name}\n \n \n \n {t(outerPolicy.status?.toLowerCase() as string)}\n \n {t(`${outerPolicy.policy?.decisionStrategy?.toLowerCase()}`)} \n \n {outerPolicy.status === DecisionEffect.Permit\n ? resource.policies?.[rowIndex]?.scopes?.join(\", \")\n : \"-\"}\n \n \n {outerPolicy.status === DecisionEffect.Deny &&\n resource.policies?.[rowIndex]?.scopes?.length\n ? resource.policies[rowIndex].scopes?.join(\", \")\n : \"-\"}\n \n \n \n \n \n {expanded && (\n \n \n \n \n {outerPolicy.associatedPolicies?.map((item) => (\n \n \n {item.policy?.name}\n \n\n {t(\"votedToStatus\", {\n status: capitalize(item.status as string),\n })}\n \n ))}\n \n \n \n \n )}\n \n \n \n );\n};\n","import { useState } from \"react\";\nimport {\n ExpandableRowContent,\n Table,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n} from \"@patternfly/react-table\";\nimport { DescriptionList } from \"@patternfly/react-core/dist/esm/components\";\nimport { useTranslation } from \"react-i18next\";\nimport { AuthorizationEvaluateResourcePolicies } from \"./AuthorizationEvaluateResourcePolicies\";\nimport type EvaluationResultRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/evaluationResultRepresentation\";\nimport type PolicyResultRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/policyResultRepresentation\";\n\ntype Props = {\n rowIndex: number;\n resource: EvaluationResultRepresentation;\n evaluateResults: any;\n};\n\nexport const AuthorizationEvaluateResource = ({\n rowIndex,\n resource,\n evaluateResults,\n}: Props) => {\n const [expanded, setExpanded] = useState(false);\n const { t } = useTranslation();\n\n return (\n \n \n setExpanded((prev) => !prev),\n }}\n />\n \n {resource.resource?.name}\n \n \n {t(`${resource.status?.toLowerCase()}`)}\n \n \n {resource.allowedScopes?.length\n ? resource.allowedScopes.map((item) => item.name)\n : \"-\"}\n \n \n \n \n \n \n {expanded && (\n \n \n \n \n \n {t(\"permission\")} \n {t(\"results\")} \n {t(\"decisionStrategy\")} \n {t(\"grantedScopes\")} \n {t(\"deniedScopes\")} \n \n \n \n {Object.values(evaluateResults[rowIndex].policies).map(\n (outerPolicy, idx) => (\n \n ),\n )}\n
\n \n )}\n \n \n \n \n );\n};\n","import {\n Button,\n ButtonVariant,\n Divider,\n Form,\n InputGroup,\n PageSection,\n TextInput,\n Toolbar,\n ToolbarGroup,\n ToolbarItem,\n InputGroupItem,\n Select,\n MenuToggle,\n SelectList,\n SelectOption,\n} from \"@patternfly/react-core\";\nimport { SearchIcon } from \"@patternfly/react-icons\";\nimport { Table, Th, Thead, Tr } from \"@patternfly/react-table\";\nimport { KeyboardEvent, useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\n\nimport type EvaluationResultRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/evaluationResultRepresentation\";\nimport type PolicyEvaluationResponse from \"@keycloak/keycloak-admin-client/lib/defs/policyEvaluationResponse\";\nimport { FixedButtonsGroup } from \"../../../components/form/FixedButtonGroup\";\nimport { ListEmptyState } from \"../../../components/list-empty-state/ListEmptyState\";\nimport useToggle from \"../../../utils/useToggle\";\nimport { AuthorizationDataModal } from \"../AuthorizationDataModal\";\nimport { AuthorizationEvaluateResource } from \"../AuthorizationEvaluateResource\";\n\ntype ResultProps = {\n evaluateResult: PolicyEvaluationResponse;\n refresh: () => void;\n back: () => void;\n};\n\nenum ResultsFilter {\n All = \"ALL\",\n StatusDenied = \"STATUS_DENIED\",\n StatusPermitted = \"STATUS_PERMITTED\",\n}\n\nfunction filterResults(\n results: EvaluationResultRepresentation[],\n filter: ResultsFilter,\n) {\n switch (filter) {\n case ResultsFilter.StatusPermitted:\n return results.filter(({ status }) => status === \"PERMIT\");\n case ResultsFilter.StatusDenied:\n return results.filter(({ status }) => status === \"DENY\");\n default:\n return results;\n }\n}\n\nexport const Results = ({ evaluateResult, refresh, back }: ResultProps) => {\n const { t } = useTranslation();\n\n const [filterDropdownOpen, toggleFilterDropdown] = useToggle();\n\n const [filter, setFilter] = useState(ResultsFilter.All);\n const [searchQuery, setSearchQuery] = useState(\"\");\n const [searchInput, setSearchInput] = useState(\"\");\n\n const confirmSearchQuery = () => {\n setSearchQuery(searchInput);\n };\n\n const handleKeyDown = (e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n confirmSearchQuery();\n }\n };\n\n const filteredResources = useMemo(\n () =>\n filterResults(evaluateResult.results!, filter).filter(\n ({ resource }) => resource?.name?.includes(searchQuery) ?? false,\n ),\n [evaluateResult.results, filter, searchQuery],\n );\n\n const noEvaluatedData = evaluateResult.results!.length === 0;\n const noFilteredData = filteredResources.length === 0;\n\n return (\n \n \n \n \n \n \n setSearchInput(val)}\n onKeyDown={handleKeyDown}\n />\n \n \n confirmSearchQuery()}\n >\n \n \n \n \n \n \n (\n \n {filter}\n \n )}\n onSelect={(_, value) => {\n setFilter(value as ResultsFilter);\n toggleFilterDropdown();\n refresh();\n }}\n selected={filter}\n >\n \n \n {t(\"allResults\")}\n \n \n {t(\"resultPermit\")}\n \n \n {t(\"resultDeny\")}\n \n \n \n \n \n \n {!noFilteredData && (\n \n \n \n \n {t(\"resource\")} \n {t(\"overallResults\")} \n {t(\"scopes\")} \n \n \n \n {filteredResources.map((resource, rowIndex) => (\n \n ))}\n
\n )}\n {(noFilteredData || noEvaluatedData) && (\n <>\n \n \n >\n )}\n \n \n \n {t(\"back\")}\n {\" \"}\n \n {t(\"reevaluate\")}\n {\" \"}\n \n \n \n \n );\n};\n","import type ClientRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientRepresentation\";\nimport type EvaluationResultRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/evaluationResultRepresentation\";\nimport type PolicyEvaluationResponse from \"@keycloak/keycloak-admin-client/lib/defs/policyEvaluationResponse\";\nimport type ResourceEvaluation from \"@keycloak/keycloak-admin-client/lib/defs/resourceEvaluation\";\nimport type ResourceRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation\";\nimport type RoleRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/roleRepresentation\";\nimport type ScopeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation\";\nimport {\n HelpItem,\n SelectControl,\n TextControl,\n} from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n Button,\n ExpandableSection,\n FormGroup,\n PageSection,\n Panel,\n PanelHeader,\n PanelMainBody,\n Switch,\n Title,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { FormProvider, useForm, useWatch } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { ForbiddenSection } from \"../../ForbiddenSection\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { ClientSelect } from \"../../components/client/ClientSelect\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport {\n KeyValueType,\n keyValueToArray,\n} from \"../../components/key-value-form/key-value-convert\";\nimport { UserSelect } from \"../../components/users/UserSelect\";\nimport { useAccess } from \"../../context/access/Access\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport { FormFields } from \"../ClientDetails\";\nimport { defaultContextAttributes } from \"../utils\";\nimport { KeyBasedAttributeInput } from \"./KeyBasedAttributeInput\";\nimport { Results } from \"./evaluate/Results\";\n\ninterface EvaluateFormInputs\n extends Omit {\n alias: string;\n authScopes: string[];\n context: {\n attributes: Record[];\n };\n resources?: Record[];\n client: FormFields;\n user: string[];\n}\n\nexport type AttributeType = {\n key: string;\n name: string;\n custom?: boolean;\n values?: {\n [key: string]: string;\n }[];\n};\n\ntype ClientSettingsProps = {\n client: ClientRepresentation;\n save: () => void;\n};\n\nexport type AttributeForm = Omit<\n EvaluateFormInputs,\n \"context\" | \"resources\"\n> & {\n context: {\n attributes?: KeyValueType[];\n };\n resources?: KeyValueType[];\n};\n\ntype Props = ClientSettingsProps & EvaluationResultRepresentation;\n\nexport const AuthorizationEvaluate = (props: Props) => {\n const { hasAccess } = useAccess();\n\n if (!hasAccess(\"view-users\")) {\n return ;\n }\n\n return ;\n};\n\nconst AuthorizationEvaluateContent = ({ client }: Props) => {\n const { adminClient } = useAdminClient();\n\n const form = useForm({ mode: \"onChange\" });\n const {\n control,\n reset,\n trigger,\n formState: { isValid },\n } = form;\n const { t } = useTranslation();\n const { addError } = useAlerts();\n const realm = useRealm();\n const [isExpanded, setIsExpanded] = useState(false);\n const [applyToResourceType, setApplyToResourceType] = useState(false);\n const [resources, setResources] = useState([]);\n const [scopes, setScopes] = useState([]);\n const [evaluateResult, setEvaluateResult] =\n useState();\n const [clientRoles, setClientRoles] = useState([]);\n\n useFetch(\n () => adminClient.roles.find(),\n (roles) => {\n setClientRoles(roles);\n },\n [],\n );\n\n useFetch(\n () =>\n Promise.all([\n adminClient.clients.listResources({\n id: client.id!,\n }),\n adminClient.clients.listAllScopes({\n id: client.id!,\n }),\n ]),\n ([resources, scopes]) => {\n setResources(resources);\n setScopes(scopes);\n },\n [],\n );\n\n const evaluate = async () => {\n if (!(await trigger())) {\n return;\n }\n const formValues = form.getValues();\n const keys = keyValueToArray(formValues.resources as KeyValueType[]);\n const resEval: ResourceEvaluation = {\n roleIds: formValues.roleIds ?? [],\n clientId: formValues.client.id!,\n userId: formValues.user![0],\n resources: resources\n .filter((resource) => Object.keys(keys).includes(resource.name!))\n .map((r) => ({\n ...r,\n scopes: r.scopes?.filter((s) =>\n Object.values(keys)\n .flatMap((v) => v)\n .includes(s.name!),\n ),\n })),\n entitlements: false,\n context: {\n attributes: Object.fromEntries(\n formValues.context.attributes\n .filter((item) => item.key || item.value !== \"\")\n .map(({ key, value }) => [key, value]),\n ),\n },\n };\n\n try {\n const evaluation = await adminClient.clients.evaluateResource(\n { id: client.id!, realm: realm.realm },\n resEval,\n );\n\n setEvaluateResult(evaluation);\n } catch (error) {\n addError(\"evaluateError\", error);\n }\n };\n\n const user = useWatch({ control, name: \"user\", defaultValue: [] });\n const roles = useWatch({ control, name: \"roleIds\", defaultValue: [] });\n\n if (evaluateResult) {\n return (\n setEvaluateResult(undefined)}\n />\n );\n }\n\n return (\n \n \n \n \n {t(\"identityInformation\")} \n \n \n \n \n \n role.name!)}\n />\n \n \n \n \n \n {t(\"permissions\")} \n \n \n \n \n }\n >\n setApplyToResourceType(val)}\n aria-label={t(\"applyToResourceType\")}\n />\n \n {!applyToResourceType ? (\n \n }\n fieldId=\"resourcesAndScopes\"\n >\n ((item) => ({\n name: item.name!,\n key: item._id!,\n }))}\n resources={resources}\n name=\"resources\"\n />\n \n ) : (\n <>\n \n s.name!)}\n />\n >\n )}\n setIsExpanded(!isExpanded)}\n isExpanded={isExpanded}\n >\n \n }\n fieldId=\"contextualAttributes\"\n >\n \n \n \n \n \n \n \n evaluate()}\n >\n {t(\"evaluate\")}\n \n reset()}\n >\n {t(\"revert\")}\n \n \n \n \n );\n};\n","import type ResourceServerRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { saveAs } from \"file-saver\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { TextAreaControl } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { KeycloakSpinner } from \"../../components/keycloak-spinner/KeycloakSpinner\";\nimport { prettyPrintJSON } from \"../../util\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport { useParams } from \"../../utils/useParams\";\nimport type { ClientParams } from \"../routes/Client\";\n\nexport const AuthorizationExport = () => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { clientId } = useParams();\n const { addAlert, addError } = useAlerts();\n\n const [code, setCode] = useState();\n const [authorizationDetails, setAuthorizationDetails] =\n useState();\n\n useFetch(\n () =>\n adminClient.clients.exportResource({\n id: clientId,\n }),\n\n (authDetails) => {\n setCode(JSON.stringify(authDetails, null, 2));\n setAuthorizationDetails(authDetails);\n },\n [],\n );\n\n const exportAuthDetails = () => {\n try {\n saveAs(\n new Blob([prettyPrintJSON(authorizationDetails)], {\n type: \"application/json\",\n }),\n \"test-authz-config.json\",\n );\n addAlert(t(\"exportAuthDetailsSuccess\"), AlertVariant.success);\n } catch (error) {\n addError(\"exportAuthDetailsError\", error);\n }\n };\n\n if (!code) {\n return ;\n }\n\n return (\n \n \n \n \n exportAuthDetails()}\n >\n {t(\"download\")}\n \n {\n try {\n await navigator.clipboard.writeText(code!);\n addAlert(t(\"copied\"), AlertVariant.success);\n } catch (error) {\n addError(t(\"copyError\"), error);\n }\n }}\n >\n {t(\"copy\")}\n \n \n \n \n );\n};\n","import {\n DescriptionListDescription,\n DescriptionListGroup,\n DescriptionListTerm,\n} from \"@patternfly/react-core\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, Path } from \"react-router-dom\";\n\ntype DetailDescriptionProps = {\n name: string;\n array?: string[] | T[];\n convert?: (obj: T) => string;\n};\n\nexport function DetailDescription(props: DetailDescriptionProps) {\n return ;\n}\n\ntype DetailDescriptionLinkProps = DetailDescriptionProps & {\n link?: (element: T) => Partial;\n};\n\nexport function DetailDescriptionLink({\n name,\n array,\n convert,\n link,\n}: DetailDescriptionLinkProps) {\n const { t } = useTranslation();\n return (\n \n {t(name)} \n \n {array?.map((element) => {\n const value =\n typeof element === \"string\" ? element : convert!(element);\n return link ? (\n \n {value}\n \n ) : (\n \n {value}\n \n );\n })}\n {array?.length === 0 && {t(\"none\")} }\n \n \n );\n}\n","import { useNavigate } from \"react-router-dom\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n EmptyState,\n EmptyStateIcon,\n EmptyStateBody,\n Button,\n Tooltip,\n EmptyStateHeader,\n EmptyStateFooter,\n} from \"@patternfly/react-core\";\nimport { PlusCircleIcon } from \"@patternfly/react-icons\";\n\nimport { PermissionType, toNewPermission } from \"../routes/NewPermission\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toUpperCase } from \"../../util\";\n\ntype EmptyButtonProps = {\n permissionType: PermissionType;\n disabled?: boolean;\n clientId: string;\n};\n\nconst EmptyButton = ({\n permissionType,\n disabled = false,\n clientId,\n}: EmptyButtonProps) => {\n const { t } = useTranslation();\n const { realm } = useRealm();\n const navigate = useNavigate();\n return (\n \n !disabled &&\n navigate(toNewPermission({ realm, id: clientId, permissionType }))\n }\n >\n {t(`create${toUpperCase(permissionType)}BasedPermission`)}\n \n );\n};\n\nconst TooltipEmptyButton = ({\n permissionType,\n disabled,\n ...props\n}: EmptyButtonProps) => {\n const { t } = useTranslation();\n return disabled ? (\n \n \n \n ) : (\n \n );\n};\n\ntype EmptyPermissionsStateProps = {\n clientId: string;\n isResourceEnabled?: boolean;\n isScopeEnabled?: boolean;\n};\n\nexport const EmptyPermissionsState = ({\n clientId,\n isResourceEnabled,\n isScopeEnabled,\n}: EmptyPermissionsStateProps) => {\n const { t } = useTranslation();\n return (\n \n {t(\"emptyPermissions\")}>}\n icon={ }\n headingLevel=\"h1\"\n />\n {t(\"emptyPermissionInstructions\")} \n \n \n \n \n \n \n );\n};\n","import { useTranslation } from \"react-i18next\";\nimport { Label } from \"@patternfly/react-core\";\n\ntype MoreLabelProps = {\n array: unknown[] | undefined;\n};\n\nexport const MoreLabel = ({ array }: MoreLabelProps) => {\n const { t } = useTranslation();\n\n if (!array || array.length <= 1) {\n return null;\n }\n return {t(\"more\", { count: array.length - 1 })} ;\n};\n","import type PolicyProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/policyProviderRepresentation\";\nimport { SelectControl, TextControl } from \"@keycloak/keycloak-ui-shared\";\nimport {\n ActionGroup,\n Button,\n Dropdown,\n Form,\n MenuToggle,\n} from \"@patternfly/react-core\";\nimport { useEffect } from \"react\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport useToggle from \"../../utils/useToggle\";\n\nimport \"./search-dropdown.css\";\n\nexport type SearchForm = {\n name?: string;\n resource?: string;\n scope?: string;\n type?: string;\n uri?: string;\n owner?: string;\n};\n\ntype SearchDropdownProps = {\n types?: PolicyProviderRepresentation[] | PolicyProviderRepresentation[];\n search: SearchForm;\n onSearch: (form: SearchForm) => void;\n type: \"resource\" | \"policy\" | \"permission\";\n};\n\nexport const SearchDropdown = ({\n types,\n search,\n onSearch,\n type,\n}: SearchDropdownProps) => {\n const { t } = useTranslation();\n const form = useForm({ mode: \"onChange\" });\n const {\n reset,\n formState: { isDirty },\n handleSubmit,\n } = form;\n\n const [open, toggle] = useToggle();\n\n const submit = (form: SearchForm) => {\n toggle();\n onSearch(form);\n };\n\n useEffect(() => reset(search), [search]);\n\n return (\n (\n \n {type === \"resource\" && t(\"searchClientAuthorizationResource\")}\n {type === \"policy\" && t(\"searchClientAuthorizationPolicy\")}\n {type === \"permission\" && t(\"searchClientAuthorizationPermission\")}\n \n )}\n isOpen={open}\n >\n \n \n \n {type === \"resource\" && (\n <>\n \n \n \n >\n )}\n {type !== \"resource\" && type !== \"policy\" && (\n \n )}\n {type !== \"policy\" && }\n {type !== \"resource\" && (\n ({\n key: type!,\n value: name!,\n })),\n ]}\n />\n )}\n \n \n {t(\"search\")}\n \n onSearch({})}\n >\n {t(\"clear\")}\n \n \n \n \n \n );\n};\n","import type PolicyProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/policyProviderRepresentation\";\nimport type PolicyRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/policyRepresentation\";\nimport {\n Alert,\n AlertVariant,\n ButtonVariant,\n DescriptionList,\n Divider,\n Dropdown,\n DropdownItem,\n DropdownList,\n MenuToggle,\n PageSection,\n ToolbarItem,\n} from \"@patternfly/react-core\";\nimport {\n ExpandableRowContent,\n Table,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n} from \"@patternfly/react-table\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { useConfirmDialog } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { KeycloakSpinner } from \"../../components/keycloak-spinner/KeycloakSpinner\";\nimport { ListEmptyState } from \"../../components/list-empty-state/ListEmptyState\";\nimport { PaginatingTableToolbar } from \"../../components/table-toolbar/PaginatingTableToolbar\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport useToggle from \"../../utils/useToggle\";\nimport { toNewPermission } from \"../routes/NewPermission\";\nimport { toPermissionDetails } from \"../routes/PermissionDetails\";\nimport { toPolicyDetails } from \"../routes/PolicyDetails\";\nimport { DetailDescriptionLink } from \"./DetailDescription\";\nimport { EmptyPermissionsState } from \"./EmptyPermissionsState\";\nimport { MoreLabel } from \"./MoreLabel\";\nimport { SearchDropdown, SearchForm } from \"./SearchDropdown\";\n\nimport \"./permissions.css\";\n\ntype PermissionsProps = {\n clientId: string;\n isDisabled?: boolean;\n};\n\ntype ExpandablePolicyRepresentation = PolicyRepresentation & {\n associatedPolicies?: PolicyRepresentation[];\n isExpanded: boolean;\n};\n\nconst AssociatedPoliciesRenderer = ({\n row,\n}: {\n row: ExpandablePolicyRepresentation;\n}) => {\n return (\n <>\n {row.associatedPolicies?.[0]?.name}{\" \"}\n \n >\n );\n};\n\nexport const AuthorizationPermissions = ({\n clientId,\n isDisabled = false,\n}: PermissionsProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const [permissions, setPermissions] =\n useState();\n const [selectedPermission, setSelectedPermission] =\n useState();\n const [policyProviders, setPolicyProviders] =\n useState();\n const [disabledCreate, setDisabledCreate] = useState<{\n resources: boolean;\n scopes: boolean;\n }>();\n const [createOpen, toggleCreate] = useToggle();\n const [search, setSearch] = useState({});\n\n const [key, setKey] = useState(0);\n const refresh = () => setKey(key + 1);\n\n const [max, setMax] = useState(10);\n const [first, setFirst] = useState(0);\n\n useFetch(\n async () => {\n const permissions = await adminClient.clients.findPermissions({\n first,\n max: max + 1,\n id: clientId,\n ...search,\n });\n\n return await Promise.all(\n permissions.map(async (permission) => {\n const associatedPolicies =\n await adminClient.clients.getAssociatedPolicies({\n id: clientId,\n permissionId: permission.id!,\n });\n\n return {\n ...permission,\n associatedPolicies,\n isExpanded: false,\n };\n }),\n );\n },\n setPermissions,\n [key, search, first, max],\n );\n\n useFetch(\n async () => {\n const params = {\n first: 0,\n max: 1,\n };\n const [policies, resources, scopes] = await Promise.all([\n adminClient.clients.listPolicyProviders({\n id: clientId,\n }),\n adminClient.clients.listResources({ ...params, id: clientId }),\n adminClient.clients.listAllScopes({ ...params, id: clientId }),\n ]);\n return {\n policies: policies.filter(\n (p) => p.type === \"resource\" || p.type === \"scope\",\n ),\n resources: resources.length !== 1,\n scopes: scopes.length !== 1,\n };\n },\n ({ policies, resources, scopes }) => {\n setPolicyProviders(policies);\n setDisabledCreate({ resources, scopes });\n },\n [],\n );\n\n const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({\n titleKey: \"deletePermission\",\n messageKey: t(\"deletePermissionConfirm\", {\n permission: selectedPermission?.name,\n }),\n continueButtonVariant: ButtonVariant.danger,\n continueButtonLabel: \"confirm\",\n onConfirm: async () => {\n try {\n await adminClient.clients.delPermission({\n id: clientId,\n type: selectedPermission?.type!,\n permissionId: selectedPermission?.id!,\n });\n addAlert(t(\"permissionDeletedSuccess\"), AlertVariant.success);\n refresh();\n } catch (error) {\n addError(\"permissionDeletedError\", error);\n }\n },\n });\n\n if (!permissions) {\n return ;\n }\n\n const noData = permissions.length === 0;\n const searching = Object.keys(search).length !== 0;\n return (\n \n \n {(!noData || searching) && (\n {\n setFirst(first);\n setMax(max);\n }}\n toolbarItem={\n <>\n \n \n \n \n (\n \n {t(\"createPermission\")}\n \n )}\n isOpen={createOpen}\n >\n \n \n navigate(\n toNewPermission({\n realm,\n id: clientId,\n permissionType: \"resource\",\n }),\n )\n }\n >\n {t(\"createResourceBasedPermission\")}\n \n \n \n navigate(\n toNewPermission({\n realm,\n id: clientId,\n permissionType: \"scope\",\n }),\n )\n }\n >\n {t(\"createScopeBasedPermission\")}\n {disabledCreate?.scopes && (\n \n )}\n \n \n \n \n >\n }\n >\n {!noData && (\n \n \n \n \n {t(\"name\")} \n {t(\"type\")} \n {t(\"associatedPolicy\")} \n {t(\"description\")} \n \n \n \n {permissions.map((permission, rowIndex) => (\n \n \n {\n const rows = permissions.map((p, index) =>\n index === rowIndex\n ? { ...p, isExpanded: !p.isExpanded }\n : p,\n );\n setPermissions(rows);\n },\n }}\n />\n \n \n {permission.name}\n \n \n \n {\n policyProviders?.find((p) => p.type === permission.type)\n ?.name\n }\n \n \n \n \n {permission.description} \n {\n setSelectedPermission(permission);\n toggleDeleteDialog();\n },\n },\n ],\n }}\n > \n \n \n \n \n \n {permission.isExpanded && (\n \n p.name!}\n link={(p) =>\n toPolicyDetails({\n id: clientId,\n realm,\n policyId: p.id!,\n policyType: p.type!,\n })\n }\n />\n \n )}\n \n \n \n \n ))}\n
\n )}\n \n )}\n {noData && !searching && (\n \n )}\n {noData && searching && (\n \n )}\n \n );\n};\n","import type PolicyProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/policyProviderRepresentation\";\nimport type PolicyRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/policyRepresentation\";\nimport {\n Alert,\n AlertVariant,\n Button,\n DescriptionList,\n PageSection,\n ToolbarItem,\n} from \"@patternfly/react-core\";\nimport {\n ExpandableRowContent,\n Table,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n} from \"@patternfly/react-table\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { useConfirmDialog } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { KeycloakSpinner } from \"../../components/keycloak-spinner/KeycloakSpinner\";\nimport { ListEmptyState } from \"../../components/list-empty-state/ListEmptyState\";\nimport { PaginatingTableToolbar } from \"../../components/table-toolbar/PaginatingTableToolbar\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toUpperCase } from \"../../util\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport useToggle from \"../../utils/useToggle\";\nimport { toCreatePolicy } from \"../routes/NewPolicy\";\nimport { toPermissionDetails } from \"../routes/PermissionDetails\";\nimport { toPolicyDetails } from \"../routes/PolicyDetails\";\nimport { DetailDescriptionLink } from \"./DetailDescription\";\nimport { MoreLabel } from \"./MoreLabel\";\nimport { NewPolicyDialog } from \"./NewPolicyDialog\";\nimport { SearchDropdown, SearchForm } from \"./SearchDropdown\";\n\ntype PoliciesProps = {\n clientId: string;\n isDisabled?: boolean;\n};\n\ntype ExpandablePolicyRepresentation = PolicyRepresentation & {\n dependentPolicies?: PolicyRepresentation[];\n isExpanded: boolean;\n};\n\nconst DependentPoliciesRenderer = ({\n row,\n}: {\n row: ExpandablePolicyRepresentation;\n}) => {\n return (\n <>\n {row.dependentPolicies?.[0]?.name}{\" \"}\n \n >\n );\n};\n\nexport const AuthorizationPolicies = ({\n clientId,\n isDisabled = false,\n}: PoliciesProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n const navigate = useNavigate();\n\n const [policies, setPolicies] = useState();\n const [selectedPolicy, setSelectedPolicy] =\n useState();\n const [policyProviders, setPolicyProviders] =\n useState();\n\n const [key, setKey] = useState(0);\n const refresh = () => setKey(key + 1);\n\n const [max, setMax] = useState(10);\n const [first, setFirst] = useState(0);\n const [search, setSearch] = useState({});\n const [newDialog, toggleDialog] = useToggle();\n\n useFetch(\n async () => {\n const policies = await adminClient.clients.listPolicies({\n first,\n max: max + 1,\n id: clientId,\n permission: \"false\",\n ...search,\n });\n\n return await Promise.all([\n adminClient.clients.listPolicyProviders({ id: clientId }),\n ...(policies || []).map(async (policy) => {\n const dependentPolicies =\n await adminClient.clients.listDependentPolicies({\n id: clientId,\n policyId: policy.id!,\n });\n\n return {\n ...policy,\n dependentPolicies,\n isExpanded: false,\n };\n }),\n ]);\n },\n ([providers, ...policies]) => {\n setPolicyProviders(\n providers.filter((p) => p.type !== \"resource\" && p.type !== \"scope\"),\n );\n setPolicies(policies);\n },\n [key, search, first, max],\n );\n\n const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({\n titleKey: \"deletePolicy\",\n children: (\n <>\n {t(\"deletePolicyConfirm\")}\n {selectedPolicy?.dependentPolicies &&\n selectedPolicy.dependentPolicies.length > 0 && (\n \n \n {selectedPolicy.dependentPolicies.map((policy) => (\n \n {policy.name}\n \n ))}\n
\n \n )}\n >\n ),\n continueButtonLabel: \"confirm\",\n onConfirm: async () => {\n try {\n await adminClient.clients.delPolicy({\n id: clientId,\n policyId: selectedPolicy?.id!,\n });\n addAlert(t(\"policyDeletedSuccess\"), AlertVariant.success);\n refresh();\n } catch (error) {\n addError(\"policyDeletedError\", error);\n }\n },\n });\n\n if (!policies) {\n return ;\n }\n\n const noData = policies.length === 0;\n const searching = Object.keys(search).length !== 0;\n return (\n \n \n {(!noData || searching) && (\n <>\n {newDialog && (\n \n navigate(\n toCreatePolicy({ id: clientId, realm, policyType: p.type! }),\n )\n }\n toggleDialog={toggleDialog}\n />\n )}\n\n {\n setFirst(first);\n setMax(max);\n }}\n toolbarItem={\n <>\n \n \n \n \n \n {t(\"createPolicy\")}\n \n \n >\n }\n >\n {!noData && (\n \n \n \n \n {t(\"name\")} \n {t(\"type\")} \n {t(\"dependentPermission\")} \n {t(\"description\")} \n \n \n \n {policies.map((policy, rowIndex) => (\n \n \n {\n const rows = policies.map((policy, index) =>\n index === rowIndex\n ? { ...policy, isExpanded: !policy.isExpanded }\n : policy,\n );\n setPolicies(rows);\n },\n }}\n />\n \n \n {policy.name}\n \n \n {toUpperCase(policy.type!)} \n \n \n \n {policy.description} \n {!isDisabled && (\n {\n setSelectedPolicy(policy);\n toggleDeleteDialog();\n },\n },\n ],\n }}\n />\n )}\n \n \n \n \n \n {policy.isExpanded && (\n \n p.name!}\n link={(permission) =>\n toPermissionDetails({\n realm,\n id: clientId,\n permissionId: permission.id!,\n permissionType: permission.type!,\n })\n }\n />\n \n )}\n \n \n \n \n ))}\n
\n )}\n \n >\n )}\n {noData && searching && (\n \n )}\n {noData && !searching && (\n <>\n {newDialog && (\n p.type !== \"aggregate\",\n )}\n onSelect={(p) =>\n navigate(\n toCreatePolicy({ id: clientId, realm, policyType: p.type! }),\n )\n }\n toggleDialog={toggleDialog}\n />\n )}\n \n >\n )}\n \n );\n};\n","import type ResourceServerRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation\";\nimport { DescriptionList } from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { KeycloakSpinner } from \"../../components/keycloak-spinner/KeycloakSpinner\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport { toPermissionDetails } from \"../routes/PermissionDetails\";\nimport { toScopeDetails } from \"../routes/Scope\";\nimport { DetailDescription, DetailDescriptionLink } from \"./DetailDescription\";\n\nimport \"./detail-cell.css\";\n\ntype Scope = { id: string; name: string }[];\n\ntype DetailCellProps = {\n id: string;\n clientId: string;\n uris?: string[];\n};\n\nexport const DetailCell = ({ id, clientId, uris }: DetailCellProps) => {\n const { adminClient } = useAdminClient();\n\n const { realm } = useRealm();\n const [scope, setScope] = useState();\n const [permissions, setPermissions] =\n useState();\n\n useFetch(\n () =>\n Promise.all([\n adminClient.clients.listScopesByResource({\n id: clientId,\n resourceName: id,\n }),\n adminClient.clients.listPermissionsByResource({\n id: clientId,\n resourceId: id,\n }),\n ]),\n ([scopes, permissions]) => {\n setScope(scopes);\n setPermissions(permissions);\n },\n [],\n );\n\n if (!permissions || !scope) {\n return ;\n }\n\n return (\n \n \n s.name}\n link={(scope) =>\n toScopeDetails({ id: clientId, realm, scopeId: scope.id! })\n }\n />\n p.name!}\n link={(permission) =>\n toPermissionDetails({\n id: clientId,\n realm,\n permissionId: permission.id!,\n permissionType: \"resource\",\n })\n }\n />\n \n );\n};\n","import type ResourceRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceRepresentation\";\nimport type ResourceServerRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation\";\nimport {\n Alert,\n AlertVariant,\n Button,\n PageSection,\n ToolbarItem,\n} from \"@patternfly/react-core\";\nimport {\n ExpandableRowContent,\n Table,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n} from \"@patternfly/react-table\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { useConfirmDialog } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { KeycloakSpinner } from \"../../components/keycloak-spinner/KeycloakSpinner\";\nimport { ListEmptyState } from \"../../components/list-empty-state/ListEmptyState\";\nimport { PaginatingTableToolbar } from \"../../components/table-toolbar/PaginatingTableToolbar\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport { toNewPermission } from \"../routes/NewPermission\";\nimport { toCreateResource } from \"../routes/NewResource\";\nimport { toResourceDetails } from \"../routes/Resource\";\nimport { DetailCell } from \"./DetailCell\";\nimport { MoreLabel } from \"./MoreLabel\";\nimport { SearchDropdown, SearchForm } from \"./SearchDropdown\";\n\ntype ResourcesProps = {\n clientId: string;\n isDisabled?: boolean;\n};\n\ntype ExpandableResourceRepresentation = ResourceRepresentation & {\n isExpanded: boolean;\n};\n\nconst UriRenderer = ({ row }: { row: ResourceRepresentation }) => (\n <>\n {row.uris?.[0]} \n >\n);\n\nexport const AuthorizationResources = ({\n clientId,\n isDisabled = false,\n}: ResourcesProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const [resources, setResources] =\n useState();\n const [selectedResource, setSelectedResource] =\n useState();\n const [permissions, setPermission] =\n useState();\n\n const [key, setKey] = useState(0);\n const refresh = () => setKey(key + 1);\n\n const [max, setMax] = useState(10);\n const [first, setFirst] = useState(0);\n const [search, setSearch] = useState({});\n\n useFetch(\n () => {\n const params = {\n first,\n max: max + 1,\n deep: false,\n ...search,\n };\n return adminClient.clients.listResources({\n ...params,\n id: clientId,\n });\n },\n (resources) =>\n setResources(\n resources.map((resource) => ({ ...resource, isExpanded: false })),\n ),\n [key, search, first, max],\n );\n\n const fetchPermissions = async (id: string) => {\n return adminClient.clients.listPermissionsByResource({\n id: clientId,\n resourceId: id,\n });\n };\n\n const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({\n titleKey: \"deleteResource\",\n children: (\n <>\n {t(\"deleteResourceConfirm\")}\n {permissions?.length && (\n \n \n {permissions.map((permission) => (\n \n {permission.name}\n \n ))}\n
\n \n )}\n >\n ),\n continueButtonLabel: \"confirm\",\n onConfirm: async () => {\n try {\n await adminClient.clients.delResource({\n id: clientId,\n resourceId: selectedResource?._id!,\n });\n addAlert(t(\"resourceDeletedSuccess\"), AlertVariant.success);\n refresh();\n } catch (error) {\n addError(\"resourceDeletedError\", error);\n }\n },\n });\n\n if (!resources) {\n return ;\n }\n\n const noData = resources.length === 0;\n const searching = Object.keys(search).length !== 0;\n return (\n \n \n {(!noData || searching) && (\n {\n setFirst(first);\n setMax(max);\n }}\n toolbarItem={\n <>\n \n \n \n\n \n (\n \n )}\n >\n {t(\"createResource\")}\n \n \n >\n }\n >\n {!noData && (\n \n \n \n \n {t(\"name\")} \n {t(\"displayName\")} \n {t(\"type\")} \n {t(\"owner\")} \n {t(\"uris\")} \n {!isDisabled && (\n <>\n \n \n >\n )}\n \n \n {resources.map((resource, rowIndex) => (\n \n \n {\n const rows = resources.map((resource, index) =>\n index === rowIndex\n ? {\n ...resource,\n isExpanded: !resource.isExpanded,\n }\n : resource,\n );\n setResources(rows);\n },\n }}\n />\n \n \n {resource.name}\n \n \n {resource.displayName} \n {resource.type} \n {resource.owner?.name} \n \n \n \n {!isDisabled && (\n <>\n \n (\n \n )}\n >\n {t(\"createPermission\")}\n \n \n {\n setSelectedResource(resource);\n setPermission(\n await fetchPermissions(resource._id!),\n );\n toggleDeleteDialog();\n },\n },\n ],\n }}\n />\n >\n )}\n \n \n \n \n \n {resource.isExpanded && (\n \n )}\n \n \n \n \n ))}\n
\n )}\n \n )}\n {noData && searching && (\n \n )}\n {noData && !searching && (\n \n navigate(toCreateResource({ realm, id: clientId }))\n }\n />\n )}\n \n );\n};\n","import type PolicyRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/policyRepresentation\";\nimport type ScopeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/scopeRepresentation\";\nimport {\n Button,\n DescriptionList,\n PageSection,\n ToolbarItem,\n} from \"@patternfly/react-core\";\nimport {\n ExpandableRowContent,\n Table,\n Tbody,\n Td,\n Th,\n Thead,\n Tr,\n} from \"@patternfly/react-table\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { KeycloakSpinner } from \"../../components/keycloak-spinner/KeycloakSpinner\";\nimport { ListEmptyState } from \"../../components/list-empty-state/ListEmptyState\";\nimport { PaginatingTableToolbar } from \"../../components/table-toolbar/PaginatingTableToolbar\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport useToggle from \"../../utils/useToggle\";\nimport { toNewPermission } from \"../routes/NewPermission\";\nimport { toNewScope } from \"../routes/NewScope\";\nimport { toPermissionDetails } from \"../routes/PermissionDetails\";\nimport { toResourceDetails } from \"../routes/Resource\";\nimport { toScopeDetails } from \"../routes/Scope\";\nimport { DeleteScopeDialog } from \"./DeleteScopeDialog\";\nimport { DetailDescriptionLink } from \"./DetailDescription\";\n\ntype ScopesProps = {\n clientId: string;\n isDisabled?: boolean;\n};\n\nexport type PermissionScopeRepresentation = ScopeRepresentation & {\n permissions?: PolicyRepresentation[];\n isLoaded: boolean;\n};\n\ntype ExpandableRow = {\n id: string;\n isExpanded: boolean;\n};\n\nexport const AuthorizationScopes = ({\n clientId,\n isDisabled = false,\n}: ScopesProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const { realm } = useRealm();\n\n const [deleteDialog, toggleDeleteDialog] = useToggle();\n const [scopes, setScopes] = useState();\n const [selectedScope, setSelectedScope] =\n useState();\n const [collapsed, setCollapsed] = useState([]);\n\n const [key, setKey] = useState(0);\n const refresh = () => setKey(key + 1);\n\n const [max, setMax] = useState(10);\n const [first, setFirst] = useState(0);\n const [search, setSearch] = useState(\"\");\n\n useFetch(\n () => {\n const params = {\n first,\n max: max + 1,\n deep: false,\n name: search,\n };\n return adminClient.clients.listAllScopes({\n ...params,\n id: clientId,\n });\n },\n (scopes) => {\n setScopes(scopes.map((s) => ({ ...s, isLoaded: false })));\n setCollapsed(scopes.map((s) => ({ id: s.id!, isExpanded: false })));\n },\n [key, search, first, max],\n );\n\n const getScope = (id: string) => scopes?.find((scope) => scope.id === id)!;\n const isExpanded = (id: string | undefined) =>\n collapsed.find((c) => c.id === id)?.isExpanded || false;\n\n useFetch(\n () => {\n const newlyOpened = collapsed\n .filter((row) => row.isExpanded)\n .map(({ id }) => getScope(id))\n .filter((s) => !s.isLoaded);\n\n return Promise.all(\n newlyOpened.map(async (scope) => {\n const [resources, permissions] = await Promise.all([\n adminClient.clients.listAllResourcesByScope({\n id: clientId,\n scopeId: scope.id!,\n }),\n adminClient.clients.listAllPermissionsByScope({\n id: clientId,\n scopeId: scope.id!,\n }),\n ]);\n\n return {\n ...scope,\n resources,\n permissions,\n isLoaded: true,\n };\n }),\n );\n },\n (resourcesScopes) => {\n let result = [...(scopes || [])];\n resourcesScopes.forEach((resourceScope) => {\n const index = scopes?.findIndex(\n (scope) => resourceScope.id === scope.id,\n )!;\n result = [\n ...result.slice(0, index),\n resourceScope,\n ...result.slice(index + 1),\n ];\n });\n\n setScopes(result);\n },\n [collapsed],\n );\n\n if (!scopes) {\n return ;\n }\n\n const noData = scopes.length === 0;\n const searching = search !== \"\";\n return (\n \n \n {(!noData || searching) && (\n {\n setFirst(first);\n setMax(max);\n }}\n inputGroupName=\"search\"\n inputGroupPlaceholder={t(\"searchByName\")}\n inputGroupOnEnter={setSearch}\n toolbarItem={\n \n (\n \n )}\n >\n {t(\"createAuthorizationScope\")}\n \n \n }\n >\n {!noData && (\n \n \n \n \n {t(\"name\")} \n {t(\"displayName\")} \n \n \n \n \n {scopes.map((scope, rowIndex) => (\n \n \n {\n setCollapsed([\n ...collapsed.slice(0, index),\n { id: scope.id!, isExpanded },\n ...collapsed.slice(index + 1),\n ]);\n },\n }}\n />\n \n \n {scope.name}\n \n \n {scope.displayName} \n \n (\n \n )}\n >\n {t(\"createPermission\")}\n \n \n {\n setSelectedScope(scope);\n toggleDeleteDialog();\n },\n },\n ],\n }}\n />\n \n \n \n \n \n {isExpanded(scope.id) && scope.isLoaded ? (\n \n r.name!}\n link={(r) =>\n toResourceDetails({\n id: clientId,\n realm,\n resourceId: r._id!,\n })\n }\n />\n p.name!}\n link={(p) =>\n toPermissionDetails({\n id: clientId,\n realm,\n permissionId: p.id!,\n permissionType: p.type!,\n })\n }\n />\n \n ) : (\n \n )}\n \n \n \n \n ))}\n
\n )}\n \n )}\n {noData && !searching && (\n navigate(toNewScope({ id: clientId, realm }))}\n primaryActionText={t(\"createAuthorizationScope\")}\n />\n )}\n {noData && searching && (\n \n )}\n \n );\n};\n","import { Fragment, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n Alert,\n Button,\n ButtonVariant,\n Divider,\n Form,\n FormGroup,\n Modal,\n Radio,\n Switch,\n} from \"@patternfly/react-core\";\n\nimport type ResourceServerRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation\";\nimport { JsonFileUpload } from \"../../components/json-file-upload/JsonFileUpload\";\nimport { HelpItem } from \"@keycloak/keycloak-ui-shared\";\n\ntype ImportDialogProps = {\n onConfirm: (value: ResourceServerRepresentation) => void;\n closeDialog: () => void;\n};\n\nexport const ImportDialog = ({ onConfirm, closeDialog }: ImportDialogProps) => {\n const { t } = useTranslation();\n const [imported, setImported] = useState({});\n return (\n {\n onConfirm(imported);\n closeDialog();\n }}\n data-testid=\"confirm\"\n >\n {t(\"confirm\")}\n ,\n {\n closeDialog();\n }}\n >\n {t(\"cancel\")}\n ,\n ]}\n >\n \n \n \n {Object.keys(imported).length !== 0 && (\n <>\n \n {t(\"importResources\")}
\n \n \n }\n fieldId=\"policyEnforcementMode\"\n hasNoPaddingTop\n >\n \n \n \n }\n fieldId=\"decisionStrategy\"\n hasNoPaddingTop\n >\n \n \n \n }\n >\n \n \n \n \n {Object.entries(imported)\n .filter(([, value]) => Array.isArray(value))\n .map(([key, value]) => (\n
\n \n \n \n {value.length} {t(key)}\n \n
\n \n ))}\n
\n \n \n >\n )}\n \n );\n};\n","import type ResourceServerRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/resourceServerRepresentation\";\nimport {\n AlertVariant,\n Button,\n Divider,\n FormGroup,\n PageSection,\n Radio,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { Controller, FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { HelpItem } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { DefaultSwitchControl } from \"../../components/SwitchControl\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { FixedButtonsGroup } from \"../../components/form/FixedButtonGroup\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { KeycloakSpinner } from \"../../components/keycloak-spinner/KeycloakSpinner\";\nimport { useAccess } from \"../../context/access/Access\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport useToggle from \"../../utils/useToggle\";\nimport { DecisionStrategySelect } from \"./DecisionStrategySelect\";\nimport { ImportDialog } from \"./ImportDialog\";\n\nconst POLICY_ENFORCEMENT_MODES = [\n \"ENFORCING\",\n \"PERMISSIVE\",\n \"DISABLED\",\n] as const;\n\nexport type FormFields = Omit<\n ResourceServerRepresentation,\n \"scopes\" | \"resources\"\n>;\n\nexport const AuthorizationSettings = ({ clientId }: { clientId: string }) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const [resource, setResource] = useState();\n const [importDialog, toggleImportDialog] = useToggle();\n\n const form = useForm({});\n const { control, reset, handleSubmit } = form;\n\n const { addAlert, addError } = useAlerts();\n const { hasAccess } = useAccess();\n\n const isDisabled = !hasAccess(\"manage-authorization\");\n\n useFetch(\n () => adminClient.clients.getResourceServer({ id: clientId }),\n (resource) => {\n setResource(resource);\n reset(resource);\n },\n [],\n );\n\n const importResource = async (value: ResourceServerRepresentation) => {\n try {\n await adminClient.clients.importResource({ id: clientId }, value);\n addAlert(t(\"importResourceSuccess\"), AlertVariant.success);\n reset({ ...value });\n } catch (error) {\n addError(\"importResourceError\", error);\n }\n };\n\n const onSubmit = async (resource: ResourceServerRepresentation) => {\n try {\n await adminClient.clients.updateResourceServer(\n { id: clientId },\n resource,\n );\n addAlert(t(\"updateResourceSuccess\"), AlertVariant.success);\n } catch (error) {\n addError(\"resourceSaveError\", error);\n }\n };\n\n if (!resource) {\n return ;\n }\n\n return (\n \n {importDialog && (\n \n )}\n \n \n }\n >\n \n {t(\"import\")}\n \n \n \n \n }\n fieldId=\"policyEnforcementMode\"\n hasNoPaddingTop\n >\n (\n <>\n {POLICY_ENFORCEMENT_MODES.map((mode) => (\n field.onChange(mode)}\n label={t(`policyEnforcementModes.${mode}`)}\n className=\"pf-v5-u-mb-md\"\n />\n ))}\n >\n )}\n />\n \n \n \n \n \n reset(resource)}\n isActive\n isSubmit\n />\n \n \n );\n};\n","import { useState, useEffect } from \"react\";\n\n/** A 'plain' object version of the permission status. */\nexport type PlainPermissionStatus = {\n readonly name: string;\n readonly state: PermissionState;\n};\n\nexport default function useQueryPermission(\n name: PermissionName,\n): PlainPermissionStatus | null {\n const [status, setStatus] = useState(null);\n const [plainStatus, setPlainStatus] = useState(\n null,\n );\n\n function updatePlainStatus(newStatus: PermissionStatus) {\n setPlainStatus({\n name: newStatus.name,\n state: newStatus.state,\n });\n }\n\n // Query the permission status when the name changes.\n useEffect(() => {\n setStatus(null);\n setPlainStatus(null);\n\n navigator.permissions.query({ name }).then((newStatus) => {\n setStatus(newStatus);\n updatePlainStatus(newStatus);\n });\n }, [name]);\n\n // Update the 'plain' status when the permission status changes.\n useEffect(() => {\n if (!status) {\n return;\n }\n\n function onStatusChange() {\n if (!status) {\n return;\n }\n\n updatePlainStatus(status);\n }\n\n status.addEventListener(\"change\", onStatusChange);\n return () => status.removeEventListener(\"change\", onStatusChange);\n }, [status]);\n\n return plainStatus;\n}\n","import { useEffect, useMemo, useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n ClipboardCopyButton,\n ClipboardCopyButtonProps,\n} from \"@patternfly/react-core\";\n\nimport useSetTimeout from \"../../utils/useSetTimeout\";\nimport useQueryPermission from \"../../utils/useQueryPermission\";\n\nenum CopyState {\n Ready,\n Copied,\n Error,\n}\n\ntype CopyToClipboardButtonProps = Pick & {\n id: string;\n label: string;\n text: string;\n};\n\nexport const CopyToClipboardButton = ({\n id,\n label,\n text,\n variant = \"plain\",\n}: CopyToClipboardButtonProps) => {\n const { t } = useTranslation();\n const setTimeout = useSetTimeout();\n const permission = useQueryPermission(\"clipboard-write\" as PermissionName);\n const permissionDenied = permission?.state === \"denied\";\n const [copyState, setCopyState] = useState(CopyState.Ready);\n\n // Determine the message to use for the copy button.\n const copyMessageKey = useMemo(() => {\n if (permissionDenied) {\n return \"clipboardCopyDenied\";\n }\n\n switch (copyState) {\n case CopyState.Ready:\n return \"copyToClipboard\";\n case CopyState.Copied:\n return \"copySuccess\";\n case CopyState.Error:\n return \"clipboardCopyError\";\n }\n }, [permissionDenied, copyState]);\n\n // Reset the message of the copy button after copying to the clipboard.\n useEffect(() => {\n if (copyState !== CopyState.Ready) {\n return setTimeout(() => setCopyState(CopyState.Ready), 1000);\n }\n }, [copyState, setTimeout]);\n\n const copyToClipboard = async (text: string) => {\n try {\n await navigator.clipboard.writeText(text);\n setCopyState(CopyState.Copied);\n } catch (error) {\n setCopyState(CopyState.Error);\n }\n };\n\n return (\n copyToClipboard(text)}\n exitDelay={600}\n variant={variant}\n >\n {t(copyMessageKey)}\n \n );\n};\n","import type ClientRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientRepresentation\";\nimport {\n Alert,\n Button,\n FormGroup,\n InputGroup,\n InputGroupItem,\n Split,\n SplitItem,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { PasswordInput } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { useConfirmDialog } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { useAccess } from \"../../context/access/Access\";\nimport useFormatDate from \"../../utils/useFormatDate\";\nimport { CopyToClipboardButton } from \"../scopes/CopyToClipboardButton\";\n\nexport type ClientSecretProps = {\n client: ClientRepresentation;\n secret: string;\n toggle: () => void;\n};\n\ntype SecretInputProps = ClientSecretProps & {\n id: string;\n buttonLabel: string;\n};\n\nconst SecretInput = ({\n id,\n buttonLabel,\n client,\n secret,\n toggle,\n}: SecretInputProps) => {\n const { t } = useTranslation();\n const form = useFormContext();\n const { hasAccess } = useAccess();\n const isManager = hasAccess(\"manage-clients\") || client.access?.configure;\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n \n {t(buttonLabel)}\n \n \n \n );\n};\n\nconst ExpireDateFormatter = ({ time }: { time: number }) => {\n const { t } = useTranslation();\n const formatDate = useFormatDate();\n const unixTimeToString = (time: number) =>\n time\n ? t(\"secretExpiresOn\", {\n time: formatDate(new Date(time * 1000), {\n dateStyle: \"full\",\n timeStyle: \"long\",\n }),\n })\n : undefined;\n\n return {unixTimeToString(time)}
;\n};\n\nexport const ClientSecret = ({ client, secret, toggle }: ClientSecretProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { addAlert, addError } = useAlerts();\n\n const [secretRotated, setSecretRotated] = useState(\n client.attributes?.[\"client.secret.rotated\"],\n );\n const secretExpirationTime: number =\n client.attributes?.[\"client.secret.expiration.time\"];\n const secretRotatedExpirationTime: number =\n client.attributes?.[\"client.secret.rotated.expiration.time\"];\n\n const expired = (time: number) => new Date().getTime() >= time * 1000;\n\n const [toggleInvalidateConfirm, InvalidateConfirm] = useConfirmDialog({\n titleKey: \"invalidateRotatedSecret\",\n messageKey: \"invalidateRotatedSecretExplain\",\n continueButtonLabel: \"confirm\",\n onConfirm: async () => {\n try {\n await adminClient.clients.invalidateSecret({\n id: client.id!,\n });\n setSecretRotated(undefined);\n addAlert(t(\"invalidateRotatedSuccess\"));\n } catch (error) {\n addError(\"invalidateRotatedError\", error);\n }\n },\n });\n\n return (\n <>\n \n \n \n \n {expired(secretExpirationTime) && (\n \n )}\n \n {secretRotated && (\n \n \n \n \n )}\n >\n );\n};\n","import { useTranslation } from \"react-i18next\";\nimport { SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { useServerInfo } from \"../../context/server-info/ServerInfoProvider\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport { FormFields } from \"../ClientDetails\";\n\ntype SignedJWTProps = {\n clientAuthenticatorType: string;\n};\n\nexport const SignedJWT = ({ clientAuthenticatorType }: SignedJWTProps) => {\n const { cryptoInfo } = useServerInfo();\n const providers =\n clientAuthenticatorType === \"client-jwt\"\n ? cryptoInfo?.clientSignatureAsymmetricAlgorithms ?? []\n : cryptoInfo?.clientSignatureSymmetricAlgorithms ?? [];\n\n const { t } = useTranslation();\n\n return (\n (\n \"attributes.token.endpoint.auth.signing.alg\",\n )}\n label={t(\"signatureAlgorithm\")}\n labelIcon={t(\"signatureAlgorithmHelp\")}\n controller={{\n defaultValue: \"\",\n }}\n isScrollable\n maxMenuHeight=\"200px\"\n options={[\n { key: \"\", value: t(\"anyAlgorithm\") },\n ...providers.map((option) => ({ key: option, value: option })),\n ]}\n />\n );\n};\n","import { useTranslation } from \"react-i18next\";\nimport { TextControl } from \"@keycloak/keycloak-ui-shared\";\nimport { DefaultSwitchControl } from \"../../components/SwitchControl\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport { FormFields } from \"../ClientDetails\";\n\nexport const X509 = () => {\n const { t } = useTranslation();\n return (\n <>\n (\n \"attributes.x509.allow.regex.pattern.comparison\",\n )}\n label={t(\"allowRegexComparison\")}\n labelIcon={t(\"allowRegexComparisonHelp\")}\n />\n \n >\n );\n};\n","import type { AuthenticationProviderRepresentation } from \"@keycloak/keycloak-admin-client/lib/defs/authenticatorConfigRepresentation\";\nimport type ClientRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientRepresentation\";\nimport type CredentialRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/credentialRepresentation\";\nimport {\n ActionGroup,\n Alert,\n AlertVariant,\n Button,\n Card,\n CardBody,\n ClipboardCopy,\n Divider,\n FormGroup,\n PageSection,\n Split,\n SplitItem,\n} from \"@patternfly/react-core\";\nimport { useState } from \"react\";\nimport { useFormContext, useWatch } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { HelpItem, SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { useConfirmDialog } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport { FormFields } from \"../ClientDetails\";\nimport { ClientSecret } from \"./ClientSecret\";\nimport { SignedJWT } from \"./SignedJWT\";\nimport { X509 } from \"./X509\";\n\ntype AccessToken = {\n registrationAccessToken: string;\n};\n\nexport type CredentialsProps = {\n client: ClientRepresentation;\n save: () => void;\n refresh: () => void;\n};\n\nexport const Credentials = ({ client, save, refresh }: CredentialsProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { addAlert, addError } = useAlerts();\n const clientId = client.id!;\n\n const [providers, setProviders] = useState<\n AuthenticationProviderRepresentation[]\n >([]);\n\n const {\n control,\n formState: { isDirty },\n handleSubmit,\n } = useFormContext();\n\n const clientAuthenticatorType = useWatch({\n control: control,\n name: \"clientAuthenticatorType\",\n defaultValue: \"\",\n });\n\n const [secret, setSecret] = useState(\"\");\n const [accessToken, setAccessToken] = useState(\"\");\n\n const selectedProvider = providers.find(\n (provider) => provider.id === clientAuthenticatorType,\n );\n\n useFetch(\n () =>\n Promise.all([\n adminClient.authenticationManagement.getClientAuthenticatorProviders(),\n adminClient.clients.getClientSecret({\n id: clientId,\n }),\n ]),\n ([providers, secret]) => {\n setProviders(providers);\n setSecret(secret.value!);\n },\n [],\n );\n\n async function regenerate(\n call: (clientId: string) => Promise,\n message: string,\n ): Promise {\n try {\n const data = await call(clientId);\n addAlert(t(`${message}Success`), AlertVariant.success);\n return data;\n } catch (error) {\n addError(`${message}Error`, error);\n }\n }\n\n const regenerateClientSecret = async () => {\n const secret = await regenerate(\n (clientId) =>\n adminClient.clients.generateNewClientSecret({ id: clientId }),\n \"clientSecret\",\n );\n setSecret(secret?.value || \"\");\n refresh();\n };\n\n const [toggleClientSecretConfirm, ClientSecretConfirm] = useConfirmDialog({\n titleKey: \"confirmClientSecretTitle\",\n messageKey: \"confirmClientSecretBody\",\n continueButtonLabel: \"yes\",\n cancelButtonLabel: \"no\",\n onConfirm: regenerateClientSecret,\n });\n\n const regenerateAccessToken = async () => {\n const accessToken = await regenerate(\n (clientId) =>\n adminClient.clients.generateRegistrationAccessToken({ id: clientId }),\n \"accessToken\",\n );\n setAccessToken(accessToken?.registrationAccessToken || \"\");\n };\n\n const [toggleAccessTokenConfirm, AccessTokenConfirm] = useConfirmDialog({\n titleKey: \"confirmAccessTokenTitle\",\n messageKey: \"confirmAccessTokenBody\",\n continueButtonLabel: \"yes\",\n cancelButtonLabel: \"no\",\n onConfirm: regenerateAccessToken,\n });\n\n return (\n \n \n \n \n \n \n ({\n key: id!,\n value: displayName || id!,\n }))}\n />\n {(clientAuthenticatorType === \"client-jwt\" ||\n clientAuthenticatorType === \"client-secret-jwt\") && (\n \n )}\n {clientAuthenticatorType === \"client-jwt\" && (\n \n \n \n )}\n {clientAuthenticatorType === \"client-x509\" && }\n \n \n {t(\"save\")}\n \n \n \n {selectedProvider?.supportsSecret && (\n <>\n \n \n \n \n >\n )}\n \n \n \n \n }\n >\n \n \n \n {accessToken}\n \n \n \n \n {t(\"regenerate\")}\n \n \n \n \n \n \n \n \n );\n};\n","import type CertificateRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation\";\nimport { FormGroup, TextArea } from \"@patternfly/react-core\";\nimport { useId } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { HelpItem } from \"@keycloak/keycloak-ui-shared\";\n\ntype CertificateProps = Omit & {\n plain?: boolean;\n};\n\ntype CertificateDisplayProps = {\n id: string;\n keyInfo?: CertificateRepresentation;\n};\n\nconst CertificateDisplay = ({ id, keyInfo }: CertificateDisplayProps) => {\n const { t } = useTranslation();\n return (\n \n );\n};\n\nexport const Certificate = ({ keyInfo, plain = false }: CertificateProps) => {\n const { t } = useTranslation();\n const id = useId();\n\n return plain ? (\n \n ) : (\n }\n >\n \n \n );\n};\n","import { useTranslation } from \"react-i18next\";\nimport { PasswordControl, TextControl } from \"@keycloak/keycloak-ui-shared\";\n\nexport const StoreSettings = ({\n hidePassword = false,\n isSaml = false,\n}: {\n hidePassword?: boolean;\n isSaml?: boolean;\n}) => {\n const { t } = useTranslation();\n\n return (\n <>\n \n {!hidePassword && (\n \n )}\n {isSaml && (\n \n )}\n \n >\n );\n};\n","import { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport {\n Controller,\n FormProvider,\n useForm,\n useFormContext,\n} from \"react-hook-form\";\nimport {\n Button,\n ButtonVariant,\n Form,\n FormGroup,\n Modal,\n ModalVariant,\n Text,\n TextContent,\n} from \"@patternfly/react-core\";\n\nimport type KeyStoreConfig from \"@keycloak/keycloak-admin-client/lib/defs/keystoreConfig\";\nimport { HelpItem, SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { StoreSettings } from \"./StoreSettings\";\nimport { FileUpload } from \"../../components/json-file-upload/patternfly/FileUpload\";\nimport { useServerInfo } from \"../../context/server-info/ServerInfoProvider\";\n\ntype GenerateKeyDialogProps = {\n clientId: string;\n toggleDialog: () => void;\n save: (keyStoreConfig: KeyStoreConfig) => void;\n};\n\ntype KeyFormProps = {\n useFile?: boolean;\n isSaml?: boolean;\n hasPem?: boolean;\n};\n\nconst CERT_PEM = \"Certificate PEM\" as const;\n\nconst extensions = new Map([\n [\"PKCS12\", \"p12\"],\n [\"JKS\", \"jks\"],\n [\"BCFKS\", \"bcfks\"],\n]);\n\ntype FormFields = KeyStoreConfig & {\n file: string | File;\n};\n\nexport const getFileExtension = (format: string) => extensions.get(format);\n\nexport const KeyForm = ({\n isSaml = false,\n hasPem = false,\n useFile = false,\n}: KeyFormProps) => {\n const { t } = useTranslation();\n\n const [filename, setFilename] = useState();\n\n const { control, watch } = useFormContext();\n const format = watch(\"format\");\n\n const { cryptoInfo } = useServerInfo();\n const supportedKeystoreTypes = [\n ...(cryptoInfo?.supportedKeystoreTypes ?? []),\n ...(hasPem ? [CERT_PEM] : []),\n ];\n\n return (\n \n \n {useFile && (\n \n }\n fieldId=\"importFile\"\n >\n (\n {\n setFilename(filename);\n field.onChange(value);\n }}\n />\n )}\n />\n \n )}\n {format !== CERT_PEM && (\n \n )}\n \n );\n};\n\nexport const GenerateKeyDialog = ({\n clientId,\n save,\n toggleDialog,\n}: GenerateKeyDialogProps) => {\n const { t } = useTranslation();\n const form = useForm({\n defaultValues: { keyAlias: clientId },\n mode: \"onChange\",\n });\n\n const {\n handleSubmit,\n formState: { isValid },\n } = form;\n\n return (\n {\n handleSubmit((config) => {\n save(config);\n toggleDialog();\n })();\n }}\n >\n {t(\"generate\")}\n ,\n {\n toggleDialog();\n }}\n >\n {t(\"cancel\")}\n ,\n ]}\n >\n \n {t(\"generateKeysDescription\")} \n \n \n \n \n \n );\n};\n","import {\n Button,\n ButtonVariant,\n Form,\n FormGroup,\n Modal,\n ModalVariant,\n Text,\n TextContent,\n} from \"@patternfly/react-core\";\nimport { Controller, FormProvider, useForm, useWatch } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { SelectControl } from \"@keycloak/keycloak-ui-shared\";\nimport { FileUpload } from \"../../components/json-file-upload/patternfly/FileUpload\";\nimport { useServerInfo } from \"../../context/server-info/ServerInfoProvider\";\nimport { StoreSettings } from \"./StoreSettings\";\n\ntype ImportKeyDialogProps = {\n toggleDialog: () => void;\n save: (importFile: ImportFile) => void;\n};\n\nexport type ImportFile = {\n keystoreFormat: string;\n keyAlias: string;\n storePassword: string;\n file: { value?: string; filename: string };\n};\n\nexport const ImportKeyDialog = ({\n save,\n toggleDialog,\n}: ImportKeyDialogProps) => {\n const { t } = useTranslation();\n const form = useForm();\n const { control, handleSubmit } = form;\n\n const baseFormats = useServerInfo().cryptoInfo?.supportedKeystoreTypes ?? [];\n\n const formats = baseFormats.concat([\n \"Certificate PEM\",\n \"Public Key PEM\",\n \"JSON Web Key Set\",\n ]);\n\n const format = useWatch({\n control,\n name: \"keystoreFormat\",\n defaultValue: formats[0],\n });\n\n return (\n {\n handleSubmit((importFile) => {\n save(importFile);\n toggleDialog();\n })();\n }}\n >\n {t(\"import\")}\n ,\n {\n toggleDialog();\n }}\n >\n {t(\"cancel\")}\n ,\n ]}\n >\n \n {t(\"generateKeysDescription\")} \n \n \n \n \n {baseFormats.includes(format) && }\n \n (\n \n field.onChange({ value, filename })\n }\n />\n )}\n />\n \n \n \n \n );\n};\n","import type CertificateRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation\";\nimport type KeyStoreConfig from \"@keycloak/keycloak-admin-client/lib/defs/keystoreConfig\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n Card,\n CardBody,\n CardHeader,\n CardTitle,\n PageSection,\n Text,\n TextContent,\n} from \"@patternfly/react-core\";\nimport { saveAs } from \"file-saver\";\nimport { useState } from \"react\";\nimport { useFormContext, useWatch } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { TextControl } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { DefaultSwitchControl } from \"../../components/SwitchControl\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport useToggle from \"../../utils/useToggle\";\nimport { FormFields } from \"../ClientDetails\";\nimport { Certificate } from \"./Certificate\";\nimport { GenerateKeyDialog, getFileExtension } from \"./GenerateKeyDialog\";\nimport { ImportFile, ImportKeyDialog } from \"./ImportKeyDialog\";\n\ntype KeysProps = {\n save: () => void;\n clientId: string;\n hasConfigureAccess?: boolean;\n};\n\nconst attr = \"jwt.credential\";\n\nexport const Keys = ({ clientId, save, hasConfigureAccess }: KeysProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const {\n control,\n getValues,\n formState: { isDirty },\n } = useFormContext();\n const { addAlert, addError } = useAlerts();\n\n const [keyInfo, setKeyInfo] = useState();\n const [openGenerateKeys, toggleOpenGenerateKeys, setOpenGenerateKeys] =\n useToggle();\n const [openImportKeys, toggleOpenImportKeys, setOpenImportKeys] = useToggle();\n const [key, setKey] = useState(0);\n const refresh = () => setKey(key + 1);\n\n const useJwksUrl = useWatch({\n control,\n name: convertAttributeNameToForm(\"attributes.use.jwks.url\"),\n defaultValue: \"false\",\n });\n\n useFetch(\n () => adminClient.clients.getKeyInfo({ id: clientId, attr }),\n (info) => setKeyInfo(info),\n [key],\n );\n\n const generate = async (config: KeyStoreConfig) => {\n try {\n const keyStore = await adminClient.clients.generateAndDownloadKey(\n {\n id: clientId,\n attr,\n },\n config,\n );\n saveAs(\n new Blob([keyStore], { type: \"application/octet-stream\" }),\n `keystore.${getFileExtension(config.format ?? \"\")}`,\n );\n addAlert(t(\"generateSuccess\"), AlertVariant.success);\n refresh();\n } catch (error) {\n addError(\"generateError\", error);\n }\n };\n\n const importKey = async (importFile: ImportFile) => {\n try {\n const formData = new FormData();\n const { file, ...rest } = importFile;\n\n for (const [key, value] of Object.entries(rest)) {\n formData.append(key, value);\n }\n\n formData.append(\"file\", file.value!);\n\n await adminClient.clients.uploadCertificate(\n { id: clientId, attr },\n formData,\n );\n addAlert(t(\"importSuccess\"), AlertVariant.success);\n refresh();\n } catch (error) {\n addError(\"importError\", error);\n }\n };\n\n return (\n \n {openGenerateKeys && (\n \n )}\n {openImportKeys && (\n \n )}\n \n \n {t(\"jwksUrlConfig\")} \n \n \n \n {t(\"keysIntro\")} \n \n \n \n \n \n {useJwksUrl !== \"true\" &&\n (keyInfo ? (\n \n ) : (\n \"No client certificate configured\"\n ))}\n {useJwksUrl === \"true\" && (\n \n )}\n \n \n {t(\"save\")}\n \n setOpenGenerateKeys(true)}\n >\n {t(\"generateNewKeys\")}\n \n setOpenImportKeys(true)}\n isDisabled={useJwksUrl === \"true\"}\n >\n {t(\"import\")}\n \n \n \n \n \n \n );\n};\n","import KeyStoreConfig from \"@keycloak/keycloak-admin-client/lib/defs/keystoreConfig\";\nimport { Button, Form, Modal } from \"@patternfly/react-core\";\nimport { saveAs } from \"file-saver\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { KeyForm, getFileExtension } from \"./GenerateKeyDialog\";\nimport { KeyTypes } from \"./SamlKeys\";\n\ntype ExportSamlKeyDialogProps = {\n clientId: string;\n close: () => void;\n keyType: KeyTypes;\n};\n\nexport const ExportSamlKeyDialog = ({\n clientId,\n close,\n keyType,\n}: ExportSamlKeyDialogProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { realm } = useRealm();\n\n const { addAlert, addError } = useAlerts();\n\n const form = useForm({\n defaultValues: { realmAlias: realm },\n });\n\n const download = async (config: KeyStoreConfig) => {\n try {\n const keyStore = await adminClient.clients.downloadKey(\n {\n id: clientId,\n attr: keyType,\n },\n config,\n );\n saveAs(\n new Blob([keyStore], { type: \"application/octet-stream\" }),\n `keystore.${getFileExtension(config.format ?? \"\")}`,\n );\n addAlert(t(\"samlKeysExportSuccess\"));\n close();\n } catch (error) {\n addError(\"samlKeysExportError\", error);\n }\n };\n\n return (\n \n {t(\"export\")}\n ,\n {\n close();\n }}\n >\n {t(\"cancel\")}\n ,\n ]}\n >\n \n \n \n \n \n \n );\n};\n","import KeycloakAdminClient from \"@keycloak/keycloak-admin-client\";\nimport type CertificateRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation\";\nimport type KeyStoreConfig from \"@keycloak/keycloak-admin-client/lib/defs/keystoreConfig\";\nimport {\n AlertVariant,\n Button,\n ButtonVariant,\n Flex,\n FlexItem,\n Form,\n FormGroup,\n Modal,\n ModalVariant,\n Radio,\n Split,\n SplitItem,\n Text,\n TextContent,\n Title,\n} from \"@patternfly/react-core\";\nimport { saveAs } from \"file-saver\";\nimport { useState } from \"react\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { HelpItem } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { Certificate } from \"./Certificate\";\nimport { KeyForm } from \"./GenerateKeyDialog\";\nimport type { KeyTypes } from \"./SamlKeys\";\n\ntype SamlKeysDialogProps = {\n id: string;\n attr: KeyTypes;\n onClose: () => void;\n onCancel: () => void;\n};\n\nexport type SamlKeysDialogForm = KeyStoreConfig & {\n file: File;\n};\n\nexport const submitForm = async (\n adminClient: KeycloakAdminClient,\n form: SamlKeysDialogForm,\n id: string,\n attr: KeyTypes,\n callback: (error?: unknown) => void,\n) => {\n try {\n const formData = new FormData();\n const { file, ...rest } = form;\n Object.entries(rest).map(([key, value]) =>\n formData.append(\n key === \"format\" ? \"keystoreFormat\" : key,\n value.toString(),\n ),\n );\n formData.append(\"file\", file);\n\n await adminClient.clients.uploadKey({ id, attr }, formData);\n callback();\n } catch (error) {\n callback(error);\n }\n};\n\nexport const SamlKeysDialog = ({\n id,\n attr,\n onClose,\n onCancel,\n}: SamlKeysDialogProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const [type, setType] = useState(false);\n const [keys, setKeys] = useState();\n const form = useForm({ mode: \"onChange\" });\n const {\n handleSubmit,\n formState: { isValid },\n } = form;\n\n const { addAlert, addError } = useAlerts();\n\n const submit = (form: SamlKeysDialogForm) => {\n submitForm(adminClient, form, id, attr, (error) => {\n if (error) {\n addError(\"importError\", error);\n } else {\n addAlert(t(\"importSuccess\"), AlertVariant.success);\n }\n });\n };\n\n const generate = async () => {\n try {\n const key = await adminClient.clients.generateKey({\n id,\n attr,\n });\n setKeys(key);\n saveAs(\n new Blob([key.privateKey!], {\n type: \"application/octet-stream\",\n }),\n \"private.key\",\n );\n\n addAlert(t(\"generateSuccess\"), AlertVariant.success);\n } catch (error) {\n addError(\"generateError\", error);\n }\n };\n\n return (\n \n {t(\"enableClientSignatureRequired\")} \n {t(\"enableClientSignatureRequiredExplain\")} \n \n }\n isOpen={true}\n onClose={onClose}\n actions={[\n {\n if (type) {\n handleSubmit(submit)();\n }\n onClose();\n }}\n >\n {t(\"confirm\")}\n ,\n \n {t(\"cancel\")}\n ,\n ]}\n >\n \n \n \n \n \n setType(false)}\n label={t(\"selectMethodType.generate\")}\n id=\"selectMethodType-generate\"\n />\n \n \n setType(true)}\n label={t(\"selectMethodType.import\")}\n id=\"selectMethodType-import\"\n />\n \n \n \n {!type && (\n \n }\n >\n \n \n \n \n \n \n {t(\"generate\")}\n \n \n \n \n )}\n \n {type && }\n \n \n );\n};\n","import { AlertVariant } from \"@patternfly/react-core\";\nimport { FormProvider, useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { ConfirmDialogModal } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { KeyForm } from \"./GenerateKeyDialog\";\nimport type { KeyTypes } from \"./SamlKeys\";\nimport { SamlKeysDialogForm, submitForm } from \"./SamlKeysDialog\";\n\ntype SamlImportKeyDialogProps = {\n id: string;\n attr: KeyTypes;\n onClose: () => void;\n};\n\nexport const SamlImportKeyDialog = ({\n id,\n attr,\n onClose,\n}: SamlImportKeyDialogProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const form = useFormContext();\n const { handleSubmit } = form;\n\n const { addAlert, addError } = useAlerts();\n\n const submit = (form: SamlKeysDialogForm) => {\n submitForm(adminClient, form, id, attr, (error) => {\n if (error) {\n addError(\"importError\", error);\n } else {\n addAlert(t(\"importSuccess\"), AlertVariant.success);\n }\n });\n };\n\n return (\n {\n handleSubmit(submit)();\n onClose();\n }}\n >\n \n \n \n \n );\n};\n","import type CertificateRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/certificateRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n Card,\n CardBody,\n Form,\n FormGroup,\n PageSection,\n Switch,\n Text,\n TextContent,\n} from \"@patternfly/react-core\";\nimport { saveAs } from \"file-saver\";\nimport { Fragment, useState } from \"react\";\nimport { Controller, useFormContext } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { FormPanel, HelpItem } from \"@keycloak/keycloak-ui-shared\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { useConfirmDialog } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { convertAttributeNameToForm } from \"../../util\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport useToggle from \"../../utils/useToggle\";\nimport { FormFields } from \"../ClientDetails\";\nimport { Certificate } from \"./Certificate\";\nimport { ExportSamlKeyDialog } from \"./ExportSamlKeyDialog\";\nimport { SamlImportKeyDialog } from \"./SamlImportKeyDialog\";\nimport { SamlKeysDialog } from \"./SamlKeysDialog\";\n\ntype SamlKeysProps = {\n clientId: string;\n save: () => void;\n};\n\nconst KEYS = [\"saml.signing\", \"saml.encryption\"] as const;\nexport type KeyTypes = (typeof KEYS)[number];\n\nconst KEYS_MAPPING: { [key in KeyTypes]: { [index: string]: string } } = {\n \"saml.signing\": {\n name: convertAttributeNameToForm(\"attributes.saml.client.signature\"),\n title: \"signingKeysConfig\",\n key: \"clientSignature\",\n },\n \"saml.encryption\": {\n name: convertAttributeNameToForm(\"attributes.saml.encrypt\"),\n title: \"encryptionKeysConfig\",\n key: \"encryptAssertions\",\n },\n};\n\ntype KeySectionProps = {\n clientId: string;\n keyInfo?: CertificateRepresentation;\n attr: KeyTypes;\n onChanged: (key: KeyTypes) => void;\n onGenerate: (key: KeyTypes, regenerate: boolean) => void;\n onImport: (key: KeyTypes) => void;\n};\n\nconst KeySection = ({\n clientId,\n keyInfo,\n attr,\n onChanged,\n onGenerate,\n onImport,\n}: KeySectionProps) => {\n const { t } = useTranslation();\n const { control, watch } = useFormContext();\n const title = KEYS_MAPPING[attr].title;\n const key = KEYS_MAPPING[attr].key;\n const name = KEYS_MAPPING[attr].name;\n\n const [showImportDialog, toggleImportDialog] = useToggle();\n\n const section = watch(name as keyof FormFields);\n return (\n <>\n {showImportDialog && (\n \n )}\n \n \n {t(`${title}Explain`)} \n \n \n \n }\n label={t(key)}\n fieldId={key}\n hasNoPaddingTop\n >\n (\n {\n const v = value.toString();\n if (v === \"true\") {\n onChanged(attr);\n field.onChange(v);\n } else {\n onGenerate(attr, false);\n }\n }}\n aria-label={t(key)}\n />\n )}\n />\n \n \n \n {keyInfo?.certificate && section === \"true\" && (\n \n \n \n \n \n onGenerate(attr, true)}\n >\n {t(\"regenerate\")}\n \n onImport(attr)}>\n {t(\"importKey\")}\n \n \n {t(\"export\")}\n \n \n \n \n \n )}\n >\n );\n};\n\nexport const SamlKeys = ({ clientId, save }: SamlKeysProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const [isChanged, setIsChanged] = useState();\n const [keyInfo, setKeyInfo] = useState();\n const [selectedType, setSelectedType] = useState();\n const [openImport, setImportOpen] = useState();\n const [refresh, setRefresh] = useState(0);\n\n const { setValue } = useFormContext();\n const { addAlert, addError } = useAlerts();\n\n useFetch(\n () =>\n Promise.all(\n KEYS.map((attr) =>\n adminClient.clients.getKeyInfo({ id: clientId, attr }),\n ),\n ),\n (info) => setKeyInfo(info),\n [refresh],\n );\n\n const generate = async (attr: KeyTypes) => {\n const index = KEYS.indexOf(attr);\n try {\n const info = [...(keyInfo || [])];\n info[index] = await adminClient.clients.generateKey({\n id: clientId,\n attr,\n });\n\n setKeyInfo(info);\n saveAs(\n new Blob([info[index].privateKey!], {\n type: \"application/octet-stream\",\n }),\n \"private.key\",\n );\n\n addAlert(t(\"generateSuccess\"), AlertVariant.success);\n } catch (error) {\n addError(\"generateError\", error);\n }\n };\n\n const key = selectedType ? KEYS_MAPPING[selectedType].key : \"\";\n const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({\n titleKey: t(\"disableSigning\", {\n key: t(key),\n }),\n messageKey: t(\"disableSigningExplain\", {\n key: t(key),\n }),\n continueButtonLabel: \"yes\",\n cancelButtonLabel: \"no\",\n onConfirm: () => {\n setValue(KEYS_MAPPING[selectedType!].name, \"false\");\n save();\n },\n });\n\n const [toggleReGenerateDialog, ReGenerateConfirm] = useConfirmDialog({\n titleKey: \"reGenerateSigning\",\n messageKey: \"reGenerateSigningExplain\",\n continueButtonLabel: \"yes\",\n cancelButtonLabel: \"no\",\n onConfirm: () => {\n generate(selectedType!);\n },\n });\n\n return (\n \n {isChanged && (\n {\n setIsChanged(undefined);\n save();\n setRefresh(refresh + 1);\n }}\n onCancel={() => {\n setValue(KEYS_MAPPING[selectedType!].name, \"false\");\n setIsChanged(undefined);\n }}\n />\n )}\n \n \n {KEYS.map((attr, index) => (\n \n {openImport === attr && (\n setImportOpen(undefined)}\n />\n )}\n {\n setSelectedType(type);\n if (!isNew) {\n toggleDisableDialog();\n } else {\n toggleReGenerateDialog();\n }\n }}\n onImport={() => setImportOpen(attr)}\n />\n \n ))}\n \n );\n};\n","import type ClientScopeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation\";\nimport {\n AlertVariant,\n Button,\n ButtonVariant,\n Dropdown,\n DropdownItem,\n DropdownList,\n MenuToggle,\n ToolbarItem,\n} from \"@patternfly/react-core\";\nimport { EllipsisVIcon } from \"@patternfly/react-icons\";\nimport { useState } from \"react\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { ChangeTypeDropdown } from \"../../client-scopes/ChangeTypeDropdown\";\nimport {\n SearchDropdown,\n SearchToolbar,\n SearchType,\n nameFilter,\n typeFilter,\n} from \"../../client-scopes/details/SearchFilter\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport {\n AllClientScopeType,\n AllClientScopes,\n CellDropdown,\n ClientScope,\n addClientScope,\n changeClientScope,\n removeClientScope,\n} from \"../../components/client-scope/ClientScopeTypes\";\nimport { useConfirmDialog } from \"../../components/confirm-dialog/ConfirmDialog\";\nimport { ListEmptyState } from \"../../components/list-empty-state/ListEmptyState\";\nimport {\n Action,\n KeycloakDataTable,\n} from \"../../components/table-toolbar/KeycloakDataTable\";\nimport { useAccess } from \"../../context/access/Access\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport useLocaleSort, { mapByKey } from \"../../utils/useLocaleSort\";\nimport { toDedicatedScope } from \"../routes/DedicatedScopeDetails\";\nimport { AddScopeDialog } from \"./AddScopeDialog\";\n\nimport \"./client-scopes.css\";\n\nexport type ClientScopesProps = {\n clientId: string;\n protocol: string;\n clientName: string;\n fineGrainedAccess?: boolean;\n};\n\nexport type Row = ClientScopeRepresentation & {\n type: AllClientScopeType;\n description?: string;\n};\n\nconst DEDICATED_ROW = \"dedicated\";\n\ntype TypeSelectorProps = Row & {\n clientId: string;\n fineGrainedAccess?: boolean;\n refresh: () => void;\n};\n\nconst TypeSelector = ({\n clientId,\n refresh,\n fineGrainedAccess,\n ...scope\n}: TypeSelectorProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { addAlert, addError } = useAlerts();\n\n const { hasAccess } = useAccess();\n\n const isDedicatedRow = (value: Row) => value.id === DEDICATED_ROW;\n const isManager = hasAccess(\"manage-clients\") || fineGrainedAccess;\n\n return (\n {\n try {\n await changeClientScope(\n adminClient,\n clientId,\n scope,\n scope.type,\n value as ClientScope,\n );\n addAlert(t(\"clientScopeSuccess\"), AlertVariant.success);\n refresh();\n } catch (error) {\n addError(\"clientScopeError\", error);\n }\n }}\n />\n );\n};\n\nexport const ClientScopes = ({\n clientId,\n protocol,\n clientName,\n fineGrainedAccess,\n}: ClientScopesProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n const localeSort = useLocaleSort();\n\n const [searchType, setSearchType] = useState(\"name\");\n\n const [searchTypeType, setSearchTypeType] = useState(\n AllClientScopes.none,\n );\n\n const [addDialogOpen, setAddDialogOpen] = useState(false);\n\n const [rest, setRest] = useState();\n const [selectedRows, setSelectedRowState] = useState([]);\n const setSelectedRows = (rows: Row[]) =>\n setSelectedRowState(rows.filter(({ id }) => id !== DEDICATED_ROW));\n const [kebabOpen, setKebabOpen] = useState(false);\n\n const [key, setKey] = useState(0);\n const refresh = () => setKey(key + 1);\n const isDedicatedRow = (value: Row) => value.id === DEDICATED_ROW;\n\n const { hasAccess } = useAccess();\n const isManager = hasAccess(\"manage-clients\") || fineGrainedAccess;\n const isViewer = hasAccess(\"view-clients\") || fineGrainedAccess;\n\n const loader = async (first?: number, max?: number, search?: string) => {\n const defaultClientScopes =\n await adminClient.clients.listDefaultClientScopes({ id: clientId });\n const optionalClientScopes =\n await adminClient.clients.listOptionalClientScopes({ id: clientId });\n const clientScopes = await adminClient.clientScopes.find();\n\n const find = (id: string) =>\n clientScopes.find((clientScope) => id === clientScope.id);\n\n const optional = optionalClientScopes.map((c) => {\n const scope = find(c.id!);\n const row: Row = {\n ...c,\n type: ClientScope.optional,\n description: scope?.description,\n };\n return row;\n });\n\n const defaultScopes = defaultClientScopes.map((c) => {\n const scope = find(c.id!);\n const row: Row = {\n ...c,\n type: ClientScope.default,\n description: scope?.description,\n };\n return row;\n });\n\n let rows = [...optional, ...defaultScopes];\n const names = rows.map((row) => row.name);\n\n setRest(\n clientScopes\n .filter((scope) => !names.includes(scope.name))\n .filter((scope) => scope.protocol === protocol),\n );\n\n rows = localeSort(rows, mapByKey(\"name\"));\n\n if (isViewer) {\n rows.unshift({\n id: DEDICATED_ROW,\n name: t(\"dedicatedScopeName\", { clientName }),\n type: AllClientScopes.none,\n description: t(\"dedicatedScopeDescription\"),\n });\n }\n\n const filter =\n searchType === \"name\" ? nameFilter(search) : typeFilter(searchTypeType);\n const firstNum = Number(first);\n\n return rows.filter(filter).slice(firstNum, firstNum + Number(max));\n };\n\n const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({\n titleKey: t(\"deleteClientScope\", {\n count: selectedRows.length,\n name: selectedRows[0]?.name,\n }),\n messageKey: \"deleteConfirmClientScopes\",\n continueButtonLabel: \"delete\",\n continueButtonVariant: ButtonVariant.danger,\n onConfirm: async () => {\n try {\n await removeClientScope(\n adminClient,\n clientId,\n selectedRows[0],\n selectedRows[0].type as ClientScope,\n );\n addAlert(t(\"clientScopeRemoveSuccess\"), AlertVariant.success);\n refresh();\n } catch (error) {\n addError(\"clientScopeRemoveError\", error);\n }\n },\n });\n\n return (\n <>\n {rest && (\n setAddDialogOpen(!addDialogOpen)}\n onAdd={async (scopes) => {\n try {\n await Promise.all(\n scopes.map(\n async (scope) =>\n await addClientScope(\n adminClient,\n clientId,\n scope.scope,\n scope.type!,\n ),\n ),\n );\n addAlert(t(\"clientScopeSuccess\"), AlertVariant.success);\n refresh();\n } catch (error) {\n addError(\"clientScopeError\", error);\n }\n }}\n />\n )}\n\n setSelectedRows([...rows])}\n searchTypeComponent={\n setSearchType(searchType)}\n />\n }\n toolbarItem={\n <>\n setSearchType(searchType)}\n onType={(value) => {\n setSearchTypeType(value);\n refresh();\n }}\n />\n {isManager && (\n <>\n \n \n setAddDialogOpen(true)}>\n {t(\"addClientScope\")}\n \n \n \n \n \n \n (\n setKebabOpen(!kebabOpen)}\n isExpanded={kebabOpen}\n >\n \n \n )}\n isOpen={kebabOpen}\n >\n \n {\n try {\n await Promise.all(\n selectedRows.map((row) =>\n removeClientScope(\n adminClient,\n clientId,\n { ...row },\n row.type as ClientScope,\n ),\n ),\n );\n\n setKebabOpen(false);\n setSelectedRows([]);\n addAlert(t(\"clientScopeRemoveSuccess\"));\n refresh();\n } catch (error) {\n addError(\"clientScopeRemoveError\", error);\n }\n }}\n >\n {t(\"remove\")}\n \n \n \n \n >\n )}\n >\n }\n columns={[\n {\n name: \"name\",\n displayKey: \"assignedClientScope\",\n cellRenderer: (row) => {\n if (isDedicatedRow(row)) {\n return (\n \n {row.name}\n \n );\n }\n return row.name!;\n },\n },\n {\n name: \"type\",\n displayKey: \"assignedType\",\n cellRenderer: (row) => (\n \n ),\n },\n { name: \"description\" },\n ]}\n actions={\n isManager\n ? [\n {\n title: t(\"remove\"),\n onRowClick: async (row) => {\n setSelectedRows([row]);\n toggleDeleteDialog();\n return true;\n },\n } as Action,\n ]\n : []\n }\n emptyState={\n setAddDialogOpen(true)}\n />\n }\n />\n >\n );\n};\n","import type UserRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/userRepresentation\";\nimport {\n CodeBlock,\n CodeBlockAction,\n EmptyState,\n EmptyStateBody,\n EmptyStateHeader,\n TextArea,\n} from \"@patternfly/react-core\";\nimport { useTranslation } from \"react-i18next\";\nimport { CopyToClipboardButton } from \"./CopyToClipboardButton\";\n\ntype GeneratedCodeTabProps = {\n user?: UserRepresentation;\n text: string;\n label: string;\n};\n\nexport const GeneratedCodeTab = ({\n text,\n user,\n label,\n}: GeneratedCodeTabProps) => {\n const { t } = useTranslation();\n\n return user ? (\n \n \n \n }\n >\n \n \n ) : (\n \n {t(`${label}No`)}>} headingLevel=\"h2\" />\n {t(`${label}IsDisabled`)} \n \n );\n};\n","import type ClientScopeRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientScopeRepresentation\";\nimport type ProtocolMapperRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/protocolMapperRepresentation\";\nimport type RoleRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/roleRepresentation\";\nimport type { ProtocolMapperTypeRepresentation } from \"@keycloak/keycloak-admin-client/lib/defs/serverInfoRepesentation\";\nimport {\n HelpItem,\n KeycloakSelect,\n SelectVariant,\n useHelp,\n} from \"@keycloak/keycloak-ui-shared\";\nimport {\n ClipboardCopy,\n Form,\n FormGroup,\n Grid,\n GridItem,\n PageSection,\n SelectOption,\n Split,\n SplitItem,\n Tab,\n TabContent,\n Tabs,\n TabTitleText,\n Text,\n TextContent,\n} from \"@patternfly/react-core\";\nimport { QuestionCircleIcon } from \"@patternfly/react-icons\";\nimport { useEffect, useRef, useState } from \"react\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { KeycloakDataTable } from \"../../components/table-toolbar/KeycloakDataTable\";\nimport { UserSelect } from \"../../components/users/UserSelect\";\nimport { useAccess } from \"../../context/access/Access\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { useServerInfo } from \"../../context/server-info/ServerInfoProvider\";\nimport { prettyPrintJSON } from \"../../util\";\nimport { useFetch } from \"../../utils/useFetch\";\nimport { GeneratedCodeTab } from \"./GeneratedCodeTab\";\n\nimport \"./evaluate.css\";\n\nexport type EvaluateScopesProps = {\n clientId: string;\n protocol: string;\n};\n\nconst ProtocolMappers = ({\n protocolMappers,\n}: {\n protocolMappers: ProtocolMapperRepresentation[];\n}) => {\n const [key, setKey] = useState(0);\n useEffect(() => {\n setKey(key + 1);\n }, [protocolMappers]);\n return (\n Promise.resolve(protocolMappers)}\n ariaLabelKey=\"effectiveProtocolMappers\"\n searchPlaceholderKey=\"searchForProtocol\"\n data-testid=\"effective-protocol-mappers\"\n columns={[\n {\n name: \"mapperName\",\n displayKey: \"name\",\n },\n {\n name: \"containerName\",\n displayKey: \"parentClientScope\",\n },\n {\n name: \"type.category\",\n displayKey: \"category\",\n },\n {\n name: \"type.priority\",\n displayKey: \"priority\",\n },\n ]}\n />\n );\n};\n\nconst EffectiveRoles = ({\n effectiveRoles,\n}: {\n effectiveRoles: RoleRepresentation[];\n}) => {\n const [key, setKey] = useState(0);\n useEffect(() => {\n setKey(key + 1);\n }, [effectiveRoles]);\n\n return (\n Promise.resolve(effectiveRoles)}\n ariaLabelKey=\"effectiveRoleScopeMappings\"\n searchPlaceholderKey=\"searchForRole\"\n data-testid=\"effective-role-scope-mappings\"\n columns={[\n {\n name: \"name\",\n displayKey: \"role\",\n },\n {\n name: \"containerId\",\n displayKey: \"origin\",\n },\n ]}\n />\n );\n};\n\nexport const EvaluateScopes = ({ clientId, protocol }: EvaluateScopesProps) => {\n const { adminClient } = useAdminClient();\n\n const prefix = \"openid\";\n const { t } = useTranslation();\n const { enabled } = useHelp();\n const { realm } = useRealm();\n const mapperTypes = useServerInfo().protocolMapperTypes![protocol];\n\n const [selectableScopes, setSelectableScopes] = useState<\n ClientScopeRepresentation[]\n >([]);\n const [isScopeOpen, setIsScopeOpen] = useState(false);\n const [selected, setSelected] = useState([prefix]);\n const [activeTab, setActiveTab] = useState(0);\n\n const [key, setKey] = useState(\"\");\n const refresh = () => setKey(`${new Date().getTime()}`);\n const [effectiveRoles, setEffectiveRoles] = useState(\n [],\n );\n const [protocolMappers, setProtocolMappers] = useState<\n ProtocolMapperRepresentation[]\n >([]);\n const [accessToken, setAccessToken] = useState(\"\");\n const [userInfo, setUserInfo] = useState(\"\");\n const [idToken, setIdToken] = useState(\"\");\n\n const tabContent1 = useRef(null);\n const tabContent2 = useRef(null);\n const tabContent3 = useRef(null);\n const tabContent4 = useRef(null);\n const tabContent5 = useRef(null);\n\n const form = useForm();\n\n const { hasAccess } = useAccess();\n const hasViewUsers = hasAccess(\"view-users\");\n\n useFetch(\n () => adminClient.clients.listOptionalClientScopes({ id: clientId }),\n (optionalClientScopes) => setSelectableScopes(optionalClientScopes),\n [],\n );\n\n useFetch(\n async () => {\n const scope = selected.join(\" \");\n const effectiveRoles = await adminClient.clients.evaluatePermission({\n id: clientId,\n roleContainer: realm,\n scope,\n type: \"granted\",\n });\n\n const mapperList = (await adminClient.clients.evaluateListProtocolMapper({\n id: clientId,\n scope,\n })) as ({\n type: ProtocolMapperTypeRepresentation;\n } & ProtocolMapperRepresentation)[];\n\n return {\n mapperList,\n effectiveRoles,\n };\n },\n ({ mapperList, effectiveRoles }) => {\n setEffectiveRoles(effectiveRoles);\n mapperList.map((mapper) => {\n mapper.type = mapperTypes.filter(\n (type) => type.id === mapper.protocolMapper,\n )[0];\n });\n\n setProtocolMappers(mapperList);\n refresh();\n },\n [selected],\n );\n\n useFetch(\n async () => {\n const scope = selected.join(\" \");\n const user = form.getValues(\"user\");\n if (!user) return [];\n\n return await Promise.all([\n adminClient.clients.evaluateGenerateAccessToken({\n id: clientId,\n userId: user[0],\n scope,\n }),\n adminClient.clients.evaluateGenerateUserInfo({\n id: clientId,\n userId: user[0],\n scope,\n }),\n adminClient.clients.evaluateGenerateIdToken({\n id: clientId,\n userId: user[0],\n scope,\n }),\n ]);\n },\n ([accessToken, userInfo, idToken]) => {\n setAccessToken(prettyPrintJSON(accessToken));\n setUserInfo(prettyPrintJSON(userInfo));\n setIdToken(prettyPrintJSON(idToken));\n },\n [form.getValues(\"user\"), selected],\n );\n\n return (\n <>\n \n {enabled && (\n \n \n {t(\"evaluateExplain\")}\n \n \n )}\n \n \n }\n >\n \n \n setIsScopeOpen(!isScopeOpen)}\n isOpen={isScopeOpen}\n selections={selected}\n onSelect={(value) => {\n const option = value as string;\n if (selected.includes(option)) {\n if (option !== prefix) {\n setSelected(selected.filter((item) => item !== option));\n }\n } else {\n setSelected([...selected, option]);\n }\n }}\n aria-labelledby={t(\"scopeParameter\")}\n placeholderText={t(\"scopeParameterPlaceholder\")}\n >\n {selectableScopes.map((option, index) => (\n \n {option.name}\n \n ))}\n \n \n \n \n {selected.join(\" \")}\n \n \n \n \n {hasViewUsers && (\n \n \n \n )}\n \n \n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n setActiveTab(key as number)}\n >\n \n {t(\"effectiveProtocolMappers\")}{\" \"}\n \n \n }\n tabContentRef={tabContent1}\n />\n \n {t(\"effectiveRoleScopeMappings\")}{\" \"}\n \n \n }\n tabContentRef={tabContent2}\n > \n \n {t(\"generatedAccessToken\")}{\" \"}\n \n \n }\n tabContentRef={tabContent3}\n />\n \n {t(\"generatedIdToken\")}{\" \"}\n \n \n }\n tabContentRef={tabContent4}\n />\n \n {t(\"generatedUserInfo\")}{\" \"}\n \n \n }\n tabContentRef={tabContent5}\n />\n \n \n \n >\n );\n};\n","import type ClientRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientRepresentation\";\nimport type { RoleMappingPayload } from \"@keycloak/keycloak-admin-client/lib/defs/roleRepresentation\";\nimport type UserRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/userRepresentation\";\nimport { AlertVariant, PageSection } from \"@patternfly/react-core\";\nimport { InfoCircleIcon } from \"@patternfly/react-icons\";\nimport { useState } from \"react\";\nimport { Trans, useTranslation } from \"react-i18next\";\nimport { Link } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"../../components/alert/Alerts\";\nimport { KeycloakSpinner } from \"../../components/keycloak-spinner/KeycloakSpinner\";\nimport { RoleMapping, Row } from \"../../components/role-mapping/RoleMapping\";\nimport { useAccess } from \"../../context/access/Access\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toUser } from \"../../user/routes/User\";\nimport { useFetch } from \"../../utils/useFetch\";\n\nimport \"./service-account.css\";\n\ntype ServiceAccountProps = {\n client: ClientRepresentation;\n};\n\nexport const ServiceAccount = ({ client }: ServiceAccountProps) => {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const [serviceAccount, setServiceAccount] = useState();\n\n const { hasAccess } = useAccess();\n const hasManageClients = hasAccess(\"manage-clients\");\n\n useFetch(\n () =>\n adminClient.clients.getServiceAccountUser({\n id: client.id!,\n }),\n (serviceAccount) => setServiceAccount(serviceAccount),\n [],\n );\n\n const assignRoles = async (rows: Row[]) => {\n try {\n const realmRoles = rows\n .filter((row) => row.client === undefined)\n .map((row) => row.role as RoleMappingPayload)\n .flat();\n await adminClient.users.addRealmRoleMappings({\n id: serviceAccount?.id!,\n roles: realmRoles,\n });\n await Promise.all(\n rows\n .filter((row) => row.client !== undefined)\n .map((row) =>\n adminClient.users.addClientRoleMappings({\n id: serviceAccount?.id!,\n clientUniqueId: row.client!.id!,\n roles: [row.role as RoleMappingPayload],\n }),\n ),\n );\n addAlert(t(\"roleMappingUpdatedSuccess\"), AlertVariant.success);\n } catch (error) {\n addError(\"roleMappingUpdatedError\", error);\n }\n };\n return serviceAccount ? (\n <>\n \n \n \n \n {\"\"}\n \n {{ link: serviceAccount.username }}\n \n \n \n \n \n >\n ) : (\n \n );\n};\n","import type ClientRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/clientRepresentation\";\nimport {\n AlertVariant,\n ButtonVariant,\n Divider,\n DropdownItem,\n Label,\n PageSection,\n Tab,\n TabTitleText,\n Tooltip,\n} from \"@patternfly/react-core\";\nimport { InfoCircleIcon } from \"@patternfly/react-icons\";\nimport { cloneDeep, sortBy } from \"lodash-es\";\nimport { useMemo, useState } from \"react\";\nimport { Controller, FormProvider, useForm, useWatch } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../admin-client\";\nimport { useAlerts } from \"../components/alert/Alerts\";\nimport {\n ConfirmDialogModal,\n useConfirmDialog,\n} from \"../components/confirm-dialog/ConfirmDialog\";\nimport { DownloadDialog } from \"../components/download-dialog/DownloadDialog\";\nimport type { KeyValueType } from \"../components/key-value-form/key-value-convert\";\nimport { KeycloakSpinner } from \"../components/keycloak-spinner/KeycloakSpinner\";\nimport { PermissionsTab } from \"../components/permission-tab/PermissionTab\";\nimport { RolesList } from \"../components/roles-list/RolesList\";\nimport {\n RoutableTabs,\n useRoutableTab,\n} from \"../components/routable-tabs/RoutableTabs\";\nimport {\n ViewHeader,\n ViewHeaderBadge,\n} from \"../components/view-header/ViewHeader\";\nimport { useAccess } from \"../context/access/Access\";\nimport { useRealm } from \"../context/realm-context/RealmContext\";\nimport {\n convertAttributeNameToForm,\n convertFormValuesToObject,\n convertToFormValues,\n exportClient,\n} from \"../util\";\nimport { useFetch } from \"../utils/useFetch\";\nimport useIsFeatureEnabled, { Feature } from \"../utils/useIsFeatureEnabled\";\nimport { useParams } from \"../utils/useParams\";\nimport useToggle from \"../utils/useToggle\";\nimport { AdvancedTab } from \"./AdvancedTab\";\nimport { ClientSessions } from \"./ClientSessions\";\nimport { ClientSettings } from \"./ClientSettings\";\nimport { AuthorizationEvaluate } from \"./authorization/AuthorizationEvaluate\";\nimport { AuthorizationExport } from \"./authorization/AuthorizationExport\";\nimport { AuthorizationPermissions } from \"./authorization/Permissions\";\nimport { AuthorizationPolicies } from \"./authorization/Policies\";\nimport { AuthorizationResources } from \"./authorization/Resources\";\nimport { AuthorizationScopes } from \"./authorization/Scopes\";\nimport { AuthorizationSettings } from \"./authorization/Settings\";\nimport { Credentials } from \"./credentials/Credentials\";\nimport { Keys } from \"./keys/Keys\";\nimport { SamlKeys } from \"./keys/SamlKeys\";\nimport {\n AuthorizationTab,\n toAuthorizationTab,\n} from \"./routes/AuthenticationTab\";\nimport { ClientParams, ClientTab, toClient } from \"./routes/Client\";\nimport { toClientRole } from \"./routes/ClientRole\";\nimport { ClientScopesTab, toClientScopesTab } from \"./routes/ClientScopeTab\";\nimport { toClients } from \"./routes/Clients\";\nimport { toCreateRole } from \"./routes/NewRole\";\nimport { ClientScopes } from \"./scopes/ClientScopes\";\nimport { EvaluateScopes } from \"./scopes/EvaluateScopes\";\nimport { ServiceAccount } from \"./service-account/ServiceAccount\";\nimport { getProtocolName, isRealmClient } from \"./utils\";\n\ntype ClientDetailHeaderProps = {\n onChange: (value: boolean) => void;\n value: boolean | undefined;\n save: () => void;\n client: ClientRepresentation;\n toggleDownloadDialog: () => void;\n toggleDeleteDialog: () => void;\n};\n\nconst ClientDetailHeader = ({\n onChange,\n value,\n save,\n client,\n toggleDownloadDialog,\n toggleDeleteDialog,\n}: ClientDetailHeaderProps) => {\n const { t } = useTranslation();\n const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({\n titleKey: \"disableConfirmClientTitle\",\n messageKey: \"disableConfirmClient\",\n continueButtonLabel: \"disable\",\n onConfirm: () => {\n onChange(!value);\n save();\n },\n });\n\n const badges = useMemo(() => {\n const protocolName = getProtocolName(\n t,\n client.protocol ?? \"openid-connect\",\n );\n\n const text = client.bearerOnly ? (\n \n }\n >\n {protocolName}\n \n \n ) : (\n {protocolName} \n );\n\n return [{ text }];\n }, [client, t]);\n\n const { hasAccess } = useAccess();\n const isManager = hasAccess(\"manage-clients\") || client.access?.configure;\n\n const dropdownItems = [\n \n {t(\"downloadAdapterConfig\")}\n ,\n exportClient(client)}>\n {t(\"export\")}\n ,\n ...(!isRealmClient(client) && isManager\n ? [\n ,\n \n {t(\"delete\")}\n ,\n ]\n : []),\n ];\n\n return (\n <>\n \n {\n if (!value) {\n toggleDisableDialog();\n } else {\n onChange(value);\n save();\n }\n }}\n />\n >\n );\n};\n\nexport type SaveOptions = {\n confirmed?: boolean;\n messageKey?: string;\n};\n\nexport type FormFields = Omit<\n ClientRepresentation,\n \"authorizationSettings\" | \"resources\"\n>;\n\nexport default function ClientDetails() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n const { hasAccess } = useAccess();\n const isFeatureEnabled = useIsFeatureEnabled();\n\n const hasManageAuthorization = hasAccess(\"manage-authorization\");\n const hasViewAuthorization = hasAccess(\"view-authorization\");\n const hasManageClients = hasAccess(\"manage-clients\");\n const hasViewClients = hasAccess(\"view-clients\");\n const hasViewUsers = hasAccess(\"view-users\");\n const permissionsEnabled =\n isFeatureEnabled(Feature.AdminFineGrainedAuthz) &&\n (hasManageAuthorization || hasViewAuthorization);\n\n const navigate = useNavigate();\n\n const [downloadDialogOpen, toggleDownloadDialogOpen] = useToggle();\n const [changeAuthenticatorOpen, toggleChangeAuthenticatorOpen] = useToggle();\n\n const form = useForm();\n const { clientId } = useParams();\n const [key, setKey] = useState(0);\n\n const clientAuthenticatorType = useWatch({\n control: form.control,\n name: \"clientAuthenticatorType\",\n defaultValue: \"client-secret\",\n });\n\n const [client, setClient] = useState();\n\n const loader = async () => {\n const roles = await adminClient.clients.listRoles({ id: clientId });\n return sortBy(roles, (role) => role.name?.toUpperCase());\n };\n\n const useTab = (tab: ClientTab) =>\n useRoutableTab(\n toClient({\n realm,\n clientId,\n tab,\n }),\n );\n\n const settingsTab = useTab(\"settings\");\n const keysTab = useTab(\"keys\");\n const credentialsTab = useTab(\"credentials\");\n const rolesTab = useTab(\"roles\");\n const clientScopesTab = useTab(\"clientScopes\");\n const authorizationTab = useTab(\"authorization\");\n const serviceAccountTab = useTab(\"serviceAccount\");\n const sessionsTab = useTab(\"sessions\");\n const permissionsTab = useTab(\"permissions\");\n const advancedTab = useTab(\"advanced\");\n\n const useClientScopesTab = (tab: ClientScopesTab) =>\n useRoutableTab(\n toClientScopesTab({\n realm,\n clientId,\n tab,\n }),\n );\n\n const clientScopesSetupTab = useClientScopesTab(\"setup\");\n const clientScopesEvaluateTab = useClientScopesTab(\"evaluate\");\n\n const useAuthorizationTab = (tab: AuthorizationTab) =>\n useRoutableTab(\n toAuthorizationTab({\n realm,\n clientId,\n tab,\n }),\n );\n\n const authorizationSettingsTab = useAuthorizationTab(\"settings\");\n const authorizationResourcesTab = useAuthorizationTab(\"resources\");\n const authorizationScopesTab = useAuthorizationTab(\"scopes\");\n const authorizationPoliciesTab = useAuthorizationTab(\"policies\");\n const authorizationPermissionsTab = useAuthorizationTab(\"permissions\");\n const authorizationEvaluateTab = useAuthorizationTab(\"evaluate\");\n const authorizationExportTab = useAuthorizationTab(\"export\");\n\n const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({\n titleKey: \"clientDeleteConfirmTitle\",\n messageKey: \"clientDeleteConfirm\",\n continueButtonLabel: \"delete\",\n continueButtonVariant: ButtonVariant.danger,\n onConfirm: async () => {\n try {\n await adminClient.clients.del({ id: clientId });\n addAlert(t(\"clientDeletedSuccess\"), AlertVariant.success);\n navigate(toClients({ realm }));\n } catch (error) {\n addError(\"clientDeleteError\", error);\n }\n },\n });\n\n const setupForm = (client: ClientRepresentation) => {\n form.reset({ ...client });\n convertToFormValues(client, form.setValue);\n if (client.attributes?.[\"acr.loa.map\"]) {\n form.setValue(\n convertAttributeNameToForm(\"attributes.acr.loa.map\"),\n // @ts-ignore\n Object.entries(JSON.parse(client.attributes[\"acr.loa.map\"])).flatMap(\n ([key, value]) => ({ key, value }),\n ),\n );\n }\n };\n\n useFetch(\n () => adminClient.clients.findOne({ id: clientId }),\n (fetchedClient) => {\n if (!fetchedClient) {\n throw new Error(t(\"notFound\"));\n }\n setClient(cloneDeep(fetchedClient));\n setupForm(fetchedClient);\n },\n [clientId, key],\n );\n\n const save = async (\n { confirmed = false, messageKey = \"clientSaveSuccess\" }: SaveOptions = {\n confirmed: false,\n messageKey: \"clientSaveSuccess\",\n },\n ) => {\n if (!(await form.trigger())) {\n return;\n }\n\n if (\n !client?.publicClient &&\n client?.clientAuthenticatorType !== clientAuthenticatorType &&\n !confirmed\n ) {\n toggleChangeAuthenticatorOpen();\n return;\n }\n\n const values = convertFormValuesToObject(form.getValues());\n\n const submittedClient =\n convertFormValuesToObject(values);\n\n if (submittedClient.attributes?.[\"acr.loa.map\"]) {\n submittedClient.attributes[\"acr.loa.map\"] = JSON.stringify(\n Object.fromEntries(\n (submittedClient.attributes[\"acr.loa.map\"] as KeyValueType[])\n .filter(({ key }) => key !== \"\")\n .map(({ key, value }) => [key, value]),\n ),\n );\n }\n\n try {\n const newClient: ClientRepresentation = {\n ...client,\n ...submittedClient,\n };\n\n newClient.clientId = newClient.clientId?.trim();\n\n await adminClient.clients.update({ id: clientId }, newClient);\n setupForm(newClient);\n setClient(newClient);\n addAlert(t(messageKey), AlertVariant.success);\n } catch (error) {\n addError(\"clientSaveError\", error);\n }\n };\n\n if (!client) {\n return ;\n }\n\n return (\n <>\n save({ confirmed: true })}\n >\n <>\n {t(\"changeAuthenticatorConfirm\", {\n clientAuthenticatorType: clientAuthenticatorType,\n })}\n >\n \n \n {downloadDialogOpen && (\n \n )}\n (\n \n )}\n />\n \n \n \n {t(\"settings\")}}\n {...settingsTab}\n >\n save()}\n reset={() => setupForm(client)}\n />\n \n {((!client.publicClient && !isRealmClient(client)) ||\n client.protocol === \"saml\") && (\n {t(\"keys\")}}\n {...keysTab}\n >\n {client.protocol === \"openid-connect\" && (\n \n )}\n {client.protocol === \"saml\" && (\n \n )}\n \n )}\n {!client.publicClient &&\n !isRealmClient(client) &&\n (hasViewClients ||\n client.access?.configure ||\n client.access?.view) && (\n {t(\"credentials\")}}\n {...credentialsTab}\n >\n setKey(key + 1)}\n />\n \n )}\n {t(\"roles\")}}\n {...rolesTab}\n >\n \n toClientRole({\n realm,\n clientId: client.id!,\n id: roleId,\n tab: \"details\",\n })\n }\n isReadOnly={!(hasManageClients || client.access?.configure)}\n />\n \n {!isRealmClient(client) && !client.bearerOnly && (\n {t(\"clientScopes\")}}\n {...clientScopesTab}\n >\n \n {t(\"setup\")}}\n {...clientScopesSetupTab}\n >\n \n \n {t(\"evaluate\")}}\n {...clientScopesEvaluateTab}\n >\n \n \n \n \n )}\n {client!.authorizationServicesEnabled &&\n (hasManageAuthorization || hasViewAuthorization) && (\n {t(\"authorization\")}}\n {...authorizationTab}\n >\n \n {t(\"settings\")}}\n {...authorizationSettingsTab}\n >\n \n \n {t(\"resources\")}}\n {...authorizationResourcesTab}\n >\n \n \n {t(\"scopes\")}}\n {...authorizationScopesTab}\n >\n \n \n {t(\"policies\")}}\n {...authorizationPoliciesTab}\n >\n \n \n {t(\"permissions\")}}\n {...authorizationPermissionsTab}\n >\n \n \n {hasViewUsers && (\n {t(\"evaluate\")}}\n {...authorizationEvaluateTab}\n >\n \n \n )}\n {hasAccess(\"manage-authorization\") && (\n {t(\"export\")}}\n {...authorizationExportTab}\n >\n \n \n )}\n \n \n )}\n {client!.serviceAccountsEnabled && hasViewUsers && (\n {t(\"serviceAccount\")}}\n {...serviceAccountTab}\n >\n \n \n )}\n {t(\"sessions\")}}\n {...sessionsTab}\n >\n \n \n {permissionsEnabled &&\n (hasManageClients || client.access?.manage) && (\n {t(\"permissions\")}}\n {...permissionsTab}\n >\n \n \n )}\n {t(\"advanced\")}}\n {...advancedTab}\n >\n \n \n \n \n \n >\n );\n}\n"],"names":["styles","CodeBlock","_a","children","className","actions","props","__rest","React","css","CodeBlockAction","PanelHeader","TextListVariants","TextList","component","isPlain","Component","TextListItemVariants","TextListItem","DownloadDialog","id","open","toggleDialog","protocol","adminClient","useAdminClient","realm","useRealm","t","useTranslation","enabled","useHelp","configFormats","useServerInfo","selected","setSelected","useState","snippet","setSnippet","openType","setOpenType","selectedConfig","useMemo","config","sanitizeSnippet","useFetch","fetchWithError","addTrailingSlash","getAuthorizationHeaders","prettyPrintJSON","useEffect","jsx","ConfirmDialogModal","saveAs","ModalVariant","Form","jsxs","Stack","StackItem","FormGroup","HelpItem","Select","ref","MenuToggle","_","value","SelectList","configFormat","SelectOption","TextArea","inherited","expires","TokenLifespan","name","defaultValue","units","setOpen","focused","setFocused","onFocus","onBlur","control","useFormContext","isExpireSet","Controller","field","Split","SplitItem","TimeSelector","AdvancedSettings","save","reset","hasConfigureAccess","isDPoPEnabled","useIsFeatureEnabled","Feature","FormAccess","convertAttributeNameToForm","Fragment","DefaultSwitchControl","v","KeyValueInput","MultiLineInput","ActionGroup","Button","AuthenticationOverrides","flows","setFlows","filteredFlows","flow","sortBy","f","SelectControl","alias","TimeSelectorForm","useController","AddHostDialog","isOpen","onAdded","onClose","form","useForm","handleSubmit","isDirty","isValid","addAlert","addError","useAlerts","onSubmit","node","AlertVariant","error","Modal","ButtonVariant","FormProvider","TextControl","ClusteringPanel","registeredNodes","access","formatDate","useFormatDate","nodes","setNodes","expanded","setExpanded","selectedNode","setSelectedNode","addNodeOpen","setAddNodeOpen","key","setKey","refresh","testCluster","result","parseResult","toggleDeleteNodeConfirm","DeleteNodeConfirm","useConfirmDialog","object","ExpandableSection","_event","val","KeycloakDataTable","entry","ToolbarItem","FORMAT_DATE_AND_TIME","ListEmptyState","ApplicationUrls","FineGrainOpenIdConnect","providers","clientSignatureProviders","contentEncryptionProviders","cekManagementProviders","signatureProviders","convert","list","sortProviders","i","prependEmpty","prependAny","prependNone","p","FineGrainSamlEndpointConfig","OpenIdConnectCompatibilityModes","Switch","prefixKey","successCount","failedCount","AdvancedTab","client","openIdConnect","setValue","publicClient","attributes","authenticationFlowBindingOverrides","resetFields","names","PageSection","ScrollForm","Text","toUpperCase","ClientSessions","SessionsTable","first","max","mapSessionsToType","type","sessions","session","AccessSettings","watch","hasAccess","useAccess","isManager","LoginSettings","FixedButtonsGroup","LoginSettingsPanel","loginThemes","consentRequired","displayOnConsentScreen","TextAreaControl","validateUrl","uri","LogoutPanel","frontchannelLogout","Toggle","label","SamlConfig","SIGNATURE_ALGORITHMS","KEYNAME_TRANSFORMER","CANONICALIZATION","SamlSignature","signDocs","signAssertion","ClientSettings","ClientDescription","CapabilityConfig","ValueInput","rowIndex","attribute","selectableValues","resources","register","getValues","isValueOpenArray","setIsValueOpenArray","toggleValueSelect","arr","attributeValues","values","defaultContextAttributes","attr","renderSelectOptionType","scopeValues","resource","scope","getMessageBundleKey","attributeName","camelCase","Td","KeycloakSelect","SelectVariant","TextInput","KeyBasedAttributeInput","fields","append","remove","useFieldArray","isKeyOpenArray","setIsKeyOpenArray","toggleKeySelect","watchLastValue","Table","Thead","Tr","Th","Tbody","MinusCircleIcon","PlusCircleIcon","AuthorizationDataModal","data","show","toggle","useToggle","TextContent","TextVariants","AuthorizationEvaluateResourcePolicies","idx","outerPolicy","clientId","useParams","prev","Link","toPermissionDetails","DecisionEffect","ExpandableRowContent","DescriptionList","item","toPolicyDetails","capitalize","AuthorizationEvaluateResource","evaluateResults","filterResults","results","filter","status","Results","evaluateResult","back","filterDropdownOpen","toggleFilterDropdown","setFilter","searchQuery","setSearchQuery","searchInput","setSearchInput","confirmSearchQuery","handleKeyDown","e","filteredResources","noEvaluatedData","noFilteredData","Toolbar","ToolbarGroup","InputGroup","InputGroupItem","SearchIcon","Divider","AuthorizationEvaluate","AuthorizationEvaluateContent","ForbiddenSection","trigger","isExpanded","setIsExpanded","applyToResourceType","setApplyToResourceType","setResources","scopes","setScopes","setEvaluateResult","clientRoles","setClientRoles","roles","evaluate","formValues","keys","keyValueToArray","resEval","r","s","evaluation","user","useWatch","Panel","Title","PanelMainBody","ClientSelect","UserSelect","role","AuthorizationExport","code","setCode","authorizationDetails","setAuthorizationDetails","authDetails","exportAuthDetails","KeycloakSpinner","DetailDescription","DetailDescriptionLink","array","link","DescriptionListGroup","DescriptionListTerm","DescriptionListDescription","element","EmptyButton","permissionType","disabled","navigate","useNavigate","toNewPermission","TooltipEmptyButton","Tooltip","EmptyPermissionsState","isResourceEnabled","isScopeEnabled","EmptyState","EmptyStateHeader","EmptyStateIcon","EmptyStateBody","EmptyStateFooter","MoreLabel","Label","SearchDropdown","types","search","onSearch","submit","Dropdown","AssociatedPoliciesRenderer","row","AuthorizationPermissions","isDisabled","permissions","setPermissions","selectedPermission","setSelectedPermission","policyProviders","setPolicyProviders","disabledCreate","setDisabledCreate","createOpen","toggleCreate","setSearch","setMax","setFirst","permission","associatedPolicies","params","policies","toggleDeleteDialog","DeleteConfirm","noData","searching","PaginatingTableToolbar","DropdownList","DropdownItem","Alert","rows","index","DependentPoliciesRenderer","AuthorizationPolicies","setPolicies","selectedPolicy","setSelectedPolicy","newDialog","policy","dependentPolicies","NewPolicyDialog","toCreatePolicy","DetailCell","uris","setScope","toScopeDetails","UriRenderer","AuthorizationResources","selectedResource","setSelectedResource","setPermission","fetchPermissions","toCreateResource","toResourceDetails","AuthorizationScopes","deleteDialog","selectedScope","setSelectedScope","collapsed","setCollapsed","getScope","c","newlyOpened","resourcesScopes","resourceScope","DeleteScopeDialog","toNewScope","ImportDialog","onConfirm","closeDialog","imported","setImported","JsonFileUpload","Radio","POLICY_ENFORCEMENT_MODES","AuthorizationSettings","setResource","importDialog","toggleImportDialog","importResource","mode","DecisionStrategySelect","useQueryPermission","setStatus","plainStatus","setPlainStatus","updatePlainStatus","newStatus","onStatusChange","CopyToClipboardButton","text","variant","setTimeout","useSetTimeout","permissionDenied","copyState","setCopyState","copyMessageKey","copyToClipboard","ClipboardCopyButton","SecretInput","buttonLabel","secret","PasswordInput","ExpireDateFormatter","time","ClientSecret","secretRotated","setSecretRotated","secretExpirationTime","secretRotatedExpirationTime","expired","toggleInvalidateConfirm","InvalidateConfirm","SignedJWT","clientAuthenticatorType","cryptoInfo","option","X509","Credentials","setProviders","setSecret","accessToken","setAccessToken","selectedProvider","provider","regenerate","call","message","regenerateClientSecret","toggleClientSecretConfirm","ClientSecretConfirm","regenerateAccessToken","toggleAccessTokenConfirm","AccessTokenConfirm","Card","CardBody","displayName","ClipboardCopy","CertificateDisplay","keyInfo","Certificate","plain","useId","StoreSettings","hidePassword","isSaml","PasswordControl","CERT_PEM","extensions","getFileExtension","format","KeyForm","hasPem","useFile","filename","setFilename","supportedKeystoreTypes","FileUpload","GenerateKeyDialog","ImportKeyDialog","baseFormats","formats","importFile","Keys","setKeyInfo","openGenerateKeys","toggleOpenGenerateKeys","setOpenGenerateKeys","openImportKeys","toggleOpenImportKeys","setOpenImportKeys","useJwksUrl","info","generate","keyStore","importKey","formData","file","rest","CardHeader","CardTitle","ExportSamlKeyDialog","close","keyType","download","submitForm","callback","SamlKeysDialog","onCancel","setType","setKeys","Flex","FlexItem","SamlImportKeyDialog","KEYS","KEYS_MAPPING","KeySection","onChanged","onGenerate","onImport","title","showImportDialog","section","FormPanel","SamlKeys","isChanged","setIsChanged","selectedType","setSelectedType","openImport","setImportOpen","setRefresh","toggleDisableDialog","DisableConfirm","toggleReGenerateDialog","ReGenerateConfirm","isNew","DEDICATED_ROW","TypeSelector","fineGrainedAccess","isDedicatedRow","CellDropdown","changeClientScope","ClientScopes","clientName","localeSort","useLocaleSort","searchType","setSearchType","searchTypeType","setSearchTypeType","AllClientScopes","addDialogOpen","setAddDialogOpen","setRest","selectedRows","setSelectedRowState","setSelectedRows","kebabOpen","setKebabOpen","isViewer","loader","defaultClientScopes","optionalClientScopes","clientScopes","find","clientScope","optional","ClientScope","defaultScopes","mapByKey","nameFilter","typeFilter","firstNum","removeClientScope","AddScopeDialog","addClientScope","SearchToolbar","ChangeTypeDropdown","EllipsisVIcon","toDedicatedScope","GeneratedCodeTab","ProtocolMappers","protocolMappers","EffectiveRoles","effectiveRoles","EvaluateScopes","prefix","mapperTypes","selectableScopes","setSelectableScopes","isScopeOpen","setIsScopeOpen","activeTab","setActiveTab","setEffectiveRoles","setProtocolMappers","userInfo","setUserInfo","idToken","setIdToken","tabContent1","useRef","tabContent2","tabContent3","tabContent4","tabContent5","hasViewUsers","mapperList","mapper","QuestionCircleIcon","Grid","GridItem","TabContent","Tabs","Tab","TabTitleText","ServiceAccount","serviceAccount","setServiceAccount","hasManageClients","assignRoles","realmRoles","InfoCircleIcon","Trans","toUser","RoleMapping","ClientDetailHeader","onChange","toggleDownloadDialog","badges","protocolName","getProtocolName","dropdownItems","exportClient","isRealmClient","ViewHeader","ClientDetails","isFeatureEnabled","hasManageAuthorization","hasViewAuthorization","hasViewClients","permissionsEnabled","downloadDialogOpen","toggleDownloadDialogOpen","changeAuthenticatorOpen","toggleChangeAuthenticatorOpen","setClient","useTab","tab","useRoutableTab","toClient","settingsTab","keysTab","credentialsTab","rolesTab","clientScopesTab","authorizationTab","serviceAccountTab","sessionsTab","permissionsTab","advancedTab","useClientScopesTab","toClientScopesTab","clientScopesSetupTab","clientScopesEvaluateTab","useAuthorizationTab","toAuthorizationTab","authorizationSettingsTab","authorizationResourcesTab","authorizationScopesTab","authorizationPoliciesTab","authorizationPermissionsTab","authorizationEvaluateTab","authorizationExportTab","toClients","setupForm","fetchedClient","cloneDeep","confirmed","messageKey","convertFormValuesToObject","submittedClient","newClient","RoutableTabs","RolesList","toCreateRole","roleId","toClientRole","PermissionsTab"],"mappings":"y8HACA,MAAeA,GAAA,CACb,UAAa,qBACb,iBAAoB,8BACpB,cAAiB,2BACjB,iBAAoB,8BACpB,gBAAmB,6BACnB,aAAgB,yBAClB,ECJaC,GAAaC,GAAO,CAC7B,GAAI,CAAE,SAAAC,EAAW,KAAM,UAAAC,EAAW,QAAAC,EAAU,IAAI,EAAKH,EAAII,EAAQC,GAAOL,EAAI,CAAC,WAAY,YAAa,SAAS,CAAC,EAChH,OAAQM,GAAM,cAAc,MAAO,OAAO,OAAO,CAAE,UAAWC,GAAIT,GAAO,UAAWI,CAAS,CAAC,EAAIE,CAAK,EACnGD,GAAYG,GAAM,cAAc,MAAO,CAAE,UAAWC,GAAIT,GAAO,eAAe,CAAG,EAC7EQ,GAAM,cAAc,MAAO,CAAE,UAAWC,GAAIT,GAAO,gBAAgB,CAAC,EAAIK,CAAO,CAAC,EACpFG,GAAM,cAAc,MAAO,CAAE,UAAWC,GAAIT,GAAO,gBAAgB,CAAC,EAAIG,CAAQ,CAAC,CACzF,EACAF,GAAU,YAAc,YCPjB,MAAMS,GAAmBR,GAAO,CACnC,GAAI,CAAE,SAAAC,EAAW,KAAM,UAAAC,CAAW,EAAGF,EAAII,EAAQC,GAAOL,EAAI,CAAC,WAAY,WAAW,CAAC,EACrF,OAAQM,GAAM,cAAc,MAAO,OAAO,OAAO,CAAE,UAAWC,GAAI,GAAGT,GAAO,gBAAgB,QAASI,CAAS,CAAC,EAAIE,CAAK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