Skip to content

fix: stop hardcoding JWKS_KID dev-main for managed scaffolds #124

Description

@Bccorb

Problem

seamless init hardcodes JWKS_KID to "dev-main" in the generated scaffold (src/commands/init.ts:50, printed at init.ts:409). Managed instances pin their signing key id in Terraform: paidkey1 for paid tenants and trialkey1 for trials (seamless-terraform-service paid-jobs/main.tf and trial-jobs/main.tf). Nothing is read from the portal for it.

Scope

  • Verify whether the scaffolded backend actually validates against the managed instance's JWKS kid, and if so, stop hardcoding dev-main for managed scaffolds.
  • Either resolve the kid from the instance's JWKS endpoint at init time, or have the portal API expose it alongside the application payload.
  • --local scaffolds can keep the dev default.

Why

A hardcoded dev kid against a managed instance whose kid is paidkey1 breaks token verification in the scaffold, which is exactly the zero-to-working-local-dev path the CLI exists to make fast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions