mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Fix TTL for issuing cert
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import json
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
import threading
|
||||
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}"')
|
||||
def step_impl(context: Context, profile_var: str):
|
||||
profile_id = os.getenv("PROFILE_ID")
|
||||
secret = os.getenv("EAB_SECRET")
|
||||
profile_id = context.vars.get("PROFILE_ID")
|
||||
secret = context.vars.get("EAB_SECRET")
|
||||
if profile_id is not None and secret is not None:
|
||||
kid = profile_id
|
||||
else:
|
||||
|
||||
@@ -641,11 +641,12 @@ export const pkiAcmeServiceFactory = ({
|
||||
notAfter: finalizingOrder.notAfter ? new Date(finalizingOrder.notAfter) : undefined,
|
||||
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
|
||||
ttl: (24 * 60 * 60 * 1000).toString()
|
||||
ttl: `${47 * 24 * 60}m`
|
||||
}
|
||||
: // ttl is not used if notAfter is provided
|
||||
({ ttl: "0" } as const),
|
||||
({ ttl: "0m" } as const),
|
||||
enrollmentType: EnrollmentType.ACME
|
||||
});
|
||||
// TODO: associate the certificate with the order
|
||||
|
||||
Reference in New Issue
Block a user