Skip to content

Commit fc73574

Browse files
authored
Merge pull request #2789 from port-labs/feat_update_gitlab_with_visibility_config
Add access control section to GitLab integration documentation
2 parents 9931953 + 903d314 commit fc73574

File tree

2 files changed

+73
-0
lines changed

2 files changed

+73
-0
lines changed

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/GitLab-v2.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,17 @@ resources:
118118
119119
</details>
120120
121+
## Access control
121122
123+
The GitLab integration supports configurable access control to determine which resources are visible and accessible to the integration.
124+
125+
You can configure access control using the `visibility` configuration block in the integration mapping.
126+
127+
This allows you to filter resources based on GitLab access levels (Guest, Reporter, Developer, Maintainer, Owner). You can also disable access level filtering entirely to include all accessible resources.
128+
129+
:::tip Access control configuration
130+
For detailed configuration options, access level reference, and practical examples, see the [Advanced configuration](./advanced.md#access-control) section.
131+
:::
122132

123133
## Capabilities
124134

docs/build-your-software-catalog/sync-data-to-catalog/git/gitlab-v2/advanced.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,67 @@ The `createMissingRelatedEntities` parameter enables automatic creation of place
5959

6060
</TabItem>
6161

62+
<TabItem value="accessControl" label="Access control">
63+
64+
The `visibility` configuration allows you to control which GitLab resources are accessible to the integration based on access levels.
65+
66+
<h3>Access levels</h3>
67+
68+
GitLab uses numeric access levels to define permissions:
69+
70+
| Level | Role | Description |
71+
|-------|------|-------------|
72+
| 10 | Guest | Read-only access to public resources |
73+
| 20 | Reporter | Can view and download code |
74+
| 30 | Developer | Can push code and manage issues |
75+
| 40 | Maintainer | Can manage project settings |
76+
| 50 | Owner | Full administrative access |
77+
78+
<h3>Parameters</h3>
79+
80+
- **`useMinAccessLevel`**: Boolean flag to enable/disable access level filtering
81+
- **Default value**: `true`
82+
- **Use case**: Set to `false` to include all accessible resources without filtering
83+
84+
- **`minAccessLevel`**: Integer specifying the minimal required access level
85+
- **Default value**: `30` (Developer)
86+
- **Use case**: Restrict integration to resources where the token has the specified access level or higher
87+
88+
<h3>Configuration examples</h3>
89+
90+
```yaml showLineNumbers
91+
# Only sync owned projects
92+
visibility:
93+
useMinAccessLevel: true
94+
minAccessLevel: 50
95+
resources:
96+
- kind: project
97+
selector:
98+
query: 'true'
99+
port:
100+
entity:
101+
mappings:
102+
identifier: .path_with_namespace | gsub(" "; "")
103+
title: .name
104+
blueprint: '"service"'
105+
```
106+
107+
```yaml showLineNumbers
108+
# Include all accessible resources
109+
visibility:
110+
useMinAccessLevel: false
111+
resources:
112+
- kind: project
113+
selector:
114+
query: 'true'
115+
port:
116+
entity:
117+
mappings:
118+
identifier: .path_with_namespace | gsub(" "; "")
119+
title: .name
120+
blueprint: '"service"'
121+
```
122+
123+
</TabItem>
124+
62125
</Tabs>

0 commit comments

Comments
 (0)