#26: configurable issuer CN, OpenAPI URL and dev seed credentials #61

Merged
amiryahaya merged 3 commits from fix/26-config-branding-seed into main 2026-11-15 17:52:21 +01:00
Owner

Closes #26 (remaining bullets; the URL externalisation landed in B2).

  • Default issuer CN for Trustgate SOAP is now :default_issuer_cn config (default MyTrust Digital ID Class 3 CA); MDID_DEFAULT_ISSUER_CN overrides it, blank ignored. OpenAPI text and the dev_doc page show the configured value.
  • OpenAPI server URL comes from :public_base_url (MDID_PUBLIC_BASE_URL in prod) instead of the hardcoded mypqc host.
  • Dev/test seed client reads MDID_SEED_CLIENT_ID / MDID_SEED_CLIENT_SECRET (blank = default). Prod never seeds; the prod boot guard still checks only the literal mdid_ws_client, documented in .env.example.

No behaviour change with the variables unset. Not done: scripts still default CLIENT_ID to mdid_ws_client; the mypqc.com.my default stays as the dev/test fallback in config/config.exs.

Verification: mix precommit 327 passed; whole-app coverage 83.86% (changed modules: ClientCredentials 87.69%, Status 96.08%, ApiSpec 100%). Two-pass review: Pass 1 found a duplicate config key and blank-env handling, Pass 2 found blank seed vars; all fixed. Not checked: Docker build, the prod runtime.exs block under a real release boot, XML escaping of a custom issuer CN in SOAP.

🤖 Generated with Claude Code

Closes #26 (remaining bullets; the URL externalisation landed in B2). - Default issuer CN for Trustgate SOAP is now `:default_issuer_cn` config (default `MyTrust Digital ID Class 3 CA`); `MDID_DEFAULT_ISSUER_CN` overrides it, blank ignored. OpenAPI text and the dev_doc page show the configured value. - OpenAPI server URL comes from `:public_base_url` (`MDID_PUBLIC_BASE_URL` in prod) instead of the hardcoded mypqc host. - Dev/test seed client reads `MDID_SEED_CLIENT_ID` / `MDID_SEED_CLIENT_SECRET` (blank = default). Prod never seeds; the prod boot guard still checks only the literal `mdid_ws_client`, documented in `.env.example`. No behaviour change with the variables unset. Not done: scripts still default `CLIENT_ID` to `mdid_ws_client`; the `mypqc.com.my` default stays as the dev/test fallback in `config/config.exs`. Verification: `mix precommit` 327 passed; whole-app coverage 83.86% (changed modules: ClientCredentials 87.69%, Status 96.08%, ApiSpec 100%). Two-pass review: Pass 1 found a duplicate config key and blank-env handling, Pass 2 found blank seed vars; all fixed. Not checked: Docker build, the prod `runtime.exs` block under a real release boot, XML escaping of a custom issuer CN in SOAP. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix: #26 review — blank seed env vars fall back to defaults, test cleanup order, docs
All checks were successful
Lint / lint (pull_request) Successful in 1m40s
Security / Dependency advisories (mix hex.audit) (pull_request) Successful in 18s
Security / Secret scan (gitleaks) (pull_request) Successful in 11s
Unit tests / test (pull_request) Successful in 2m27s
943d16d37c
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.