{"version":3,"sources":["login/components/BearerMessage.tsx","helpers/router.ts","helpers/redirect.ts","login/login.tsx","status/statusmessages.tsx","img/healthy.svg","img/unhealthy.svg","img/unknown.svg","status/components/StatusReport.tsx","status/components/LogList.tsx","status/status.tsx","img/1passwordlock.svg","setup/setup.tsx","install/install.tsx","NotFoundPage.tsx","img/scim-bridge.svg","App.tsx","index.tsx"],"names":["BearerMessage","errorMsg","notifyMsg","id","className","GetAuthHeaders","bearer","Authorization","GetBridgePathNoAuth","path","controller","AbortController","setTimeout","abort","fetch","method","signal","GetBridgePath","headers","GetAddressPrefix","domain","window","location","port","protocol","useRedirect","useState","loading","sessionFileFound","state","setState","fetchAuth","url","a","json","useEffect","current","buildCheckAuthRequest","hostname","data","console","error","Login","token","setToken","setErrorMsg","setNotifyMsg","URLSearchParams","search","get","replace","onSubmit","event","preventDefault","then","response","ok","sessionStorage","setItem","sessiontoken","log","href","catch","err","status","message","res","detail","htmlFor","type","value","onChange","e","currentTarget","alt","unknown","unhealthy","healthy","StatusReport","healthIcon","statusHealth","statusName","statusText","src","LogList","logs","sessionToken","errorLog","setErrorLog","length","map","onClick","stopPropagation","convert","blob","content","Blob","URL","createObjectURL","document","createElement","body","appendChild","download","click","revokeObjectURL","removeChild","downLoadLogFile","Status","history","useHistory","getItem","statusMessage","deploymentHealth","setDeploymentHealth","deploymentText","setDeploymentText","connectionHealth","setConnectionHealth","connectionText","setConnectionText","authenticationHealth","setAuthenticationHealth","authenticationText","setAuthenticationText","scimHealth","setScimHealth","scimText","setScimText","provisionHealth","setProvisionHealth","provisionText","setProvisionText","redisHealth","setRedisHealth","redisText","setRedisText","setLogs","formatComponentReport","cr","time","Date","now","getHealthReport","report","reports","forEach","source","push","pathname","stateStatus","connection","reason","session","getStatusReport","generateLogList","removeItem","Setup","setDomain","failedVerify","setFailedVerify","configureDomain","setConfigureDomain","connectVerified","setConnectVerified","dnsStatus","setDnsStatus","dnsDescription","setDnsDescription","match","has","currentDomain","buildVerifyRequest","getTLSCert","Error","getPath","text","getRoutablePath","oldPath","newPath","retries","Promise","resolve","any","testDomain","regexp","newDomain","target","lock","Install","addressPrefix","installAddress","scimsession","hash","JSON","stringify","PostBridgePath","pingAddress","pingBridge","NotFoundPage","App","scim_bridge","exact","component","ReactDOM","render","StrictMode","getElementById"],"mappings":"4TA+BeA,EAxBO,SAAC,GAGkB,IAFvCC,EAEsC,EAFtCA,SACAC,EACsC,EADtCA,UAEA,OAAID,EAEA,qBAAKE,GAAG,sBAAsBC,UAAU,MAAxC,SACE,oBAAGD,GAAG,uBAAuBC,UAAU,WAAvC,UACG,IACAH,OAML,qBAAKE,GAAG,sBAAsBC,UAAU,MAAxC,SACE,oBAAGD,GAAG,uBAAuBC,UAAU,eAAvC,UACG,IACAF,QCvBJ,SAASG,EAAeC,GAI9B,MAHgB,CACfC,cAAe,UAAYD,GAKtB,SAASE,EAAoBC,GACnC,IAAMC,EAAa,IAAIC,gBAGvB,OAFAC,YAAW,kBAAMF,EAAWG,UAAS,KAE9BC,MAAML,EAAM,CAAEM,OAAQ,MAAOC,OAAQN,EAAWM,SAGjD,SAASC,EAAcR,GAA+C,IAAjCH,EAAgC,uDAAvB,GAC9CI,EAAa,IAAIC,gBAGvB,OAFAC,YAAW,kBAAMF,EAAWG,UAAS,KAE9BC,MAAML,EAAM,CAClBM,OAAQ,MACRG,QAASb,EAAeC,GACxBU,OAAQN,EAAWM,SAmBd,SAASG,EAAiBC,GAChC,MAAe,cAAXA,GAAqC,cAAXA,EACA,KAAzBC,OAAOC,SAASC,KACZ,UAAYH,EAAS,IAAMC,OAAOC,SAASC,KAE5C,UAAYH,EAEbC,OAAOC,SAASE,SAAW,KAAOJ,E,2BCzC7BK,EAAc,WAC1B,MAA0BC,mBAAgB,CACzCC,SAAS,EACTC,kBAAkB,IAFnB,mBAAOC,EAAP,KAAcC,EAAd,KAaMC,EAAS,uCAAG,WAAOC,GAAP,SAAAC,EAAA,sEACJnB,MAAMkB,GADF,8BACQE,OADR,mFAAH,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UAAU,YAAnB,UACE,2CACA,gCACG,IACD,mBAAGA,UAAU,OAAb,gEAGA,wBACEA,UAAU,cACVuF,QAAS,kBAAOtE,OAAOC,SAASuC,KAAO,cAFzC,kBAKU,YCjBH,G,MAAA,IAA0B,yCCmC1B2I,EAzBH,WACV,OACE,cAAC,IAAD,UACE,sBAAKrM,GAAG,wBAAR,UACE,qBAAKA,GAAG,UAAR,SACE,qBACEuE,IAAI,mBACJvE,GAAG,mBACHC,UAAU,OACV+E,IAAKsH,MAGT,eAAC,IAAD,WACE,cAAC,IAAD,CAAOhM,KAAK,OAAOiM,OAAK,EAACC,UAAWjK,IACpC,cAAC,IAAD,CAAOjC,KAAK,aAAaiM,OAAK,EAACC,UAAWjK,IAC1C,cAAC,IAAD,CAAOjC,KAAK,cAAciM,OAAK,EAACC,UAAW/F,IAC3C,cAAC,IAAD,CAAOnG,KAAK,aAAakM,UAAW9C,IACpC,cAAC,IAAD,CAAOpJ,KAAK,eAAekM,UAAWd,IACtC,cAAC,IAAD,CAAOpL,KAAK,IAAIkM,UAAWJ,aCvBrCK,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,EAAD,MAEF3G,SAAS4G,eAAe,W","file":"static/js/main.60e69613.chunk.js","sourcesContent":["import React, { ReactElement } from \"react\";\n\ninterface BearerMessageProps {\n errorMsg: string;\n notifyMsg: string;\n}\n\nconst BearerMessage = ({\n errorMsg,\n notifyMsg,\n}: BearerMessageProps): ReactElement => {\n if (errorMsg) {\n return (\n
\n

\n {\" \"}\n {errorMsg}\n

\n
\n );\n } else {\n return (\n
\n

\n {\" \"}\n {notifyMsg}\n

\n
\n );\n }\n};\nexport default BearerMessage;\n","/* general helpers */\n\nexport function GetAuthHeaders(bearer: string): Record {\n\tconst headers = {\n\t\tAuthorization: \"Bearer \" + bearer,\n\t};\n\treturn headers;\n}\n\nexport function GetBridgePathNoAuth(path: string): Promise {\n\tconst controller = new AbortController();\n\tsetTimeout(() => controller.abort(), 5000);\n\n\treturn fetch(path, { method: \"GET\", signal: controller.signal });\n}\n\nexport function GetBridgePath(path: string, bearer = \"\"): Promise {\n\tconst controller = new AbortController();\n\tsetTimeout(() => controller.abort(), 5000);\n\n\treturn fetch(path, {\n\t\tmethod: \"GET\",\n\t\theaders: GetAuthHeaders(bearer),\n\t\tsignal: controller.signal,\n\t});\n}\n\nexport function PostBridgePath(\n\tpath: string,\n\tscimsession = \"\",\n): Promise {\n\tconst controller = new AbortController();\n\tsetTimeout(() => controller.abort(), 3000);\n\n\treturn fetch(path, {\n\t\theaders: { \"Content-Type\": \"application/json; charset=UTF-8\" },\n\t\tmethod: \"POST\",\n\t\tbody: JSON.stringify({ session: scimsession }),\n\t\tsignal: controller.signal,\n\t});\n}\n\nexport function GetAddressPrefix(domain: string): string {\n\tif (domain === \"localhost\" || domain === \"127.0.0.1\") {\n\t\tif (window.location.port !== \"\") {\n\t\t\treturn \"http://\" + domain + \":\" + window.location.port;\n\t\t}\n\t\treturn \"http://\" + domain;\n\t}\n\treturn window.location.protocol + \"//\" + domain;\n}\n\nexport interface ScimResponse {\n\tdetail: string;\n\tschemas: Array;\n}\n","import { useEffect, useState } from \"react\";\nimport { GetAddressPrefix } from \"./router\";\n\ninterface State {\n\tloading: boolean;\n\tsessionFileFound: boolean;\n}\n\nexport const useRedirect = (): State => {\n\tconst [state, setState] = useState({\n\t\tloading: true,\n\t\tsessionFileFound: false,\n\t});\n\tinterface sessionFileFoundRes {\n\t\tsessionFileFound: boolean;\n\t}\n\n\tconst buildCheckAuthRequest = (current: string): string => {\n\t\tconst addressPrefix = GetAddressPrefix(current);\n\t\treturn addressPrefix + \"/check\";\n\t};\n\n\tconst fetchAuth = async (url: string): Promise =>\n\t\tawait (await fetch(url)).json();\n\n\tuseEffect(() => {\n\t\tconst current = window.location.hostname;\n\t\tconst url = buildCheckAuthRequest(current);\n\n\t\tvoid (async () => {\n\t\t\ttry {\n\t\t\t\tconst data = await fetchAuth(url);\n\n\t\t\t\tif (!data.sessionFileFound) {\n\t\t\t\t\tsetState({ loading: false, sessionFileFound: false });\n\t\t\t\t}\n\n\t\t\t\tif (data.sessionFileFound) {\n\t\t\t\t\tsetState({ loading: false, sessionFileFound: true });\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(\"Failed to check for scimsession file: \", error);\n\t\t\t\tsetState({ loading: false, sessionFileFound: false });\n\t\t\t}\n\t\t})();\n\t}, []);\n\n\treturn state;\n};\n","import React, { useEffect, useState } from \"react\";\nimport \"./login.css\";\nimport BearerMessage from \"./components/BearerMessage\";\nimport { ScimResponse, GetBridgePath } from \"../helpers/router\";\nimport { useRedirect } from \"../helpers/redirect\";\n\nconst Login = (): JSX.Element => {\n const state = useRedirect();\n const [token, setToken] = useState(\"\");\n const [errorMsg, setErrorMsg] = useState(\"\");\n const [notifyMsg, setNotifyMsg] = useState(\"\");\n\n useEffect(() => {\n const params = new URLSearchParams(window.location.search);\n const install = params.get(\"install\");\n if (install) {\n setNotifyMsg(\n \"'scimsession' file installed. Input your Bearer Token to continue.\"\n );\n }\n }, []);\n\n const verify = (event: React.SyntheticEvent) => {\n event.preventDefault();\n\n GetBridgePath(\"/login/session\", token)\n .then((response) => {\n if (!response.ok) {\n throw response;\n }\n return response.json();\n })\n .then((json) => {\n window.sessionStorage.setItem(\"session-token\", json.sessiontoken);\n console.log(\"redirecting\");\n window.location.replace(\"/app/status\");\n setTimeout(() => {\n window.location.href = \"/app/status\";\n }, 1000);\n })\n .catch((err) => {\n console.log(\"bearer token error\");\n if (err.status === 403) {\n return err\n .json()\n .then((message: Response) => {\n return message;\n })\n .then((res: ScimResponse) => setErrorMsg(res.detail));\n } else {\n setErrorMsg(\"Incorrect bearer token.\");\n return;\n }\n });\n };\n\n if (state.loading) {\n return <>;\n }\n\n if (!state.sessionFileFound) {\n window.location.replace(\"/app/setup\");\n }\n\n return (\n
\n

1Password SCIM Bridge Login

\n
\n
\n
\n

Enter your OAuth bearer token:

\n
\n \n setToken(e.currentTarget.value)}\n id=\"bearer-token-field\"\n alt=\"Password\"\n />\n \n \n
\n
\n {(errorMsg || notifyMsg) && (\n \n )}\n
\n );\n};\n\nexport default Login;\n","export const genDeployment = \"Generating deployment report...\";\nexport const genConnection = \"Generating connection report...\";\nexport const genAuth = \"Generating authentication report...\";\nexport const genScim = \"Generating SCIM Server status report...\";\nexport const genProvision = \"Generating Confirmation Watcher status report...\";\nexport const genRedis = \"Generating redis server status report...\";\n\nexport const error = \"Error\";\nexport const unsuccessfulDeployment =\n \"Bearer Token missing. Check that your input is correct.\";\nexport const unsuccessfulConnection =\n \"Couldn't connect to 1Password. Confirm the SCIM bridge network settings and try again.\";\nexport const unsuccessfulAuth =\n \"Couldn't authenticate. Make sure the Provision Manager account is an active user. If the Provision Manager's credentials have changed, generate a new 'scimsession' file and Bearer Token.\";\nexport const unknown = \"unknown\";\nexport const unhealthy = \"unhealthy\";\nexport const healthy = \"healthy\";\n\nexport const successfulDeployment = \"Deployment successful.\";\nexport const successfulConnection = \"Connection to 1Password successful.\";\nexport const successfulAuth = \"Authentication successful\";\n","export default __webpack_public_path__ + \"static/media/healthy.30f422d1.svg\";","export default __webpack_public_path__ + \"static/media/unhealthy.51ca8f3d.svg\";","export default __webpack_public_path__ + \"static/media/unknown.3d30bad1.svg\";","import React, { ReactElement } from \"react\";\nimport healthy from \"../../img/healthy.svg\";\nimport unhealthy from \"../../img/unhealthy.svg\";\nimport unknown from \"../../img/unknown.svg\";\n\ninterface StatusReportProps {\n statusHealth: string;\n statusName: string;\n statusText: string;\n}\n\nconst StatusReport = ({\n statusHealth,\n statusName,\n statusText,\n}: StatusReportProps): ReactElement => {\n let healthIcon;\n\n switch (statusHealth) {\n case \"healthy\":\n healthIcon = (\n \"healthy\"\n );\n\n break;\n case \"unknown\":\n healthIcon = \"unknown\";\n break;\n case \"unhealthy\":\n healthIcon = (\n \"unhealthy\"\n );\n break;\n\n default:\n healthIcon = null;\n }\n\n return (\n
\n
{healthIcon}
\n
\n

