Skip to content

api-gateway JWT secret falls back to a dev value in env #563

Description

@therealjhay

ProblemThe gateway defaults the JWT secret to a known development string when unset; in a misconfigured prod it silently uses the known secret.

  1. Default known secret.
  2. No startup guard for prod.
  3. Forged tokens possible.

Solution

  • Fail startup when the JWT secret is missing or the default in prod.
  • Add a secret-strength check.
  • Test the guard.

Acceptance Criteria

  • Prod refuses to boot with a weak/default secret.
  • Dev still works.
  • pnpm --filter api-gateway build passes.

Note for Contributors: Write a clear PR description. Show the prod boot guard.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardThird CampaignCampaign: Third Campaign

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions