# Permissions and scopes

> What each workspace role and repository role allows, which role opens each Settings page, and the OAuth scopes clients request.

Source: https://docs.corfedo.ai/reference/permissions-and-scopes/

Everything Corfedo returns, from a search to an answer or a security finding, contains only what the person asking may read. Corfedo does not copy access from your forge. Who may read a repository is set in Corfedo.

Access adds up from every role a member holds, directly or through groups. No role takes away access that another gives. A member with no group, no direct role and no **Default repository role** can sign in but reads no code.

A client, such as a coding agent, the CLI or an API key, never has more access than its person. It gets the overlap of the person's current access, the [client scopes](#client-scopes) it was given and the repositories chosen for it. [Members and groups](https://docs.corfedo.ai/workspace/members/#when-membership-changes) says when a change in groups takes effect.

## Workspace role

The **Workspace role** column on **Settings** › **Members**.

| Workspace role | Allows |
| --- | --- |
| Administrator | Every permission, on every repository, including every Settings page |
| Member | Signing in, searching and reading the repositories their roles allow, asking Corfedo AI with the profiles open to them, their own conversations, recent searches and saved contexts |
| Service account | What a member has, through its API keys only. The **Default repository role** does not apply to it. |

## Workspace permissions

Workspace permissions are given to groups in **Settings** › **Groups**.

| Permission | Allows |
| --- | --- |
| **Access manager** | Members, groups, service accounts, client access and network access. Reads sign-in settings without changing them. |
| **Repository administrator** | Sources and repositories, and **Admin** on every repository |
| **Repository reader** | **Reader** on every repository |
| **Security manager** | Dependencies and security findings on every repository, with triage and without code |
| **AI administrator** | AI providers, profiles and spending limits, every profile, and every AI trace as far as **Settings** › **Privacy** allows |
| **Audit reader** | The audit log |
| **Integration administrator** | Integrations such as Slack, with their access, profile and channels |

## Repository roles

Repository roles are given to a member or a group on one repository, under the repository's **Access** tab. The **Default repository role** in **Settings** › **General** can give every person who is a member **Reader** on every repository.

| Allows | Security reader | Reader | Triage | Maintainer | Admin |
| --- | --- | --- | --- | --- | --- |
| See the repository | ✓ | ✓ | ✓ | ✓ | ✓ |
| Search and read code | | ✓ | ✓ | ✓ | ✓ |
| Dependencies and security findings | ✓ | ✓ | ✓ | ✓ | ✓ |
| Dismiss and reopen findings | | | ✓ | ✓ | ✓ |
| Indexing status and history | | ✓ | ✓ | ✓ | ✓ |
| Change indexing and reindex | | | | ✓ | ✓ |
| See who has access | | | | ✓ | ✓ |
| Change access and delete the repository | | | | | ✓ |

## Settings pages

A Settings page appears only for members who may manage it.

| Page | Administrators and |
| --- | --- |
| **General**, **Privacy** | Administrators only |
| **Members**, **Groups**, **Service accounts** | **Access manager** |
| **Sign-in** | **Access manager**, to read. Only administrators change it. |
| **Sources**, **Repositories** | **Repository administrator** |
| **Contexts** | Administrators only |
| **Providers**, **Profiles**, **Spending limits** | **AI administrator** |
| **Integrations** | **Integration administrator** |
| **Client access**, **Network access** | **Access manager** |
| **Audit log** | **Audit reader** |
| **AI traces** | **AI administrator**, while **All traces** on the Privacy page shows at least **Structure** |

## Client scopes

A client requests scopes when it signs in, and an API key holds the permissions chosen when it was created. The **Authorize** page shows each scope as a permission the person can clear. A client never gets more than the person it acts for.

| Permission | Scope | Lets the client |
| --- | --- | --- |
| **Search and read code** | `corfedo:repositories:code:read` | Search code and read files |
| **Dependencies** | `corfedo:repositories:dependencies:read` | See the packages the repositories use and where they are used |
| **Security findings** | `corfedo:repositories:security:read` | See vulnerabilities found in their dependencies and the advisories behind them |
| **Ask Corfedo AI** | `corfedo:ai:invoke` | Ask questions about the selected repositories and read the answers. Asking also needs **Search and read code**. Answers use the workspace's AI budget. |
| **Read saved contexts** | `corfedo:tenant:contexts:read` | Read your and the workspace's named repository lists |
| **Manage your saved contexts** | `corfedo:tenant:contexts:write` | Create, change and delete your own contexts |
| **Manage workspace contexts** | `corfedo:tenant:workspace-contexts:write` | Create, change and delete the workspace's contexts. Only workspace administrators can. |

The repository scopes apply to the repositories chosen for the client, and on each one only to what the person can read there. Unknown scopes give no permission. A browser sign-in that may renew itself also requests `offline_access`. Each [API reference](https://docs.corfedo.ai/reference/api/) operation names the scopes it needs.