{statusName}

\n

{statusText}

\n
\n
\n );\n};\n\nexport default StatusReport;\n","import React, { ReactElement } from \"react\";\nimport { useState } from \"react\";\nimport { GetBridgePath } from \"../../helpers/router\";\ninterface LogProps {\n logs: string[];\n sessionToken: string;\n}\n\nconst LogList = ({ logs, sessionToken }: LogProps): ReactElement => {\n const [errorLog, setErrorLog] = useState(false);\n\n const downLoadLogFile = (event: React.SyntheticEvent, log: string) => {\n event.stopPropagation();\n event.preventDefault();\n GetBridgePath(\"/status/logs/\" + log, sessionToken)\n .then((convert) => {\n if (!convert.ok) {\n throw convert;\n }\n return convert.blob();\n })\n .then(function (content) {\n const blob = new Blob([content], { type: \"text/plain\" });\n const url = window.URL.createObjectURL(blob);\n const a = document.createElement(\"a\");\n document.body.appendChild(a);\n a.href = url;\n a.download = log;\n a.click();\n window.URL.revokeObjectURL(url);\n document.body.removeChild(a);\n })\n .catch((err) => {\n console.log(\"could not get log files\");\n if (err.status === 401) {\n window.location.href = \"/app\";\n } else if (err.status === 500) {\n setErrorLog(true);\n }\n });\n };\n\n return (\n
\n
\n

