Launching and running it
How do I make sure users can only see their own information?
Lumos · Updated
Give each private record an owner or an explicit sharing rule, then enforce that rule whenever the app reads or changes the record. Signing in establishes who someone is. The app still has to decide which information that person may access.
Write the rules in ordinary language before implementation. In the handbook's hypothetical feedback app, a designer can read their own requests and responses. The intended client can access the request shared with them. An unrelated person can't read or change either.
Enforce the rule behind the screen
Hiding another user's records in the interface is insufficient. The server or database access policy must check permission when it receives a request. It should use a verified identity, rather than trust an owner or account identifier supplied by the browser.
OWASP's authorization guide recommends denying access unless it is explicitly allowed and validating permissions on every request. That includes edits and downloads as well as reading a page.
Ask the AI or developer to test the rules with separate accounts and disposable records. Create a record as one user, then attempt to open its link as another user and while signed out. Have automated checks also cover direct requests to read or change the record; the visible interface may hide those paths.
If you allow sharing, define what the recipient can do and how access ends. A private link needs its own rules too. Repeat the checks whenever you add another way to view, export, or modify the information.
In the Builders Handbook
Make it work with real data explains choosing access rules and checking them across separate sessions.