- See who is a member, and which organization or project role they hold
- Let people request just-in-time access to the organization and to a project, as Read-Only, Developer, Administrator, or Owner
- Invite someone who is not yet a member, and remove them when access should end
- Optionally review the Postgres role on a project’s Auth users, for people Opal already knows
- Delegate approvals to the right owners, and revoke access when a time-bound grant expires
Supported resources
Requirements
Before you begin, you must:- Be an Opal Admin.
- Be an Owner of the Supabase organization. The token acts as the person who creates it. Changing roles and inviting members needs an Owner, and Supabase only allows those changes on a Team or Enterprise plan.
- Be on version
1.1262.0or later, if you self-host Opal
1. Create a personal access token
In Supabase, open Account, then Access Tokens, and create a fine-grained token scoped to this organization. Give the token Read access to:- Organization Settings
- Organization Members
- Organization Projects, if Opal should sync projects
- Projects, if Opal should sync projects
A classic account-wide Owner token also works, as a last resort. Prefer a fine-grained token scoped to the one organization, with only the permissions above.
2. Create the Supabase app in Opal
In Opal, go to Inventory > + App and select Supabase.
Opal checks the token when you save the app.
3. Check the app setup
Open the app’s Setup tab.4. Import the organization and projects
Opal pulls access only for items you import.- On the app’s Assets tab, select Import assets.
- Import Supabase Organization, and the projects you want people to request.
- Turn on requests for those items.
<project> Auth, only when Sync project Auth users is on. You do not import that item yourself.
How access maps to Opal
Organization role
The organization appears in Opal as Supabase Organization, with Read-Only, Developer, Administrator, and Owner. Each person holds one organization role, so requesting another role replaces the current one. That role applies to every project in the organization. Read-Only exists on Team and Enterprise plans only.Do not make Owner or Administrator time-bound if you expect the person to lose access when the grant expires. Opal can only demote those roles to Developer.
Projects
Each project appears in Opal as a Supabase Project, with the same four roles. A project lists the people scoped to it directly, and inherits everyone who holds an organization role. Project roles exist on Team and Enterprise plans. On those plans a member can hold No access on the organization and a role on specific projects. Opal does not offer No access as a role you can request. Granting a project role moves that project out of any other project role the person holds on it. Opal cannot revoke a project role. Supabase has no call that removes one. To take a project role away, change it in Supabase, or remove the person from the organization.Inviting and removing people
When Access is Read and write, Opal can invite an email to the organization. Supabase creates the invitation with No access, on Team and Enterprise plans only. The person is matched in Opal after they accept and a sync lists them. Until then the invitation can still be accepted, and they join with no role. Removing the person in Opal removes their organization membership. If they have not accepted yet, Opal revokes the invitation. Opal does not delete their Auth users.Auth users
Turn this on only for projects whose Auth users are people in your company. A project can hold millions of end users, and Opal cannot ask Supabase for just the emails it already knows. Leave it off when those users are your customers. Opal imports an Auth user only when their email is already an organization member’s email, or an Opal user’s primary email. It never creates an Opal user from an Auth user. Users without an email are skipped, and so are anonymous, unconfirmed, banned, and deleted users. The roles you can grant are the Postgres roles thatauthenticator can assume in that project. anon is left out, because it is the role of a request with no user. service_role bypasses row level security, so Opal syncs it but does not let anyone request it.
An Auth user holds one role. The usual role is authenticated.
- Granting a role sets that role. Opal refuses the grant while the user holds some other role besides
authenticated. Revoke the current role first. - Revoking a role other than
authenticatedsets the user back toauthenticated. - Opal cannot revoke
authenticated. The only way to take it away is to delete the Auth user, and Opal does not delete Auth users. - The person must already have an Auth account in that project, on one of their emails. Opal does not create Auth users.
Changing what the connection syncs
You can change these on the app’s Setup tab after the app exists.- Access set to Read only stops grants, revokes, invites, and removals. Opal hides those actions. Set it back to Read and write to allow them again. The token still needs Read-write access to Organization Settings.
- Projects set to Don’t sync removes imported projects on the next sync, and each project’s Auth users with them. Opal does not call Supabase to list projects while this is off.
- Turning off Sync project Auth users removes imported Auth users on the next sync. The projects stay.
What Opal does not manage
- Creating, pausing, or deleting Supabase projects
- Database schemas, row level security, storage, and edge functions
- Creating or deleting Auth users
- Revoking the
authenticatedrole, or any project-scoped member role - Auth users who are not already people in Opal
- Changing roles or sending invitations on a Free or Pro plan