Skip to main content

OpenFin8:Core - Business Requirements & Functionality

Audience: product owners, business analysts, and anyone evaluating what openfin8-core does for the business. For architecture read README.md; for wire-level detail read DESIGN.md (OBARCH-1).

1. Business Purpose​

openfin8-core is the open-finance kernel: the shared implementation behind every jurisdiction adapter. It is a library crate - no process runs on it - and it delivers:

  • The consent authority - the provider's grant ledger and the recipient's connection registry (the two-ledger model), so that no customer data ever leaves an institution without a live, revocable, scope-limited consent.
  • Data minimization as an engine - the CSDF filter projects every response to the granted data clusters before serialization; unknown scopes grant nothing (fail-closed).
  • One code path, every market - the runtime Profile carries every jurisdiction identity (service type, scope vocabulary, schema, env prefix, standard version), so adding a market is a constructor and a thin binary - never a port, never a fork.
  • Signed, durable notifications - HMAC-signed webhook delivery with retry backoff, so recipients reliably learn about consent and account events.
  • The audit and evidence trail - every provider data call is audited (data_call* actions), feeding the per-market certification metrics.

2. Business Scope (What the Library Provides)​

#Capability areaWhat the business gets
1Consent ledgerGrant lifecycle (ACTIVE → REVOKED/EXPIRED), duration windows (ONE_TIME/PERSISTENT/TIME_BOUND + lookback), revocation records with reason + initiator
2Recipient registryThe two-ledger recipient plane: per-provider OAuth client cache (DCR), PKCE verifier + delegated-token custody, connection lifecycle
3CSDF minimizationResponse projection by granted clusters, scope, product category, and requested fields
4Provider catalogThe cross-env provider directory (auto-registered at env-init) recipients discover and connect to
5Money-movement initiationRecipient-initiated transfers/payments, consent-checked here, executed by the bank's Payments service - one executor
6NotificationsSubscription registry, HMAC-signed webhook delivery with backoff, polling feed
7Admin surfacesRFW admin pages (overview, provider, recipients, consents, CSDF, settings + the policy studio) rendered in the platform dashboard
8ConsumersBus consumers for env-init (provider self-registration, per-env policy-set seed) and the authorization-server grant event (ledger seed)
9Contract validationThe route contract + FAPI header validation (x-fapi-interaction-id echo) per standard profile
10Events16 outbound event types per adapter family (openfin8:{xx}:{resource}:{operation})
11Audit & evidencedata_call* audit rows + the certification-metrics counters
12HealthThe health surface the fleet supervisor polls

What the kernel does NOT own (business boundary):

Out of scopeOwned by
Account/transaction data (the data plane)The composing vertical (bank8:Ledger) - consumed via public APIs only
Money-movement executionThe composing vertical (bank8:Payments)
Statement bytes at restSentin8:Storage (signed URLs for download)
Identity, sign-in, the OAuth ceremony hostingSentin8:Auth (the kernel drives it per profile)
The jurisdiction identity, registration data, published-spec policyThe adapter binaries (this crate is jurisdiction-agnostic by design)

3. Business Capabilities​

CapabilityBusiness rule
Grant captureSeeded from the authorization server's grant event at code issuance - the grant ledger reflects the ceremony the customer actually completed
EnforcementEvery provider route passes the consent middleware on top of row-level security; a route cannot bypass it structurally
RevocationImmediate: a revoked consent stops serving on the next call; terminal - introspection can never revive one
ExpiryDuration-window driven, introspection-checked, never cached

3.2 The two-ledger model​

The provider's grant ledger and the recipient's consent registry live in separate tenants - no cross-tenant SQL ever. Either institution may run any technology; the only contract between them is standards-based OAuth at the provider's authorization server.

3.3 Data minimization (CSDF)​

Responses are projected to the granted clusters before serialization. The cluster vocabulary is profile data - FDX clusters and UK OB permission arrays are two vocabularies over the same filter engine - so a new market's vocabulary needs no engine change.

3.4 The runtime Profile​

One struct carries every identity string: service type (openfin8:ca), env prefix (OPENFIN8_CA_*), scope vocabulary (openfin8:ca:*), event family, schema, workload names, and the served standard version. Adapters construct it; everything else derives.

4. Business Events (Outbound)​

Per-adapter family openfin8:{xx}:*: consent created/updated/revoked, recipient consent started/refreshed/revoked, transfer created/ cancelled, payment created, recurring payment created, payee created, PIP party created, payment network revoked, notification subscription created/deleted, provider profile updated - consumed by recipient-side reconciliation and the delivery worker.

5. Business Rules & Invariants​

  • No provider route bypasses the consent middleware.
  • Revoked consents are terminal.
  • No plaintext delegated tokens or webhook secrets in any column - secret references only, resolved at call time.
  • Unknown scopes grant nothing (fail-closed minimization).
  • No cross-tenant SQL between the provider and recipient planes.
  • Every tenant-table write carries the tenant context in the same transaction (the platform's FORCE-RLS discipline).
  • The OBVERT boundary: this crate never imports another vertical's database - public API + SDK contracts only.

6. Target-User Roles & Use Cases​

RoleUse case
Adapter engineerEmbeds the kernel, supplies a Profile + registration; the served surface is complete without writing service code
Compliance officerReads the consent ledger, revocation records, audit trail, and certification metrics
Recipient product ownerRelies on the connection registry and event feed for reconciliation UX
Bank operatorEnables a jurisdiction per environment (sys.services); version + capability via config, not deploys

7. KPIs / Success Criteria​

  • Time-to-new-market: a new jurisdiction adapter = a Profile constructor + registration data (target: days, not quarters).
  • Zero-fork guarantee: no implementation code differs between adapters (auditable: adapters carry only main.rs + registration.rs + openapi.rs).
  • Consent enforcement coverage: 100% of provider routes behind the middleware (structural).
  • Certification readiness: per-market evidence counters derived from audited traffic, current at query time.

8. Dependencies & Reliance on Other Services​

DependencyWhat the kernel gets
Sentin8 platform SDKThe shell (boot, TLS, OpenAPI merge), Auth client, Bus, Shield policy engine, RFW admin framework
bank8:: SDK contractsLedger/Payments typed clients - the cross-vertical data plane (public APIs only)
Sentin8:AuthThe OAuth ceremonies; the grant-seed event
Sentin8:BusEvent transport (producer outbox + SSE consumers)
Sentin8:SecretsToken/secret reference resolution
Sentin8:SysEnvironment enablement events (env-init)
Sentin8:StorageStatement objects (signed-URL download)

9. Acceptance Criteria​

  • 91 unit tests green (consent state machines, CSDF filter per vocabulary, route contract, revocation model).
  • The US and Canadian adapters build against this crate unchanged - byte-for-byte the same implementation, different data.
  • Every identity string in the served surface derives from the Profile (verified during the OBVERT rename: no stragglers).
  • The published-spec policy is enforced per adapter by CI drift guards.

10. Open Business Questions​

  • Should the certification-metrics rollup grow a daily snapshot table
    • evidence admin page (deferred at scale in the original design)?
  • Is a response cache for recipient polling warranted before a customer hits FDX poll-guidance degradation (explicit trigger in the design)?
  • Should the staged-intent expiry sweep (OB's 24h intent retention) generalize into the kernel when the UK adapter lands, or stay adapter-owned until a second standard needs it?
  • Should the recipient plane grow a dashboard-grade connection health surface, or does the event feed suffice?

Architecture & Design: openfin8:core and its underlying concepts were designed by Hamid Jahanzad.