mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Add SAML doc links to Org Settings
This commit is contained in:
BIN
frontend/public/images/sso/Auth0.png
Normal file
BIN
frontend/public/images/sso/Auth0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 100 KiB |
BIN
frontend/public/images/sso/Google.png
Normal file
BIN
frontend/public/images/sso/Google.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 42 KiB |
BIN
frontend/public/images/sso/JumpCloud.png
Normal file
BIN
frontend/public/images/sso/JumpCloud.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
BIN
frontend/public/images/sso/Keycloak.png
Normal file
BIN
frontend/public/images/sso/Keycloak.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
frontend/public/images/sso/Microsoft Azure.png
Normal file
BIN
frontend/public/images/sso/Microsoft Azure.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.1 KiB |
BIN
frontend/public/images/sso/Okta.png
Normal file
BIN
frontend/public/images/sso/Okta.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 62 KiB |
@@ -20,6 +20,8 @@ import { useToggle } from "@app/hooks";
|
|||||||
import { useCreateSSOConfig, useGetSSOConfig, useUpdateSSOConfig } from "@app/hooks/api";
|
import { useCreateSSOConfig, useGetSSOConfig, useUpdateSSOConfig } from "@app/hooks/api";
|
||||||
import { UsePopUpState } from "@app/hooks/usePopUp";
|
import { UsePopUpState } from "@app/hooks/usePopUp";
|
||||||
|
|
||||||
|
import { SSOModalHeader } from "./SSOModalHeader";
|
||||||
|
|
||||||
enum AuthProvider {
|
enum AuthProvider {
|
||||||
OKTA_SAML = "okta-saml",
|
OKTA_SAML = "okta-saml",
|
||||||
AZURE_SAML = "azure-saml",
|
AZURE_SAML = "azure-saml",
|
||||||
@@ -30,12 +32,32 @@ enum AuthProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const ssoAuthProviders = [
|
const ssoAuthProviders = [
|
||||||
{ label: "Okta SAML", value: AuthProvider.OKTA_SAML },
|
{ label: "Okta SAML", value: AuthProvider.OKTA_SAML, image: "Okta.png", docsUrl: "okta" },
|
||||||
{ label: "Azure / Entra SAML", value: AuthProvider.AZURE_SAML },
|
{
|
||||||
{ label: "JumpCloud SAML", value: AuthProvider.JUMPCLOUD_SAML },
|
label: "Azure / Entra SAML",
|
||||||
{ label: "Keycloak SAML", value: AuthProvider.KEYCLOAK_SAML },
|
value: AuthProvider.AZURE_SAML,
|
||||||
{ label: "Google SAML", value: AuthProvider.GOOGLE_SAML },
|
image: "Microsoft Azure.png",
|
||||||
{ label: "Auth0 SAML", value: AuthProvider.AUTH0_SAML }
|
docsUrl: "azure"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "JumpCloud SAML",
|
||||||
|
value: AuthProvider.JUMPCLOUD_SAML,
|
||||||
|
image: "JumpCloud.png",
|
||||||
|
docsUrl: "jumpcloud"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Keycloak SAML",
|
||||||
|
value: AuthProvider.KEYCLOAK_SAML,
|
||||||
|
image: "Keycloak.png",
|
||||||
|
docsUrl: "keycloak-saml"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Google SAML",
|
||||||
|
value: AuthProvider.GOOGLE_SAML,
|
||||||
|
image: "Google.png",
|
||||||
|
docsUrl: "google-saml"
|
||||||
|
},
|
||||||
|
{ label: "Auth0 SAML", value: AuthProvider.AUTH0_SAML, image: "Auth0.png", docsUrl: "auth0-saml" }
|
||||||
];
|
];
|
||||||
|
|
||||||
const schema = z
|
const schema = z
|
||||||
@@ -231,6 +253,10 @@ export const SSOModal = ({ popUp, handlePopUpClose, handlePopUpToggle, hideDelet
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ModalContent title="Manage SAML configuration">
|
<ModalContent title="Manage SAML configuration">
|
||||||
|
<SSOModalHeader
|
||||||
|
providerDetails={ssoAuthProviders.find((provider) => provider.value === authProvider)!}
|
||||||
|
isConnected={Boolean(data)}
|
||||||
|
/>
|
||||||
<form onSubmit={handleSubmit(onSSOModalSubmit)}>
|
<form onSubmit={handleSubmit(onSSOModalSubmit)}>
|
||||||
<Controller
|
<Controller
|
||||||
control={control}
|
control={control}
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
import { faArrowUpRightFromSquare, faBookOpen } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
|
type ProviderDetails = {
|
||||||
|
label: string;
|
||||||
|
image: string;
|
||||||
|
value: string;
|
||||||
|
docsUrl: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
providerDetails: ProviderDetails;
|
||||||
|
isConnected: boolean;
|
||||||
|
};
|
||||||
|
|
||||||
|
const docsBaseUrl = "https://infisical.com/docs/documentation/platform/sso";
|
||||||
|
|
||||||
|
export const SSOModalHeader = ({ providerDetails, isConnected }: Props) => {
|
||||||
|
return (
|
||||||
|
<div className="mb-4 flex w-full items-start gap-2 border-b border-mineshaft-500 pb-4">
|
||||||
|
<img
|
||||||
|
alt={`${providerDetails.label} logo`}
|
||||||
|
src={`/images/sso/${providerDetails.image}`}
|
||||||
|
className="h-12 w-12 rounded-md bg-bunker-500 p-2"
|
||||||
|
/>
|
||||||
|
<div>
|
||||||
|
<div className="flex items-center text-mineshaft-300">
|
||||||
|
{providerDetails.label}
|
||||||
|
<a
|
||||||
|
href={`${docsBaseUrl}/${providerDetails.docsUrl}`}
|
||||||
|
target="_blank"
|
||||||
|
className="mb-1 ml-1"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
>
|
||||||
|
<div className="inline-block rounded-md bg-yellow/20 px-1.5 text-sm text-yellow opacity-80 hover:opacity-100">
|
||||||
|
<FontAwesomeIcon icon={faBookOpen} className="mb-[0.03rem] mr-1 text-[12px]" />
|
||||||
|
<span>Docs</span>
|
||||||
|
<FontAwesomeIcon
|
||||||
|
icon={faArrowUpRightFromSquare}
|
||||||
|
className="mb-[0.07rem] ml-1 text-[10px]"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<p className="text-sm leading-4 text-mineshaft-400">
|
||||||
|
{isConnected
|
||||||
|
? `${providerDetails.label} Connection`
|
||||||
|
: `Connect to ${providerDetails.label}`}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user