Delete the inline signing-key PEM input
GC_ACCESS_SIGNING_PRIVATE_KEY_PEM put the signing key's bytes into the process environment, and so into any binding, unit or plan that carries environment. The recipe never declared it and GC_ACCESS_SIGNING_PRIVATE_KEY_PATH already covers the key as a file, which a binding binds through [workload.secret_files]. The signing key is now always a file. Idunn secret-files cut, Cut 1 (delete first). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d5acc94fb9
commit
d2d0778847
5 changed files with 6 additions and 21 deletions
|
|
@ -35,7 +35,6 @@ export interface HeimdallConfig {
|
|||
refreshTtlSeconds: number;
|
||||
stateTtlSeconds: number;
|
||||
completionTtlSeconds: number;
|
||||
signingPrivateKeyPem?: string;
|
||||
signingPrivateKeyPath?: string;
|
||||
bootstrapSigningPrivateKeyOnMissing: boolean;
|
||||
signingKeyId?: string;
|
||||
|
|
@ -278,11 +277,6 @@ export function loadConfig(
|
|||
config.odinCultMeshUri = odinCultMeshUri;
|
||||
}
|
||||
|
||||
const signingPrivateKeyPem = env.GC_ACCESS_SIGNING_PRIVATE_KEY_PEM?.replace(/\\n/g, "\n");
|
||||
if (signingPrivateKeyPem) {
|
||||
config.signingPrivateKeyPem = signingPrivateKeyPem;
|
||||
}
|
||||
|
||||
if (env.GC_ACCESS_SIGNING_PRIVATE_KEY_PATH) {
|
||||
config.signingPrivateKeyPath = env.GC_ACCESS_SIGNING_PRIVATE_KEY_PATH;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export interface RuntimeKeyMaterial {
|
|||
privateKey: KeyObject;
|
||||
publicKey: KeyObject;
|
||||
publicJwk: PublicSigningJwk;
|
||||
source: "configured_pem" | "configured_file" | "bootstrapped_file" | "ephemeral_dev";
|
||||
source: "configured_file" | "bootstrapped_file" | "ephemeral_dev";
|
||||
}
|
||||
|
||||
function encodeBase64Url(input: string | Buffer): string {
|
||||
|
|
@ -110,12 +110,7 @@ function createOrLoadPrivateKeyFromPath(config: HeimdallConfig): {
|
|||
}
|
||||
|
||||
export function createRuntimeKeyMaterial(config: HeimdallConfig): RuntimeKeyMaterial {
|
||||
const loaded = config.signingPrivateKeyPem
|
||||
? {
|
||||
privateKey: createPrivateKey(config.signingPrivateKeyPem),
|
||||
source: "configured_pem" as const,
|
||||
}
|
||||
: createOrLoadPrivateKeyFromPath(config);
|
||||
const loaded = createOrLoadPrivateKeyFromPath(config);
|
||||
const privateKey = loaded.privateKey;
|
||||
const publicKey = createPublicKey(privateKey);
|
||||
const exportedJwk = publicKey.export({ format: "jwk" }) as Jwk;
|
||||
|
|
|
|||
Loading…
Reference in a new issue