Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Make progress on SCIM
Tuan Dang3a7b697549fd
diff --cc backend/src/ee/services/license/licence-fns.tsindex 7014eac5f3,7014eac5f3..9b1d4c203d--- a/backend/src/ee/services/license/licence-fns.ts+++ b/backend/src/ee/services/license/licence-fns.ts@@@ -24,6 -24,6 +24,7 @@@ export const getDefaultOnPremFeaturesauditLogs: false,auditLogsRetentionDays: 0,samlSSO: false,++ scim: false,status: null,trial_end: null,has_used_trial: true,diff --cc backend/src/ee/services/license/license-types.tsindex 762aff5b21,762aff5b21..3547144894--- a/backend/src/ee/services/license/license-types.ts+++ b/backend/src/ee/services/license/license-types.ts@@@ -25,6 -25,6 +25,7 @@@ export type TFeatureSet =auditLogs: false;auditLogsRetentionDays: 0;samlSSO: false;++ scim: false;status: null;trial_end: null;has_used_trial: true;diff --cc frontend/src/views/Settings/OrgSettingsPage/components/OrgAuthTab/OrgAuthTab.tsxindex 3141f21635,c4d78b6f07..4a18fcd411--- a/frontend/src/views/Settings/OrgSettingsPage/components/OrgAuthTab/OrgAuthTab.tsx+++ b/frontend/src/views/Settings/OrgSettingsPage/components/OrgAuthTab/OrgAuthTab.tsx@@@ -1,15 -1,15 +1,17 @@@import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context";import { withPermission } from "@app/hoc";- import { OrgSCIMSection } from "./OrgSCIMSection";++import { OrgScimSection } from "./OrgScimSection";+ import { OrgGeneralAuthSection } from "./OrgGeneralAuthSection";import { OrgSSOSection } from "./OrgSSOSection";export const OrgAuthTab = withPermission(() => {return (<div>+ <OrgGeneralAuthSection /><OrgSSOSection />- <OrgSCIMSection />++ <OrgScimSection /></div>);},diff --cc frontend/src/views/Settings/OrgSettingsPage/components/OrgAuthTab/OrgSCIMSection.tsxindex 93c47ae3bc,0000000000..66e72d39e8mode 100644,000000..100644--- a/frontend/src/views/Settings/OrgSettingsPage/components/OrgAuthTab/OrgSCIMSection.tsx+++ b/frontend/src/views/Settings/OrgSettingsPage/components/OrgAuthTab/OrgSCIMSection.tsx@@@ -1,108 -1,0 +1,122 @@@+import { useState } from "react";- import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";++import { faPlus, faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";+import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";++// import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";+// import { OrgPermissionCan } from "@app/components/permissions";+import {- // Button,++ Button,+ IconButton,+ Switch+} from "@app/components/v2";+import {+// OrgPermissionActions,+// OrgPermissionSubjects,+ useOrganization,+// useSubscription+} from "@app/context";+import { useToggle } from "@app/hooks";+// import { usePopUp } from "@app/hooks/usePopUp";+import { useGetScimToken } from "@app/hooks/api";++// TODO: add permissioning for enteprise SCIM+- export const OrgSCIMSection = () => {++export const OrgScimSection = () => {+ const { currentOrg } = useOrganization();+ // const { createNotification } = useNotificationContext();+ // const { subscription } = useSubscription();+ // const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([+ // "upgradePlan"+ // ] as const);++ const { data: scimToken } = useGetScimToken(currentOrg?.id ?? "");++ const [scimEnabled, setScimEnabled] = useState(false); // sync this with backend+ const [isAPIKeyCopied, setIsAPIKeyCopied] = useToggle(false);++ // TODO: get SCIM stuf+++ const addScimTokenBtnClick = () => {++++ }+++ const handleSCIMToggle = (value: boolean) => {+ // TODO+ try {+ setScimEnabled(value);+ } catch (err) {+ console.error(err);+ }+ }++ const copyTokenToClipboard = () => {+ navigator.clipboard.writeText(scimToken ?? "");+ setIsAPIKeyCopied.on();+ };++ return (+ <div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">- <h2 className="flex-1 text-xl font-semibold text-white mb-8">SCIM Configuration</h2>++ <div className="mb-8 flex items-center">++ <h2 className="flex-1 text-xl font-semibold text-white">SCIM Configuration</h2>++ <Button++ onClick={addScimTokenBtnClick}++ colorSchema="secondary"++ // isDisabled={!isAllowed}++ leftIcon={<FontAwesomeIcon icon={faPlus} />}++ >++ Add SCIM Token++ </Button>++ </div>+ <Switch+ id="enable-scim"+ onCheckedChange={(value) => handleSCIMToggle(value)}+ isChecked={scimEnabled}+ isDisabled={false}+ >+ Enable SCIM Provisioning+ </Switch>+ {scimEnabled && (+ <div>+ <div className="mt-8 mb-8">+ <h3 className="text-sm text-mineshaft-400">SCIM URL</h3>+ <p className="text-md text-gray-400">{`${window.origin}/api/v1/scim`}</p>+ </div>+ {/* <h3 className="mb-2 mt-8 text-sm text-mineshaft-400">SCIM URL</h3> */}+ {/* <div className="mb-8 max-w-xl flex items-center justify-between rounded-md bg-white/[0.07] p-2 text-base text-gray-400">+ <p className="mr-4 break-all">{`${window.origin}/api/v1/scim`}</p>+ <IconButton+ ariaLabel="copy icon"+ colorSchema="secondary"+ className="group relative"+ onClick={copyTokenToClipboard}+ >+ <FontAwesomeIcon icon={isAPIKeyCopied ? faCheck : faCopy} />+ <span className="absolute -left-8 -top-20 hidden w-28 translate-y-full rounded-md bg-bunker-800 py-2 pl-3 text-center text-sm text-gray-400 group-hover:flex group-hover:animate-fadeIn">+ Click to copy+ </span>+ </IconButton>+ </div> */}+ {scimToken && (+ <>+ <h3 className="mb-2 text-sm text-mineshaft-400">SCIM Bearer Token</h3>+ <div className="max-w-xl flex items-center justify-between rounded-md bg-white/[0.07] p-2 text-base text-gray-400">+ <p className="mr-4 break-all">{scimToken}</p>+ <IconButton+ ariaLabel="copy icon"+ colorSchema="secondary"+ className="group relative"+ onClick={copyTokenToClipboard}+ >+ <FontAwesomeIcon icon={isAPIKeyCopied ? faCheck : faCopy} />+ <span className="absolute -left-8 -top-20 hidden w-28 translate-y-full rounded-md bg-bunker-800 py-2 pl-3 text-center text-sm text-gray-400 group-hover:flex group-hover:animate-fadeIn">+ Click to copy+ </span>+ </IconButton>+ </div>+ </>+ )}+ </div>+ )}+ </div>+ );+}diff --cc frontend/src/views/Settings/OrgSettingsPage/components/OrgAuthTab/ScimTokenModal.tsxindex 0000000000,0000000000..e69de29bb2new file mode 100644--- /dev/null+++ b/frontend/src/views/Settings/OrgSettingsPage/components/OrgAuthTab/ScimTokenModal.tsx