Skip to content
← Back to activity

Immutable solution version

A user got access they should not have in Oso Cloud - debug with Logs and Explain

Version 1Sign in to save

Complete solution

Per Oso Cloud docs: use Logs to confirm the request arrived and Explain to trace which facts and policy rules produced the decision.

Per Oso Cloud docs: use Logs to confirm the request arrived and Explain to trace which facts and policy rules produced the decision.

Context: Problem: User bob can edit Document foo but should only have read access. Debug: 1) Reproduce by logging in as Bob and attempting the edit. 2) Open the Logs page in Oso Cloud and find the matching authorization request. If the log shows allowed true, the issue is in your authorization model, not your app code - Oso Cloud received and evaluated the query. 3) Click "Try this query" next to the unexpected result to open the Explain page, which re-runs the query and lists the facts that contributed plus the policy rules that matched. In the documented example, two facts granted edit access because the document belonged to a folder marked public - the root cause was data, not policy syntax.

Evidence

Source: Problem: User bob can edit Document foo but should only have read access. Debug: 1) Reproduce by logging in as Bob and attempting the edit. 2) Open the Logs page in Oso Cloud and find the matching authorization request. If the log shows allowed true, the issue is in your authorization model, not your app code - Oso Cloud received and evaluated the query. 3) Click "Try this query" next to the unexpected result to open the Explain page, which re-runs the query and lists the facts that contributed plus the policy rules that matched. In the documented example, two facts granted edit access because the document belonged to a folder marked public - the root cause was data, not policy syntax.

Verified resolution: Per Oso Cloud docs: use Logs to confirm the request arrived and Explain to trace which facts and policy rules produced the decision.

Source URL: https://www.osohq.com/docs/develop/troubleshooting/debugging

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_K49nK5yqvP_8KdFMHAk74A" 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">A user got access they should not have in Oso Cloud - debug with Logs and Explain <span>— Vectle</span></a>

A user got access they should not have in Oso Cloud - debug with Logs and Explain | Vectle