[M-14] Cert-embedded URLs (AIA/OCSP/CDP) compile-time hardcoded to mdidws.mypqc.com.my — must be externalized for the eMudhra variant #26

Closed
opened 2026-11-14 18:28:53 +01:00 by amiryahaya · 0 comments
Owner

Finding

The URLs baked permanently into issued certificates are compile-time config with a production-looking default; crl_base_url isn't set anywhere and falls back to the same hardcoded host in code. Any deployment on another domain embeds wrong URLs forever. This is also the core eMudhra-onboarding blocker, together with branding (login/dev_doc pages), the SOAP endpoint default (M-6) and client credentials.

Evidence

  • config/config.exs:13-14 — ocsp/aia base URLs
  • lib/mdid_ws/cert_management/crl_publisher.ex:49, 69-72; ocsp_responder.ex:15; issuer_manager.ex:23 — hardcoded @default_*_base_url
  • .env.example — no corresponding vars

Impact

Certificates issued by this deployment point at someone else's OCSP/CRL/AIA for their entire validity; eMudhra branding/config cannot be set per deployment.

Fix

  • Move ocsp_base_url / issuer_aia_base_url / crl_base_url to runtime.exs env vars with no default in :prod (fail loudly if unset)
  • Externalize branding and SOAP endpoint per client; parameterize the seeded client credentials

Line numbers refer to the initial import commit 282cb11. Source: comprehensive audit, 2026-11-12 (first review of this codebase).

## Finding The URLs baked permanently into issued certificates are compile-time config with a production-looking default; `crl_base_url` isn't set anywhere and falls back to the same hardcoded host in code. Any deployment on another domain embeds wrong URLs forever. This is also the core eMudhra-onboarding blocker, together with branding (login/dev_doc pages), the SOAP endpoint default (M-6) and client credentials. ## Evidence - `config/config.exs:13-14` — ocsp/aia base URLs - `lib/mdid_ws/cert_management/crl_publisher.ex:49, 69-72`; `ocsp_responder.ex:15`; `issuer_manager.ex:23` — hardcoded `@default_*_base_url` - `.env.example` — no corresponding vars ## Impact Certificates issued by this deployment point at someone else's OCSP/CRL/AIA for their entire validity; eMudhra branding/config cannot be set per deployment. ## Fix - [ ] Move ocsp_base_url / issuer_aia_base_url / crl_base_url to runtime.exs env vars with no default in :prod (fail loudly if unset) - [ ] Externalize branding and SOAP endpoint per client; parameterize the seeded client credentials _Line numbers refer to the initial import commit `282cb11`. Source: comprehensive audit, 2026-11-12 (first review of this codebase)._
Sign in to join this conversation.
No description provided.