Skip to main content

sender-id-registry-service — Service Overview

Version: 1.0 Status: Draft Owner: Trust & Safety + Regulator-facing Last Updated: 2026-04-21 References: ADR-0004 §3, 07-epics-and-user-stories.md §6.3, 13-security-compliance-tenancy.md


1. Purpose

sender-id-registry-service is the platform's national authority for SMS sender-ID (alpha-ID and short-code) registration, KYC, verification, suspension, and reputation scoring. It exposes a public registry queryable by tenants, regulators, and citizens, and feeds gating decisions into compliance-engine, sms-firewall-service, and routing-engine.

The service is the platform's bid to become the sender-ID registry that ATRA eventually adopts as the national authority — analogous to India's DLT or KSA's CITC registry. This is a strategic play to lock in regulatory primacy and remove a major class of impersonation fraud.


2. Bounded Context

ConcernIn scopeOut of scope
Sender-ID registration with KYCCitizen ID issuance
Verification (DNS-TXT / OTP / notarised document)National-PKI authority issuance
Suspension, rotation, regulator export, public searchSender-ID deletion (audit-immortal)
Reputation scoring per sender-IDTenant compliance score (owned by compliance-engine)
Cross-feeding of compliance + fraud signals into reputationDetection of those signals

3. Key Responsibilities

  1. Accept tenant submissions for sender-IDs (alpha-IDs 1–11 chars, short-codes 4–6 digits, long codes E.164).
  2. Capture KYC of the registrant (commercial license / national ID / regulator letter / notarised authority); document hash + S3 ref retained.
  3. Verify the registrant's claim via one of: DNS-TXT challenge (for domain-affiliated alpha-IDs), OTP to registrant phone, or notarised document review.
  4. Maintain registry state machine: SUBMITTED → KYC_REVIEW → VERIFIED → ACTIVE → SUSPENDED → REVOKED.
  5. Publish Verify(senderId, tenantId) gRPC consumed by compliance-engine SENDER_ID rule and routing-engine last-mile veto.
  6. Compute reputation score per sender-ID daily from compliance hits, complaint rate, fraud signals, and DLR delivery patterns.
  7. Public search API for citizens: "Who registered sender-ID BANK-XYZ?" with verification level disclosed.

4. Dependencies

DirectionDependencyReason
InboundTenant API (REST + customer portal)Sender-ID submission
Inboundadmin-dashboard (T&S workbench)Approval workflow
Inboundcompliance-engine (gRPC Verify)Per-message SENDER_ID rule
Inboundrouting-engine (gRPC Verify)Last-mile veto
Inboundsms-firewall-service (gRPC Verify)Inbound MT firewall check
InboundCitizen-facing public search RESTVerification disclosure
Inboundregulator-portal-serviceRegistry export
OutboundNATS (sender.id.*)State change events
Outboundcompliance-engine (consume reputation)Reputation feeds compliance scoring
Outboundfraud-intel-service (consume signals)Fraud signals feed reputation
OutboundPostgres (sender_id_registry schema)Registry state
OutboundRedis (sid:verify:{senderId}:{tenantId})Hot-cache
OutboundVaultDocument-encryption keys
OutboundObject storageKYC document files

5. Runtime Topology


6. Key Design Decisions

  1. Verification level is first-class — every sender-ID carries verificationLevel{ NONE, OTP, DOCUMENT, NOTARISED, DOMAIN_DNS }. Compliance treatment varies by level (e.g., banks claiming BANK-XYZ must be NOTARISED + DOMAIN_DNS).
  2. Public registry by default — sender-IDs are public records. KYC documents are NOT public; only registrant org name + verification level + status are visible.
  3. Audit-immortal — sender-IDs are never deleted, only REVOKED. Re-registration requires re-verification.
  4. Reputation is a derived score — computed daily from compliance hits, complaint rate, fraud signals, DLR patterns. Range 0–100. Drives auto-suspension threshold.
  5. Restricted-name protection — names matching national-banking, government, MNO patterns require NOTARISED verification AND regulator letter.

7. Surface Inventory

InterfacePurposeAuth
REST POST /v1/sender-idsTenant submits sender-ID for registrationKong JWT (tenant)
REST PATCH /v1/sender-ids/:id/verificationTenant submits verification artifactKong JWT (tenant)
REST GET /v1/sender-ids/public/search?q=Citizen public searchNone (public)
REST POST /v1/admin/sender-ids/:id/decisionT&S approves/rejectsKong JWT (T&S role)
REST POST /v1/admin/sender-ids/:id/suspendSuspend with reasonKong JWT (T&S role)
REST GET /v1/admin/sender-ids/exportRegulator exportmTLS regulator role
gRPC Verify(senderId, tenantId) → VerifyResponsePer-message check; P95 ≤ 5 msService mesh mTLS
gRPC GetReputation(senderId)Reputation lookupService mesh mTLS
HTTP /health/live, /health/ready, /metricsK8s + PromNone / cluster
NATS produce sender.id.registered.v1, sender.id.suspended.v1, sender.id.revoked.v1, sender.id.reputation.changed.v1, sender.id.regulator.exported.v1Downstream
NATS consume compliance.message.blocked.v1, compliance.message.held.v1, fraud.detected.*Reputation inputs

8. Data Ownership

sender_id_registry schema:

  • sender_id_registry.sender_ids — registry rows with state machine
  • sender_id_registry.kyc_documents — pointers to S3 + hash + verification result
  • sender_id_registry.verifications — verification attempts log
  • sender_id_registry.reputation_history — daily reputation snapshots
  • sender_id_registry.restricted_patterns — regex of restricted-name patterns
  • sender_id_registry.audit — append-only state-transition log

9. Failure Modes

  • Verification storm (e.g., automated abuse) → rate-limit per registrant + per source IP; tarpit.
  • DNS-TXT verification target unreachable → retry policy; manual review fallback.
  • Reputation scorer cron failure → alert; previous reputation persists; manual re-trigger.
  • Public search abuse (scraping) → cache-then-block: response cached 60 s; >100 RPS from one IP → tarpit.

10. Open Points

IDQuestionOwnerResolution
SID-OPEN-001National-banking pattern list — who maintains the protected-name list?Legal + BanksTBD
SID-OPEN-002Notarised document acceptance — which notaries does Ghasi recognise?LegalTBD
SID-OPEN-003Regulator export schedule — daily, weekly, monthly?Regulator LiaisonTBD
SID-OPEN-004Public search rate-limit policy — what's the citizen-protection threshold?T&S CouncilTBD