# Security and access control

This page is for whoever administers a Solidafy organisation. It explains who can do what: organisation and environment roles, security groups for per-resource access, data policies for row-level filtering, personal access tokens, single sign-on, the limits that protect sign-in, and where your data is hosted. Proving ownership of the email domains SSO applies to has its own page, [Domain verification](/docs/access/domain-verification).

## The layers at a glance

Access in Solidafy is decided in layers, and a request has to pass all of them:

![Every request passes four layers in order. 1, membership: only organisations and environments you belong to. 2, role: which parts of the portal and which actions. 3, security group: which pipelines, dashboards, sources and tables. 4, data policies: which rows of a table you see. This applies to dashboards, the Data Explorer, Scout, the CLI and the API alike.](/illustrations/access-layers.svg)

Membership decides which organisations and environments you see at all. Your role in an environment decides which parts of the portal you can open and which kinds of action you can take, such as writing data or managing settings. Your security group decides which individual pipelines, dashboards, data sources and tables you can read, change or delete. A data policy on a table filters which rows you see when you query it.

## Organisations, environments and members

Your company has one **organisation**. Inside it are one or more **environments**, separate workspaces each with their own data sources, pipelines, tables, dashboards, security groups and access tokens.

People have two kinds of role, set independently:

| Role | Values | What it controls |
| --- | --- | --- |
| Organisation role | `owner`, `admin`, `member` | Organisation-wide settings: members, environments, domains, SSO and billing. |
| Environment role | `owner`, `admin`, `engineer`, `analyst`, `viewer` | What you can do inside one environment. You can have a different role in each environment. |

Being an owner of one environment does not make you an owner of the organisation, and an organisation admin needs an environment membership to work inside an environment.

### Inviting people

