mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 11:38:55 +00:00
feat: Add dynamic secrets for Azure Entra ID
This commit is contained in:
@@ -6,6 +6,7 @@ import { apiRequest } from "@app/config/request";
|
||||
import {
|
||||
TDetailsDynamicSecretDTO,
|
||||
TDynamicSecret,
|
||||
TDynamicSecretProvider,
|
||||
TGetDynamicSecretsByEnvsDTO,
|
||||
TListDynamicSecretDTO
|
||||
} from "./types";
|
||||
@@ -71,6 +72,28 @@ export const useGetDynamicSecretDetails = ({
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetDynamicSecretProviderData = ({
|
||||
provider,
|
||||
dataFetchType
|
||||
}: {
|
||||
provider: TDynamicSecretProvider,
|
||||
dataFetchType: "Users"
|
||||
}) => {
|
||||
return useQuery({
|
||||
queryKey: ["users"],
|
||||
queryFn: async () => {
|
||||
const { data } = await apiRequest.post<{ data: { users: [{ name: string, id: string }] } }>(
|
||||
"/api/v1/dynamic-secrets/fetch-provider-data",
|
||||
{
|
||||
provider,
|
||||
dataFetchType
|
||||
}
|
||||
);
|
||||
return data.data.users;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const useGetDynamicSecretsOfAllEnv = ({
|
||||
path,
|
||||
projectSlug,
|
||||
|
||||
@@ -24,7 +24,8 @@ export enum DynamicSecretProviders {
|
||||
MongoAtlas = "mongo-db-atlas",
|
||||
ElasticSearch = "elastic-search",
|
||||
MongoDB = "mongo-db",
|
||||
RabbitMq = "rabbit-mq"
|
||||
RabbitMq = "rabbit-mq",
|
||||
AzureEntraId = "azure-entra-id"
|
||||
}
|
||||
|
||||
export enum SqlProviders {
|
||||
@@ -177,7 +178,14 @@ export type TDynamicSecretProvider =
|
||||
};
|
||||
ca?: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
| {
|
||||
type: DynamicSecretProviders.AzureEntraId;
|
||||
inputs: {
|
||||
tenantId: string;
|
||||
userId: string;
|
||||
};
|
||||
};
|
||||
|
||||
export type TCreateDynamicSecretDTO = {
|
||||
projectSlug: string;
|
||||
|
||||
Reference in New Issue
Block a user