Remove service account JSON requirement from GCP Auth

This commit is contained in:
Tuan Dang
2024-05-10 09:56:35 -07:00
parent 610f474ecc
commit 0a91586904
14 changed files with 229 additions and 469 deletions
@@ -181,7 +181,6 @@ export const useAddIdentityGcpAuth = () => {
return useMutation<IdentityGcpAuth, {}, AddIdentityGcpAuthDTO>({
mutationFn: async ({
identityId,
credentials,
type,
allowedServiceAccounts,
allowedProjects,
@@ -196,7 +195,6 @@ export const useAddIdentityGcpAuth = () => {
} = await apiRequest.post<{ identityGcpAuth: IdentityGcpAuth }>(
`/api/v1/auth/gcp-auth/identities/${identityId}`,
{
credentials,
type,
allowedServiceAccounts,
allowedProjects,
@@ -221,7 +219,6 @@ export const useUpdateIdentityGcpAuth = () => {
return useMutation<IdentityGcpAuth, {}, UpdateIdentityGcpAuthDTO>({
mutationFn: async ({
identityId,
credentials,
type,
allowedServiceAccounts,
allowedProjects,
@@ -236,7 +233,6 @@ export const useUpdateIdentityGcpAuth = () => {
} = await apiRequest.patch<{ identityGcpAuth: IdentityGcpAuth }>(
`/api/v1/auth/gcp-auth/identities/${identityId}`,
{
credentials,
type,
allowedServiceAccounts,
allowedProjects,
@@ -115,7 +115,6 @@ export type UpdateIdentityUniversalAuthDTO = {
export type IdentityGcpAuth = {
identityId: string;
credentials: string;
type: "iam" | "gce";
allowedServiceAccounts: string;
allowedProjects: string;
@@ -129,7 +128,6 @@ export type IdentityGcpAuth = {
export type AddIdentityGcpAuthDTO = {
organizationId: string;
identityId: string;
credentials: string;
type: "iam" | "gce";
allowedServiceAccounts: string;
allowedProjects: string;
@@ -145,7 +143,6 @@ export type AddIdentityGcpAuthDTO = {
export type UpdateIdentityGcpAuthDTO = {
organizationId: string;
identityId: string;
credentials?: string;
type?: "iam" | "gce";
allowedServiceAccounts?: string;
allowedProjects?: string;