Organisation owners and admins manage people through **Manage organization > Members**. An invitation names the person's email, their organisation role, at least one environment with a role in it, and optionally their security groups. If you pick no security group, the person joins each of their environments' default **Full Access** group, which has Admin on most resources (see [Security groups](#security-groups)), so pick a narrower group when they should see less. Two rules protect against escalation: you can't grant a role above your own, and an admin can't change an owner or make anyone an owner. Only an owner can delete the organisation.

Nobody can sign up for Solidafy on their own. A new account needs either a pending invitation for that exact email address, or a sign-in through your [single sign-on](#single-sign-on) provider at one of your verified domains. Anyone else who tries to sign up is told that accounts are by invitation only.

How an invitation reaches people:

- **Someone without a Solidafy account** gets an email with a link. The link works for 7 days and only once. An address can have only one pending invitation in your organisation at a time.
- **Someone who already has a Solidafy account** joins your organisation straight away. They get an email saying they were added, with nothing to accept.
- **Someone already signed in** who opens the link joins from there. If they are signed in with a different address than the one invited, they are asked to sign in with the invited address first.

Within an environment, owners and admins manage members, their role and their security group under **Settings > Environment Members**.

### What each environment role can open

These are the default permissions for each environment role:

| Area | Owner | Admin | Engineer | Analyst | Viewer |
| --- | --- | --- | --- | --- | --- |
| Dashboards, Reports, Liveboards, Scout | Yes | Yes | Yes | Yes | Yes |
| Apps | Yes | Yes | Yes | Yes | Yes |
| Operators | Yes | Yes | Yes | No | No |
| Data Sources, Pipelines, Transforms | Yes | Yes | Yes | Yes | No |
| Catalog, Data Explorer, Notebooks | Yes | Yes | Yes | Yes | No |
| Master Data (seed tables) | Yes | Yes | Yes | No | No |
| API Keys | Yes | Yes | Yes | No | No |
| Data Policies | Yes | Yes | No | No | No |
| Security Groups, Environment Members | Yes | Yes | No | No | No |

Two rows also depend on your organisation:

- **Apps**, such as [Engineering Delivery](/docs/engineering-delivery/overview), exist only once Solidafy has turned them on for your organisation. Until then the portal doesn't show them and the API answers `404`. Installing an app in an environment needs the admin or owner role there.
- **[Operators](/docs/operators/overview)** work only once Solidafy has turned them on for your organisation. Ask Solidafy if you want them; your own admins can't switch them on.

On top of this, writing data with DSL (anything ending in `.output()`, from the CLI or the API) needs the engineer role or higher in that environment.

A role lets you open an area. Which items inside it you can see and change is decided by your security group, described next.

## Security groups

A **security group** is a named set of members in one environment, with a list of grants. Each grant gives an access level on one kind of resource, either on every resource of that kind or on specific ones.

| Level | Means |
| --- | --- |
| Read | See and use it: view a dashboard, open a pipeline and its run history, query a table. |
| Write | Read, plus change it: edit a pipeline or dashboard, run, backfill or cancel a pipeline, create new ones. |
| Admin | Write, plus delete it, and for pipelines, turn its webhook or stream on and off. |

Grants exist for dashboards, pipelines, data sources, notebooks, namespaces, tables, reports, liveboards and curated views. Tables and namespaces have no Write level: Read lets you see and query them, Admin also lets you delete them. Taking away access to a namespace hides all of its tables, whatever their own grants say.

How grants combine:

- **Nothing is allowed by default.** If your group has no grant for a resource, you can't see it.
- **The most generous grant wins.** If a group has Read on all pipelines and Admin on one, you have Admin on that one.
- **A member belongs to one security group per environment.** Adding someone to a second group in the same environment moves them out of the first.
- **[Operators](/docs/operators/overview) belong to security groups too.** An operator reads exactly what its own group grants, not what the person who created it can read, and reads nothing at all while it is in no group. Like a member, it is in one group at a time: adding it to another group moves it. Use **Add operator** on a group to put an operator in it.
- **What you create, your group can manage.** When you create a pipeline, dashboard or data source, your group is granted access to it at the highest level the group holds for that kind of resource.

Every environment starts with a group called **Full Access**: Admin on all dashboards, pipelines, data sources, notebooks, namespaces and liveboards, and Read on all tables, reports and curated views. The person who created the organisation is its first member, and the group can't be deleted. Narrower groups are how you give someone a smaller slice, for example a "Frontend Team" group with Read on two dashboards and the tables behind them.

Manage groups under **Settings > Security Groups** (owners and admins). From the CLI, `solidafy groups` lists groups, shows and changes their members, and creates and deletes groups; see the [CLI command reference](/docs/cli/commands#solidafy-groups).

## Data policies (row-level security)

A **data policy** filters the rows of one table for one audience. With a policy on `scout.pull_requests` saying `team == "Frontend"` for the "Frontend Team" group, members of that group only ever see Frontend rows when they query that table, from a dashboard, the Data Explorer, Scout, the CLI or the API.

Each policy has:

| Field | Meaning |
| --- | --- |
| Namespace and table | The table it filters. |
| Target | A security group, or a single user identified by email. |
| Filter | The condition a row must meet to be visible. |
| Enabled | Whether it applies. |

Create and edit policies under **Data Lake > Data Policies**, which owners and admins can open by default. Creating a policy also needs Admin access to that table through your security group, or Admin on all namespaces; changing or deleting a policy needs Admin on all namespaces. The default Full Access group has both.

### Filter syntax

Filters are simple conditions, not full DSL:

| Form | Example |
| --- | --- |
| Equality | `team == "Frontend"`, `region != "US"` |
| Comparison | `amount > 100`, `score <= 5` |
| Membership | `region IN ("EU", "UK")`, `status NOT IN ("archived")` |
| Null checks | `owner is null`, `owner is not null` |
| Regular expression | `email matches "@example\.com$"` |
| Combined | `team == "Frontend" and region == "EU"`, `team == "Frontend" or team == "Platform"` |

### How policies apply

- A table with no policy that applies to you is not filtered.
- When several policies apply to you on the same table (one for your group and one for you personally), a row must pass all of them.
- After you create or change a policy, check it by querying the table as a member of the target group.
- Policies filter what people query. A table that a pipeline builds from a protected table is a new table and has no policy until you add one.

### Policies as code

`solidafy policies pull` writes every policy in the environment to `environments/<env>/policies/access-policies.yaml`, grouped by target. You can edit that file and apply it with `solidafy policies push`:

```yaml
rules:
  - name: frontend-team-policy
    target_type: security_group
    target: Frontend Team
    enabled: true
    filters:
      scout.pull_requests: 'team == "Frontend"'
      scout.jira_tickets: 'team == "Frontend"'
  - name: jane-personal
    target_type: user
    target: jane@example.com
    enabled: true
    filters:
      scout.ai_usage: 'developer == "Jane Doe"'
```

Each entry under `filters` becomes one policy on that table. `target` is the group's name for `security_group`, or the person's email for `user`.

> **Warning:** `solidafy policies push` makes the environment match the file exactly. A policy that exists in the environment but not in the file is deleted. Run `solidafy policies push --dry-run` first to see what it will create, update and delete, and try policy changes in a sandbox environment before production.

## Seed tables

Seed tables are small, hand-maintained lookup tables, such as a developer roster that maps GitHub handles to teams. They are often what data policies filter on, so who can edit them matters. Seed tables are edited under **Data Lake > Master Data**, which owners, admins and engineers can open by default, and with `solidafy seeds`. See [Seed steps](/docs/pipelines/overview#seed-steps).

## Personal access tokens

A **personal access token** (PAT) lets the CLI, an AI agent or your own scripts act as you.

- Create one in **Settings > API Keys** under **Personal Access Tokens** with **Create Token**. Give it a name that says where it is used, and choose when it expires: 1 hour, 24 hours, 7 days, 30 days, 90 days or never.
- The token starts with `sk_pat_`. It is shown once, when you create it. Store it in a secret manager or in the CLI's `.env` file, which the CLI keeps out of git.
- A token acts with your permissions: your role, your security group and the data policies that apply to you. If your access changes, so does the token's.
- A token belongs to the environment you were in when you created it. To work in another environment, switch to it in the portal and create a token there.
- A token stops working when it expires, when it is revoked on the API Keys page, or when you lose access to its environment.
- A token is also refused while its organisation is suspended or cancelled (`403 ORG_SUSPENDED`), or while the organisation has agreements its owner has not yet accepted (`403 AGREEMENTS_REQUIRED`). The same goes for portal sessions and the MCP server. The only requests that still work are listing your environments and switching to one, so you can move to another organisation you belong to.

The same list also shows one key for each [operator](/docs/operators/overview), named `Operator: <operator name>`. Creating an operator creates its key, recorded as created by you. Operator keys never expire. Revoking one stops that operator from running until it is recreated. An operator's key also stops working when the person who created the operator is no longer a member of that environment.

Send it as a bearer token:

```text
Authorization: Bearer sk_pat_...
```

Creating tokens needs the API Keys permission, which owners, admins and engineers have by default. See [API reference](/docs/reference/api) for using a token with the REST API.

> **Warning:** Anyone holding your token can do everything you can do in that environment. Prefer short expirations for one-off scripts, and revoke a token as soon as you suspect it has leaked.

## Single sign-on

Owners and admins can connect an OpenID Connect (OIDC) identity provider, such as Okta or Microsoft Entra ID, under **Manage organization > SSO**:

1. Copy the **Sign-in Redirect URI** the page shows into a new application in your identity provider.
2. Enter a provider id, your provider's issuer URL, your email domain, and the client id and secret from your identity provider. **Test Connection** checks that the issuer can be discovered.
3. Verify your email domain by publishing a DNS TXT record. SSO only applies to domains your organisation has verified; see [Domain verification](/docs/access/domain-verification).
4. Optionally turn on **Enforce SSO**. People with addresses at your verified domains must then sign in through your identity provider. Password, Google and GitHub sign-in and sign-up are all refused for them, with the message "This domain must sign in with SSO. Password, Google and GitHub sign-in are disabled." That includes a Google or GitHub account that was linked earlier to someone at an enforced domain, even if the provider now reports a different address. If Solidafy can't check whether a domain is enforced at that moment, it refuses the sign-in ("Sign-in is temporarily unavailable") rather than let it through.

You also decide what people get when they sign in through SSO. These settings apply at every SSO sign-in, not only the first:

- **Auto-join environment access** gives everyone a role, and optionally security groups, in the environments you pick.
- **IdP group mappings** read a groups claim from your identity provider (for example `groups`) and give members of each identity-provider group their own environments, roles and security groups.

What that means in practice:

- An existing member picks up any environment newly assigned to them the next time they sign in through SSO.
- Where IdP group mappings cover an environment, the mapped role is applied again at each sign-in. A change in your identity provider can therefore lower someone's role as well as raise it. An environment owner is never lowered this way.
- Someone who already had a Solidafy account before you set up SSO joins your organisation the next time they sign in through it.
- Everyone added through SSO gets the organisation role `member`. SSO never makes anyone an organisation admin or owner; an owner or admin does that under **Manage organization > Members**.

## Sign-in protection

Every sign-in step that checks a password or code, and every request that sends an email to an address, is limited both per account and per client address (the network address the request comes from). Each limit counts attempts in a fixed window that starts with the first attempt:

| What | Per account | Per client address |
| --- | --- | --- |
| Signing in with a password, and re-entering your password to change it or change two-factor settings | 10 per 15 minutes | 100 per 15 minutes |
| Entering a two-factor code | 5 per 15 minutes | 30 per 15 minutes |
| Signing up | 5 per hour | 50 per hour |
| Emails to an address: password reset, email verification and one-time codes | 3 per hour | 20 per hour |
| The sign-in page checking how an address signs in | 30 per 15 minutes | 100 per 15 minutes |
| Using a link or code from an email, such as a password reset link | Not counted | 30 per 15 minutes |

Going over a limit returns `429` with "Too many attempts. Please try again later." and a `Retry-After` header saying how many seconds to wait. If Solidafy can't check the counts at that moment, the request is refused with `503` ("Sign-in is temporarily unavailable") rather than let through. These limits don't apply to requests made with a personal access token.

## Where your data lives

Solidafy is operated by Solidafy Labs AB, a company in the EU. Customer platform data is stored and processed within the EU/EEA. The platform and all data at rest are hosted on EU infrastructure (Scaleway and OVHcloud, in the Netherlands and France), and AI features run on EU infrastructure as well, at the inference providers on our sub-processor list, which names TensorX (Ireland and Finland), Entrim (Slovenia, with API ingress in Frankfurt) and Cortecs, an EU router that forwards each request to one named inference provider. Inference runs with zero data retention. The platform does not process source code, code diffs or pull request comments; only the code-review agents do, for customers who install them. Data is encrypted in transit (TLS 1.2 or later) and at rest. Data source credentials are encrypted when stored and are never shown again in full.

For the full list of sub-processors and the legal terms, see [Sub-processors](https://www.solidafy.com/legal/sub-processors), the [GDPR statement](https://www.solidafy.com/legal/gdpr) and the [Data Processing Agreement](https://www.solidafy.com/legal/dpa).
