Update GCP auth docs

This commit is contained in:
Tuan Dang
2024-05-07 14:58:14 -07:00
parent d98430fe07
commit ac469dbe4f
8 changed files with 35 additions and 9 deletions
@@ -15,6 +15,7 @@ import { IdentityAuthMethod } from "@app/hooks/api/identities";
import { UsePopUpState } from "@app/hooks/usePopUp";
import { IdentityAwsIamAuthForm } from "./IdentityAwsIamAuthForm";
import { IdentityGcpIamAuthForm } from "./IdentityGcpIamAuthForm";
import { IdentityUniversalAuthForm } from "./IdentityUniversalAuthForm";
type Props = {
@@ -28,7 +29,8 @@ type Props = {
const identityAuthMethods = [
{ label: "Universal Auth", value: IdentityAuthMethod.UNIVERSAL_AUTH },
{ label: "AWS IAM Auth", value: IdentityAuthMethod.AWS_IAM_AUTH }
{ label: "AWS IAM Auth", value: IdentityAuthMethod.AWS_IAM_AUTH },
{ label: "GCP Auth", value: IdentityAuthMethod.GCP_IAM_AUTH }
];
const schema = yup
@@ -75,6 +77,15 @@ export const IdentityAuthMethodModal = ({ popUp, handlePopUpOpen, handlePopUpTog
/>
);
}
case IdentityAuthMethod.GCP_IAM_AUTH: {
return (
<IdentityGcpIamAuthForm
handlePopUpOpen={handlePopUpOpen}
handlePopUpToggle={handlePopUpToggle}
identityAuthMethodData={identityAuthMethodData}
/>
);
}
case IdentityAuthMethod.UNIVERSAL_AUTH: {
return (
<IdentityUniversalAuthForm
@@ -51,7 +51,7 @@ type Props = {
};
};
export const IdentityAwsIamAuthForm = ({
export const IdentityGcpIamAuthForm = ({
handlePopUpOpen,
handlePopUpToggle,
identityAuthMethodData
@@ -194,7 +194,7 @@ export const IdentityAwsIamAuthForm = ({
name="allowedProjects"
render={({ field, fieldState: { error } }) => (
<FormControl label="Allowed Projects" isError={Boolean(error)} errorText={error?.message}>
<Input {...field} placeholder="123456789012, ..." />
<Input {...field} placeholder="my-gcp-project, ..." />
</FormControl>
)}
/>