mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 11:28:18 +00:00
Skip dns ownership validation
This commit is contained in:
@@ -567,6 +567,8 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
accountId: string;
|
accountId: string;
|
||||||
payload: TCreateAcmeOrderPayload;
|
payload: TCreateAcmeOrderPayload;
|
||||||
}): Promise<TAcmeResponse<TAcmeOrderResource>> => {
|
}): Promise<TAcmeResponse<TAcmeOrderResource>> => {
|
||||||
|
const profile = await validateAcmeProfile(profileId);
|
||||||
|
const skipDnsOwnershipVerification = profile.acmeConfig?.skipDnsOwnershipVerification ?? false;
|
||||||
// TODO: check and see if we have existing orders for this account that meet the criteria
|
// TODO: check and see if we have existing orders for this account that meet the criteria
|
||||||
// if we do, return the existing order
|
// if we do, return the existing order
|
||||||
// TODO: check the identifiers and see if are they even allowed for this profile.
|
// TODO: check the identifiers and see if are they even allowed for this profile.
|
||||||
@@ -592,7 +594,7 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
const createdOrder = await acmeOrderDAL.create(
|
const createdOrder = await acmeOrderDAL.create(
|
||||||
{
|
{
|
||||||
accountId: account.id,
|
accountId: account.id,
|
||||||
status: AcmeOrderStatus.Pending,
|
status: skipDnsOwnershipVerification ? AcmeOrderStatus.Valid : AcmeOrderStatus.Pending,
|
||||||
notBefore: payload.notBefore ? new Date(payload.notBefore) : undefined,
|
notBefore: payload.notBefore ? new Date(payload.notBefore) : undefined,
|
||||||
notAfter: payload.notAfter ? new Date(payload.notAfter) : undefined,
|
notAfter: payload.notAfter ? new Date(payload.notAfter) : undefined,
|
||||||
// TODO: read config from the profile to get the expiration time instead
|
// TODO: read config from the profile to get the expiration time instead
|
||||||
@@ -627,7 +629,7 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
await acmeChallengeDAL.create(
|
await acmeChallengeDAL.create(
|
||||||
{
|
{
|
||||||
authId: auth.id,
|
authId: auth.id,
|
||||||
status: AcmeChallengeStatus.Pending,
|
status: skipDnsOwnershipVerification ? AcmeChallengeStatus.Valid : AcmeChallengeStatus.Pending,
|
||||||
type: AcmeChallengeType.HTTP_01
|
type: AcmeChallengeType.HTTP_01
|
||||||
},
|
},
|
||||||
tx
|
tx
|
||||||
|
|||||||
Reference in New Issue
Block a user