Built-in Roles
What each built-in role can do and where it can be assigned.
Built-in Roles
A role is a named, code-defined bundle of capabilities. A role assignment binds one principal, one
role, and one resource: instance roles are assigned on the GoodMem instance itself, and memory-space
roles are assigned on a single space. The role's capabilities then apply relative to that assigned
resource, so a SPACE_ADMIN assignment on space X grants nothing on space Y.
Role definitions live in server code. A deployment cannot redefine what
ADMIN means by editing a table; role names and numeric identifiers are stable API values, and the
capability sets below are the complete definitions. Roles are one source of authority among
several — direct grants, all-authenticated grants, and resource ownership are evaluated alongside
them, and a scoped API key's ceiling still attenuates the result. See
Roles, Grants, and Selectors for how these sources
combine.
Each capability pairs an operation with a selector. Instance roles use the OWN and ANY
selectors; memory-space roles use EXACT (the assigned space itself) and DIRECT_MEMBERS_OF (the
memories directly contained by it). Selector semantics are defined in
Operations and Selectors.
Role Catalog
| Role | ID | Scope | Purpose |
|---|---|---|---|
ROOT | 1 | Instance | Mirrors instance ownership; carries no capabilities of its own |
ADMIN | 2 | Instance | Instance administrator |
USER | 3 | Instance | Standard user operating resources they own |
SPACE_VIEWER | 4 | Memory space | Reads one space and its memories |
SPACE_CONTRIBUTOR | 5 | Memory space | Viewer, plus creates memories |
SPACE_CONTENT_MANAGER | 6 | Memory space | Contributor, plus deletes memories |
SPACE_ADMIN | 7 | Memory space | Content manager, plus space configuration and access policy |
Instance Roles
ROOT
ROOT marks the current instance owner and supplies no ordinary capabilities. The owner's
authority — recovery-level access administration across the instance, and the exclusive right to
transfer instance ownership — derives from ownership itself rather than from this assignment. ROOT
cannot be assigned or revoked through the access-policy API; attempting either returns
INVALID_ARGUMENT. The assignment moves only as part of an instance ownership transfer.
ADMIN
ADMIN is the broad instance administrator. It holds every resource operation below with both the
OWN and ANY selectors:
| Resource | Operations with OWN and ANY |
|---|---|
| Spaces | CREATE_SPACE, READ_SPACE, UPDATE_SPACE, DELETE_SPACE, LIST_SPACE |
| API keys | CREATE_API_KEY, READ_API_KEY, UPDATE_API_KEY, DELETE_API_KEY, LIST_API_KEY |
| Embedders | CREATE_EMBEDDER, READ_EMBEDDER, UPDATE_EMBEDDER, DELETE_EMBEDDER, LIST_EMBEDDER, PING_EMBEDDER, EXECUTE_EMBEDDER |
| Rerankers | CREATE_RERANKER, READ_RERANKER, UPDATE_RERANKER, DELETE_RERANKER, LIST_RERANKER, PING_RERANKER, EXECUTE_RERANKER |
| LLMs | CREATE_LLM, READ_LLM, UPDATE_LLM, DELETE_LLM, LIST_LLM, PING_LLM, EXECUTE_LLM |
| Memories | CREATE_MEMORY, READ_MEMORY, DELETE_MEMORY, LIST_MEMORY |
| Extensions | CREATE_EXTENSION, READ_EXTENSION, UPDATE_EXTENSION, DELETE_EXTENSION, LIST_EXTENSION, DOWNLOAD_EXTENSION |
| Inference proxy | PROXY_INFERENCE_TARGET |
It additionally holds these operations with ANY only:
| Area | Operations with ANY |
|---|---|
| Users | CREATE_USER, READ_USER, UPDATE_USER, DELETE_USER, LIST_USER, MANAGE_USER_ENROLLMENT |
| Service identities | CREATE_SERVICE_IDENTITY, READ_SERVICE_IDENTITY, UPDATE_SERVICE_IDENTITY, DELETE_SERVICE_IDENTITY, LIST_SERVICE_IDENTITY |
| Access policy | MANAGE_ACCESS |
| Provider credentials | READ_EMBEDDER_CREDENTIALS, READ_RERANKER_CREDENTIALS, READ_LLM_CREDENTIALS |
| Ownership | TRANSFER_RESOURCE_OWNERSHIP |
| OCR | OCR_DOCUMENT |
| Server administration | RELOAD_LICENSE, DRAIN_SERVER, PURGE_BACKGROUND_JOBS |
| Retrieval log policies | CREATE_RETRIEVE_MEMORY_LOG_POLICY, READ_RETRIEVE_MEMORY_LOG_POLICY, LIST_RETRIEVE_MEMORY_LOG_POLICY, DELETE_RETRIEVE_MEMORY_LOG_POLICY |
ADMIN does not hold TRANSFER_INSTANCE_OWNERSHIP. Only the current instance owner can transfer
the instance, and no role or grant can supply that authority.
USER
USER is the standard role for a person operating their own resources. The pattern: OWN for
nearly everything, ANY for the instance-level LIST_* collection gates and for OCR_DOCUMENT.
The ANY list capabilities permit invoking the list operation; each returned row must still pass
the matching READ_* check, so a USER sees only rows they can read.
| Resource | OWN operations | ANY operations |
|---|---|---|
| Users | READ_USER, UPDATE_USER | — |
| Service identities | CREATE_SERVICE_IDENTITY, READ_SERVICE_IDENTITY, UPDATE_SERVICE_IDENTITY, DELETE_SERVICE_IDENTITY | LIST_SERVICE_IDENTITY |
| API keys | CREATE_API_KEY, READ_API_KEY, UPDATE_API_KEY, DELETE_API_KEY | LIST_API_KEY |
| Spaces | CREATE_SPACE, READ_SPACE, UPDATE_SPACE, DELETE_SPACE | LIST_SPACE |
| Embedders | CREATE_EMBEDDER, READ_EMBEDDER, UPDATE_EMBEDDER, DELETE_EMBEDDER, PING_EMBEDDER, EXECUTE_EMBEDDER | LIST_EMBEDDER |
| Rerankers | CREATE_RERANKER, READ_RERANKER, UPDATE_RERANKER, DELETE_RERANKER, PING_RERANKER, EXECUTE_RERANKER | LIST_RERANKER |
| LLMs | CREATE_LLM, READ_LLM, UPDATE_LLM, DELETE_LLM, PING_LLM, EXECUTE_LLM | LIST_LLM |
| Memories | CREATE_MEMORY, READ_MEMORY, DELETE_MEMORY, LIST_MEMORY | — |
| Extensions | CREATE_EXTENSION, READ_EXTENSION, UPDATE_EXTENSION, DELETE_EXTENSION, DOWNLOAD_EXTENSION | LIST_EXTENSION |
| Inference proxy | PROXY_INFERENCE_TARGET | — |
| OCR | — | OCR_DOCUMENT |
LIST_MEMORY carries OWN rather than ANY because it targets a space rather than the
instance: a USER may enumerate memories in spaces they own.
USER holds no capability for creating, deleting, or listing human users, no
MANAGE_USER_ENROLLMENT, no MANAGE_ACCESS, no provider-credential reads, and no ownership
transfer. A USER still administers access policy on resources they own — that right derives from
ownership rather than from the role.
Memory-Space Roles
Memory-space roles are assigned on one space. In the tables below, S is the assigned space. Each role includes everything the previous one grants.
SPACE_VIEWER
| Operation | Selector |
|---|---|
READ_SPACE | Exact — S itself |
LIST_MEMORY | Exact — S itself |
READ_MEMORY | Direct members of S |
A viewer can read the space's configuration, enumerate its memories, and read them. That combination also satisfies both gates of semantic retrieval over S.
SPACE_CONTRIBUTOR
Viewer capabilities, plus:
| Operation | Selector |
|---|---|
CREATE_MEMORY | Exact — S itself |
SPACE_CONTENT_MANAGER
Contributor capabilities, plus:
| Operation | Selector |
|---|---|
DELETE_MEMORY | Direct members of S |
SPACE_ADMIN
Content-manager capabilities, plus:
| Operation | Selector |
|---|---|
UPDATE_SPACE | Exact — S itself |
MANAGE_ACCESS | Exact — S itself |
A SPACE_ADMIN configures the space, manages its content, and administers its access policy —
including granting space roles to others and appointing another SPACE_ADMIN. No space role
includes deleting the space or transferring its ownership. Deletion belongs to the space's owner
and to instance administrators; transfer belongs to the owner, the instance owner, and holders of
TRANSFER_RESOURCE_OWNERSHIP.
Provisioning Defaults
System initialization creates the first human and gives them two independent assignments: ROOT,
mirroring instance ownership, and ADMIN, supplying ordinary administrative capabilities. An
instance ownership transfer later moves only ROOT. The new owner does not implicitly become an
ADMIN; they can use ownership-derived access administration to assign themselves the role. The
former owner keeps any ADMIN assignment until it is revoked.
Assigning Roles
Role assignments are managed through the access-policy API. With the CLI:
# Instance role: no resource UUID
goodmem access-policy role-assignment assign \
--principal <principal-uuid> \
--role USER \
--resource-kind INSTANCE
# Space role: names the space
goodmem access-policy role-assignment assign \
--principal <principal-uuid> \
--role SPACE_VIEWER \
--resource-kind SPACE \
--resource-id <space-uuid>Spaces also expose a scoped shortcut that fixes the resource arguments:
goodmem space access role assign <space-uuid> \
--principal <principal-uuid> \
--role SPACE_VIEWERRole tokens accept the short form (USER) or the full protobuf enum name
(BUILT_IN_ROLE_USER); case and hyphens are normalized. Assigning or revoking a role requires
MANAGE_ACCESS on the assignment's resource — the instance for instance roles, the space for
space roles. See Share a Space for the common
workflow.