mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-04 01:36:39 +00:00
Dont create ca certs quite yet
This commit is contained in:
@@ -82,9 +82,9 @@ export async function createUserAccountOrg(
|
|||||||
const utilitySubnet = config.getRawConfig().orgs.utility_subnet_group;
|
const utilitySubnet = config.getRawConfig().orgs.utility_subnet_group;
|
||||||
|
|
||||||
// Generate SSH CA keys for the org
|
// Generate SSH CA keys for the org
|
||||||
const ca = generateCA(`${orgId}-ca`);
|
// const ca = generateCA(`${orgId}-ca`);
|
||||||
const encryptionKey = config.getRawConfig().server.secret!;
|
// const encryptionKey = config.getRawConfig().server.secret!;
|
||||||
const encryptedCaPrivateKey = encrypt(ca.privateKeyPem, encryptionKey);
|
// const encryptedCaPrivateKey = encrypt(ca.privateKeyPem, encryptionKey);
|
||||||
|
|
||||||
const newOrg = await trx
|
const newOrg = await trx
|
||||||
.insert(orgs)
|
.insert(orgs)
|
||||||
@@ -95,8 +95,8 @@ export async function createUserAccountOrg(
|
|||||||
subnet: "100.90.128.0/24", // TODO: this should not be hardcoded - or can it be the same in all orgs?
|
subnet: "100.90.128.0/24", // TODO: this should not be hardcoded - or can it be the same in all orgs?
|
||||||
utilitySubnet: utilitySubnet,
|
utilitySubnet: utilitySubnet,
|
||||||
createdAt: new Date().toISOString(),
|
createdAt: new Date().toISOString(),
|
||||||
sshCaPrivateKey: encryptedCaPrivateKey,
|
// sshCaPrivateKey: encryptedCaPrivateKey,
|
||||||
sshCaPublicKey: ca.publicKeyOpenSSH
|
// sshCaPublicKey: ca.publicKeyOpenSSH
|
||||||
})
|
})
|
||||||
.returning();
|
.returning();
|
||||||
|
|
||||||
|
|||||||
@@ -145,10 +145,10 @@ export async function createOrg(
|
|||||||
.from(domains)
|
.from(domains)
|
||||||
.where(eq(domains.configManaged, true));
|
.where(eq(domains.configManaged, true));
|
||||||
|
|
||||||
// Generate SSH CA keys for the org
|
// // Generate SSH CA keys for the org
|
||||||
const ca = generateCA(`${orgId}-ca`);
|
// const ca = generateCA(`${orgId}-ca`);
|
||||||
const encryptionKey = config.getRawConfig().server.secret!;
|
// const encryptionKey = config.getRawConfig().server.secret!;
|
||||||
const encryptedCaPrivateKey = encrypt(ca.privateKeyPem, encryptionKey);
|
// const encryptedCaPrivateKey = encrypt(ca.privateKeyPem, encryptionKey);
|
||||||
|
|
||||||
const newOrg = await trx
|
const newOrg = await trx
|
||||||
.insert(orgs)
|
.insert(orgs)
|
||||||
@@ -158,8 +158,8 @@ export async function createOrg(
|
|||||||
subnet,
|
subnet,
|
||||||
utilitySubnet,
|
utilitySubnet,
|
||||||
createdAt: new Date().toISOString(),
|
createdAt: new Date().toISOString(),
|
||||||
sshCaPrivateKey: encryptedCaPrivateKey,
|
// sshCaPrivateKey: encryptedCaPrivateKey,
|
||||||
sshCaPublicKey: ca.publicKeyOpenSSH
|
// sshCaPublicKey: ca.publicKeyOpenSSH
|
||||||
})
|
})
|
||||||
.returning();
|
.returning();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user