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AAA,EAAAA,IAAWH,IACrC9V,KAAK6U,GAIR,OAFAvB,EAAAA,mBAAAA,QAA6C6C,GAEtCA","sources":["webpack://graylog-web-interface/./src/components/authentication/AuthenticationOverviewLinks.tsx","webpack://graylog-web-interface/./src/components/authentication/BackendActionLinks.tsx","webpack://graylog-web-interface/./src/logic/authentication/directoryServices/BackendConfigParser.ts","webpack://graylog-web-interface/./src/components/authentication/directoryServices/ldap/WizardPageHeader.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/HandleCreate.ts","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/BackendWizardContext.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/ServerConfigStep.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/UserSyncStep.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/GroupSyncStep.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/StepTitleWarning.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/wizardSteps.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/ConnectionErrors.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/ServerConnectionTest.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/UserLoginTest.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/Sidebar.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/BackendWizard.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendWizard/index.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/ldap/BackendCreate.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/PrepareInitialWizardValues.ts","webpack://graylog-web-interface/./src/components/authentication/directoryServices/HandleUpdate.ts","webpack://graylog-web-interface/./src/components/authentication/directoryServices/ldap/BackendEdit.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendConfigDetails/EditLinkButton.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendConfigDetails/ServerConfigSection.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendConfigDetails/UserSyncSection.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/BackendConfigDetails/GroupSyncSection.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/activeDirectory/BackendConfigDetails.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/ldap/BackendConfigDetails.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/activeDirectory/WizardPageHeader.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/activeDirectory/BackendCreate.tsx","webpack://graylog-web-interface/./src/components/authentication/directoryServices/activeDirectory/BackendEdit.tsx","webpack://graylog-web-interface/./src/components/authentication/bindings.ts","webpack://graylog-web-interface/./src/components/authentication/useActiveBackend.ts","webpack://graylog-web-interface/./src/components/common/Section/SectionComponent.tsx","webpack://graylog-web-interface/./src/domainActions/roles/AuthzRolesDomain.ts","webpack://graylog-web-interface/./src/logic/roles/Role.ts","webpack://graylog-web-interface/./src/actions/roles/AuthzRolesActions.ts","webpack://graylog-web-interface/./src/stores/roles/AuthzRolesStore.ts"],"sourcesContent":["/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport Routes from 'routing/Routes';\nimport { LinkContainer } from 'components/common/router';\nimport { ButtonToolbar, Button } from 'components/bootstrap';\n\nconst AuthenticationOverviewLinks = () => (\n \n \n \n \n \n \n \n \n);\n\nexport default AuthenticationOverviewLinks;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { LinkContainer } from 'components/common/router';\nimport type AuthenticationBackend from 'logic/authentication/AuthenticationBackend';\nimport Routes from 'routing/Routes';\nimport { ButtonToolbar, Button } from 'components/bootstrap';\n\ntype Props = {\n activeBackend: AuthenticationBackend | undefined,\n finishedLoading: boolean,\n};\n\nconst BackendActionLinks = ({ activeBackend, finishedLoading }: Props) => (\n \n \n \n \n \n \n \n \n \n \n \n);\n\nexport default BackendActionLinks;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport type { DirectoryServiceBackendConfigJson, DirectoryServiceBackendConfig } from './types';\n\nconst toJson = ({\n servers,\n systemUserDn,\n systemUserPassword,\n transportSecurity,\n type,\n userFullNameAttribute,\n userNameAttribute,\n userSearchBase,\n userSearchPattern,\n userUniqueIdAttribute,\n verifyCertificates,\n}: DirectoryServiceBackendConfig): DirectoryServiceBackendConfigJson => ({\n servers,\n system_user_dn: systemUserDn,\n system_user_password: { is_set: systemUserPassword.isSet },\n transport_security: transportSecurity,\n type: type,\n user_full_name_attribute: userFullNameAttribute,\n user_name_attribute: userNameAttribute,\n user_search_base: userSearchBase,\n user_search_pattern: userSearchPattern,\n user_unique_id_attribute: userUniqueIdAttribute,\n verify_certificates: verifyCertificates,\n});\n\nconst fromJson = ({\n servers,\n system_user_dn,\n system_user_password,\n transport_security,\n type,\n user_full_name_attribute,\n user_name_attribute,\n user_search_base,\n user_search_pattern,\n user_unique_id_attribute,\n verify_certificates,\n}: DirectoryServiceBackendConfigJson): DirectoryServiceBackendConfig => ({\n servers,\n systemUserDn: system_user_dn,\n systemUserPassword: { isSet: system_user_password.is_set },\n transportSecurity: transport_security,\n type: type,\n userFullNameAttribute: user_full_name_attribute,\n userNameAttribute: user_name_attribute,\n userSearchBase: user_search_base,\n userSearchPattern: user_search_pattern,\n userUniqueIdAttribute: user_unique_id_attribute,\n verifyCertificates: verify_certificates,\n});\n\nexport default { fromJson, toJson };\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport AuthenticationOverviewLinks from 'components/authentication/AuthenticationOverviewLinks';\nimport DocsHelper from 'util/DocsHelper';\nimport StringUtils from 'util/StringUtils';\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\nimport type { OktaBackend } from 'logic/authentication/okta/types';\nimport { PageHeader } from 'components/common';\nimport useActiveBackend from 'components/authentication/useActiveBackend';\nimport BackendActionLinks from 'components/authentication/BackendActionLinks';\nimport DocumentationLink from 'components/support/DocumentationLink';\n\ntype Props = {\n authenticationBackend?: DirectoryServiceBackend | OktaBackend,\n title?: string,\n};\n\nconst _pageTitle = (authBackend, title) => {\n if (authBackend) {\n const backendTitle = StringUtils.truncateWithEllipses(authBackend.title, 30);\n\n return <>Edit Authentication Service - {backendTitle}>;\n }\n\n return title || 'Create LDAP Authentication Service';\n};\n\nconst WizardPageHeader = ({ authenticationBackend: authBackend, title }: Props) => {\n const { finishedLoading, activeBackend } = useActiveBackend();\n const pageTitle = _pageTitle(authBackend, title);\n\n return (\n \n )}>\n Configure Graylog's authentication services of this Graylog cluster.\n \n Read more authentication in the .\n \n\n \n \n );\n};\n\nWizardPageHeader.defaultProps = {\n authenticationBackend: undefined,\n title: undefined,\n};\n\nexport default WizardPageHeader;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport type { $PropertyType } from 'utility-types';\n\nimport UserNotification from 'util/UserNotification';\nimport type { WizardSubmitPayload } from 'logic/authentication/directoryServices/types';\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport { AuthenticationActions } from 'stores/authentication/AuthenticationStore';\n\nimport type { WizardFormValues, AuthBackendMeta } from './BackendWizard/BackendWizardContext';\n\nexport default (payload: WizardSubmitPayload, formValues: WizardFormValues, serviceType: $PropertyType, shouldUpdateGroupSync: boolean | undefined = true) => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const notifyOnSuccess = () => UserNotification.success('Authentication service was created successfully.', 'Success');\n const notifyOnError = (error) => UserNotification.error(`Creating authentication service failed with status: ${error}`, 'Error');\n\n return AuthenticationActions.create(payload).then((result) => {\n if (result.backend && formValues.synchronizeGroups && enterpriseGroupSyncPlugin && shouldUpdateGroupSync) {\n return enterpriseGroupSyncPlugin.actions.onDirectoryServiceBackendUpdate(false, formValues, result.backend.id, serviceType).then(notifyOnSuccess);\n }\n\n notifyOnSuccess();\n\n return result;\n }).catch((error) => {\n notifyOnError(error);\n throw error;\n });\n};\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport type * as Immutable from 'immutable';\nimport type { $PropertyType } from 'utility-types';\n\nimport type { Step, StepKey } from 'components/common/Wizard';\nimport { singleton } from 'logic/singleton';\n\nexport type WizardFormValues = {\n title?: string,\n description?: string,\n defaultRoles?: string,\n groupSearchBase?: string,\n groupSearchPattern?: string,\n serverHost?: string,\n serverPort?: string | number,\n systemUserDn?: string,\n systemUserPassword?: string,\n synchronizeGroups?: boolean,\n teamDefaultRoles?: string,\n teamNameAttribute?: string,\n teamUniqueIdAttribute?: string,\n teamSelectionType?: 'all' | 'include' | 'exclude',\n teamSelection?: Immutable.Set,\n transportSecurity?: 'tls' | 'start_tls' | 'none',\n userFullNameAttribute?: string,\n userNameAttribute?: string,\n userUniqueIdAttribute?: string,\n userSearchBase?: string,\n userSearchPattern?: string,\n verifyCertificates?: boolean,\n oktaApiToken?: string,\n};\n\nexport type AuthBackendMeta = {\n backendId?: string, // only needed when editing an auth service\n backendHasPassword?: boolean, // only needed when editing an auth service\n backendGroupSyncIsActive?: boolean, // only needed when editing an auth service\n serviceType: string,\n serviceTitle: string,\n};\nexport type WizardStepsState = {\n activeStepKey: $PropertyType,\n backendValidationErrors: { [inputName: string]: React.ReactElement | string | null | undefined } | null | undefined,\n formValues: WizardFormValues,\n invalidStepKeys: Array,\n authBackendMeta: AuthBackendMeta,\n};\n\nexport type BackendWizardType = WizardStepsState & {\n setStepsState: (BackendWizardType) => void,\n};\n\nconst initialState = {\n activeStepKey: '',\n backendValidationErrors: undefined,\n authBackendMeta: { serviceType: '', serviceTitle: '' },\n formValues: {},\n invalidStepKeys: [],\n setStepsState: () => {},\n};\n\nconst BackendWizardContext = React.createContext(initialState);\nexport default singleton('contexts.authentication.directoryServices.backendWizard', () => BackendWizardContext);\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport styled from 'styled-components';\nimport { useContext } from 'react';\nimport type { FormikProps } from 'formik';\nimport { Formik, Form, Field } from 'formik';\n\nimport { validateField, formHasErrors } from 'util/FormsUtils';\nimport { FormikFormGroup, FormikInput, InputOptionalInfo as Opt } from 'components/common';\nimport { Input, Button, ButtonToolbar } from 'components/bootstrap';\n\nimport type { WizardFormValues } from './BackendWizardContext';\nimport BackendWizardContext from './BackendWizardContext';\n\nexport const STEP_KEY = 'server-configuration';\n// Form validation needs to include all input names\n// to be able to associate backend validation errors with the form\nexport const FORM_VALIDATION = {\n title: {\n required: true,\n },\n serverHost: {\n required: true,\n },\n serverPort: {\n required: true,\n min: 1,\n max: 65535,\n },\n description: {},\n transportSecurity: {},\n verifyCertificates: {},\n systemUserDn: {},\n systemUserPassword: {},\n};\n\nconst ServerUrl = styled.div`\n display: flex;\n\n > * {\n align-self: flex-start;\n min-height: 34px;\n flex-grow: 1;\n\n :last-child {\n flex: 0.8;\n min-width: 130px;\n }\n }\n\n .input-group-addon {\n display: flex;\n align-items: center;\n max-width: fit-content;\n min-width: fit-content;\n }\n`;\n\nconst ProtocolOptions = styled.div`\n display: flex;\n\n div + * {\n margin-left: 10px;\n }\n`;\n\ntype Props = {\n formRef: React.Ref>,\n help: { [inputName: string]: React.ReactElement | string | null | undefined },\n onSubmit: () => void,\n onSubmitAll: () => Promise,\n submitAllError: React.ReactNode | null | undefined,\n validateOnMount: boolean,\n};\n\nconst ServerConfigStep = ({ formRef, help = {}, onSubmit, onSubmitAll, submitAllError, validateOnMount }: Props) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { setStepsState, ...stepsState } = useContext(BackendWizardContext);\n const { backendValidationErrors, authBackendMeta: { backendHasPassword } } = stepsState;\n\n const _onTransportSecurityChange = (event, values, setFieldValue, onChange) => {\n const currentValue = values.transportSecurity;\n const newValue = event.target.value;\n const defaultPort = 389;\n const defaultTlsPort = 636;\n\n if (currentValue === 'tls' && newValue !== 'tls' && values.serverPort === defaultTlsPort) {\n setFieldValue('serverPort', defaultPort);\n }\n\n if (currentValue !== 'tls' && newValue === 'tls' && values.serverPort === defaultPort) {\n setFieldValue('serverPort', defaultTlsPort);\n }\n\n onChange(event);\n };\n\n const _onSubmitAll = (validateForm) => {\n validateForm().then((errors) => {\n if (!formHasErrors(errors)) {\n onSubmitAll();\n }\n });\n };\n\n return (\n \n {({ isSubmitting, setFieldValue, values, validateForm }) => (\n \n )}\n \n );\n};\n\nexport default ServerConfigStep;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport type * as Immutable from 'immutable';\nimport { useContext } from 'react';\nimport type { FormikProps } from 'formik';\nimport { Formik, Form, Field } from 'formik';\n\nimport type Role from 'logic/roles/Role';\nimport { validateField, formHasErrors } from 'util/FormsUtils';\nimport { Icon, FormikFormGroup, Select } from 'components/common';\nimport { Alert, Button, ButtonToolbar, Row, Col, Panel, Input } from 'components/bootstrap';\n\nimport type { WizardFormValues } from './BackendWizardContext';\nimport BackendWizardContext from './BackendWizardContext';\n\nexport const STEP_KEY = 'user-synchronization';\n// Form validation needs to include all input names\n// to be able to associate backend validation errors with the form\nexport const FORM_VALIDATION = {\n defaultRoles: { required: true },\n userFullNameAttribute: { required: true },\n userNameAttribute: { required: true },\n userSearchBase: { required: true },\n userSearchPattern: { required: true },\n userUniqueIdAttribute: {},\n};\n\ntype Props = {\n formRef: React.Ref>,\n help: { [inputName: string]: React.ReactElement | string | null | undefined },\n excludedFields: { [inputName: string]: boolean },\n roles: Immutable.List,\n onSubmit: () => void,\n onSubmitAll: () => Promise,\n submitAllError: React.ReactNode | null | undefined,\n validateOnMount: boolean,\n};\n\nconst UserSyncStep = ({ help = {}, excludedFields = {}, formRef, onSubmit, onSubmitAll, submitAllError, validateOnMount, roles }: Props) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { setStepsState, ...stepsState } = useContext(BackendWizardContext);\n const { backendValidationErrors } = stepsState;\n const rolesOptions = roles.map((role) => ({ label: role.name, value: role.id })).toArray();\n\n const _onSubmitAll = (validateForm) => {\n validateForm().then((errors) => {\n if (!formHasErrors(errors)) {\n onSubmitAll();\n }\n });\n };\n\n return (\n \n {({ isSubmitting, validateForm }) => (\n \n )}\n \n );\n};\n\nexport default UserSyncStep;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport type * as Immutable from 'immutable';\nimport type { FormikProps } from 'formik';\n\nimport { Row, Col, Button, ButtonToolbar } from 'components/bootstrap';\nimport { EnterprisePluginNotFound } from 'components/common';\nimport type Role from 'logic/roles/Role';\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport type { WizardSubmitPayload } from 'logic/authentication/directoryServices/types';\n\nimport type { WizardFormValues } from './BackendWizardContext';\n\nexport const STEP_KEY = 'group-synchronization';\n\nexport type Props = {\n formRef: React.Ref>,\n onSubmitAll: (shouldUpdateGroupSync?: boolean) => Promise,\n help: { [inputName: string]: React.ReactElement | string | null | undefined },\n excludedFields: { [inputName: string]: boolean },\n prepareSubmitPayload: (fromValues: WizardFormValues | null | undefined) => WizardSubmitPayload,\n roles: Immutable.List,\n submitAllError: React.ReactNode | null | undefined,\n validateOnMount: boolean,\n};\n\nconst GroupSyncStep = ({\n onSubmitAll,\n prepareSubmitPayload,\n formRef,\n submitAllError,\n validateOnMount,\n roles,\n help,\n excludedFields,\n}: Props) => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const GroupSyncForm = enterpriseGroupSyncPlugin?.components?.GroupSyncForm;\n\n if (!GroupSyncForm) {\n return (\n <>\n \n \n \n \n
\n \n \n \n >\n );\n }\n\n return (\n \n );\n};\n\nexport default GroupSyncStep;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { Icon } from 'components/common';\nimport type { StepKey } from 'components/common/Wizard';\n\ntype Props = {\n invalidStepKeys: Array,\n stepKey: string,\n};\n\nconst StepTitleWarning = ({ invalidStepKeys = [], stepKey }: Props) => {\n if (invalidStepKeys.includes(stepKey)) {\n return <> {' '}>;\n }\n\n return null;\n};\n\nexport default StepTitleWarning;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport type * as Immutable from 'immutable';\nimport type { FormikProps } from 'formik';\n\nimport type { WizardSubmitPayload } from 'logic/authentication/directoryServices/types';\nimport type Role from 'logic/roles/Role';\nimport type { StepKey } from 'components/common/Wizard';\n\nimport type { WizardFormValues } from './BackendWizardContext';\nimport ServerConfigStep, { STEP_KEY as SERVER_CONFIG_KEY } from './ServerConfigStep';\nimport UserSyncStep, { STEP_KEY as USER_SYNC_KEY } from './UserSyncStep';\nimport GroupSyncStep, { STEP_KEY as GROUP_SYNC_KEY } from './GroupSyncStep';\nimport StepTitleWarning from './StepTitleWarning';\n\ntype Props = {\n formRefs: Record>>,\n excludedFields: { [inputName: string]: boolean },\n handleSubmitAll: (shouldUpdateGroupSync?: boolean) => Promise,\n help: { [inputName: string]: React.ReactElement | string | null | undefined },\n invalidStepKeys: Array,\n prepareSubmitPayload: (fromValues: WizardFormValues | null | undefined) => WizardSubmitPayload,\n roles: Immutable.List,\n setActiveStepKey: (stepKey: string) => void,\n submitAllError: React.ReactNode | null | undefined,\n};\n\nconst wizardSteps = ({\n formRefs,\n handleSubmitAll,\n help,\n excludedFields,\n invalidStepKeys,\n prepareSubmitPayload,\n roles,\n setActiveStepKey,\n submitAllError,\n}: Props) => [\n {\n key: SERVER_CONFIG_KEY,\n title: (\n <>\n \n Server Configuration\n >\n ),\n component: (\n setActiveStepKey(USER_SYNC_KEY)}\n onSubmitAll={handleSubmitAll}\n submitAllError={submitAllError}\n validateOnMount={invalidStepKeys.includes(SERVER_CONFIG_KEY)} />\n ),\n },\n {\n key: USER_SYNC_KEY,\n title: (\n <>\n \n User Synchronization\n >\n ),\n component: (\n setActiveStepKey(GROUP_SYNC_KEY)}\n onSubmitAll={handleSubmitAll}\n roles={roles}\n submitAllError={submitAllError}\n validateOnMount={invalidStepKeys.includes(USER_SYNC_KEY)} />\n ),\n },\n {\n key: GROUP_SYNC_KEY,\n title: (\n <>\n \n Group Synchronization (Opt.)\n >\n ),\n component: (\n \n ),\n },\n];\n\nexport default wizardSteps;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\n\nimport { Alert } from 'components/bootstrap';\n\nexport const NotificationContainer = styled(Alert)`\n margin-top: 10px;\n word-break: break-word;\n`;\n\nexport const Title = styled.div`\n font-weight: bold;\n margin-bottom: 5px;\n`;\n\nconst ErrorsList = styled.ul(({ theme }) => `\n font-family: ${theme.fonts.family.monospace};\n list-style: initial;\n padding-left: 20px;\n`);\n\ntype Props = {\n errors: Array,\n message: string,\n};\n\nconst ConnectionErrors = ({ errors, message }: Props) => (\n \n {message} \n \n {errors.map((error) => {\n return {String(error)} ;\n })}\n \n \n);\n\nConnectionErrors.propTypes = {\n errors: PropTypes.arrayOf(PropTypes.string).isRequired,\n message: PropTypes.string,\n};\n\nConnectionErrors.defaultProps = {\n message: 'There was an error',\n};\n\nexport default ConnectionErrors;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useState, useContext } from 'react';\n\nimport type { WizardSubmitPayload } from 'logic/authentication/directoryServices/types';\nimport AuthenticationDomain from 'domainActions/authentication/AuthenticationDomain';\nimport { Button } from 'components/bootstrap';\nimport { Spinner } from 'components/common';\n\nimport ConnectionErrors, { NotificationContainer } from './ConnectionErrors';\nimport type { WizardFormValues } from './BackendWizardContext';\nimport BackendWizardContext from './BackendWizardContext';\n\nconst _addRequiredRequestPayload = (formValues) => {\n const necessaryAttributes = { ...formValues };\n\n if (!necessaryAttributes.config.user_search_base) {\n necessaryAttributes.config.user_search_base = '';\n }\n\n if (!necessaryAttributes.config.user_search_pattern) {\n necessaryAttributes.config.user_search_pattern = '';\n }\n\n return necessaryAttributes;\n};\n\ntype Props = {\n prepareSubmitPayload: (fromValues: WizardFormValues | null | undefined) => WizardSubmitPayload,\n};\n\nconst ServerConnectionTest = ({ prepareSubmitPayload }: Props) => {\n const { authBackendMeta } = useContext(BackendWizardContext);\n const [{ loading, success, message, errors }, setConnectionStatus] = useState({ loading: false, success: false, message: undefined, errors: undefined });\n\n const _handleConnectionCheck = () => {\n const payload = _addRequiredRequestPayload(prepareSubmitPayload(undefined));\n\n setConnectionStatus({ loading: true, message: undefined, errors: undefined, success: false });\n\n AuthenticationDomain.testConnection({ backend_configuration: payload, backend_id: authBackendMeta.backendId }).then((response) => {\n setConnectionStatus({ loading: false, message: response?.message, success: response?.success, errors: response?.errors });\n }).catch((error) => {\n const requestErrors = [error?.message, error?.additional?.res?.text];\n setConnectionStatus({ loading: false, message: undefined, errors: requestErrors, success: false });\n });\n };\n\n return (\n <>\n \n Performs a background connection check with the address and credentials defined in the step "Server Configuration".\n
\n \n {success && (\n \n {message}\n \n )}\n {(errors && errors.length >= 1) && (\n \n )}\n >\n );\n};\n\nexport default ServerConnectionTest;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useState, useContext } from 'react';\nimport { Formik, Form } from 'formik';\n\nimport type { WizardSubmitPayload } from 'logic/authentication/directoryServices/types';\nimport AuthenticationDomain from 'domainActions/authentication/AuthenticationDomain';\nimport { FormikInput, Spinner } from 'components/common';\nimport { Button, Row, Col } from 'components/bootstrap';\nimport type { LoginTestResult } from 'stores/authentication/AuthenticationStore';\n\nimport ConnectionErrors, { NotificationContainer } from './ConnectionErrors';\nimport type { WizardFormValues } from './BackendWizardContext';\nimport BackendWizardContext from './BackendWizardContext';\n\ntype Props = {\n prepareSubmitPayload: (fromValues: WizardFormValues | null | undefined) => WizardSubmitPayload,\n};\n\nconst UserLoginTest = ({ prepareSubmitPayload }: Props) => {\n const { authBackendMeta } = useContext(BackendWizardContext);\n const initialLoginStatus = { loading: false, success: false, testFinished: false, result: undefined, message: undefined, errors: [] };\n const [{ loading, testFinished, success, message, errors, result }, setLoginStatus] = useState<\n LoginTestResult & {\n loading: boolean,\n testFinished: boolean,\n result: LoginTestResult['result'] | null | undefined\n }\n >(initialLoginStatus);\n const hasErrors = (errors && errors.length >= 1);\n\n const _handleLoginTest = ({ username, password }) => {\n setLoginStatus({ ...initialLoginStatus, loading: true });\n\n return AuthenticationDomain.testLogin({\n backend_configuration: prepareSubmitPayload(undefined),\n user_login: { username, password },\n backend_id: authBackendMeta.backendId,\n }).then((response) => {\n setLoginStatus({\n loading: false,\n testFinished: true,\n message: response.message,\n result: response.result,\n errors: response.errors,\n success: response.success,\n });\n }).catch((error) => {\n const requestErrors = [error?.message, error?.additional?.res?.text];\n setLoginStatus({ loading: false, success: false, testFinished: true, result: undefined, message: undefined, errors: requestErrors });\n });\n };\n\n return (\n <>\n \n Verify the settings by loading the entry for the given user name. If you omit the password, no authentication attempt will be made.\n
\n \n \n \n >\n );\n};\n\nexport default UserLoginTest;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useState, useContext, useEffect } from 'react';\nimport styled from 'styled-components';\nimport type { $PropertyType } from 'utility-types';\n\nimport type { WizardSubmitPayload } from 'logic/authentication/directoryServices/types';\nimport { PanelGroup, Panel } from 'components/bootstrap';\nimport type { Step } from 'components/common/Wizard';\n\nimport { STEP_KEY as SERVER_CONFIG_KEY } from './ServerConfigStep';\nimport { STEP_KEY as USER_SYNC_KEY } from './UserSyncStep';\nimport type { WizardFormValues } from './BackendWizardContext';\nimport BackendWizardContext from './BackendWizardContext';\nimport ServerConnectionTest from './ServerConnectionTest';\nimport UserLoginTest from './UserLoginTest';\n\nconst StyledPanelGroup = styled(PanelGroup)`\n &.panel-group .panel {\n margin-top: 0;\n border-color: ${(props) => props.theme.colors.input.border};\n background-color: ${(props) => props.theme.colors.global.contentBackground};\n\n .panel-heading {\n background-color: ${(props) => props.theme.colors.table.backgroundAlt};\n }\n\n &:not(:first-child) {\n border-top: 0;\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n &:not(:last-child) {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n }\n`;\ntype Props = {\n prepareSubmitPayload: (fromValues: WizardFormValues | null | undefined) => WizardSubmitPayload,\n};\n\nconst Sidebar = ({ prepareSubmitPayload }: Props) => {\n const [activeKey, setActiveKey] = useState<$PropertyType>(SERVER_CONFIG_KEY);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { setStepsState, ...stepsState } = useContext(BackendWizardContext);\n\n useEffect(() => {\n setActiveKey(stepsState.activeStepKey);\n }, [stepsState.activeStepKey]);\n\n return (\n \n \n \n Server Connection Check \n \n \n \n \n \n \n \n User Login Test \n \n \n \n \n \n \n );\n};\n\nexport default Sidebar;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport { useState, useRef, useEffect } from 'react';\nimport { compact, camelCase, mapKeys, mapValues } from 'lodash';\nimport type { $PropertyType } from 'utility-types';\nimport PropTypes from 'prop-types';\nimport type { FormikProps } from 'formik';\n\nimport history from 'util/History';\nimport { validateField } from 'util/FormsUtils';\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport { Row, Col, Alert } from 'components/bootstrap';\nimport { Spinner } from 'components/common';\nimport AuthzRolesDomain from 'domainActions/roles/AuthzRolesDomain';\nimport Routes from 'routing/Routes';\nimport type { WizardSubmitPayload } from 'logic/authentication/directoryServices/types';\nimport type { Step, StepKey } from 'components/common/Wizard';\nimport Wizard from 'components/common/Wizard';\nimport type FetchError from 'logic/errors/FetchError';\nimport type { LoadResponse as LoadBackendResponse } from 'stores/authentication/AuthenticationStore';\nimport type { PaginatedRoles } from 'actions/roles/AuthzRolesActions';\n\nimport type { WizardStepsState, WizardFormValues, AuthBackendMeta } from './BackendWizardContext';\nimport BackendWizardContext from './BackendWizardContext';\nimport {\n FORM_VALIDATION as SERVER_CONFIG_VALIDATION,\n STEP_KEY as SERVER_CONFIG_KEY,\n} from './ServerConfigStep';\nimport {\n FORM_VALIDATION as USER_SYNC_VALIDATION,\n STEP_KEY as USER_SYNC_KEY,\n} from './UserSyncStep';\nimport {\n STEP_KEY as GROUP_SYNC_KEY,\n} from './GroupSyncStep';\nimport wizardSteps from './wizardSteps';\nimport Sidebar from './Sidebar';\n\nconst FORMS_VALIDATION = {\n [SERVER_CONFIG_KEY]: SERVER_CONFIG_VALIDATION,\n [USER_SYNC_KEY]: USER_SYNC_VALIDATION,\n};\n\nconst SubmitAllError = ({ error, backendId }: { error: FetchError, backendId: string | null | undefined }) => (\n \n \n \n Failed to {backendId ? 'edit' : 'create'} authentication service
\n {error?.message && <>{error.message}
>}\n {error?.additional?.res?.text}\n \n \n
\n);\n\nconst _formatBackendValidationErrors = (backendErrors: { [inputNameJSON: string]: string[] }) => {\n const backendErrorStrings = mapValues(backendErrors, (errorArray) => `Server validation error: ${errorArray.join(' ')}`);\n const formattedBackendErrors = mapKeys(backendErrorStrings, (value, key) => camelCase(key));\n\n return formattedBackendErrors;\n};\n\nexport const _passwordPayload = (backendId: string | null | undefined, systemUserPassword: string | null | undefined) => {\n const _formatPayload = (password) => {\n if (!password) {\n return undefined;\n }\n\n return password;\n };\n\n // Only update password on edit if necessary,\n // if a users resets the previously defined password its form value is an empty string\n if (backendId) {\n if (systemUserPassword === undefined) {\n return { keep_value: true };\n }\n\n if (systemUserPassword === '') {\n return { delete_value: true };\n }\n\n return { set_value: _formatPayload(systemUserPassword) };\n }\n\n return _formatPayload(systemUserPassword);\n};\n\nconst _prepareSubmitPayload = (stepsState, getUpdatedFormsValues) => (overrideFormValues: WizardFormValues): WizardSubmitPayload => {\n // We need to ensure that we are using the actual form values\n // It is possible to provide already updated form values, so we do not need to get them twice\n const formValues = overrideFormValues ?? getUpdatedFormsValues();\n const {\n defaultRoles = '',\n description,\n serverHost,\n serverPort,\n systemUserDn,\n systemUserPassword,\n title,\n transportSecurity,\n userUniqueIdAttribute,\n userFullNameAttribute,\n userNameAttribute,\n userSearchBase,\n userSearchPattern,\n verifyCertificates,\n } = formValues;\n const {\n serviceType,\n backendId,\n } = stepsState.authBackendMeta;\n\n return {\n title,\n description,\n default_roles: defaultRoles.split(','),\n config: {\n servers: [{ host: serverHost, port: serverPort }],\n system_user_dn: systemUserDn,\n system_user_password: _passwordPayload(backendId, systemUserPassword),\n transport_security: transportSecurity,\n type: serviceType,\n user_full_name_attribute: userFullNameAttribute,\n user_name_attribute: userNameAttribute,\n user_search_base: userSearchBase,\n user_search_pattern: userSearchPattern,\n user_unique_id_attribute: userUniqueIdAttribute,\n verify_certificates: verifyCertificates,\n },\n };\n};\n\nconst _getInvalidStepKeys = (formValues, newBackendValidationErrors, excludedFields): StepKey[] => {\n const validation = { ...FORMS_VALIDATION, [GROUP_SYNC_KEY]: {} };\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const groupSyncValidation = enterpriseGroupSyncPlugin?.validation.GroupSyncValidation;\n\n if (groupSyncValidation && formValues.synchronizeGroups) {\n validation[GROUP_SYNC_KEY] = groupSyncValidation(formValues.teamSelectionType);\n }\n\n const invalidStepKeys = Object.entries(validation).map(([stepKey, formValidation]) => {\n const stepHasError = Object.entries(formValidation).some(([fieldName, fieldValidation]) => {\n if (excludedFields[fieldName]) {\n return false;\n }\n\n if (newBackendValidationErrors?.[fieldName]) {\n return true;\n }\n\n return !!validateField(fieldValidation)(formValues?.[fieldName]);\n });\n\n return stepHasError ? stepKey : undefined;\n });\n\n return compact(invalidStepKeys);\n};\n\nconst _onSubmitAll = (\n stepsState,\n setSubmitAllError,\n onSubmit,\n getUpdatedFormsValues,\n getSubmitPayload,\n validateSteps,\n shouldUpdateGroupSync,\n) => {\n const formValues = getUpdatedFormsValues();\n const invalidStepKeys = validateSteps(formValues, {});\n\n // Do not submit if there are invalid steps\n if (invalidStepKeys.length >= 1) {\n return Promise.resolve();\n }\n\n // Reset submit all errors\n setSubmitAllError(null);\n\n const payload = getSubmitPayload(formValues);\n const _submit = () => onSubmit(payload, formValues, stepsState.authBackendMeta.serviceType, shouldUpdateGroupSync).then(() => {\n history.push(Routes.SYSTEM.AUTHENTICATION.BACKENDS.OVERVIEW);\n }).catch((error) => {\n if (typeof error?.additional?.body?.errors === 'object') {\n const backendValidationErrors = _formatBackendValidationErrors(error.additional.body.errors);\n validateSteps(formValues, backendValidationErrors);\n } else {\n setSubmitAllError(error);\n }\n });\n\n if (stepsState.authBackendMeta.backendGroupSyncIsActive && !formValues.synchronizeGroups) {\n // eslint-disable-next-line no-alert\n if (window.confirm('Do you really want to remove the group synchronization config for this authentication service?')) {\n return _submit();\n }\n\n return Promise.resolve();\n }\n\n return _submit();\n};\n\nconst _setDefaultCreateRole = (roles, stepsState, setStepsState) => {\n const defaultCreateRoleId = roles?.find((role) => role.name === 'Reader')?.id;\n\n if (defaultCreateRoleId) {\n setStepsState({ ...stepsState, formValues: { ...stepsState.formValues, defaultRoles: defaultCreateRoleId } });\n }\n};\n\ntype Props = {\n authBackendMeta: AuthBackendMeta,\n initialStepKey: $PropertyType,\n initialValues: WizardFormValues,\n excludedFields: {[ inputName: string ]: boolean },\n help: { [inputName: string]: React.ReactElement | string | null | undefined },\n onSubmit: (WizardSubmitPayload, WizardFormValues, serviceType: $PropertyType, shouldUpdateGroupSync?: boolean) => Promise,\n};\n\nconst _loadRoles = (setPaginatedRoles) => {\n const getUnlimited = { page: 1, perPage: 0, query: '' };\n\n AuthzRolesDomain.loadRolesPaginated(getUnlimited).then(setPaginatedRoles);\n};\n\nconst BackendWizard = ({ initialValues, initialStepKey, onSubmit, authBackendMeta, help, excludedFields }: Props) => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const MatchingGroupsProvider = enterpriseGroupSyncPlugin?.components.MatchingGroupsProvider;\n const [paginatedRoles, setPaginatedRoles] = useState();\n const [submitAllError, setSubmitAllError] = useState();\n const [stepsState, setStepsState] = useState({\n activeStepKey: initialStepKey,\n authBackendMeta,\n backendValidationErrors: undefined,\n formValues: initialValues,\n invalidStepKeys: [],\n });\n\n const formRefs = {\n [SERVER_CONFIG_KEY]: useRef>(null),\n [USER_SYNC_KEY]: useRef>(null),\n [GROUP_SYNC_KEY]: useRef>(null),\n };\n\n useEffect(() => _loadRoles(setPaginatedRoles), []);\n\n useEffect(() => {\n if (paginatedRoles && !authBackendMeta.backendId && !stepsState.formValues.defaultRoles) {\n _setDefaultCreateRole(paginatedRoles.list, stepsState, setStepsState);\n }\n }, [paginatedRoles, authBackendMeta.backendId, stepsState, setStepsState]);\n\n if (!paginatedRoles) {\n return ;\n }\n\n const _getUpdatedFormsValues = () => {\n const activeForm = formRefs[stepsState.activeStepKey]?.current;\n\n return { ...stepsState.formValues, ...activeForm?.values };\n };\n\n const _validateSteps = (formValues: WizardFormValues, newBackendValidationErrors): Array => {\n const invalidStepKeys = _getInvalidStepKeys(\n formValues,\n newBackendValidationErrors,\n excludedFields,\n );\n\n if (invalidStepKeys.length >= 1) {\n const nextStepKey = invalidStepKeys.includes(stepsState.activeStepKey) ? stepsState.activeStepKey : invalidStepKeys[0];\n\n setStepsState({\n ...stepsState,\n backendValidationErrors: newBackendValidationErrors,\n activeStepKey: nextStepKey,\n formValues,\n invalidStepKeys,\n });\n }\n\n return invalidStepKeys;\n };\n\n const _getSubmitPayload = _prepareSubmitPayload(stepsState, _getUpdatedFormsValues);\n\n const _setActiveStepKey = (stepKey: $PropertyType) => {\n const formValues = _getUpdatedFormsValues();\n let invalidStepKeys = [...stepsState.invalidStepKeys];\n\n // Only update invalid steps keys, we create them on submit all only\n if (invalidStepKeys.length >= 1) {\n invalidStepKeys = _getInvalidStepKeys(formValues, stepsState.backendValidationErrors, excludedFields);\n }\n\n setStepsState({\n ...stepsState,\n invalidStepKeys,\n formValues,\n activeStepKey: stepKey,\n });\n };\n\n const _handleSubmitAll = (shouldUpdateGroupSync?: boolean) => _onSubmitAll(\n stepsState,\n setSubmitAllError,\n onSubmit,\n _getUpdatedFormsValues,\n _getSubmitPayload,\n _validateSteps,\n shouldUpdateGroupSync,\n );\n\n const steps = wizardSteps({\n formRefs,\n help,\n handleSubmitAll: _handleSubmitAll,\n invalidStepKeys: stepsState.invalidStepKeys,\n prepareSubmitPayload: _getSubmitPayload,\n excludedFields,\n roles: paginatedRoles.list,\n setActiveStepKey: _setActiveStepKey,\n submitAllError: submitAllError && ,\n });\n\n const wizard = (\n \n \n \n );\n\n return (\n \n {MatchingGroupsProvider\n ? (\n \n {wizard}\n \n )\n : wizard}\n \n );\n};\n\nBackendWizard.defaultProps = {\n initialStepKey: SERVER_CONFIG_KEY,\n help: undefined,\n excludedFields: {},\n};\n\nBackendWizard.propTypes = {\n authBackendMeta: PropTypes.shape({\n backendHasPassword: PropTypes.bool,\n backendId: PropTypes.string,\n serviceTitle: PropTypes.string.isRequired,\n serviceType: PropTypes.string.isRequired,\n }).isRequired,\n help: PropTypes.object,\n initialStepKey: PropTypes.string,\n initialValues: PropTypes.object.isRequired,\n excludedFields: PropTypes.object,\n};\n\nexport default BackendWizard;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport BackendWizard from './BackendWizard';\n\nexport default BackendWizard;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { DocumentTitle } from 'components/common';\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport type { WizardFormValues } from 'components/authentication/directoryServices/BackendWizard/BackendWizardContext';\n\nimport WizardPageHeader from './WizardPageHeader';\n\nimport handleCreate from '../HandleCreate';\nimport BackendWizard from '../BackendWizard';\n\nexport const AUTH_BACKEND_META = {\n serviceType: 'ldap',\n serviceTitle: 'LDAP',\n};\n\nexport const HELP = {\n // server config help\n systemUserDn: (\n \n The username for the initial connection to the LDAP server, e.g. cn=admin,dc=example,dc=com
,\n this might be optional depending on your LDAP server.\n \n ),\n systemUserPassword: 'The password for the initial connection to the LDAP server.',\n // user sync help\n userSearchBase: (\n \n The base tree to limit the LDAP search query to, e.g. cn=users,dc=example,dc=com
.\n \n ),\n userSearchPattern: (\n \n For example {'(&(uid={0})(objectClass=inetOrgPerson))'}
.{' '}\n The string {'{0}'}
will be replaced by the entered username.\n \n ),\n userNameAttribute: (\n \n Which LDAP attribute to use for the username of the user in Graylog, e.g uid
.
\n Try to load a test user in the sidebar section User Login Test, if you are unsure which attribute to use.\n \n ),\n userFullNameAttribute: (\n \n Which LDAP attribute to use for the full name of a synchronized Graylog user, e.g. cn
.
\n \n ),\n userUniqueIdAttribute: (\n \n Which LDAP attribute to use for the ID of a synchronized Graylog user, e.g. entryUUID
.
\n \n ),\n defaultRoles: (\n The default Graylog roles synchronized user will obtain. All users need the Reader
role, to use the Graylog web interface\n ),\n};\n\nconst INITIAL_VALUES: Partial = {\n title: AUTH_BACKEND_META.serviceTitle,\n serverHost: 'localhost',\n serverPort: 636,\n transportSecurity: 'tls',\n userFullNameAttribute: 'cn',\n userNameAttribute: 'uid',\n userUniqueIdAttribute: 'entryUUID',\n verifyCertificates: true,\n};\n\nconst BackendCreate = () => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const {\n help: groupSyncHelp = {},\n initialValues: initialGroupSyncValues = {},\n } = enterpriseGroupSyncPlugin?.wizardConfig?.ldap ?? {};\n const help = { ...HELP, ...groupSyncHelp };\n const initialValues = { ...INITIAL_VALUES, ...initialGroupSyncValues };\n\n return (\n \n \n \n \n );\n};\n\nexport default BackendCreate;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as Immutable from 'immutable';\n\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\n\nimport type { WizardFormValues } from './BackendWizard/BackendWizardContext';\n\nexport default ({\n title,\n description,\n defaultRoles = Immutable.List(),\n config: {\n servers = [],\n systemUserDn,\n transportSecurity,\n userFullNameAttribute,\n userNameAttribute,\n userSearchBase,\n userSearchPattern,\n userUniqueIdAttribute,\n verifyCertificates,\n },\n}: DirectoryServiceBackend): WizardFormValues => ({\n title,\n description,\n defaultRoles: defaultRoles.join(),\n serverHost: servers[0].host,\n serverPort: servers[0].port,\n systemUserDn,\n transportSecurity,\n userFullNameAttribute,\n userNameAttribute,\n userSearchBase,\n userSearchPattern,\n userUniqueIdAttribute,\n verifyCertificates,\n});\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport UserNotification from 'util/UserNotification';\nimport type { WizardSubmitPayload } from 'logic/authentication/directoryServices/types';\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport { AuthenticationActions } from 'stores/authentication/AuthenticationStore';\n\nimport type { WizardFormValues } from './BackendWizard/BackendWizardContext';\n\nexport default (payload: WizardSubmitPayload, formValues: WizardFormValues, backendId: string, backendGroupSyncIsActive: boolean, serviceType: string, shouldUpdateGroupSync: boolean | undefined = true) => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const notifyOnSuccess = () => UserNotification.success('Authentication service was updated successfully.', 'Success');\n const notifyOnError = (error) => UserNotification.error(`Updating authentication service failed with status: ${error}`, 'Error');\n\n return AuthenticationActions.update(backendId, {\n ...payload,\n id: backendId,\n }).then((result) => {\n if (enterpriseGroupSyncPlugin && shouldUpdateGroupSync) {\n return enterpriseGroupSyncPlugin.actions.onDirectoryServiceBackendUpdate(backendGroupSyncIsActive, formValues, backendId, serviceType).then(notifyOnSuccess);\n }\n\n notifyOnSuccess();\n\n return result;\n }).catch((error) => {\n notifyOnError(error);\n throw error;\n });\n};\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport { DocumentTitle, Spinner } from 'components/common';\n\nimport { AUTH_BACKEND_META, HELP } from './BackendCreate';\nimport WizardPageHeader from './WizardPageHeader';\n\nimport prepareInitialWizardValues from '../PrepareInitialWizardValues';\nimport BackendWizard from '../BackendWizard';\nimport handleUpdate from '../HandleUpdate';\n\ntype Props = {\n authenticationBackend: DirectoryServiceBackend,\n initialStepKey: string | null | undefined,\n};\n\nconst _optionalWizardProps = (initialStepKey: string | null | undefined) => {\n return { initialStepKey };\n};\n\nconst BackendEdit = ({ authenticationBackend, initialStepKey }: Props) => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const {\n help: groupSyncHelp = {},\n initialValues: initialGroupSyncValues = {},\n } = enterpriseGroupSyncPlugin?.wizardConfig?.ldap ?? {};\n const help = { ...HELP, ...groupSyncHelp };\n let initialValues = prepareInitialWizardValues(authenticationBackend);\n\n if (enterpriseGroupSyncPlugin) {\n const {\n formValues: groupSyncFormValues,\n finishedLoading,\n } = enterpriseGroupSyncPlugin.hooks.useInitialGroupSyncValues(authenticationBackend.id, initialGroupSyncValues);\n\n if (!finishedLoading) {\n return ;\n }\n\n initialValues = { ...initialValues, ...groupSyncFormValues };\n }\n\n const authBackendMeta = {\n ...AUTH_BACKEND_META,\n backendId: authenticationBackend.id,\n backendHasPassword: authenticationBackend.config.systemUserPassword.isSet,\n backendGroupSyncIsActive: !!initialValues.synchronizeGroups,\n };\n const _handleSubmit = (\n payload,\n formValues,\n serviceType,\n shouldUpdateGroupSync,\n ) => handleUpdate(\n payload,\n formValues,\n authenticationBackend.id,\n !!initialValues.synchronizeGroups,\n serviceType,\n shouldUpdateGroupSync,\n );\n\n return (\n \n \n \n \n );\n};\n\nexport default BackendEdit;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { LinkContainer } from 'components/common/router';\nimport Routes from 'routing/Routes';\nimport { Button } from 'components/bootstrap';\n\ntype Props = {\n authenticationBackendId: string,\n stepKey: string,\n};\n\nconst EditLinkButton = ({ authenticationBackendId, stepKey }: Props) => (\n \n \n \n);\n\nexport default EditLinkButton;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\nimport { ReadOnlyFormGroup } from 'components/common';\nimport SectionComponent from 'components/common/Section/SectionComponent';\n\nimport EditLinkButton from './EditLinkButton';\n\nimport { STEP_KEY as SERVER_CONFIG_KEY } from '../BackendWizard/ServerConfigStep';\n\ntype Props = {\n authenticationBackend: DirectoryServiceBackend,\n};\n\nconst ServerConfigSection = ({ authenticationBackend }: Props) => {\n const { title, description, config: { servers = [], systemUserDn, systemUserPassword, transportSecurity, verifyCertificates } } = authenticationBackend;\n const serverUrls = servers.map((server) => `${server.host}:${server.port}`).join(', ');\n\n return (\n }>\n \n \n \n \n \n \n \n \n );\n};\n\nexport default ServerConfigSection;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport * as Immutable from 'immutable';\nimport * as PropTypes from 'prop-types';\n\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\nimport type Role from 'logic/roles/Role';\nimport { ReadOnlyFormGroup } from 'components/common';\nimport SectionComponent from 'components/common/Section/SectionComponent';\n\nimport EditLinkButton from './EditLinkButton';\n\nimport { STEP_KEY as USER_SYNC_KEY } from '../BackendWizard/UserSyncStep';\n\nconst rolesList = (defaultRolesIds: Immutable.List, roles: Immutable.List) => {\n const defaultRolesNames = defaultRolesIds.map((roleId) => roles.find((role) => role.id === roleId)?.name ?? 'Role not found');\n\n return defaultRolesNames.join(', ');\n};\n\ntype Props = {\n authenticationBackend: DirectoryServiceBackend,\n excludedFields: {[ inputName: string ]: boolean },\n roles: Immutable.List,\n};\n\nconst UserSyncSection = ({ authenticationBackend, roles, excludedFields }: Props) => {\n const {\n userSearchBase,\n userSearchPattern,\n userNameAttribute,\n userFullNameAttribute,\n userUniqueIdAttribute,\n } = authenticationBackend.config;\n const {\n defaultRoles = Immutable.List(),\n } = authenticationBackend;\n\n return (\n }>\n \n \n \n \n {!excludedFields.userUniqueIdAttribute && (\n \n )}\n \n \n );\n};\n\nUserSyncSection.defaultProps = {\n excludedFields: {},\n};\n\nUserSyncSection.propTypes = {\n excludedFields: PropTypes.object,\n};\n\nexport default UserSyncSection;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport type * as Immutable from 'immutable';\n\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\nimport type Role from 'logic/roles/Role';\nimport { EnterprisePluginNotFound } from 'components/common';\nimport SectionComponent from 'components/common/Section/SectionComponent';\n\nimport EditLinkButton from './EditLinkButton';\n\nimport { STEP_KEY as GROUP_SYNC_KEY } from '../BackendWizard/GroupSyncStep';\n\ntype Props = {\n authenticationBackend: DirectoryServiceBackend,\n excludedFields?: {[ inputName: string ]: boolean },\n roles: Immutable.List,\n};\n\nconst GroupSyncSection = ({ authenticationBackend, roles, excludedFields }: Props) => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const GroupSyncSectionPlugin = enterpriseGroupSyncPlugin?.components.GroupSyncSection;\n\n if (!GroupSyncSectionPlugin) {\n return (\n \n )}>\n \n \n );\n }\n\n return (\n \n );\n};\n\nGroupSyncSection.defaultProps = {\n excludedFields: undefined,\n};\n\nexport default GroupSyncSection;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport type * as Immutable from 'immutable';\n\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\nimport type Role from 'logic/roles/Role';\n\nimport ServerConfigSection from '../BackendConfigDetails/ServerConfigSection';\nimport UserSyncSection from '../BackendConfigDetails/UserSyncSection';\nimport GroupSyncSection from '../BackendConfigDetails/GroupSyncSection';\n\ntype Props = {\n authenticationBackend: DirectoryServiceBackend,\n roles: Immutable.List,\n};\n\nconst BackendConfigDetails = ({ authenticationBackend, roles }: Props) => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const {\n excludedFields: groupSyncExcludedFields = {},\n } = enterpriseGroupSyncPlugin?.wizardConfig?.activeDirectory ?? {};\n const excludedFields = { ...groupSyncExcludedFields, userUniqueIdAttribute: true };\n\n return (\n <>\n \n \n \n >\n );\n};\n\nexport default BackendConfigDetails;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport type * as Immutable from 'immutable';\n\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\nimport type Role from 'logic/roles/Role';\n\nimport ServerConfigSection from '../BackendConfigDetails/ServerConfigSection';\nimport UserSyncSection from '../BackendConfigDetails/UserSyncSection';\nimport GroupSyncSection from '../BackendConfigDetails/GroupSyncSection';\n\ntype Props = {\n authenticationBackend: DirectoryServiceBackend,\n roles: Immutable.List,\n};\n\nconst BackendConfigDetails = ({ authenticationBackend, roles }: Props) => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const {\n excludedFields: groupSyncExcludedFields = {},\n } = enterpriseGroupSyncPlugin?.wizardConfig?.ldap ?? {};\n const excludedFields = { ...groupSyncExcludedFields };\n\n return (\n <>\n \n \n \n >\n );\n};\n\nexport default BackendConfigDetails;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport AuthenticationOverviewLinks from 'components/authentication/AuthenticationOverviewLinks';\nimport { PageHeader } from 'components/common';\nimport useActiveBackend from 'components/authentication/useActiveBackend';\nimport DocumentationLink from 'components/support/DocumentationLink';\nimport BackendActionLinks from 'components/authentication/BackendActionLinks';\nimport DocsHelper from 'util/DocsHelper';\nimport StringUtils from 'util/StringUtils';\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\n\ntype Props = {\n authenticationBackend?: DirectoryServiceBackend,\n};\n\nconst _pageTitle = (authBackend) => {\n if (authBackend) {\n const backendTitle = StringUtils.truncateWithEllipses(authBackend.title, 30);\n\n return <>Edit Authentication Service - {backendTitle}>;\n }\n\n return 'Create Active Directory Authentication Service';\n};\n\nconst WizardPageHeader = ({ authenticationBackend: authBackend }: Props) => {\n const { finishedLoading, activeBackend } = useActiveBackend();\n const pageTitle = _pageTitle(authBackend);\n\n return (\n \n )}>\n Configure Graylog's authentication services of this Graylog cluster.\n \n Read more authentication in the .\n \n \n \n );\n};\n\nWizardPageHeader.defaultProps = {\n authenticationBackend: undefined,\n};\n\nexport default WizardPageHeader;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport { DocumentTitle } from 'components/common';\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\nimport type { WizardFormValues } from 'components/authentication/directoryServices/BackendWizard/BackendWizardContext';\n\nimport WizardPageHeader from './WizardPageHeader';\n\nimport BackendWizard from '../BackendWizard';\nimport handleCreate from '../HandleCreate';\n\nexport const HELP = {\n // server config help\n systemUserDn: (\n \n The username for the initial connection to the Active Directory server, e.g. [email protected]
.
\n This needs to match the userPrincipalName
of that user.\n \n ),\n systemUserPassword: 'The password for the initial connection to the Active Directory server.',\n // user sync help\n userSearchBase: (\n \n The base tree to limit the Active Directory search query to, e.g. cn=users,dc=example,dc=com
.\n \n ),\n userSearchPattern: (\n \n For example {'(&(objectClass=user)(|(sAMAccountName={0})(userPrincipalName={0})))'}
.{' '}\n The string {'{0}'}
will be replaced by the entered username.\n \n ),\n userNameAttribute: (\n \n Which Active Directory attribute to use for the full name of the user in Graylog, e.g. userPrincipalName
.
\n Try to load a test user in the sidebar section User Login Test, if you are unsure which attribute to use.\n \n ),\n userFullNameAttribute: (\n \n Which Active Directory attribute to use for the full name of a synchronized Graylog user, e.g. displayName
.
\n \n ),\n defaultRoles: (\n The default Graylog roles synchronized user will obtain. All users need the Reader
role, to use the Graylog web interface\n ),\n};\n\nexport const AUTH_BACKEND_META = {\n serviceTitle: 'Active Directory',\n serviceType: 'active-directory',\n};\n\nconst INITIAL_VALUES: Partial = {\n title: AUTH_BACKEND_META.serviceTitle,\n serverHost: 'localhost',\n serverPort: 636,\n transportSecurity: 'tls',\n userSearchPattern: '(&(objectClass=user)(|(sAMAccountName={0})(userPrincipalName={0})))',\n userFullNameAttribute: 'displayName',\n userNameAttribute: 'userPrincipalName',\n verifyCertificates: true,\n};\n\nconst BackendCreate = () => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const {\n help: groupSyncHelp = {},\n excludedFields: groupSyncExcludedFields = {},\n initialValues: initialGroupSyncValues,\n } = enterpriseGroupSyncPlugin?.wizardConfig?.activeDirectory ?? {};\n const help = { ...HELP, ...groupSyncHelp };\n const initialValues = { ...INITIAL_VALUES, ...initialGroupSyncValues };\n const excludedFields = { ...groupSyncExcludedFields, userUniqueIdAttribute: true };\n\n return (\n \n \n \n \n );\n};\n\nexport default BackendCreate;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\n\nimport type { DirectoryServiceBackend } from 'logic/authentication/directoryServices/types';\nimport { DocumentTitle, Spinner } from 'components/common';\nimport { getEnterpriseGroupSyncPlugin } from 'util/AuthenticationService';\n\nimport WizardPageHeader from './WizardPageHeader';\nimport { HELP, AUTH_BACKEND_META } from './BackendCreate';\n\nimport prepareInitialWizardValues from '../PrepareInitialWizardValues';\nimport BackendWizard from '../BackendWizard';\nimport handleUpdate from '../HandleUpdate';\n\ntype Props = {\n authenticationBackend: DirectoryServiceBackend,\n initialStepKey: string | null | undefined,\n};\n\nconst _optionalWizardProps = (initialStepKey: string | null | undefined) => {\n return { initialStepKey };\n};\n\nconst BackendEdit = ({ authenticationBackend, initialStepKey }: Props) => {\n const enterpriseGroupSyncPlugin = getEnterpriseGroupSyncPlugin();\n const {\n help: groupSyncHelp = {},\n excludedFields: groupSyncExcludedFields = {},\n initialValues: initialGroupSyncValues = {},\n } = enterpriseGroupSyncPlugin?.wizardConfig?.activeDirectory ?? {};\n const help = { ...HELP, ...groupSyncHelp };\n const excludedFields = { ...groupSyncExcludedFields, userUniqueIdAttribute: true };\n let initialValues = prepareInitialWizardValues(authenticationBackend);\n\n if (enterpriseGroupSyncPlugin) {\n const {\n formValues: groupFormValues,\n finishedLoading,\n } = enterpriseGroupSyncPlugin.hooks.useInitialGroupSyncValues(authenticationBackend.id, initialGroupSyncValues);\n\n if (!finishedLoading) {\n return ;\n }\n\n initialValues = { ...initialValues, ...groupFormValues };\n }\n\n const authBackendMeta = {\n ...AUTH_BACKEND_META,\n backendId: authenticationBackend.id,\n backendHasPassword: authenticationBackend.config.systemUserPassword.isSet,\n backendGroupSyncIsActive: !!initialValues.synchronizeGroups,\n };\n const _handleSubmit = (\n payload,\n formValues,\n serviceType,\n shouldUpdateGroupSync,\n ) => handleUpdate(\n payload,\n formValues,\n authenticationBackend.id,\n !!initialValues.synchronizeGroups,\n serviceType,\n shouldUpdateGroupSync,\n );\n\n return (\n \n \n \n \n );\n};\n\nexport default BackendEdit;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport { PluginManifest, PluginStore } from 'graylog-web-plugin/plugin';\n\nimport ConfigParser from 'logic/authentication/directoryServices/BackendConfigParser';\n\nimport BackendCreateLDAP from './directoryServices/ldap/BackendCreate';\nimport BackendEditLDAP from './directoryServices/ldap/BackendEdit';\nimport BackendConfigDetailsAD from './directoryServices/activeDirectory/BackendConfigDetails';\nimport BackendConfigDetailsLDAP from './directoryServices/ldap/BackendConfigDetails';\nimport BackendCreateAD from './directoryServices/activeDirectory/BackendCreate';\nimport BackendEditAD from './directoryServices/activeDirectory/BackendEdit';\n\nPluginStore.register(new PluginManifest({}, {\n 'authentication.services': [\n {\n name: 'ldap',\n displayName: 'LDAP',\n createComponent: BackendCreateLDAP,\n editComponent: BackendEditLDAP,\n configDetailsComponent: BackendConfigDetailsLDAP,\n configToJson: ConfigParser.toJson,\n configFromJson: ConfigParser.fromJson,\n },\n {\n name: 'active-directory',\n displayName: 'Active Directory',\n createComponent: BackendCreateAD,\n editComponent: BackendEditAD,\n configDetailsComponent: BackendConfigDetailsAD,\n configToJson: ConfigParser.toJson,\n configFromJson: ConfigParser.fromJson,\n },\n ],\n}));\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\n/* eslint-disable import/prefer-default-export */\nimport { useState, useEffect } from 'react';\n\nimport type { LoadActiveResponse } from 'stores/authentication/AuthenticationStore';\nimport type { ListenableAction, PromiseProvider } from 'stores/StoreTypes';\nimport AuthenticationDomain from 'domainActions/authentication/AuthenticationDomain';\n\nconst useActiveBackend = (listenableActions: Array> = []) => {\n const [loadActiveResponse, setLoadActiveResponse] = useState();\n const [finishedLoading, setFinishedLoading] = useState(false);\n const _loadActive = () => AuthenticationDomain.loadActive().then((response) => {\n setFinishedLoading(true);\n setLoadActiveResponse(response);\n });\n\n useEffect(() => { _loadActive(); }, []);\n\n useEffect(() => {\n const unlistenActions = listenableActions.map((action) => action.completed.listen(_loadActive));\n\n return () => {\n unlistenActions.forEach((unlistenAction) => unlistenAction());\n };\n }, [listenableActions]);\n\n return {\n finishedLoading,\n activeBackend: loadActiveResponse?.backend,\n backendsTotal: loadActiveResponse?.context?.backendsTotal,\n };\n};\n\nexport default useActiveBackend;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as React from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Spinner from 'components/common/Spinner';\nimport { Row, Col } from 'components/bootstrap';\n\ntype Props = {\n children: React.ReactNode,\n title: string,\n showLoading?: boolean,\n headerActions?: React.ReactElement,\n className?: string,\n};\n\nconst Header = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n\n *:not(:first-child) {\n margin-left: 10px;\n }\n`;\n\nexport const Headline = styled.h2`\n margin-bottom: 15px;\n display: inline;\n`;\n\nconst LoadingSpinner = styled(Spinner)(({ theme }) => css`\n margin-left: 10px;\n font-size: ${theme.fonts.size.h3};\n`);\n\nconst SectionComponent = ({ children, title, showLoading = false, headerActions, className }: Props) => (\n \n \n \n \n {title}\n {showLoading && }\n \n {headerActions}\n \n {children}\n \n
\n);\n\nSectionComponent.defaultProps = {\n className: '',\n showLoading: false,\n headerActions: undefined,\n};\n\nexport default SectionComponent;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport { AuthzRolesActions } from 'stores/roles/AuthzRolesStore';\n\nimport notifyingAction from '../notifyingAction';\n\nconst load = notifyingAction({\n action: AuthzRolesActions.load,\n error: (error, roleId) => ({\n message: `Loading role with id \"${roleId}\" failed with status: ${error}`,\n }),\n notFoundRedirect: true,\n});\n\nconst deleteAction = notifyingAction({\n action: AuthzRolesActions.delete,\n success: (roleId, roleName) => ({\n message: `Role \"${roleName}\" was deleted successfully`,\n }),\n error: (error, roleId, roleName) => ({\n message: `Deleting role \"${roleName}\" failed with status: ${error}`,\n }),\n});\n\nconst addMembers = notifyingAction({\n action: AuthzRolesActions.addMembers,\n success: (roleId, usernames) => ({\n message: `Users:\"${usernames.join(', ')}\" were assigned successfully`,\n }),\n error: (error, roleId, usernames) => ({\n message: `Assigning users \"${usernames.join(', ')}\" failed with status: ${error}`,\n }),\n});\n\nconst removeMember = notifyingAction({\n action: AuthzRolesActions.removeMember,\n success: (roleId, username) => ({\n message: `User \"${username}\" was unassigned successfully`,\n }),\n error: (error, roleId, username) => ({\n message: `Unassign user \"${username}\" failed with status: ${error}`,\n }),\n});\n\nconst loadUsersForRole = notifyingAction({\n action: AuthzRolesActions.loadUsersForRole,\n error: (error, username, roleName) => ({\n message: `Loading users for role \"${roleName}\" failed with status: ${error}`,\n }),\n});\n\nconst loadRolesForUser = notifyingAction({\n action: AuthzRolesActions.loadRolesForUser,\n error: (error, username) => ({\n message: `Loading roles for user \"${username}\" failed with status: ${error}`,\n }),\n});\n\nconst loadRolesPaginated = notifyingAction({\n action: AuthzRolesActions.loadRolesPaginated,\n error: (error) => ({\n message: `Loading roles failed with status: ${error}`,\n }),\n});\n\nexport default {\n load,\n delete: deleteAction,\n addMembers,\n removeMember,\n loadUsersForRole,\n loadRolesForUser,\n loadRolesPaginated,\n};\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport * as Immutable from 'immutable';\nimport type { $PropertyType } from 'utility-types';\n\ntype InternalState = {\n id: string,\n name: string,\n description: string,\n permissions: Immutable.Set,\n readOnly: boolean,\n};\n\nexport type RoleJSON = {\n id: string,\n name: string,\n description: string,\n permissions: Immutable.Set,\n read_only: boolean,\n};\n\nexport default class Role {\n _value: InternalState;\n\n constructor(\n id: $PropertyType,\n name: $PropertyType,\n description: $PropertyType,\n permissions: $PropertyType,\n readOnly: $PropertyType,\n ) {\n this._value = {\n id,\n name,\n description,\n permissions,\n readOnly,\n };\n }\n\n get id() {\n return this._value.id;\n }\n\n get name() {\n return this._value.name;\n }\n\n get description() {\n return this._value.description;\n }\n\n get permissions() {\n return this._value.permissions;\n }\n\n get readOnly() {\n return this._value.readOnly;\n }\n\n toBuilder() {\n const {\n id,\n name,\n description,\n permissions,\n readOnly,\n } = this._value;\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return new Builder(Immutable.Map({\n id,\n name,\n description,\n permissions,\n readOnly,\n }));\n }\n\n static create(\n id: $PropertyType,\n name: $PropertyType,\n description: $PropertyType,\n permissions: $PropertyType,\n readOnly: $PropertyType,\n ) {\n return new Role(\n id,\n name,\n description,\n permissions,\n readOnly,\n );\n }\n\n toJSON() {\n const {\n id,\n name,\n description,\n permissions,\n readOnly,\n } = this._value;\n\n return {\n id,\n name,\n description,\n permissions,\n read_only: readOnly,\n };\n }\n\n static fromJSON(value: RoleJSON) {\n const {\n id,\n name,\n description,\n permissions,\n read_only: readOnly,\n } = value;\n\n return Role.create(\n id,\n name,\n description,\n permissions,\n readOnly,\n );\n }\n\n static builder(): Builder {\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return new Builder();\n }\n}\n\ntype BuilderState = Immutable.Map;\n\nclass Builder {\n value: BuilderState;\n\n constructor(value: BuilderState = Immutable.Map()) {\n this.value = value;\n }\n\n id(value: $PropertyType) {\n return new Builder(this.value.set('id', value));\n }\n\n name(value: $PropertyType) {\n return new Builder(this.value.set('name', value));\n }\n\n description(value: $PropertyType) {\n return new Builder(this.value.set('description', value));\n }\n\n permissions(value: $PropertyType) {\n return new Builder(this.value.set('permissions', value));\n }\n\n readOnly(value: $PropertyType) {\n return new Builder(this.value.set('readOnly', value));\n }\n\n build() {\n const {\n id,\n name,\n description,\n permissions,\n readOnly,\n } = this.value.toObject();\n\n return new Role(\n id,\n name,\n description,\n permissions,\n readOnly,\n );\n }\n}\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport Reflux from 'reflux';\nimport type * as Immutable from 'immutable';\n\nimport type Role from 'logic/roles/Role';\nimport type UserOverview from 'logic/users/UserOverview';\nimport { singletonActions } from 'logic/singleton';\nimport type { PaginatedList, Pagination } from 'stores/PaginationTypes';\n\nexport type UserContext = {\n id: string,\n username: string,\n};\n\nexport type RoleContext = {\n users: { [key: string]: UserContext[] },\n};\n\nexport type PaginatedRoles = PaginatedList & {\n context: RoleContext,\n};\nexport type PaginatedUsers = PaginatedList;\n\nexport type ActionsType = {\n load: (roleId: string) => Promise,\n delete: (roleId: string, roleName: string) => Promise,\n addMembers: (roleId: string, usernames: Immutable.Set) => Promise,\n removeMember: (roleId: string, username: string) => Promise,\n loadUsersForRole: (roleId: string, roleName: string, pagination: Pagination) => Promise,\n loadRolesForUser: (username: string, pagination: Pagination) => Promise,\n loadRolesPaginated: (pagination: Pagination) => Promise,\n};\n\nconst AuthzRolesActions = singletonActions(\n 'AuthzRoles',\n () => Reflux.createActions({\n load: { asyncResult: true },\n delete: { asyncResult: true },\n addMembers: { asyncResult: true },\n removeMember: { asyncResult: true },\n loadUsersForRole: { asyncResult: true },\n loadRolesForUser: { asyncResult: true },\n loadRolesPaginated: { asyncResult: true },\n }),\n);\n\nexport default AuthzRolesActions;\n","/*\n * Copyright (C) 2020 Graylog, Inc.\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the Server Side Public License, version 1,\n * as published by MongoDB, Inc.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * Server Side Public License for more details.\n *\n * You should have received a copy of the Server Side Public License\n * along with this program. If not, see\n * .\n */\nimport Reflux from 'reflux';\nimport * as Immutable from 'immutable';\nimport type { $PropertyType } from 'utility-types';\n\nimport type { PaginatedUsersResponse } from 'stores/users/UsersStore';\nimport type { Store } from 'stores/StoreTypes';\nimport fetch from 'logic/rest/FetchProvider';\nimport ApiRoutes from 'routing/ApiRoutes';\nimport { qualifyUrl } from 'util/URLUtils';\nimport { singletonStore } from 'logic/singleton';\nimport PaginationURL from 'util/PaginationURL';\nimport Role from 'logic/roles/Role';\nimport type { RoleJSON } from 'logic/roles/Role';\nimport type { PaginatedRoles, PaginatedUsers, RoleContext } from 'actions/roles/AuthzRolesActions';\nimport AuthzRolesActions from 'actions/roles/AuthzRolesActions';\nimport UserOverview from 'logic/users/UserOverview';\nimport type { PaginatedListJSON, Pagination } from 'stores/PaginationTypes';\n\nexport type PaginatedRolesResponse = PaginatedListJSON & {\n roles: Array,\n context?: RoleContext,\n};\n\nconst _responseToPaginatedList = ({ count, total, page, per_page, query, roles = [], context = { users: undefined } }: PaginatedRolesResponse) => ({\n list: Immutable.List(roles.map((r) => Role.fromJSON(r))),\n pagination: {\n query,\n page,\n perPage: per_page,\n count,\n total,\n },\n context,\n});\n\nconst _responseToPaginatedUserList = ({ count, total, page, per_page, query, users }: PaginatedUsersResponse) => ({\n list: Immutable.List(users.map((u) => UserOverview.fromJSON(u))),\n pagination: {\n page,\n perPage: per_page,\n query,\n count,\n total,\n },\n});\n\nconst encodeApiUrl = (apiRoute: (...args: Array) => { url: string }, uriParams: Array = []): string => {\n const encodedUriParams = uriParams.map((param) => encodeURIComponent(param));\n\n return apiRoute(...encodedUriParams).url;\n};\n\nconst AuthzRolesStore: Store<{}> = singletonStore(\n 'AuthzRoles',\n () => Reflux.createStore({\n listenables: [AuthzRolesActions],\n\n load(roleId: $PropertyType): Promise {\n const url = qualifyUrl(encodeApiUrl(ApiRoutes.AuthzRolesController.load, [roleId]));\n const promise = fetch('GET', url).then(Role.fromJSON);\n\n AuthzRolesActions.load.promise(promise);\n\n return promise;\n },\n\n delete(roleId: string): Promise {\n const url = qualifyUrl(encodeApiUrl(ApiRoutes.AuthzRolesController.delete, [roleId]));\n const promise = fetch('DELETE', url);\n\n AuthzRolesActions.delete.promise(promise);\n\n return promise;\n },\n\n addMembers(roleId: string, usernames: Immutable.Set): Promise {\n const url = encodeApiUrl(ApiRoutes.AuthzRolesController.addMembers, [roleId]);\n const promise = fetch('PUT', qualifyUrl(url), usernames.toArray());\n\n AuthzRolesActions.addMembers.promise(promise);\n\n return promise;\n },\n\n removeMember(roleId: string, username: string): Promise {\n const url = encodeApiUrl(ApiRoutes.AuthzRolesController.removeMember, [roleId, username]);\n const promise = fetch('DELETE', qualifyUrl(url));\n\n AuthzRolesActions.removeMember.promise(promise);\n\n return promise;\n },\n\n loadUsersForRole(roleId: string, roleName: string, { page, perPage, query }: Pagination): Promise {\n const apiUrl = encodeApiUrl(ApiRoutes.AuthzRolesController.loadUsersForRole, [roleId]);\n const url = PaginationURL(apiUrl, page, perPage, query);\n\n const promise = fetch('GET', qualifyUrl(url))\n .then(_responseToPaginatedUserList);\n\n AuthzRolesActions.loadUsersForRole.promise(promise);\n\n return promise;\n },\n\n loadRolesForUser(username: string, { page, perPage, query }: Pagination): Promise {\n const apiUrl = encodeApiUrl(ApiRoutes.AuthzRolesController.loadRolesForUser, [username]);\n const url = PaginationURL(apiUrl, page, perPage, query);\n\n const promise = fetch('GET', qualifyUrl(url))\n .then(_responseToPaginatedList);\n\n AuthzRolesActions.loadRolesForUser.promise(promise);\n\n return promise;\n },\n\n loadRolesPaginated({ page, perPage, query }: Pagination): Promise {\n const apiUrl = encodeApiUrl(ApiRoutes.AuthzRolesController.list);\n const url = PaginationURL(apiUrl, page, perPage, query);\n\n const promise = fetch('GET', qualifyUrl(url))\n .then(_responseToPaginatedList);\n\n AuthzRolesActions.loadRolesPaginated.promise(promise);\n\n return promise;\n },\n }),\n);\n\nexport { AuthzRolesActions, AuthzRolesStore };\n"],"names":["className","to","Routes","bsStyle","type","activeBackend","finishedLoading","disabled","id","fromJson","servers","system_user_dn","system_user_password","transport_security","user_full_name_attribute","user_name_attribute","user_search_base","user_search_pattern","user_unique_id_attribute","verify_certificates","systemUserDn","systemUserPassword","isSet","is_set","transportSecurity","userFullNameAttribute","userNameAttribute","userSearchBase","userSearchPattern","userUniqueIdAttribute","verifyCertificates","toJson","WizardPageHeader","authBackend","authenticationBackend","title","useActiveBackend","pageTitle","backendTitle","StringUtils","_pageTitle","subactions","BackendActionLinks","DocumentationLink","page","DocsHelper","text","AuthenticationOverviewLinks","defaultProps","undefined","payload","formValues","serviceType","shouldUpdateGroupSync","enterpriseGroupSyncPlugin","getEnterpriseGroupSyncPlugin","notifyOnSuccess","UserNotification","notifyOnError","error","AuthenticationActions","then","result","backend","synchronizeGroups","actions","onDirectoryServiceBackendUpdate","initialState","activeStepKey","backendValidationErrors","authBackendMeta","serviceTitle","invalidStepKeys","setStepsState","BackendWizardContext","React","singleton","STEP_KEY","FORM_VALIDATION","required","serverHost","serverPort","min","max","description","ServerUrl","styled","ProtocolOptions","formRef","help","onSubmit","onSubmitAll","submitAllError","validateOnMount","useContext","stepsState","backendHasPassword","_onTransportSecurityChange","event","values","setFieldValue","onChange","currentValue","newValue","target","value","Formik","initialValues","innerRef","initialErrors","validateOnBlur","validateOnChange","isSubmitting","validateForm","Form","label","name","placeholder","labelClassName","wrapperClassName","formGroupClassName","validate","validateField","Field","field","onBlur","defaultChecked","e","onClick","autoComplete","buttonAfter","errors","formHasErrors","_onSubmitAll","defaultRoles","excludedFields","roles","rolesOptions","map","role","toArray","sm","smOffset","meta","inputProps","multi","selectedRoles","options","prepareSubmitPayload","GroupSyncForm","components","xs","featureName","stepKey","includes","formRefs","handleSubmitAll","setActiveStepKey","key","SERVER_CONFIG_KEY","component","USER_SYNC_KEY","GROUP_SYNC_KEY","NotificationContainer","Alert","Title","ErrorsList","theme","fonts","family","monospace","ConnectionErrors","message","String","propTypes","PropTypes","isRequired","_addRequiredRequestPayload","necessaryAttributes","config","useState","loading","success","setConnectionStatus","AuthenticationDomain","backend_configuration","backend_id","backendId","response","requestErrors","additional","res","delay","length","initialLoginStatus","testFinished","setLoginStatus","hasErrors","username","password","user_login","user_exists","login_success","user_details","Object","entries","StyledPanelGroup","PanelGroup","props","colors","input","border","global","contentBackground","table","backgroundAlt","activeKey","setActiveKey","useEffect","accordion","onSelect","eventKey","toggle","collapsible","FORMS_VALIDATION","SERVER_CONFIG_VALIDATION","USER_SYNC_VALIDATION","SubmitAllError","xsOffset","style","wordBreak","_passwordPayload","_formatPayload","keep_value","delete_value","set_value","_getInvalidStepKeys","newBackendValidationErrors","validation","groupSyncValidation","GroupSyncValidation","teamSelectionType","formValidation","some","fieldName","fieldValidation","compact","setSubmitAllError","getUpdatedFormsValues","getSubmitPayload","validateSteps","Promise","resolve","_submit","history","backendErrors","backendErrorStrings","body","mapValues","errorArray","join","mapKeys","camelCase","backendGroupSyncIsActive","window","confirm","BackendWizard","initialStepKey","MatchingGroupsProvider","paginatedRoles","setPaginatedRoles","useRef","AuthzRolesDomain","perPage","query","_loadRoles","defaultCreateRoleId","find","_setDefaultCreateRole","list","_getUpdatedFormsValues","activeForm","current","_validateSteps","nextStepKey","_getSubmitPayload","overrideFormValues","default_roles","split","host","port","_prepareSubmitPayload","_setActiveStepKey","steps","wizardSteps","wizard","Wizard","activeStep","hidePreviousNextButtons","horizontal","justified","onStepChange","AUTH_BACKEND_META","HELP","INITIAL_VALUES","wizardConfig","ldap","groupSyncHelp","initialGroupSyncValues","handleCreate","Immutable","prepareInitialWizardValues","hooks","useInitialGroupSyncValues","groupSyncFormValues","_optionalWizardProps","handleUpdate","authenticationBackendId","bsSize","serverUrls","server","SectionComponent","headerActions","rolesList","defaultRolesIds","roleId","UserSyncSection","GroupSyncSection","GroupSyncSectionPlugin","activeDirectory","groupSyncExcludedFields","groupFormValues","PluginStore","PluginManifest","displayName","createComponent","BackendCreateLDAP","editComponent","BackendEditLDAP","configDetailsComponent","BackendConfigDetailsLDAP","configToJson","ConfigParser","configFromJson","BackendCreateAD","BackendEditAD","BackendConfigDetailsAD","listenableActions","loadActiveResponse","setLoadActiveResponse","setFinishedLoading","_loadActive","unlistenActions","action","completed","listen","forEach","unlistenAction","backendsTotal","context","Header","Headline","LoadingSpinner","Spinner","css","size","h3","children","showLoading","load","notifyingAction","AuthzRolesActions","notFoundRedirect","delete","roleName","addMembers","usernames","removeMember","loadUsersForRole","loadRolesForUser","loadRolesPaginated","Role","permissions","readOnly","this","_value","Builder","read_only","create","set","toObject","singletonActions","Reflux","asyncResult","_responseToPaginatedList","count","total","per_page","users","r","fromJSON","pagination","_responseToPaginatedUserList","u","UserOverview","encodeApiUrl","apiRoute","uriParams","encodedUriParams","param","encodeURIComponent","url","singletonStore","listenables","qualifyUrl","ApiRoutes","promise","fetch","apiUrl","PaginationURL"],"sourceRoot":""}