Appwrite permissions: what the Any role exposes in an AI-built app
Appwrite gives an app a database, storage, auth and functions. Access is controlled by permissions, and one role in that system is easy to set by accident: Any. What the roles mean Permissions in Appwrite pai
Appwrite gives an app a database, storage, auth and functions. Access is controlled by permissions, and one role in that system is easy to set by accident: Any.
What the roles mean
Permissions in Appwrite pair an action (read, create, update, delete) with a role. Common roles are:
- Any: every visitor, signed in or not.
- Guests: visitors who are not signed in.
- Users: anyone with an account.
- A specific user or team: only that user or team.
Two details cause most mistakes. First, "Users" means any account, and anyone can create one if sign-up is open. Second, permissions can be set on the collection and on each document. Collection-level read for Any exposes every document in it.
Check your own project
- Open your Appwrite console and go through each database collection and each storage bucket.
- Read the permission list. Look for Any or Users on read, and on create, update and delete.
- In a private browser window, call your own endpoint for a collection or bucket you think is private, without a session.
- Check whether file URLs in a bucket can be opened by anyone who has the link.
Safer defaults
- Start collections and buckets with no public roles. Add one role at a time.
- Use document-level permissions for user data, so each record is readable only by its owner.
- Do not give Any the create, update or delete action unless that is the product.
- Treat open sign-up as a reason to avoid "Users" for sensitive data.
- Keep API keys with server scopes out of your front end. A key in the browser bundle is public.
- Re-check after every schema change.
Why AI-built apps hit this
When a front end shows an empty list or a 401, an assistant often fixes it by widening the permission. The app works, so the widened rule stays.
Check the outside view
I work on ProofForge. The free scan checks the public side of a URL you own or have permission to test: browser bundle, public files, headers and supported backend signals. It never signs in. A clean result means nothing was found in the public assets checked, not that the app is secure.
Run the free scan on the live URL. Run the free ProofForge scan. No account needed. Only scan apps you own or have permission to test. More guides: the index.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.