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:
Meta Vens 2026-09-30 12:26:56 +02:00
commit d2d0778847
5 changed files with 6 additions and 21 deletions

View file

@ -10,7 +10,6 @@ GC_ACCESS_APPLY_SCHEMA_ON_STARTUP=1
GC_ACCESS_SESSION_TTL_SECONDS=3600
GC_ACCESS_STATE_TTL_SECONDS=600
GC_ACCESS_COMPLETION_TTL_SECONDS=300
GC_ACCESS_SIGNING_PRIVATE_KEY_PEM=
GC_ACCESS_SIGNING_PRIVATE_KEY_PATH=
GC_ACCESS_SIGNING_PRIVATE_KEY_BOOTSTRAP=0
GC_ACCESS_SIGNING_KEY_ID=

View file

@ -578,7 +578,6 @@ Suggested generic env surface:
- `GC_ACCESS_BASE_URL=https://heimdall.gamecult.org`
- `GC_ACCESS_INTERNAL_URL=http://127.0.0.1:4100`
- `GC_ACCESS_SESSION_SECRET=...`
- `GC_ACCESS_SIGNING_PRIVATE_KEY_PEM=...`
- `GC_ACCESS_SIGNING_PRIVATE_KEY_PATH=/var/lib/heimdall/signing-key.pem`
- `GC_ACCESS_SIGNING_PRIVATE_KEY_BOOTSTRAP=1`
- `GC_ACCESS_SIGNING_KEY_ID=...`
@ -604,10 +603,9 @@ Suggested generic env surface:
Only configure the providers Heimdall actually owns for a given deployment.
If `GC_ACCESS_SIGNING_PRIVATE_KEY_PEM` is absent, the current skeleton falls
back to `GC_ACCESS_SIGNING_PRIVATE_KEY_PATH` if present, and can bootstrap that
file on first boot when `GC_ACCESS_SIGNING_PRIVATE_KEY_BOOTSTRAP=1`. If
neither PEM nor path is configured, the current skeleton falls back to an
The signing key is always a file: `GC_ACCESS_SIGNING_PRIVATE_KEY_PATH` names
it, and Heimdall can bootstrap that file on first boot when
`GC_ACCESS_SIGNING_PRIVATE_KEY_BOOTSTRAP=1`. If no path is configured, the current skeleton falls back to an
ephemeral dev signing key. That is acceptable for local iteration and
absolutely not acceptable for real deployment.

View file

@ -44,12 +44,11 @@ Purpose:
Notes:
- current skeleton signs with Ed25519
- `GC_ACCESS_SIGNING_PRIVATE_KEY_PEM` still works for direct secret injection
- `GC_ACCESS_SIGNING_PRIVATE_KEY_PATH` lets the service load a persisted key
from disk
- if the path is missing and `GC_ACCESS_SIGNING_PRIVATE_KEY_BOOTSTRAP=1`, the
service bootstraps a new key file on first start
- if neither PEM nor path is configured, the service still generates an
- if no path is configured, the service still generates an
ephemeral dev key at startup and deserves no sympathy when the `kid` changes
### `GET /.well-known/heimdall-configuration`

View file

@ -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;
}

View file

@ -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;