Logs

\n {logs === null || logs.length === 0 ? (\n

No Logs Available

\n ) : (\n

Available Log Files

\n )}\n {!errorLog ? (\n

\n {logs.map((log) => (\n

  • \n \n
  • \n ))}\n

    \n ) : (\n

    \n Could not retrieve log files. Make sure redis is running and try\n again.\n

    \n )}\n
    \n
    \n );\n};\n\nexport default LogList;\n","import React, { useState } from \"react\";\nimport { useEffect } from \"react\";\nimport \"./status.css\";\nimport * as statusMessage from \"./statusmessages\";\n\nimport { ScimResponse, GetBridgePath } from \"../helpers/router\";\nimport { useHistory } from \"react-router\";\n\nimport StatusReport from \"./components/StatusReport\";\nimport LogList from \"./components/LogList\";\nimport { useRedirect } from \"../helpers/redirect\";\n\ninterface Report {\n reports: ComponentReport[];\n}\n\nexport interface ComponentReport {\n source: string;\n time: Date;\n expires: Date;\n state: string;\n remaining?: string;\n}\n\ninterface ConnectionReport {\n connection: boolean;\n session: boolean;\n reason?: string;\n}\n\nconst Status = (): JSX.Element => {\n const state = useRedirect();\n\n const history = useHistory();\n\n const [sessionToken, setToken] = useState(\n sessionStorage.getItem(\"session-token\") || \"\"\n );\n\n const [deploymentHealth, setDeploymentHealth] = useState(\n statusMessage.unknown\n );\n const [deploymentText, setDeploymentText] = useState(\n statusMessage.genDeployment\n );\n\n const [connectionHealth, setConnectionHealth] = useState(\n statusMessage.unknown\n );\n const [connectionText, setConnectionText] = useState(\n statusMessage.genConnection\n );\n\n const [authenticationHealth, setAuthenticationHealth] = useState(\n statusMessage.unknown\n );\n const [authenticationText, setAuthenticationText] = useState(\n statusMessage.genAuth\n );\n\n const [scimHealth, setScimHealth] = useState(statusMessage.unknown);\n const [scimText, setScimText] = useState(statusMessage.genScim);\n\n const [provisionHealth, setProvisionHealth] = useState(statusMessage.unknown);\n const [provisionText, setProvisionText] = useState(\n statusMessage.genProvision\n );\n\n const [redisHealth, setRedisHealth] = useState(statusMessage.unknown);\n const [redisText, setRedisText] = useState(statusMessage.genRedis);\n const [logs, setLogs] = useState([]);\n\n const checkSessionToken = (): boolean => {\n if (sessionToken === \"\") {\n console.log(\"failed to get session token\");\n\n setDeploymentHealth(statusMessage.unhealthy);\n setDeploymentText(statusMessage.unsuccessfulDeployment);\n setConnectionHealth(statusMessage.unhealthy);\n setConnectionText(statusMessage.error);\n setAuthenticationHealth(statusMessage.unhealthy);\n setAuthenticationText(statusMessage.error);\n setScimHealth(statusMessage.unhealthy);\n setScimText(statusMessage.error);\n setProvisionHealth(statusMessage.unhealthy);\n setProvisionText(statusMessage.error);\n setRedisHealth(statusMessage.unhealthy);\n setRedisText(statusMessage.error);\n\n return false;\n }\n setDeploymentHealth(statusMessage.healthy);\n setDeploymentText(statusMessage.successfulDeployment);\n return true;\n };\n\n function formatComponentReport(cr: ComponentReport): string {\n const time = cr.time === null ? Date.now() : cr.time;\n return `${cr.state} as of ${time}`;\n }\n\n const stateHealth = (report: Report): void => {\n report.reports.forEach((report: ComponentReport) => {\n if (report.source === \"SCIMServer\") {\n setScimHealth(report.state);\n setScimText(formatComponentReport(report));\n }\n\n if (report.source === \"ConfirmationWatcher\") {\n setProvisionHealth(report.state);\n setProvisionText(formatComponentReport(report));\n }\n\n if (report.source === \"RedisCache\") {\n setRedisHealth(report.state);\n setRedisText(formatComponentReport(report));\n }\n });\n };\n\n const getHealthReport = async (): Promise => {\n GetBridgePath(\"/status/health\", sessionToken)\n .then((report) => {\n if (!report.ok) {\n throw report;\n }\n return report.json();\n })\n .then((json) => {\n stateHealth(json);\n })\n .catch((err) => {\n console.log(\"scim health error\");\n if (err.status === 401) {\n history.push({\n pathname: \"/app\",\n });\n } else if (err.status === 500) {\n // this will be returned if b5 auth failed\n console.log(\"unable to retrieve report\");\n }\n });\n };\n\n const stateStatus = (status: ConnectionReport): void => {\n switch (status.connection) {\n case true:\n setConnectionHealth(statusMessage.healthy);\n setConnectionText(statusMessage.successfulConnection);\n break;\n case false:\n setConnectionHealth(statusMessage.unhealthy);\n if (status.reason) {\n setConnectionText(status.reason);\n } else {\n setConnectionText(statusMessage.unsuccessfulConnection);\n }\n break;\n }\n\n switch (status.session) {\n case true:\n setAuthenticationHealth(statusMessage.healthy);\n setAuthenticationText(statusMessage.successfulAuth);\n break;\n case false:\n setAuthenticationHealth(statusMessage.unhealthy);\n setAuthenticationText(statusMessage.unsuccessfulAuth);\n break;\n }\n };\n\n //status prop\n const getStatusReport = async (): Promise => {\n GetBridgePath(\"/status/info\", sessionToken)\n .then((response) => {\n if (!response.ok) {\n throw response;\n }\n return response.json();\n })\n .then((json) => {\n console.log(json);\n stateStatus(json);\n })\n .catch((err) => {\n console.log(\"scim status error\");\n\n setScimHealth(statusMessage.unhealthy);\n setScimText(statusMessage.error);\n setProvisionHealth(statusMessage.unhealthy);\n setProvisionText(statusMessage.error);\n setRedisHealth(statusMessage.unhealthy);\n setRedisText(statusMessage.error);\n\n if (err.status === 401) {\n history.push({\n pathname: \"/app\",\n });\n } else if (err.status === 403) {\n // for 403 errors like Firewall\n\n return err\n .json()\n .then((message: Response) => {\n return message;\n })\n .then((res: ScimResponse) => {\n stateStatus({\n connection: false,\n session: false,\n reason: res.detail,\n });\n });\n } else if (err.status === 500) {\n // this will be returned if b5 auth failed\n stateStatus({ connection: true, session: false });\n } else {\n stateStatus({ connection: false, session: false });\n }\n return;\n });\n };\n\n const generateLogList = async (): Promise => {\n GetBridgePath(\"/status/logs\", sessionToken)\n .then((logs) => {\n if (!logs.ok) {\n throw logs;\n }\n return logs.json();\n })\n .then((json) => {\n setLogs(json);\n })\n .catch((err) => {\n console.log(\"could not retrieve logs\");\n setLogs([]);\n if (err.status === 401) {\n history.push({\n pathname: \"/app\",\n });\n }\n });\n };\n\n const logOut = (event: React.SyntheticEvent) => {\n event.preventDefault();\n event.stopPropagation();\n\n console.log(\"clearing session token\");\n\n // clears the session token from memory\n sessionStorage.removeItem(\"session-token\");\n setToken(\"\");\n\n history.push({\n pathname: \"/app\",\n });\n };\n\n useEffect(() => {\n console.log(\"getting reports\");\n\n if (checkSessionToken()) {\n setTimeout(() => {\n getHealthReport();\n generateLogList();\n getStatusReport();\n }, 1000);\n }\n\n return;\n // Here we truly only want this to run once.\n // eslint-disable-next-line\n }, []);\n\n if (state.loading) {\n return <>;\n }\n\n if (!state.sessionFileFound) {\n window.location.replace(\"/app/setup\");\n }\n\n return (\n
    \n

    1Password SCIM Bridge Status

    \n \n \n \n \n \n \n \n\n
    \n
    \n logOut(e)}\n className=\"big-button\"\n >\n Log out\n \n \n
    \n
    \n );\n};\n\nexport default Status;\n","export default __webpack_public_path__ + \"static/media/1passwordlock.faf49056.svg\";","import React, { useEffect, useState } from \"react\";\nimport \"./setup.css\";\nimport { GetBridgePathNoAuth } from \"../helpers/router\";\nimport healthy from \"../img/healthy.svg\";\nimport lock from \"../img/1passwordlock.svg\";\nimport { useRedirect } from \"../helpers/redirect\";\n\nconst Setup = (): JSX.Element => {\n const [domain, setDomain] = useState(window.location.hostname);\n const [failedVerify, setFailedVerify] = useState(\"\");\n const [configureDomain, setConfigureDomain] = useState(\"\");\n const [connectVerified, setConnectVerified] = useState(false);\n const [dnsStatus, setDnsStatus] = useState(\"unknown\");\n const [dnsDescription, setDnsDescription] = useState(\"\");\n\n const state = useRedirect();\n\n useEffect(() => {\n\n // regexp for detecting IPv4 addresses\n const ipv4 = '(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}';\n if ((window.location.hostname).match(ipv4)) {\n setDnsDescription(\"Configure a DNS record for your SCIM bridge, and replace the IP address with your domain name:\");\n } else {\n setDnsDescription(\"Configure a DNS record for your SCIM bridge, and confirm the domain name below is correct:\");\n }\n\n const urlParams = new URLSearchParams(window.location.search);\n if (urlParams.has(\"verified\") || window.location.protocol === \"https:\") {\n setFailedVerify(\"\");\n\n const currentDomain =\n window.location.hostname + \" configuration successful.\";\n console.log(currentDomain);\n setDnsStatus(\"checked healthy\");\n setConfigureDomain(currentDomain);\n setConnectVerified(true);\n }\n }, []);\n\n const buildVerifyRequest = (current: string, domain: string): string => {\n const verifyAddress = window.location.protocol + \"//\" + current + \"/verify\";\n return verifyAddress + \"?domain=\" + domain;\n };\n\n const getTLSCert = async (domain: string): Promise => {\n const current = window.location.hostname;\n const url = buildVerifyRequest(current, domain);\n\n try {\n const resp = await fetch(url);\n if (resp.status > 299) {\n throw new Error(\"domain could not be verified\");\n }\n } catch (err) {\n throw new Error(\"getTLSCert error: \" + err);\n }\n };\n\n const getPath = async (path: string): Promise => {\n try {\n const response = await GetBridgePathNoAuth(path + \"/health\");\n if (!response.ok) {\n throw new Error(\"Request failed: \" + response.text);\n } else {\n return path;\n }\n } catch (err) {\n throw new Error(\"Failed to get '\" + path + \"': \" + err);\n }\n };\n\n // getRoutablePath gets a valid URI that can be resolved.\n // Guarantees: if this function returns, it is the new valid path to redirect to. Otherwise an error is thrown.\n const getRoutablePath = async (\n oldPath: string,\n newPath: string,\n retries: number\n ): Promise => {\n try {\n if (oldPath === \"http://localhost\") {\n return await Promise.resolve(getPath(newPath));\n }\n const path = await Promise.any([getPath(oldPath), getPath(newPath)]);\n return path;\n } catch (err) {\n if (retries === 0) {\n throw new Error(\"Out of retries: \" + err);\n }\n console.log(\"1Password SCIM Bridge TLS upgrade not ready. Retrying...\");\n\n // pause between tries\n await new Promise((resolve) => setTimeout(resolve, 1000));\n\n return getRoutablePath(oldPath, newPath, retries - 1);\n }\n };\n\n const testDomain = async (event: React.SyntheticEvent) => {\n event.preventDefault();\n event.stopPropagation();\n\n const regexp = /(^\\w+:|^)\\/\\/|(\\/)/g;\n\n const newDomain = domain.replace(regexp, \"\");\n\n if (newDomain === \"localhost\" || newDomain === \"127.0.0.1\") {\n setConnectVerified(true);\n setDnsStatus(\"checked healthy\");\n window.location.replace(\"/app/setup?verified=true\");\n return;\n }\n\n const oldPath = \"http://\" + window.location.hostname;\n const newPath = \"https://\" + newDomain;\n\n try {\n await getTLSCert(newDomain);\n setFailedVerify(\"\");\n\n setConfigureDomain(\"Verifying \" + newDomain + \"...\");\n } catch (err) {\n console.log(\"getTLSCert error: \" + err);\n setFailedVerify(\n \"Couldn't verify domain. Check your configuration and try again. Ensure the DNS record has had time to propagate, and that port 443 is open on your firewall.\"\n );\n return;\n }\n\n try {\n const path = await getRoutablePath(oldPath, newPath, 35);\n console.log(\"PATH\", path, newPath);\n if (path === newPath) {\n window.location.replace(path);\n } else {\n setFailedVerify(\n \"The 1Password SCIM bridge isn’t responding. Make sure the bridge is still working and available on the network.\"\n );\n setConfigureDomain(\"\");\n }\n } catch (err) {\n console.log(\"Failed to resolve TLS upgrade: \" + err);\n setFailedVerify(\n \"LetsEncrypt challenge attempt failed. Verify that your SCIM bridge's domain name has not been rate limited.\"\n );\n setConfigureDomain(\"\");\n }\n };\n\n if (state.loading) {\n return <>;\n }\n\n if (state.sessionFileFound) {\n window.location.replace(\"/app/login\");\n }\n\n\n return (\n
    \n

    1Password SCIM Bridge Setup

    \n
    \n
    \n \n
    \n
    \n

    Deploy

    \n

    Deployment successful.

    \n
    \n
    \n
    \n
    \n \n
    \n
    \n

    Configure domain

    \n {!configureDomain && (\n
    \n

    \n {dnsDescription}\n

    \n
    \n setDomain(e.currentTarget.value)}\n />\n \n \n

    \n The above domain will be sent to\n the{\" \"}\n \n Let's Encrypt\n {\" \"}\n service for the purposes of acquiring a TLS certificate for your SCIM bridge.

    \n\n If successful, you will be automatically redirected to a TLS-secured connection.\n

    \n
    \n )}\n {configureDomain && (\n

    {configureDomain}

    \n )}\n {failedVerify && (\n

    \n {failedVerify}\n

    \n )}\n
    \n
    \n
    \n
    \n \n
    \n
    \n

    Connect account

    \n {connectVerified && (\n
    \n {\" \"}\n

    Sign in to connect with 1Password:

    \n window.location.replace(\"/signinredirect\")}\n >\n \"lock\"\n Sign in with 1Password\n {\" \"}\n
    \n )}\n {!connectVerified && (\n

    Domain configuration required.

    \n )}\n
    \n
    \n
    \n );\n};\n\nexport default Setup;\n","import { useEffect } from \"react\";\nimport \"../setup/setup.css\";\nimport {\n GetBridgePath,\n PostBridgePath,\n GetAddressPrefix,\n} from \"../helpers/router\";\nimport { useRedirect } from \"../helpers/redirect\";\n\nconst Install = (): JSX.Element => {\n const state = useRedirect();\n\n useEffect(() => {\n const domain = window.location.hostname;\n const addressPrefix = GetAddressPrefix(domain);\n const installAddress = addressPrefix + \"/install\";\n\n if (!domain) {\n console.error(\"unable to determine domain\");\n window.location.href = \"/app\";\n return;\n }\n\n const params = new URLSearchParams(window.location.search);\n const scimsession =\n params.get(\"scimsession\") || window.location.hash.replace(\"#\", \"\");\n\n if (scimsession.length === 0) {\n console.error(\"install failed, scimsession provided is empty\");\n return;\n }\n\n try {\n PostBridgePath(installAddress, scimsession);\n } catch (err) {\n console.error(\"install call failed: \" + err);\n return;\n }\n\n const pingAddress = addressPrefix + \"/ping\";\n\n const pingBridge = async () => {\n try {\n await GetBridgePath(pingAddress);\n console.log(\"ping succeeded, redirecting\");\n window.location.replace(\"/app/login?install=1\");\n } catch (err) {\n console.error(\"ping failed: \" + err);\n }\n };\n\n setTimeout(pingBridge, 2000);\n }, []);\n\n if (state.loading) {\n return <>;\n }\n\n if (state.sessionFileFound) {\n window.location.replace(\"/app/login\");\n }\n\n return (\n
    \n

    1Password SCIM Bridge Setup

    \n\n

    Installing...

    \n
    \n

    \n You should be redirected shortly. If not, try clicking{\" \"}\n this link.\n

    \n
    \n
    \n );\n};\n\nexport default Install;\n","import { ReactElement } from \"react\";\nimport \"./notfound.css\";\n\nconst NotFoundPage = (): ReactElement => {\n return (\n
    \n

    Not Found

    \n
    \n {\" \"}\n

    \n Sorry, the page you are looking for doesn't exist.\n

    \n (window.location.href = \"/app/login\")}\n >\n Back\n {\" \"}\n
    \n
    \n );\n};\nexport default NotFoundPage;\n","export default __webpack_public_path__ + \"static/media/scim-bridge.6c088b18.svg\";","import { BrowserRouter, Route, Switch } from \"react-router-dom\";\nimport Login from \"./login/login\";\nimport Status from \"./status/status\";\nimport Setup from \"./setup/setup\";\nimport Install from \"./install/install\";\nimport NotFoundPage from \"./NotFoundPage\";\n\nimport \"./common.css\";\nimport scim_bridge from \"./img/scim-bridge.svg\";\n\nconst App = (): JSX.Element => {\n return (\n \n
    \n
    \n \n
    \n \n \n \n \n \n \n \n \n
    \n
    \n );\n};\n\nexport default App;\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport \"./index.css\";\nimport App from \"./App\";\n\nReactDOM.render(\n \n \n ,\n document.getElementById(\"root\")\n);\n"],"sourceRoot":""}