mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 16:27:46 +00:00
Fix TTL for issuing cert
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
import os
|
|
||||||
import re
|
import re
|
||||||
import threading
|
import threading
|
||||||
import urllib.parse
|
import urllib.parse
|
||||||
@@ -138,8 +137,8 @@ def step_impl(context: Context, faker_type: str, var_name: str):
|
|||||||
|
|
||||||
@given('I have an ACME cert profile as "{profile_var}"')
|
@given('I have an ACME cert profile as "{profile_var}"')
|
||||||
def step_impl(context: Context, profile_var: str):
|
def step_impl(context: Context, profile_var: str):
|
||||||
profile_id = os.getenv("PROFILE_ID")
|
profile_id = context.vars.get("PROFILE_ID")
|
||||||
secret = os.getenv("EAB_SECRET")
|
secret = context.vars.get("EAB_SECRET")
|
||||||
if profile_id is not None and secret is not None:
|
if profile_id is not None and secret is not None:
|
||||||
kid = profile_id
|
kid = profile_id
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -641,11 +641,12 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
notAfter: finalizingOrder.notAfter ? new Date(finalizingOrder.notAfter) : undefined,
|
notAfter: finalizingOrder.notAfter ? new Date(finalizingOrder.notAfter) : undefined,
|
||||||
validity: !finalizingOrder.notAfter
|
validity: !finalizingOrder.notAfter
|
||||||
? {
|
? {
|
||||||
|
// 47 days, the default TTL comes with Let's Encrypt
|
||||||
// TODO: read config from the profile to get the expiration time instead
|
// TODO: read config from the profile to get the expiration time instead
|
||||||
ttl: (24 * 60 * 60 * 1000).toString()
|
ttl: `${47 * 24 * 60}m`
|
||||||
}
|
}
|
||||||
: // ttl is not used if notAfter is provided
|
: // ttl is not used if notAfter is provided
|
||||||
({ ttl: "0" } as const),
|
({ ttl: "0m" } as const),
|
||||||
enrollmentType: EnrollmentType.ACME
|
enrollmentType: EnrollmentType.ACME
|
||||||
});
|
});
|
||||||
// TODO: associate the certificate with the order
|
// TODO: associate the certificate with the order
|
||||||
|
|||||||
Reference in New Issue
Block a user