mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 12:27:31 +00:00
misc: updated certificates v3 endpoint to be under /pki
This commit is contained in:
@@ -11,5 +11,5 @@ export const registerV3Routes = async (server: FastifyZodProvider) => {
|
|||||||
await server.register(registerUserRouter, { prefix: "/users" });
|
await server.register(registerUserRouter, { prefix: "/users" });
|
||||||
await server.register(registerDeprecatedSecretRouter, { prefix: "/secrets" });
|
await server.register(registerDeprecatedSecretRouter, { prefix: "/secrets" });
|
||||||
await server.register(registerExternalMigrationRouter, { prefix: "/external-migration" });
|
await server.register(registerExternalMigrationRouter, { prefix: "/external-migration" });
|
||||||
await server.register(registerCertificatesRouter, { prefix: "/certificates" });
|
await server.register(registerCertificatesRouter, { prefix: "/pki/certificates" });
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -675,7 +675,7 @@ export const certificateV3ServiceFactory = ({
|
|||||||
status: CertificateOrderStatus.VALID
|
status: CertificateOrderStatus.VALID
|
||||||
})),
|
})),
|
||||||
authorizations: [],
|
authorizations: [],
|
||||||
finalize: `/api/v3/certificates/orders/${orderId}/completed`,
|
finalize: `/api/v3/pki/certificates/orders/${orderId}/completed`,
|
||||||
certificate: certificateResult.certificate,
|
certificate: certificateResult.certificate,
|
||||||
projectId: certificateResult.projectId,
|
projectId: certificateResult.projectId,
|
||||||
profileName: certificateResult.profileName
|
profileName: certificateResult.profileName
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Issue certificate"
|
|
||||||
openapi: "POST /api/v1/pki/ca/{caId}/issue-certificate"
|
|
||||||
---
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Sign certificate"
|
|
||||||
openapi: "POST /api/v1/pki/ca/{caId}/sign-certificate"
|
|
||||||
---
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Issue Certificate"
|
title: "Issue Certificate"
|
||||||
openapi: "POST /api/v1/pki/certificates/issue-certificate"
|
openapi: "POST /api/v3/pki/certificates/issue-certificate"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Renew Certificate"
|
title: "Renew Certificate"
|
||||||
openapi: "POST /api/v3/certificates/{certificateId}/renew"
|
openapi: "POST /api/v3/pki/certificates/{certificateId}/renew"
|
||||||
---
|
---
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Sign Certificate"
|
title: "Sign Certificate"
|
||||||
openapi: "POST /api/v1/pki/certificates/sign-certificate"
|
openapi: "POST /api/v3/pki/certificates/sign-certificate"
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
---
|
---
|
||||||
title: "Update Certificate Config"
|
title: "Update Certificate Config"
|
||||||
openapi: "PATCH /api/v3/certificates/{certificateId}/config"
|
openapi: "PATCH /api/v3/pki/certificates/{certificateId}/config"
|
||||||
---
|
---
|
||||||
@@ -2585,8 +2585,6 @@
|
|||||||
"api-reference/endpoints/certificate-authorities/cert",
|
"api-reference/endpoints/certificate-authorities/cert",
|
||||||
"api-reference/endpoints/certificate-authorities/sign-intermediate",
|
"api-reference/endpoints/certificate-authorities/sign-intermediate",
|
||||||
"api-reference/endpoints/certificate-authorities/import-cert",
|
"api-reference/endpoints/certificate-authorities/import-cert",
|
||||||
"api-reference/endpoints/certificate-authorities/issue-cert",
|
|
||||||
"api-reference/endpoints/certificate-authorities/sign-cert",
|
|
||||||
"api-reference/endpoints/certificate-authorities/crl"
|
"api-reference/endpoints/certificate-authorities/crl"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ Here, select the certificate profile from step 1 that will be used to issue the
|
|||||||
### Sample request
|
### Sample request
|
||||||
|
|
||||||
```bash Request
|
```bash Request
|
||||||
curl --location --request POST 'https://app.infisical.com/api/v3/certificates/issue-certificate' \
|
curl --location --request POST 'https://app.infisical.com/api/v3/pki/certificates/issue-certificate' \
|
||||||
--header 'Authorization: Bearer <access-token>' \
|
--header 'Authorization: Bearer <access-token>' \
|
||||||
--header 'Content-Type: application/json' \
|
--header 'Content-Type: application/json' \
|
||||||
--data-raw '{
|
--data-raw '{
|
||||||
@@ -151,7 +151,7 @@ Here, select the certificate profile from step 1 that will be used to issue the
|
|||||||
### Sample request
|
### Sample request
|
||||||
|
|
||||||
```bash Request
|
```bash Request
|
||||||
curl --location --request POST 'https://app.infisical.com/api/v3/certificates/sign-certificate' \
|
curl --location --request POST 'https://app.infisical.com/api/v3/pki/certificates/sign-certificate' \
|
||||||
--header 'Authorization: Bearer <access-token>' \
|
--header 'Authorization: Bearer <access-token>' \
|
||||||
--header 'Content-Type: application/json' \
|
--header 'Content-Type: application/json' \
|
||||||
--data-raw '{
|
--data-raw '{
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ export const useCreateCertificateV3 = (options?: { projectId?: string }) => {
|
|||||||
return useMutation<TCreateCertificateV3Response, object, TCreateCertificateV3DTO>({
|
return useMutation<TCreateCertificateV3Response, object, TCreateCertificateV3DTO>({
|
||||||
mutationFn: async (body) => {
|
mutationFn: async (body) => {
|
||||||
const { data } = await apiRequest.post<TCreateCertificateV3Response>(
|
const { data } = await apiRequest.post<TCreateCertificateV3Response>(
|
||||||
"/api/v3/certificates/issue-certificate",
|
"/api/v3/pki/certificates/issue-certificate",
|
||||||
body
|
body
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
@@ -185,7 +185,7 @@ export const useOrderCertificateWithProfile = () => {
|
|||||||
return useMutation<TOrderCertificateResponse, object, TOrderCertificateDTO>({
|
return useMutation<TOrderCertificateResponse, object, TOrderCertificateDTO>({
|
||||||
mutationFn: async (body) => {
|
mutationFn: async (body) => {
|
||||||
const { data } = await apiRequest.post<TOrderCertificateResponse>(
|
const { data } = await apiRequest.post<TOrderCertificateResponse>(
|
||||||
"/api/v3/certificates/order-certificate",
|
"/api/v3/pki/certificates/order-certificate",
|
||||||
body
|
body
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ export const useRenewCertificate = () => {
|
|||||||
return useMutation<TRenewCertificateResponse, object, TRenewCertificateDTO>({
|
return useMutation<TRenewCertificateResponse, object, TRenewCertificateDTO>({
|
||||||
mutationFn: async ({ certificateId }) => {
|
mutationFn: async ({ certificateId }) => {
|
||||||
const { data } = await apiRequest.post<TRenewCertificateResponse>(
|
const { data } = await apiRequest.post<TRenewCertificateResponse>(
|
||||||
`/api/v3/certificates/${certificateId}/renew`,
|
`/api/v3/pki/certificates/${certificateId}/renew`,
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
@@ -119,7 +119,7 @@ export const useUpdateRenewalConfig = () => {
|
|||||||
>({
|
>({
|
||||||
mutationFn: async ({ certificateId, renewBeforeDays, enableAutoRenewal }) => {
|
mutationFn: async ({ certificateId, renewBeforeDays, enableAutoRenewal }) => {
|
||||||
const { data } = await apiRequest.patch<{ message: string; renewBeforeDays?: number }>(
|
const { data } = await apiRequest.patch<{ message: string; renewBeforeDays?: number }>(
|
||||||
`/api/v3/certificates/${certificateId}/config`,
|
`/api/v3/pki/certificates/${certificateId}/config`,
|
||||||
{ renewBeforeDays, enableAutoRenewal }
|
{ renewBeforeDays, enableAutoRenewal }
|
||||||
);
|
);
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
Reference in New Issue
Block a user