From 8315d4b6aef003a12d9d48677bcc6e07d1228e64 Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 17 Feb 2026 14:48:13 -0800 Subject: [PATCH] Dont create ca certs quite yet --- server/lib/createUserAccountOrg.ts | 10 +++++----- server/routers/org/createOrg.ts | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/server/lib/createUserAccountOrg.ts b/server/lib/createUserAccountOrg.ts index a40407d1..207594a5 100644 --- a/server/lib/createUserAccountOrg.ts +++ b/server/lib/createUserAccountOrg.ts @@ -82,9 +82,9 @@ export async function createUserAccountOrg( const utilitySubnet = config.getRawConfig().orgs.utility_subnet_group; // Generate SSH CA keys for the org - const ca = generateCA(`${orgId}-ca`); - const encryptionKey = config.getRawConfig().server.secret!; - const encryptedCaPrivateKey = encrypt(ca.privateKeyPem, encryptionKey); + // const ca = generateCA(`${orgId}-ca`); + // const encryptionKey = config.getRawConfig().server.secret!; + // const encryptedCaPrivateKey = encrypt(ca.privateKeyPem, encryptionKey); const newOrg = await trx .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? utilitySubnet: utilitySubnet, createdAt: new Date().toISOString(), - sshCaPrivateKey: encryptedCaPrivateKey, - sshCaPublicKey: ca.publicKeyOpenSSH + // sshCaPrivateKey: encryptedCaPrivateKey, + // sshCaPublicKey: ca.publicKeyOpenSSH }) .returning(); diff --git a/server/routers/org/createOrg.ts b/server/routers/org/createOrg.ts index b8e2d625..22e9314e 100644 --- a/server/routers/org/createOrg.ts +++ b/server/routers/org/createOrg.ts @@ -145,10 +145,10 @@ export async function createOrg( .from(domains) .where(eq(domains.configManaged, true)); - // Generate SSH CA keys for the org - const ca = generateCA(`${orgId}-ca`); - const encryptionKey = config.getRawConfig().server.secret!; - const encryptedCaPrivateKey = encrypt(ca.privateKeyPem, encryptionKey); + // // Generate SSH CA keys for the org + // const ca = generateCA(`${orgId}-ca`); + // const encryptionKey = config.getRawConfig().server.secret!; + // const encryptedCaPrivateKey = encrypt(ca.privateKeyPem, encryptionKey); const newOrg = await trx .insert(orgs) @@ -158,8 +158,8 @@ export async function createOrg( subnet, utilitySubnet, createdAt: new Date().toISOString(), - sshCaPrivateKey: encryptedCaPrivateKey, - sshCaPublicKey: ca.publicKeyOpenSSH + // sshCaPrivateKey: encryptedCaPrivateKey, + // sshCaPublicKey: ca.publicKeyOpenSSH }) .returning();