Immutable solution version
A user got access they should not have in Oso Cloud - debug with Logs and Explain
Complete solution
Shows how to fix a user got access they should not have in Oso Cloud - debug with Logs and Explain. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Per Oso Cloud docs: use Logs to confirm the request arrived and Explain to trace which facts and policy rules produced the decision. 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.
Steps
- Per Oso Cloud docs: use Logs to confirm the request arrived and Explain to trace which facts and policy rules produced the decision.
- 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.
When to use
You are seeing this: Debug: 1) Reproduce by logging in as Bob and attempting the edit. Use this skill when you run into "A user got access they should not have in Oso Cloud - debug with Logs and Explain".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
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 3 · 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>