Workspaces
A workspace is a group of principals in your product, such as a team or a customer. Its name is 1 to 120 characters. Workspaces are flat. Each member holds one role in it. That role can grant permissions on resources that belong to the workspace, through access checks.
Members
A membership is one principal in one workspace with one role. A principal may belong to many workspaces, with a different role in each.
- Who may join: any principal that the role’s
assignableToopens it to:principal, every principal that is not a guest,guest, or both. A role without the list is open to every principal that is not a guest, as are the built-inownerand theadminandmembera project starts with. A guest that signs in keeps its memberships, and a guest that is deleted leaves none behind. - The roles: the built-in
owner, and the workspace roles your config defines, which start asadminandmember. Roles says what each may do. - How a principal joins: by creating the workspace, by accepting an invitation, by being added directly by someone with
identity.member:add, or through your server’s import. Each membership records which, insource. - Suspended members: a membership is
activeorsuspended, and a suspended one grants nothing.
Invitations
An invitation brings someone into a workspace with a role, once they accept it. It lasts the config’s invitations.ttl, 7 days in a new project, and is pending until it is accepted, revoked, or expires.
- By email. When
urls.invitationAcceptis set, the email includes a link with the invitation token. A principal accepts it with a verified email identity for that address. - By code: IdentityHound answers with a single-use
tokenfor you to pass on yourself, so a code can bring in a principal with no email address, such as an agent.
Either kind of invitation may set openTo: principal for principals that are not guests, guest, or both. Without it, whoever the role is open to may accept. Accepting as a principal it leaves out answers invitation_not_open.
A page can preview an invitation before anyone signs in. Accepting takes the accepting principal’s own credential, with a verified identity for the address for an email invitation. In an invite_only project, a pending email invitation also lets its address sign up, as Principals explains.
Owners
- A principal that creates a workspace becomes its owner. Any principal that is not a guest may create one and own it. Your server names the owner instead, with
ownerId. - An active workspace keeps an active owner membership. Removing, demoting, or suspending its last active owner membership, or deleting that principal, answers
last_owner. Give another member the owner role with an active membership first. - Only an owner or your server can add or remove an owner membership or create an invitation to be an owner.
- A principal owns as many active workspaces as you allow. There is no limit until you set
workspaces.maxOwnedPerPrincipalin the config. Any caller’s request that would give someone another workspace to own past the limit answersworkspace_limit, with the limit indetails.limit. That covers creating a workspace, accepting an invitation as owner, and being added, imported, or promoted to owner. Your server follows the same limit. An account merge that adds ownership past the limit answersmerge_blocked. Owner memberships count even when suspended. Archived workspaces don’t count, and a principal already past the limit keeps every workspace it owns.
Archived workspaces
Archiving a workspace ends the access it gave. There is no way to unarchive it, so confirm it with whoever asked before you call archive.
- Its roles and delegations stop counting in access checks. This covers its memberships, delegations, and resource roles. An access check that only the workspace would have allowed answers
workspace_archived. A project role, or a resource role your server assigned outside any workspace, still applies, since neither comes from the workspace. Without a role that would have allowed access, the answer staysno_access. - Its grants stop counting. Its members stop holding what was granted to the workspace. If a role still allows the action but it needs an entitlement only the workspace held, the check answers
entitlement_missing. A principal’s own grants are unaffected. - It takes nothing new. It can’t be renamed, and takes no new members, invitations, delegations, or workspace grants.
- Its own roles don’t manage it. No workspace role,
ownerincluded, lets anyone view it or change its members. Your server can still read it and manage its members. A project role can authorize those actions under the same owner rule. Any member may leave it, including an owner.
Its records stay as they were: a membership, delegation, or grant keeps its status and stops counting.
Where to act on it
- The IdentityHound quickstart creates a workspace, and Invite someone to a workspace sends, previews, and accepts an invitation.
- Workspaces, Members, and Invitations have every operation.