Open finance consent checks for UAE LFIs: an optional defense-in-depth how-to
The UAE API Hub enforces open finance consent. This how-to adds an optional defense-in-depth consent check on an LFI's Ozone Connect proxies in Zerq.
- how-to
- banking
- workflows
- compliance
Open finance consent enforcement in the UAE happens at the API Hub, not at the bank. Under the Central Bank of the UAE's Open Finance Regulation (Circular No. 03/2025), TPPs never call a licensed financial institution (LFI) directly: they call the Hub, and the Hub is the only caller of your Ozone Connect API, over mutual TLS with its C4 client certificate against your S4 server certificate, plus the application-layer option you chose. The Hub's Consent Manager is the consent system of record and rejects any request on a consent that is not Authorized. Its Integration Overview says LFIs "are not required to provide an externally facing API, manage TPP identities or permissions, or handle consent parameters for each API request."
So this is not a guide to making your gateway the consent enforcer. It builds an optional defense-in-depth check on your Ozone Connect proxies: before forwarding a Hub call, Zerq looks the consent up in your own records and refuses anything not Authorized there. It earns its place in narrow cases, chiefly drift between your own suspension records and the Hub, and it adds time to every Hub call, which counts against the Hub's response-time target of 500 ms at p95 per endpoint. If neither applies to you, leave consent to the Hub.
The build sits on the Hub client and Ozone Connect collection from our LFI implementation guide; start there if your Ozone Connect API is not behind Zerq yet. This post ends with the request-log evidence and a go-live checklist.
Where consent is enforced in UAE open finance
Open banking gateway blueprints from the UK and EU put the bank's gateway in front of every TPP: a client and certificate per TPP, consent checked at the bank's edge, partner throttling. That model is bilateral, and it does not apply in the UAE. The Hub and the Open Finance Trust Framework check each TPP's licence and roles, run the FAPI 2.0 security profile and hold the consent record. Customers withdraw consent through the TPP or through your consent management interface, and Article 22 requires withdrawal to be no harder than granting. Either way the change lands at the Consent Manager, and the Hub stops relaying calls on that consent.
At the LFI that leaves one caller. Zerq sees one client for the Hub per environment, not one per TPP, so the client ID is the same on every call. The TPP behind a call is named by the o3-caller-* headers the Hub adds, which the request log records, and every call carries o3-ozone-interaction-id, the Hub's identifier for the exchange. A rate limit on the Hub client protects your core systems' capacity; it is not a per-TPP throttle.
When an LFI-side check earns its place
The Hub can only enforce the consent state it knows. Your systems change consent state too: the fraud team suspends consents when it blocks an account, and a customer revokes one in your app. Each change reaches the Consent Manager as an outbound call from your back ends over C3, and until that call lands, the Hub still treats the consent as Authorized and keeps relaying TPP calls on it. A failed call or a retry queue stretches that gap from milliseconds to hours. A check on your side of the link closes it with your own record.
The other reason that comes up is a risk function that wants an independent control, with its own evidence in the gateway log. Neither reason replaces the Hub's check. The Ozone Connect guide calls Consent.Invalid "unlikely to be implemented by the LFI", and that is the right default; this post is for institutions that decide otherwise.
Weigh the cost before you build. Every consent-bound call gains a lookup that counts against the response-time target, and a gap in your records refuses a good call. A stale Authorized in your records costs nothing, because the Hub refuses that consent first; a missing record turns a valid call into a refusal. The check is only as good as the record behind it.
Building the optional consent check in Zerq
Step 1: start from the Hub client and the Ozone Connect collection
The check is a workflow on proxies you already serve. From the LFI guide you need:
- an ingress that terminates the Hub's mTLS, presents S4, pins the Hub's C4 subject, admits only the Hub's egress IP, strips inbound
X-Client-IDandX-Profile-IDand sets them for the Hub client, plus theAuthorizationheader an mTLS profile still requires; - one Zerq client for the Hub per environment, with a profile for your application-layer option, and no client or certificate per TPP;
GATEWAY_ENABLE_CACHE=false, because every Hub response is customer-specific;- the Ozone Connect collection, with its base path (here
/ozone-connect) and published proxies.
Then choose where the check runs: consent-bound Bank Data Sharing reads such as GET /accounts/{accountId}/transactions. Leave the health checks, the Consent Events and Actions endpoints and POST /consent/action/validate without it; none of them is a call on an Authorized consent, so the check would refuse valid traffic. Service initiation proxies can take the same check, with the request body and their extra headers mapped in the forward step. The finished workflow:
http_trigger_1
└─ check_consent (http_request_node)
├─ success → consent_gate (condition_node)
│ ├─ authorized → forward_transactions (http_request_node)
│ │ ├─ success → return_upstream (response_node)
│ │ └─ error → upstream_error (response_node)
│ ├─ suspended → consent_suspended (response_node, 403)
│ └─ refused → consent_refused (response_node, 403)
└─ error → lookup_failed (response_node, 500)
Step 2: keep a consent mirror the gateway can query fast
The lookup goes to your own record, not to the Hub's Consent Manager. The Consent Manager is the system you are double-checking, and calling it takes your C3 certificate, plus Sig4 JWT Auth if you chose it, from your back ends. A mirror is a small service over the consent and suspension state your institution holds:
- Write the record when your authorization app's
doConfirmcall succeeds, so a new consent is in the mirror before its first data call. - Apply your own suspensions and revocations to the mirror first, then send them to the Consent Manager.
- Optionally apply Hub consent events, if you host the Consent Events endpoint, so TPP-side revocations reach the mirror too.
- Backfill existing consents before you enable the check, including the ones the Test Suite uses.
Give it one read endpoint that answers every lookup with 200 and Content-Type: application/json, which lets the workflow read the status field. An ID it does not hold gets a status of NotFound, so a non-2xx answer always means the lookup itself failed:
{ "consentId": "aac-7f41c2…", "status": "Suspended", "updatedAt": "2026-09-21T09:31:02Z" }
Keep it in memory or Redis-backed, next to Zerq. The lookup gets tens of milliseconds, not hundreds.
Step 3: read the consent ID and look it up
On each chosen proxy, open the proxy row and click Workflow. The trigger's ID in the builder is http_trigger_1 here. The Hub sends the consent in o3-consent-id, and the trigger exposes request headers with canonicalized keys and array values, so the ID is request.headers['O3-Consent-Id'][0]. Add an http_request_node after the trigger:
{
"id": "check_consent",
"type": "http_request_node",
"data": {
"config": {
"timeout_ms": 1000,
"credentials_id": "<consent-mirror-credential-id>"
},
"inputs": {
"url": "https://consent-mirror.internal.example.ae/v1/consents/{{ encodeURIComponent($json['http_trigger_1'].request.headers['O3-Consent-Id'][0]) }}",
"method": "GET",
"headers": {
"Accept": ["application/json"],
"o3-ozone-interaction-id": "{{ $json['http_trigger_1'].request.headers['O3-Ozone-Interaction-Id'][0] }}"
}
}
}
}
Passing the interaction ID lets the mirror's own log line up with the gateway's. Leave out retry_config: a retry spends time the forward step needs, and a failed lookup already has a defined answer (Step 5). The node's success output fires on a 2xx answer; error fires on transport failures, timeouts and any non-2xx answer.
Step 4: pass only Authorized, and catch Suspended
Add a condition_node on the lookup's success output. Conditions are plain JavaScript over $json, without template braces, and the first match wins:
{
"id": "consent_gate",
"type": "condition_node",
"data": {
"config": {
"conditions": [
{
"condition": "$json['check_consent'].response.body.status === 'Authorized'",
"output": "authorized"
},
{
"condition": "$json['check_consent'].response.body.status === 'Suspended'",
"output": "suspended"
}
],
"default_output": "refused"
}
}
}
Only Authorized reaches the forward step. Suspended gets its own branch because it is the status this check exists for, and the customer deserves a specific message. Everything else, whether revoked, expired, NotFound or a body that is not the JSON you expect, falls through to refused. Never write the condition the other way round, as a list of statuses to deny: a status you did not list would pass.
Step 5: refuse in the Ozone Connect error shape, and fail closed
The Hub relays Ozone Connect errors to the TPP, which may show errorMessage to the customer, so write it for a person. A body in any other shape reaches the TPP as a generic error. Wire suspended to a response_node:
{
"id": "consent_suspended",
"type": "response_node",
"data": {
"config": { "continue_after_response": false },
"inputs": {
"status_code": 403,
"headers": { "Content-Type": ["application/json"] },
"body": {
"errorCode": "Consent.Invalid",
"errorMessage": "Your bank has paused access through this consent. Contact your bank to restore it."
}
}
}
}
Wire refused to a second response_node, consent_refused, with the same status and code and a message such as "This consent is no longer valid. Please renew it with the provider." We pair Consent.Invalid with 403; confirm the pairing against the Ozone Connect error table for the version you implement.
The lookup's error output is the fail-closed path. A failed lookup must never reach the forward step, and a recoverable error lets the TPP try again:
{
"id": "lookup_failed",
"type": "response_node",
"data": {
"config": { "continue_after_response": false },
"inputs": {
"status_code": 500,
"headers": { "Content-Type": ["application/json"] },
"body": {
"errorCode": "GenericRecoverableError",
"errorMessage": "Account data is temporarily unavailable. Please try again shortly."
}
}
}
}
Give each branch its own response_node. None of the three refusals calls the back end.
Step 6: forward Authorized calls inside the response-time target
On the authorized output, forward with an http_request_node, mapping the Hub's o3-* headers and the query string explicitly. The query carries paging, filters and, on list endpoints, the consented scope; drop it and the back end answers with more than the call asked for.
{
"id": "forward_transactions",
"type": "http_request_node",
"data": {
"config": {
"timeout_ms": 1000,
"credentials_id": "<accounts-adapter-mtls-credential-id>"
},
"inputs": {
"url": "https://accounts-adapter.internal.example.ae{{ $json['http_trigger_1'].request.path.replace('/ozone-connect', '') }}",
"method": "GET",
"headers": {
"o3-provider-id": "{{ $json['http_trigger_1'].request.headers['O3-Provider-Id'][0] }}",
"o3-caller-org-id": "{{ $json['http_trigger_1'].request.headers['O3-Caller-Org-Id'][0] }}",
"o3-ozone-interaction-id": "{{ $json['http_trigger_1'].request.headers['O3-Ozone-Interaction-Id'][0] }}",
"o3-consent-id": "{{ $json['http_trigger_1'].request.headers['O3-Consent-Id'][0] }}",
"o3-psu-identifier": "{{ $json['http_trigger_1'].request.headers['O3-Psu-Identifier'][0] }}"
},
"query_params": "{{ $json['http_trigger_1'].request.query }}"
}
}
}
Map the operation's other o3-* headers the same way. The back end still matches records to o3-psu-identifier; the consent check does not replace that. Wire the forward's success output to a response_node, return_upstream, whose status_code and body are the forward's response.status_code and response.body. Wire its error output to the error mapping from Step 6 of the LFI guide, so back-end codes such as Consent.InvalidUserIdentifier reach the Hub in shape.
On timing: the Hub's target is 500 ms at p95 per endpoint per day, measured from the Hub's side, so it includes time spent outside Zerq and your back end. Keep the lookup small next to the forward step (about 50 ms is a reasonable aim) and keep your own p95 well below 500 ms. timeout_ms is the backstop, not the target: it defaults to 30 seconds, so set both nodes to 1000, the node's minimum, and leave retries off on both, so a stalled mirror or back end fails within a second instead of holding the call. Then measure: filter the dashboard to the Ozone Connect collection and the Hub client and read the Latency (p95) card, and with METRICS_ADDR set, the 250 ms and 500 ms buckets of the zerq_gateway_request_duration_seconds histogram show the share of calls under either threshold for each proxy route.
Step 7: test every branch, then enable
- Click Listen for a request (next to Test workflow at the bottom of the canvas) and send a sample request for each case: an Authorized consent, a Suspended one, an ID the mirror does not hold, the mirror stopped, and the back end stopped. Only the Authorized cases should call the back end.
- Choose ⋯ › Validate, then Save, then turn on the Active switch in the editor header. Until it is on, the proxy forwards directly without the check. The Hub still enforces consent, but confirm the enabled state before you count on the check.
- Rerun the Ozone Connect Test Suite with the workflow enabled. It must stay at 100%, which needs every consent it uses in the mirror.
What the request log records for allowed and refused calls
Because the refusal happens inside the gateway, allowed and refused calls land in the same request log with the same fields. Both carry the Hub client's IDs; the TPP and the exchange come from the logged headers. An allowed call:
{
"request_id": "7c9e4b2a-51d3-4f8e-9a06-2b7d1c3e8f45",
"created_at": "2026-09-21T09:14:07Z",
"method": "GET",
"path": "/ozone-connect/accounts/acc-8c04/transactions",
"status": 200,
"latency": 131,
"client_id": "66f2b1c4e8a9d30012ab4c71",
"profile_id": "66f2b1d9e8a9d30012ab4c72",
"request_headers": {
"O3-Caller-Org-Id": "3c1d2b9e-…",
"O3-Consent-Id": "aac-7f41c2…",
"O3-Ozone-Interaction-Id": "e81f04a6-…"
}
}
And a refused call on the same consent, after the fraud team suspended it:
{
"request_id": "d3b81f6e-2c47-49a0-b8e5-7f1a9c04d2e6",
"created_at": "2026-09-21T09:31:44Z",
"method": "GET",
"path": "/ozone-connect/accounts/acc-8c04/transactions",
"status": 403,
"latency": 21,
"client_id": "66f2b1c4e8a9d30012ab4c71",
"profile_id": "66f2b1d9e8a9d30012ab4c72",
"request_headers": {
"O3-Caller-Org-Id": "3c1d2b9e-…",
"O3-Consent-Id": "aac-7f41c2…",
"O3-Ozone-Interaction-Id": "52c9d0b7-…"
},
"response_body": "{\"errorCode\":\"Consent.Invalid\",\"errorMessage\":\"Your bank has paused access through this consent. Contact your bank to restore it.\"}"
}
(These are illustrative renderings of the log fields. target_url stays empty for both, because it is set only for direct-path and proxy_node calls.)
Three details carry the evidence. O3-Caller-Org-Id names the TPP, which client_id cannot, since it is the Hub on every call. O3-Ozone-Interaction-Id is the Hub's identifier for the exchange, so a Nebras ticket or a TPP dispute maps to one log entry. And because the forward step passes the interaction ID to the back end, a back end that logs it has no line for a refused interaction: the data was never read. The response body records exactly what the TPP was told.
How compliance reviews refusals
- Open Logs, set Status to
403and Path to/ozone-connect/accounts, and pick the 7d quick range. - Put
Consent.Invalid", with the closing quote, in the Payload filter. Payload search covers request and response bodies, so it separates the check's refusals from other 403s, and the quote keeps out back-end codes that start the same way, such asConsent.InvalidUserIdentifier. - Bookmark the view: active filters sync into the browser URL. The quick range is saved as fixed dates, so click 7d again when you reopen it.
- For one TPP or one interaction ID, query the log store directly, because payload search skips headers and Client ID is the Hub on every call:
db.logs.find({
"request_headers.O3-Caller-Org-Id": "3c1d2b9e-…",
status: 403
}).sort({ created_at: -1 })
These entries belong to the five-year record the Standards ask for. Entries are kept until REQUEST_LOG_RETENTION_DAYS deletes them (unset by default), so set it at or beyond five years or leave it unset, archive the request log as Step 8 of the LFI guide describes, and restrict access, because logs hold personal data. Commit an Export Collection file after each approved change to the workflow, so the check's definition has a reviewed history. Give compliance read-only accounts: the viewer role opens Logs, and the auditor role opens Audit Logs.
Go-live checklist
- The ingress, the Hub client and
GATEWAY_ENABLE_CACHE=falsefrom the LFI guide in place: one client per environment, no per-TPP clients or certificates. - The check attached only to consent-bound proxies; health checks, consent events and actions, and
validateleft without it. - The mirror written at
doConfirm, your own suspensions and revocations applied before the Consent Manager call, existing and Test Suite consents backfilled. - The condition passes only
Authorized;Suspendedand every other status are refused withConsent.Invalidin the Ozone Connect shape. - The fail-closed path tested with the mirror stopped:
GenericRecoverableError, nothing forwarded. timeout_msset on bothhttp_request_nodes, retries off, and p95 latency well below the Hub's 500 ms target.- The forward step maps the
o3-*headers and the query string, and its error path returns prescribed codes. - The workflow saved and enabled, and the Test Suite at 100% with it on.
- Refusals visible in the request log with
O3-Ozone-Interaction-IdandO3-Caller-Org-Id, and the per-TPP query saved for compliance. REQUEST_LOG_RETENTION_DAYSunset or at five years or more, and the request log archived as Step 8 of the LFI guide describes.- A collection export committed after the last workflow change.
What this looks like in practice
Illustrative scenario, not a specific customer deployment.
A UAE retail bank's fraud team suspends open finance consents when it blocks an account, and a back-end job sends each suspension to the Consent Manager. After a C3 certificate rotation went wrong, the job's calls failed for most of a day, and the Hub kept relaying TPP calls on consents the bank had already suspended. The accounts service answered them, because nothing on the bank's side of the link checked.
The risk function asked for an independent control, and the platform team added this check to the Bank Data Sharing proxies: a Redis-backed mirror fed by the authorization app and the fraud system and written before the job sends anything, lookups well inside their 50 ms share and fail-closed branches. Test Suite runs stayed at 100% once the test consents were backfilled. The next time the job's queue backed up, the request log showed 403s with Consent.Invalid for exactly the suspended consents, each with its interaction ID, and the accounts service logged nothing for them.
The Hub enforces consent in UAE open finance, and most LFIs need nothing more. Where your own suspension records can run ahead of the Hub, a short workflow on the proxies you already serve closes the gap: one lookup, Authorized or refused, prescribed errors, and evidence in the same request log as every other Hub call.
Zerq is an enterprise API gateway built for regulated industries — one platform for API management, AI agent access, compliance audit, and developer portal, running entirely in your own infrastructure. See how it works or request a demo to walk through your specific requirements.