You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/docs/authentication/legacy.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -487,4 +487,4 @@ You can discriminate between users based on the "identity provider" column in ou
487
487
488
488
You can't make the username/password login dialog disappear, however only users that have been manually invited by email can login with this option. Inviting users is controlled by the [`user:invite` permission](https://docs.pactflow.io/docs/permissions/#userinvite), which by default is only available to Administrators. You can use this permission to create custom roles as needed to control the desired behaviour.
489
489
490
-
Note it is wise to retain at least one administrative user who can login with a username and password to address break-glass scenarios (e.g., if your SSO provider is down or misconfigured).
490
+
Note it is wise to retain at least one administrative user who can login with a username and password to address break-glass scenarios (for example, if your SSO provider is down or misconfigured).
Copy file name to clipboardExpand all lines: website/docs/docs/authentication/main.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ Once SSO has been enabled, any users on the registered SAML domain _must_ login
51
51
52
52
Users not attached to the SAML domain that have been invited may login using any form. Inviting users is controlled by the [`user:invite` permission](https://docs.pactflow.io/docs/permissions/#userinvite), which by default is only available to Administrators.
53
53
54
-
We recommend at least one administrative user who can login with a username and password to address break-glass scenarios (e.g., if your SSO provider is down or misconfigured).
54
+
We recommend at least one administrative user who can login with a username and password to address break-glass scenarios (for example, if your SSO provider is down or misconfigured).
55
55
56
56
### 2. I'm an enterprise customer and need SCIM enabled
Copy file name to clipboardExpand all lines: website/docs/docs/permissions/permissions.md
+86-41Lines changed: 86 additions & 41 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,47 +4,80 @@ title: Permissions
4
4
5
5
_Eligible plans: Enterprise_
6
6
7
-
Note that "manage" permissions cover both read and write operations.
7
+
# Overview
8
8
9
-
## ai:*
9
+
PactFlow uses a structured permission model to define what users can do and where. Most permissions follow the format `resource:action:scope` , where:
10
+
11
+
-`resource` — the type of data or feature the permission applies to (for example, `contract_data`, `webhook`, `user`)
12
+
-`action` — the operation being performed (for example, `read`, `write`, `manage`, `invite`)
13
+
-`scope` — the level or context the permission applies to, such as:
14
+
-`team` — restricts the permission to resources owned by teams the user belongs to
15
+
-`*` — applies globally to all resources of that type
16
+
-`{uuid}` — scoped to a specific team, used for fine-grained delegation (for example, `team:manage:{uuid}`)
17
+
18
+
Permissions are grant-only. Broader permissions cannot be narrowed by denial (for example, ai:* cannot exclude ai:generation:code).
19
+
20
+
> Note: `manage` permissions include both read and write access.
21
+
22
+
**Example:**
23
+
`contract_data:manage:team` — allows a user to publish, modify, and view contract data for applications owned by any team they belong to.
24
+
25
+
While most permissions follow this pattern, there are a few exceptions. Refer to the sections below for a complete list of available permissions, including their effects and any additional constraints.
26
+
27
+
## AI
28
+
29
+
AI-related permissions are a special case. Instead of applying to data or resources, they control access to AI-powered features within PactFlow.
30
+
31
+
They are also **hierarchical**, meaning:
32
+
33
+
- Granting a broader permission (for example, `ai:*`) implies access to all sub-permissions within that namespace.
34
+
- More specific permissions allow access to a narrower feature set.
35
+
36
+
> **Note:** AI permissions do not include a `scope`, because they do not act on specific team-owned resources. Access is granted globally based on role assignment.
37
+
38
+
### ai:*
10
39
Provides access to all AI-related features, including all future permissions created under the `ai:` scope.
11
40
12
-
## ai:generation:*
41
+
###ai:generation:*
13
42
Can generate Pact tests from all current and future supported inputs.
14
43
15
-
## ai:generation:openapi
44
+
###ai:generation:openapi
16
45
Can generate Pact tests based on user-provided OpenAPI descriptions.
17
46
18
-
## ai:generation:code
47
+
###ai:generation:code
19
48
Can generate Pact tests based on user-provided client code.
20
49
21
-
## ai:generation:request-response
50
+
###ai:generation:request-response
22
51
Can generate Pact tests based on recorded request-response pairs.
23
52
24
-
# ai:generation:test-template
53
+
###ai:generation:test-template
25
54
Can customize generated Pact test output using a predefined example as a template.
26
55
27
-
## authentication_settings:manage
56
+
## Authentication
57
+
58
+
### authentication_settings:manage
28
59
29
60
Manage authentication settings, such as configuring SSO via Github or Google.
30
61
31
-
## contract_data:bulk_delete:*
62
+
## Application Data
63
+
64
+
### contract_data:bulk_delete:*
32
65
33
66
Bulk deletes pacts (which just removes the pacts and their associated verifications), applications (which removes associated pacts, verification results, application versions and webhooks) or an integration (which removes all pacts, verification results and webhooks, but leaves any application referenced by another integration).
34
67
35
-
## contract_data:bulk_delete:team
68
+
###contract_data:bulk_delete:team
36
69
37
70
Bulk deletes pacts (see above) where the consumer is assigned to the user's teams.
38
71
39
-
## contract_data:bulk_delete:own
72
+
###contract_data:bulk_delete:own
40
73
41
74
Bulk deletes pacts (see above) where the consumer was created by the logged in user.
42
75
43
-
## contract_data:manage:*
76
+
###contract_data:manage:*
44
77
45
78
Create, update, and delete any contract related data. This includes applications, application labels, application versions, branches, tags, pacts, and verification results. It allows the user to delete a single pact, but it does not allow to perform bulk deletions. When deleting an application that has associated pacts and versions, you must also have the appropriate bulk delete permission (see also [contract_data:bulk_delete:\*](#contract_data-bulk_delete)).
46
79
47
-
## contract_data:manage:team
80
+
###contract_data:manage:team
48
81
49
82
Create, update, and delete contract related data for applications assigned to the user's teams. Pacts are managed by the consumer's team(s) and verification results are managed by the provider's team(s).
50
83
@@ -54,114 +87,126 @@ Some PactFlow resources, such as secrets and webhooks, have a team assigned at t
54
87
55
88
:::
56
89
57
-
## contract_data:manage:own
90
+
###contract_data:manage:own
58
91
59
92
Create, update, and delete contract related data for applications created by the logged in user. This permission is required to create an application in PactFlow before it is assigned to a team.
60
93
61
-
## contract_data:read:*
94
+
###contract_data:read:*
62
95
63
96
View any contract-related data. This includes applications, application labels, application versions, branches, tags, pacts, and verification results.
64
97
65
-
## deployment_and_release:record:*
98
+
## Environment and Deployment
99
+
100
+
### deployment_and_release:record:*
66
101
67
102
Notify PactFlow that a particular version of an application has been deployed or released.
68
103
69
-
## deployment_and_release:record:team
104
+
###deployment_and_release:record:team
70
105
71
106
Notify PactFlow that a particular version of an application associated with your team has been deployed or released.
72
107
73
-
## environment:manage:*
108
+
###environment:manage:*
74
109
75
110
Create, update, and delete any environment. When creating a new environment, the user can associate it with any team.
76
111
77
-
## environment:read:*
112
+
###environment:read:*
78
113
79
114
View a list of all environments.
80
115
81
-
## environment:read:team
116
+
###environment:read:team
82
117
83
118
View a list of environments associated with the user's teams.
84
119
85
-
## read_token:manage:own
120
+
## Tokens
121
+
122
+
### read_token:manage:own
86
123
87
124
Manage own *read only* API token. This permission is for users/system accounts that are not allowed to modify any resources (for example, those with the [Viewer](./predefined-roles#viewer) role), for whom it does not make sense to have a read/write token.
88
125
89
-
## role:manage:*
126
+
## Roles
127
+
128
+
### role:manage:*
90
129
91
130
Create, update and delete roles (note that the pre-defined roles cannot be deleted).
92
131
93
-
## role:read:*
132
+
###role:read:*
94
133
95
134
View all roles.
96
135
97
-
## secret:manage:*
136
+
## Secrets
137
+
138
+
### secret:manage:*
98
139
99
140
Create, update and delete all secrets.
100
141
101
-
## secret:manage:team
142
+
###secret:manage:team
102
143
103
144
Create, update and delete secrets assigned to teams of which the user is a member.
104
145
105
-
## secret:read:team
146
+
###secret:read:team
106
147
107
148
View the names and descriptions of secrets assigned to teams of which the user is a member.
108
149
109
-
## system_account:manage:*
150
+
## Users, System Accounts and Teams
151
+
152
+
### system_account:manage:*
110
153
111
154
Create, update, and disable any system account and associated API tokens.
112
155
113
-
## system_account:manage:team
156
+
###system_account:manage:team
114
157
115
158
View details, disable, and copy and regenerate API tokens for system accounts assigned to the teams of which the user is a member. Does not currently allow system account creation, but this is expected to be supported in the future.
116
159
117
-
## system_account:read:*
160
+
###system_account:read:*
118
161
119
162
View all system accounts (does not allow viewing/copying API tokens).
120
163
121
-
## system_account:read:team
164
+
###system_account:read:team
122
165
123
166
View system accounts assigned to the teams of which the user is a member (does not allow viewing/copying API tokens).
124
167
125
-
## system_preference:manage:*
168
+
###system_preference:manage:*
126
169
127
170
Manage the global system settings such as API token expiration and application notices.
128
171
129
-
## team:manage:*
172
+
###team:manage:*
130
173
131
174
Create, update and delete teams. Add and remove users, environments and applications to/from teams.
132
175
133
-
## team:manage:{uuid}
176
+
###team:manage:{uuid}
134
177
135
178
Manage administrators, users, environments and applications associated with a particular team. This permission is only associated with the [Team Administator](./predefined-roles#team-administrator) role and cannot be assigned to any other roles.
136
179
137
-
## team:read:*
180
+
###team:read:*
138
181
139
182
View teams and their associated users and applications.
140
183
141
-
## token:manage:own
184
+
###token:manage:own
142
185
143
186
Manage own read/write and read only API tokens.
144
187
145
-
## user:invite
188
+
###user:invite
146
189
147
190
Invite a user to the PactFlow application.
148
191
149
-
## user:manage:*
192
+
###user:manage:*
150
193
151
194
Create, update, and disable any regular user (not system accounts), and modify their roles.
152
195
153
-
## user:manage_scim_attributes:*
196
+
###user:manage_scim_attributes:*
154
197
155
198
Set and update the user attributes used by the PactFlow SCIM API to identify the user in the external Identity Provider (`externalIdpUsername` and `externalIdpId`). Must be used in conjuction with `user:invite` and `user:manage` permissions. This permission can only be associated with the SCIM role.
156
199
157
-
## user:read:*
200
+
###user:read:*
158
201
159
202
View all regular users (not system accounts) and their associated roles.
160
203
161
-
## webhook:manage:*
204
+
## Webhooks
205
+
206
+
### webhook:manage:*
162
207
163
208
Create, update, and delete any webhook.
164
209
165
-
## webhook:manage:team
210
+
###webhook:manage:team
166
211
167
212
Create, update and delete webhooks assigned to the teams of which the user is a member.
description: Learn how PactFlow manages access through users, teams, roles, and permissions.
5
+
---
6
+
7
+
# Role-Based Access Control
8
+
9
+
PactFlow uses a flexible team-based Role-Based Access Control (RBAC) model to manage access to contracts, applications, and features. This ensures users can only interact with resources in ways allowed by their assigned roles and team membership.
10
+
11
+
This model supports simple team structures and scales to complex organizations.
12
+
13
+
## Core concepts
14
+
15
+
-**Users**: Individuals who interact with PactFlow via the UI, API, or CLI.
16
+
-**Roles**: Global collections of permissions assigned to users.
17
+
-**Permissions**: Actions a user can perform. Some may be scoped to specific teams or resources.
18
+
-**Teams**: Logical groups of users that own applications and resources.
19
+
-**Applications**: Team-owned services that participate in contract testing.
20
+
-**Contracts**: The data generated from interactions between applications.
21
+
-**Resources**: Include secrets, webhooks, test results, and other team-scoped assets.
22
+
23
+
## How it works
24
+
25
+
PactFlow uses a flexible RBAC model where:
26
+
27
+
-**Users are assigned one or more global roles**
28
+
-**Roles grant a set of permissions**
29
+
-**Some permissions are scoped to specific teams or resources**
30
+
31
+
While roles are assigned globally to a user, many permissions are evaluated in context — particularly when scoped to a team.
32
+
33
+
For example:
34
+
35
+
- A user with the `contract_data:manage:team` permission can modify contract data **only** for applications owned by teams they belong to.
36
+
- A user with `user:invite` (no scope) can invite users across the entire organization.
37
+
38
+
A user's **effective permissions** are therefore a combination of:
39
+
40
+
* Their globally assigned roles
41
+
* The permissions granted by those roles
42
+
* The team or resource scope (if applicable) of those permissions
43
+
* The teams they are a member of (when a permission is team-scoped)
44
+
45
+
### Special case: Team Administrator
46
+
47
+
The **Team Administrator** is a special permission-based role assigned to a user _for a specific team_. It is implemented using a scoped permission like:
48
+
49
+
```
50
+
team:manage:{team_uuid}
51
+
```
52
+
53
+
This allows for delegated administration of a team without giving the user global administrative rights.
54
+
55
+
> **Note:** Roles are additive — there are no negated permissions in PactFlow.
56
+
57
+
### Conceptual Model
58
+
59
+

60
+
61
+
## Example: Team-based access
62
+
63
+
This guide walks you through an example with two teams, three applications, and three users, one of whom is a platform administrator.
0 commit comments