mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 19:16:22 +00:00
feat: initial enforcement of template policy
This commit is contained in:
@@ -16,7 +16,8 @@ import {
|
||||
TRenewCaResponse,
|
||||
TSignIntermediateDTO,
|
||||
TSignIntermediateResponse,
|
||||
TUpdateCaDTO} from "./types";
|
||||
TUpdateCaDTO
|
||||
} from "./types";
|
||||
|
||||
export const useCreateCa = () => {
|
||||
const queryClient = useQueryClient();
|
||||
@@ -98,9 +99,9 @@ export const useImportCaCertificate = () => {
|
||||
export const useCreateCertificate = () => {
|
||||
const queryClient = useQueryClient();
|
||||
return useMutation<TCreateCertificateResponse, {}, TCreateCertificateDTO>({
|
||||
mutationFn: async ({ caId, ...body }) => {
|
||||
mutationFn: async (body) => {
|
||||
const { data } = await apiRequest.post<TCreateCertificateResponse>(
|
||||
`/api/v1/pki/ca/${caId}/issue-certificate`,
|
||||
"/api/v1/pki/certificates/issue-certificate",
|
||||
body
|
||||
);
|
||||
return data;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { CertKeyAlgorithm } from "../certificates/enums";
|
||||
import { CaRenewalType,CaStatus, CaType } from "./enums";
|
||||
import { CaRenewalType, CaStatus, CaType } from "./enums";
|
||||
|
||||
export type TCertificateAuthority = {
|
||||
id: string;
|
||||
@@ -78,7 +78,8 @@ export type TImportCaCertificateResponse = {
|
||||
|
||||
export type TCreateCertificateDTO = {
|
||||
projectSlug: string;
|
||||
caId: string;
|
||||
caId?: string;
|
||||
certificateTemplateId?: string;
|
||||
friendlyName?: string;
|
||||
commonName: string;
|
||||
altNames: string; // sans
|
||||
|
||||
@@ -2,6 +2,7 @@ export type TCertificateTemplateListEntry = {
|
||||
id: string;
|
||||
name: string;
|
||||
caName: string;
|
||||
caId: string;
|
||||
};
|
||||
|
||||
export type TCertificateTemplate = {
|
||||
|
||||
Reference in New Issue
Block a user