mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +00:00
Add cert foreign key
This commit is contained in:
@@ -80,6 +80,10 @@ export async function up(knex: Knex): Promise<void> {
|
|||||||
t.uuid("accountId").notNullable();
|
t.uuid("accountId").notNullable();
|
||||||
t.foreign("accountId").references("id").inTable(TableName.PkiAcmeAccount).onDelete("CASCADE");
|
t.foreign("accountId").references("id").inTable(TableName.PkiAcmeAccount).onDelete("CASCADE");
|
||||||
|
|
||||||
|
// Foreign key to certificate
|
||||||
|
t.uuid("certificateId").nullable();
|
||||||
|
t.foreign("certificateId").references("id").inTable(TableName.Certificate).onDelete("CASCADE");
|
||||||
|
|
||||||
t.timestamp("notBefore").nullable();
|
t.timestamp("notBefore").nullable();
|
||||||
t.timestamp("notAfter").nullable();
|
t.timestamp("notAfter").nullable();
|
||||||
|
|
||||||
|
|||||||
@@ -319,7 +319,7 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
const kmsDecryptor = await kmsService.decryptWithKmsKey({
|
const kmsDecryptor = await kmsService.decryptWithKmsKey({
|
||||||
kmsId: certificateManagerKmsId
|
kmsId: certificateManagerKmsId
|
||||||
});
|
});
|
||||||
const eabSecret = await kmsDecryptor({ cipherTextBlob: profile.acmeConfig!.encryptedEabSecret });
|
const eabSecret = await kmsDecryptor({ cipherTextBlob: profile.acmeConfig!.encryptedEabSecret! });
|
||||||
try {
|
try {
|
||||||
const { payload: eabPayload, protectedHeader: eabProtectedHeader } = await flattenedVerify(
|
const { payload: eabPayload, protectedHeader: eabProtectedHeader } = await flattenedVerify(
|
||||||
externalAccountBinding,
|
externalAccountBinding,
|
||||||
@@ -393,7 +393,6 @@ export const pkiAcmeServiceFactory = ({
|
|||||||
emails: contact ?? []
|
emails: contact ?? []
|
||||||
});
|
});
|
||||||
// TODO: create audit log here
|
// TODO: create audit log here
|
||||||
// TODO: check EAB authentication here
|
|
||||||
return {
|
return {
|
||||||
status: 201,
|
status: 201,
|
||||||
body: {
|
body: {
|
||||||
|
|||||||
Reference in New Issue
Block a user