mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 07:35:09 +00:00
feat: completed kmip server cert config
This commit is contained in:
@@ -7,8 +7,10 @@ import { User } from "../users/types";
|
||||
import { adminQueryKeys, adminStandaloneKeys } from "./queries";
|
||||
import {
|
||||
AdminSlackConfig,
|
||||
InstanceKmipServerCert,
|
||||
RootKeyEncryptionStrategy,
|
||||
TCreateAdminUserDTO,
|
||||
TGenerateInstanceKmipServerCertDTO,
|
||||
TServerConfig,
|
||||
TSetupInstanceKmipDTO,
|
||||
TUpdateAdminSlackConfigDTO
|
||||
@@ -111,3 +113,14 @@ export const useSetupInstanceKmip = () => {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
export const useGenerateInstanceKmipServerCert = () => {
|
||||
return useMutation({
|
||||
mutationFn: async (payload: TGenerateInstanceKmipServerCertDTO) => {
|
||||
return apiRequest.post<InstanceKmipServerCert>(
|
||||
"/api/v1/admin/kmip/server-certificates",
|
||||
payload
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
@@ -66,6 +66,7 @@ export type TGetServerRootKmsEncryptionDetails = {
|
||||
|
||||
export type InstanceKmipConfig = {
|
||||
serverCertificateChain: string;
|
||||
clientCertificateChain: string;
|
||||
};
|
||||
|
||||
export enum RootKeyEncryptionStrategy {
|
||||
@@ -76,3 +77,17 @@ export enum RootKeyEncryptionStrategy {
|
||||
export type TSetupInstanceKmipDTO = {
|
||||
caKeyAlgorithm: CertKeyAlgorithm;
|
||||
};
|
||||
|
||||
export type TGenerateInstanceKmipServerCertDTO = {
|
||||
commonName: string;
|
||||
keyAlgorithm: CertKeyAlgorithm;
|
||||
altNames: string;
|
||||
ttl: string;
|
||||
};
|
||||
|
||||
export type InstanceKmipServerCert = {
|
||||
serialNumber: string;
|
||||
certificate: string;
|
||||
certificateChain: string;
|
||||
privateKey: string;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user