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b,gBAAC,UAAO,QAAQ,UACR,SAAUgB,GAAgB,CAACC,EAC3B,MAAM,gBACN,KAAK,UAAS,eAEtB,CACF,CACF,CACF,CACF,CAEJ,CACF,EAnDE,gBAACF,EAAA,EAAgB,CAAC,MAAOX,CAAA,EACvB,gBAAC,KAAO,IAAC,CACX,CAmDN,EClGA,ECI8B,IAC5B,gBAACc,EAAA,EAAW,KACV,gBAAC,EAA2B,IAAC,CAC/B,E,oCCiBF,QAlB+B,IAC7B,gBAAC,KAAa,CAAC,MAAM,uBACnB,gBAACC,EAAA,EAA4B,IAAC,EAC9B,gBAAC,MAAW,MAAM,sBACN,QAAS,gBAACC,EAAA,EAAwB,IAAC,EACnC,kBAAmB,CACjB,MAAO,+BACP,KAAMC,EAAA,EAAW,MAAM,cACzB,GACV,gBAAC,YAAK,8CAEN,CACF,EAEA,gBAAC,EAAkB,IAAC,CACtB,C","sources":["webpack://graylog-web-interface/./src/components/authentication/AuthenticationPageNavigation.tsx","webpack://graylog-web-interface/./src/components/authentication/AuthenticatorActionLinks.tsx","webpack://graylog-web-interface/./src/components/common/PageNavigation.tsx","webpack://graylog-web-interface/./src/actions/authentication/HTTPHeaderAuthConfigActions.ts","webpack://graylog-web-interface/./src/logic/authentication/HTTPHeaderAuthConfig.ts","webpack://graylog-web-interface/./src/stores/authentication/HTTPHeaderAuthConfigStore.ts","webpack://graylog-web-interface/./src/domainActions/authentication/HTTPHeaderAuthConfigDomain.ts","webpack://graylog-web-interface/./src/components/authentication/AuthenticatorsEdit/HTTPHeaderAuthConfigSection.tsx","webpack://graylog-web-interface/./src/components/authentication/AuthenticatorsEdit/index.tsx","webpack://graylog-web-interface/./src/components/authentication/AuthenticatorsEdit/AuthenticatorsEdit.tsx","webpack://graylog-web-interface/./src/pages/AuthenticatorsEditPage.tsx"],"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 PageNavigation from 'components/common/PageNavigation';\nimport { Row } from 'components/bootstrap';\n\nconst NAV_ITEMS = [\n { title: 'Authentication Services', path: Routes.SYSTEM.AUTHENTICATION.BACKENDS.OVERVIEW },\n { title: 'Authenticators', path: Routes.SYSTEM.AUTHENTICATION.AUTHENTICATORS.SHOW },\n];\n\nconst AuthenticationPageNavigation = () => (\n \n \n
\n);\n\nexport default AuthenticationPageNavigation;\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 Routes from 'routing/Routes';\nimport { LinkContainer } from 'components/common/router';\nimport { ButtonToolbar, Button } from 'components/bootstrap';\n\nconst AuthenticatorActionLinks = () => (\n \n \n \n \n \n);\nexport default AuthenticatorActionLinks;\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 { Button, ButtonToolbar } from 'components/bootstrap';\nimport { LinkContainer } from 'components/common/router';\nimport { IfPermitted } from 'components/common';\nimport NavItemStateIndicator, {\n hoverIndicatorStyles,\n activeIndicatorStyles,\n} from 'components/common/NavItemStateIndicator';\n\nconst Container = styled(ButtonToolbar)`\n margin-bottom: 10px;\n`;\n\nconst StyledButton = styled(Button)(({ theme }) => css`\n font-family: ${theme.fonts.family.navigation};\n font-size: ${theme.fonts.size.navigation};\n\n &&&& {\n color: ${theme.colors.variant.darker.default};\n \n &:hover,\n &:focus {\n text-decoration: none;\n }\n\n > div {\n &:hover,\n &:focus {\n color: ${theme.colors.variant.darker.default};\n }\n }\n\n &:hover {\n ${hoverIndicatorStyles(theme)}\n }\n\n &.active {\n color: ${theme.colors.global.textDefault};\n\n ${activeIndicatorStyles(theme)}\n\n &:hover,\n &:focus {\n ${activeIndicatorStyles(theme)}\n }\n }\n }\n`);\n\nStyledButton.displayName = 'Button';\n\ntype Props = {\n /**\n * List of nav items. Define permissions, if the item should only be displayed for users with specific permissions.\n * By default, an item is active if the current URL starts with the item URL.\n * If you only want to display an item as active only when its path matches exactly, set `exactPathMatch` to true.\n */\n items: Array<{\n title: string,\n path: string,\n permissions?: string | Array\n exactPathMatch?: boolean,\n }>\n}\n\n/**\n * Simple tab navigation to allow navigating to subareas of a page.\n */\nconst PageNavigation = ({ items }: Props) => (\n \n {items.map(({ path, title, permissions, exactPathMatch }) => {\n if (!path) {\n return null;\n }\n\n return (\n \n \n \n \n {title}\n \n \n \n \n );\n })}\n \n);\n\nexport default PageNavigation;\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';\n\nimport type { RefluxActions } from 'stores/StoreTypes';\nimport { singletonActions } from 'logic/singleton';\nimport type { HTTPHeaderAuthConfigJSON } from 'logic/authentication/HTTPHeaderAuthConfig';\nimport type HTTPHeaderAuthConfig from 'logic/authentication/HTTPHeaderAuthConfig';\n\nexport type ActionsType = {\n load: () => Promise,\n update: (payload: HTTPHeaderAuthConfigJSON) => Promise,\n};\n\ntype HTTPHeaderAuthConfigActionsType = RefluxActions;\n\nconst HTTPHeaderAuthConfigActions: HTTPHeaderAuthConfigActionsType = singletonActions(\n 'HTTPHeaderAuthConfig',\n () => Reflux.createActions({\n load: { asyncResult: true },\n update: { asyncResult: true },\n }),\n);\n\nexport default HTTPHeaderAuthConfigActions;\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 enabled: boolean,\n usernameHeader: string,\n};\n\nexport type HTTPHeaderAuthConfigJSON = {\n enabled: boolean,\n username_header: string,\n};\n\nexport default class HTTPHeaderAuthConfig {\n _value: InternalState;\n\n constructor(\n usernameHeader: $PropertyType,\n enabled: $PropertyType,\n ) {\n this._value = { usernameHeader, enabled };\n }\n\n get usernameHeader() {\n return this._value.usernameHeader;\n }\n\n get enabled() {\n return this._value.enabled;\n }\n\n toBuilder() {\n const {\n usernameHeader,\n enabled,\n } = this._value;\n\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n return new Builder(Immutable.Map({ usernameHeader, enabled }));\n }\n\n static create(\n usernameHeader: $PropertyType,\n enabled: $PropertyType,\n ) {\n return new HTTPHeaderAuthConfig(usernameHeader, enabled);\n }\n\n toJSON() {\n const { usernameHeader, enabled } = this._value;\n\n return {\n username_header: usernameHeader,\n enabled,\n };\n }\n\n static fromJSON(value: HTTPHeaderAuthConfigJSON) {\n const { username_header: usernameHeader, enabled } = value;\n\n return HTTPHeaderAuthConfig.create(usernameHeader, enabled);\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 usernameHeader(value: $PropertyType) {\n return new Builder(this.value.set('usernameHeader', value));\n }\n\n enabled(value: $PropertyType) {\n return new Builder(this.value.set('enabled', value));\n }\n\n build() {\n const { usernameHeader, enabled } = this.value.toObject();\n\n return new HTTPHeaderAuthConfig(usernameHeader, enabled);\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';\n\nimport HTTPHeaderAuthConfigActions from 'actions/authentication/HTTPHeaderAuthConfigActions';\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 type { HTTPHeaderAuthConfigJSON } from 'logic/authentication/HTTPHeaderAuthConfig';\nimport HTTPHeaderAuthConfig from 'logic/authentication/HTTPHeaderAuthConfig';\n\nconst HTTPHeaderAuthConfigStore: Store<{}> = singletonStore(\n 'HTTPHeaderAuthConfig',\n () => Reflux.createStore({\n listenables: [HTTPHeaderAuthConfigActions],\n\n load(): Promise {\n const url = qualifyUrl(ApiRoutes.HTTPHeaderAuthConfigController.load().url);\n const promise = fetch('GET', url).then(HTTPHeaderAuthConfig.fromJSON);\n\n HTTPHeaderAuthConfigActions.load.promise(promise);\n\n return promise;\n },\n\n update(payload: HTTPHeaderAuthConfigJSON): Promise {\n const url = qualifyUrl(ApiRoutes.HTTPHeaderAuthConfigController.update().url);\n const promise = fetch('PUT', url, payload).then(HTTPHeaderAuthConfig.fromJSON);\n\n HTTPHeaderAuthConfigActions.update.promise(promise);\n\n return promise;\n },\n }),\n);\n\nexport { HTTPHeaderAuthConfigActions, HTTPHeaderAuthConfigStore };\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 { HTTPHeaderAuthConfigActions } from 'stores/authentication/HTTPHeaderAuthConfigStore';\n\nimport notifyingAction from '../notifyingAction';\n\nconst load = notifyingAction({\n action: HTTPHeaderAuthConfigActions.load,\n error: (error) => ({\n message: `Loading HTTP header authentication config failed with status: ${error}`,\n }),\n});\n\nconst update = notifyingAction({\n action: HTTPHeaderAuthConfigActions.update,\n success: () => ({\n message: 'Successfully updated HTTP header authentication config',\n }),\n error: (error) => ({\n message: `Updating HTTP header authentication config failed with status: ${error}`,\n }),\n});\n\nexport default {\n load,\n update,\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 { useState, useEffect } from 'react';\nimport { Formik, Form } from 'formik';\n\nimport Routes from 'routing/Routes';\nimport type HTTPHeaderAuthConfig from 'logic/authentication/HTTPHeaderAuthConfig';\nimport HTTPHeaderAuthConfigDomain from 'domainActions/authentication/HTTPHeaderAuthConfigDomain';\nimport { Input, Button, Col, Row, Alert } from 'components/bootstrap';\nimport { FormikFormGroup, ErrorAlert, Spinner } from 'components/common';\nimport SectionComponent from 'components/common/Section/SectionComponent';\nimport useHistory from 'routing/useHistory';\nimport type { HTTPHeaderAuthConfigJSON } from 'logic/authentication/HTTPHeaderAuthConfig';\nimport { getPathnameWithoutId } from 'util/URLUtils';\nimport useSendTelemetry from 'logic/telemetry/useSendTelemetry';\nimport useLocation from 'routing/useLocation';\nimport { TELEMETRY_EVENT_TYPE } from 'logic/telemetry/Constants';\n\nconst HTTPHeaderAuthConfigSection = () => {\n const [submitError, setSubmitError] = useState();\n const [loadedConfig, setLoadedConfig] = useState();\n const sectionTitle = 'Trusted Header Authentication';\n const history = useHistory();\n const { pathname } = useLocation();\n const sendTelemetry = useSendTelemetry();\n\n const _onSubmit = (data: HTTPHeaderAuthConfigJSON) => {\n sendTelemetry(TELEMETRY_EVENT_TYPE.AUTHENTICATION.CONFIG_UPDATED, {\n app_pathname: getPathnameWithoutId(pathname),\n app_section: 'authenticator-trustedheader',\n app_action_value: 'config-update',\n });\n\n setSubmitError(undefined);\n\n return HTTPHeaderAuthConfigDomain.update(data).then(() => {\n history.push(Routes.SYSTEM.AUTHENTICATION.AUTHENTICATORS.SHOW);\n }).catch((error) => {\n setSubmitError(error.additional?.res?.text);\n });\n };\n\n useEffect(() => {\n HTTPHeaderAuthConfigDomain.load().then(setLoadedConfig);\n }, []);\n\n if (!loadedConfig) {\n return (\n \n \n \n );\n }\n\n return (\n \n This authenticator enables you to login a user, based on a HTTP header without further interaction.
\n \n {({ isSubmitting, isValid }) => (\n \n )}\n \n \n );\n};\n\nexport default HTTPHeaderAuthConfigSection;\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 AuthenticatorsEdit from './AuthenticatorsEdit';\n\nexport default AuthenticatorsEdit;\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 SectionGrid from 'components/common/Section/SectionGrid';\n\nimport HTTPHeaderAuthConfigSection from './HTTPHeaderAuthConfigSection';\n\nconst AuthenticatorsDetails = () => (\n \n \n \n);\n\nexport default AuthenticatorsDetails;\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 React from 'react';\n\nimport AuthenticatorActionLinks from 'components/authentication/AuthenticatorActionLinks';\nimport AuthenticatorsEdit from 'components/authentication/AuthenticatorsEdit';\nimport { PageHeader, DocumentTitle } from 'components/common';\nimport DocsHelper from 'util/DocsHelper';\nimport AuthenticationPageNavigation from 'components/authentication/AuthenticationPageNavigation';\n\nconst AuthenticatorsEditPage = () => (\n \n \n }\n documentationLink={{\n title: 'Authenticators documentation',\n path: DocsHelper.PAGES.AUTHENTICATORS,\n }}>\n \n Configure the trusted header authentication.\n \n \n\n \n \n);\n\nexport default AuthenticatorsEditPage;\n"],"names":["NAV_ITEMS","Container","StyledButton","theme","items","path","title","permissions","exactPathMatch","singleton","HTTPHeaderAuthConfig","usernameHeader","enabled","Builder","value","HTTPHeaderAuthConfigStore","url","ApiRoutes","promise","payload","load","notifyingAction","error","update","submitError","setSubmitError","loadedConfig","setLoadedConfig","sectionTitle","history","useHistory","pathname","useLocation","sendTelemetry","useSendTelemetry","_onSubmit","data","HTTPHeaderAuthConfigDomain","Routes","SectionComponent","isSubmitting","isValid","SectionGrid","AuthenticationPageNavigation","AuthenticatorActionLinks","DocsHelper"],"sourceRoot":""}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy