MRHub
MRHub is Roche’s master data management system. It provides reference data for the G2 validity gate in the Silver layer — answering questions like “Is this site ID a real Roche facility?” or “Is this material code valid?” Records that fail MRHub validation are filtered out of Silver views, visible in Bronze but excluded from downstream consumption.
MRHub also publishes change events via Solace, allowing the pipeline to react to reference data updates in near-real-time.
Connection Details
Section titled “Connection Details”| Property | Value |
|---|---|
| URL | TBD (awaiting A03 resolution) |
| Auth method | REST API key |
| Network | Roche corporate network (VPN required) |
| Access task (REST) | A03 |
| Access task (Solace events) | A04 |
| GitHub issue | #24 |
Environment Variables
Section titled “Environment Variables”| Variable | Source | Description |
|---|---|---|
MRHUB_BASE_URL | Vault common/mrhub | Base URL for MRHub REST API |
MRHUB_API_KEY | GitHub Actions secrets | API key for authenticated access |
CLI Modules
Section titled “CLI Modules”| Module | Usage |
|---|---|
rdt-model-policy | Compiles G2 validity checks referencing MRHub lookup data |
rdt-model-store | Silver view predicates that filter against MRHub-validated identities |
Data Flow
Section titled “Data Flow”MRHub data is not queried at request time. Instead:
- A CronJob (
bundle-refresh-cronjob.yaml) periodically exports MRHub snapshots - The snapshot is stored in a Kubernetes ConfigMap
- OPA loads the ConfigMap as a bundle for O(1) lookups during policy evaluation
Access Verification
Section titled “Access Verification”Script: scripts/access/check-mrhub.sh
Required tools: curl
Checks performed:
- HTTP connectivity to MRHub endpoint (if
MRHUB_BASE_URLis set) - HTTP status code validation (200/204 = pass, timeout = network issue)
Expected state: skip — A03 not yet resolved.
Current Status
Section titled “Current Status”- Access: Not started — needed for Phase 2 (Silver layer G2 validation)
- Workaround:
StubClientwith fixture reference data for development and testing - Impact: Silver view predicates use hardcoded reference data in stub mode; real MRHub integration enables dynamic validation
G2 Validity Checks (MRHub-powered)
Section titled “G2 Validity Checks (MRHub-powered)”| Check type | Example | Silver view behaviour |
|---|---|---|
| Site identity | ”Is site_id X a valid Roche facility?” | Excluded if invalid |
| Material code | ”Is material M registered in MRHub?” | Excluded if unregistered |
| Organization | ”Does org_unit U exist in the hierarchy?” | Excluded if orphaned |
| Referential integrity | ”Does parent_id P exist?” | Excluded if dangling reference |