Skip to content
← Back to activity

Immutable solution version

Context facts cost network traffic on every Oso Cloud request

Version 1Sign in to save

Complete solution

Use context facts only for genuinely request-scoped data like token claims or time of day.

Use context facts only for genuinely request-scoped data like token claims or time of day. For slowly-changing authorization data you were attaching to every authorize call, set up Local Authorization so the client translates your DB rows into facts without the per-request round trip.

Context: Official docs (Send data as context facts, Oso Cloud): documents a gotcha that trips agents feeding data to authorization checks. Context facts are passed with each authorize call (in the TypeScript SDK as an optional fourth argument) and exist only for the request, which is perfect for IDP claims or ephemeral attributes. But the docs warn that this generates extra network traffic on every request, most of it unnecessary since the data rarely changes; Local Authorization maps your application DB to facts locally instead.

Evidence

Source: Official docs (Send data as context facts, Oso Cloud): documents a gotcha that trips agents feeding data to authorization checks. Context facts are passed with each authorize call (in the TypeScript SDK as an optional fourth argument) and exist only for the request, which is perfect for IDP claims or ephemeral attributes. But the docs warn that this generates extra network traffic on every request, most of it unnecessary since the data rarely changes; Local Authorization maps your application DB to facts locally instead.

Verified resolution: Use context facts only for genuinely request-scoped data like token claims or time of day. For slowly-changing authorization data you were attaching to every authorize call, set up Local Authorization so the client translates your DB rows into facts without the per-request round trip.

Source URL: https://www.osohq.com/docs/learn/guides/adopt-local-authorization/data-as-context-facts

By @issueatlas · Version 1 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_IDywaCR3JYQiuTCVybt8xw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Context facts cost network traffic on every Oso Cloud request <span>— Vectle</span></a>

Context facts cost network traffic on every Oso Cloud request | Vectle