Skip to content

Commit 271e63c

Browse files
authored
Q3 s6 classic abac and rule (#812)
* Update access-control.md Updated with new AND rules * Update access rules Updated content and screenshots to reflect ABAC AND and OR * Update screenshots and content Updated screenshots and content for account management overview topic * Update access-control.md * Update access-control.md
1 parent 5fc7ac4 commit 271e63c

File tree

6 files changed

+60
-48
lines changed

6 files changed

+60
-48
lines changed
Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
---
2-
title: "Account and User Management"
3-
description: "Learn how Codefresh supports different users and teams"
2+
title: "Account and user management"
3+
description: "Learn how to add teams, users, and configure access control in Codefresh"
44
group: administration
55
toc: true
66
---
77

8-
Codefresh has comprehensive support for teams and users for handling scenarios for all organization sizes.
8+
Codefresh has comprehensive support for all aspects of administration for organizations<!---in both on-premises and SaaS environments-->.
99

10-
* See [how to define users and teams]({{site.baseurl}}/docs/administration/account-user-management/add-users/)
11-
* Configure [access control]({{site.baseurl}}/docs/administration/account-user-management/access-control/).
12-
* Get [audit logs]({{site.baseurl}}/docs/administration/account-user-management/audit/) to any runtime (hosted or private)
13-
* Learn [which IP addresses]({{site.baseurl}}/docs/administration/platform-ip-addresses/) are used for the SAAS runtime.
10+
Review:
1411

15-
.
12+
* [Add users and teams]({{site.baseurl}}/docs/administration/account-user-management/add-users/)
13+
* Configure [access control]({{site.baseurl}}/docs/administration/account-user-management/access-control/)
14+
* [Configure Single Sign-On (SSO)]({{site.baseurl}}/docs/administration/single-sign-on/)
15+
* Get [audit logs]({{site.baseurl}}/docs/administration/account-user-management/audit/) for runtimes (hosted or private)
16+
* Learn [which IP addresses]({{site.baseurl}}/docs/administration/platform-ip-addresses/) are used for SAAS runtimes
17+
18+
<!--- For on-premises environments, see [On-premises account and user setup]({{site.baseurl}}/docs/installation/on-premises/on-prem-configuration/). -->

_docs/administration/account-user-management/access-control.md

Lines changed: 49 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ You can then create rules that combine roles, attributes, and CRUD (Create/Read/
1919
[Role-based access](#role-based-access-for-users-and-administrators) restricts access based on the _who (the kind of user)_. Access is granted based on the user's job responsibilities or position within an organization. Codefresh administrators can access UI functionality that you would deny to other users. For example, only account administrators can create and modify integrations with Git providers and cloud services, while other users can create, run, and modify pipelines.
2020

2121
* **Attribute-based access control (ABAC)**
22-
Access control via attributes, restricts access to entities based on the _what (the type of access)_. Assigning attributes, or tags as in Codefresh to entities makes it easy to enforce a more flexible and secure form of access control.
23-
For example, add tags to projects, and then enforce access control for pipelines through project tags, instead of relying on pipeline-level tags. So you can add tags to projects with pipelines that all teams can view and run (Read), but only the platform team can Create/Edit/Delete.
22+
Access control via attributes, restricts access to entities based on the _what (the type of access)_. Assigning attributes or tags as they are also referred to, to Codefresh entities makes it easy to enforce a more flexible and secure form of access control.
23+
For example, by adding tags to projects, you can enforce access control for pipelines through project tags, instead of relying on pipeline-level tags. So you can add tags to projects with pipelines that all teams can view and run (Read), but only the platform team can Create/Edit/Delete.
2424
See [ABAC for entities with tags and rules](#abac-for-entities-with-tags-and-rules).
2525

2626
* **YAML source and Git-repository access**
@@ -32,7 +32,8 @@ Let's review the different access mechanisms in more detail, including privilege
3232

3333
Role-based access is usually defined when you [add teams]({{site.baseurl}}/docs/administration/account-user-management/add-users/#teams-in-codefresh). Role-based access means assigning either a user or an administrator role.
3434

35-
> Only a user with an administrator role can add other users, and assign or change user roles.
35+
>**NOTE:**
36+
Only a user with an administrator role can add other users, and assign or change user roles.
3637

3738

3839
{% include
@@ -73,14 +74,18 @@ The table below lists the functionality available for the `Admin` and `User` rol
7374
## ABAC for entities with tags and rules
7475

7576
ABAC (Attribute-Based Access Control), allows fine-grained access to all entities, Kubernetes clusters, Codefresh pipelines, projects, and additional resources through the use of tags and rules.
76-
For more information on ABAC, see [ABAC on Wikipedia](https://en.wikipedia.org/wiki/Attribute-based_access_control){:target="\_blank"}.
77+
For general information on ABAC, see [ABAC on Wikipedia](https://en.wikipedia.org/wiki/Attribute-based_access_control){:target="\_blank"}.
7778

78-
Using tags, you can allocate entities and resources to teams. Define which team has access to which entities and resources, and also the type of access.
79-
Tag names are arbitrary, and can be anything you choose that matches your company process. Tags can be product names, software lifecycle phases, department names, or names that help define security policies.
79+
**Tags**
80+
Tags give you the flexibility to assign entities and resources to specific teams while determining the type of access each team has. Tags serve as labels that help organize and control access to these entities and resources.
8081

81-
You can then define rules combining teams, privileges, and tags and for fine-grained access control.
82+
Tag names are entirely customizable and can align with your company's processes and requirements. They can encompass a wide range of categories, including product names, software lifecycle phases, departmental designations, or labels designed to enforce security policies.
8283

83-
### Define tags for entities
84+
**Rules**
85+
Rules combine teams (who), privileges (what), and tags (where) to create fine-grained access control policies.
86+
Codefresh supports ABAC with the flexibility to use both OR and AND operations for tags.
87+
88+
### Tags for entities
8489

8590
#### Assign tags to Kubernetes clusters and Git contexts
8691

@@ -125,7 +130,7 @@ After integrating Kubernetes clusters/Git providers in Codefresh, you can add on
125130

126131
Add tags to projects for filtering and defining permissions.
127132

128-
>TIP:
133+
>**TIP**:
129134
If [**Auto-create projects for teams**]({{site.baseurl}}/docs/pipelines/configuration/pipeline-settings/#auto-create-projects-for-teams) is enabled in global pipeline settings for your account, then creating the team also creates a project and tag for the project, both with the same name as the team name.
130135

131136

@@ -177,17 +182,18 @@ Shared configuration can be environment variables, Helm values, encrypted secret
177182
<br><br>
178183

179184
### Rules for access control
180-
Define rules using the *who, what, where* pattern to control access to entities and resources.
185+
Define rules using the *who, what, where* pattern to control access to entities and resources. Rules can be based on OR or AND relationships.
181186

182187
For each rule, select:
183188
1. The team the rule applies to
184189
1. The CRUD (*Create/Delete/Read/Update*) privileges the team has to the entity/resource
185190
* For almost all entities, the Create privilege requires a separate rule.
186191
* The other privileges can be defined in the same rule.
187-
1. The tags that control access to the entity/resource
188-
* All tags, (implicitly includes No tags)
189-
* No tags
190-
* Named tags
192+
1. The tags that control access to the entity/resource:
193+
* Any tags (`any`): Grants access to entity as long as it has a tag. The tag name is not relevant.
194+
* All named tags (`all of these`): **AND** logic between list of defined tags. Grants access only to the entities with _all_ the tags defined in the list.
195+
* Any named tag (`any of these`): **OR** logic between list of defined tags. Grants access to the entity with _at least one_ of the tags defined.
196+
* No tags (`no`): Grants access to the entity _without_ any tags.
191197

192198

193199
The examples in this section illustrate how to control access to projects and to pipelines through project tags:
@@ -209,19 +215,21 @@ Make sure you have:
209215
1. For each entity, do the following to define a rule:
210216
1. Select the team to which assign the rule.
211217
1. Select the privileges to assign to the team for that entity.
212-
>You cannot select the **Create** privilege together with the other privileges. The **Create** privilege requires a separate rule.
218+
>**NOTE:**
219+
You cannot select the **Create** privilege together with the other privileges. The **Create** privilege requires a separate rule.
213220
**Any** indicates no privileges are selected.
214-
1. To assign tags, select one of the following:
215-
* **All tags**: Allows access only to entities with or without tags, regardless of the actual tag names.
216-
* **Without tags**: Allows access only to entities that do not have tags assigned to them.
217-
* **Named tags**: Allows access only to those entities with the same tag names.
221+
1. To determine tags, select one of the following:
222+
* **Any**: Allows access to entities _with_ any tag, regardless of the actual tag names.
223+
* **All of these tags**: Allows access only to those entities _with all_ the tags defined in the list (_AND_ relationship between the tags). Access is denied if the entity does not all the tag names.
224+
* **Any of these tags**: Allows access only to those entities _with any_ of the tags defined in the list. Access is allowed if the entity has at one of the tag names.
225+
* **No tags**: Allows access only to entities that do not have tags assigned to them.
218226

219227
{% include image.html
220228
lightbox="true"
221229
file="/images/administration/access-control/kubernetes-policies.png"
222230
url="/images/administration/access-control/kubernetes-policies.png"
223-
alt="Kubernetes policies"
224-
caption="Kubernetes policies"
231+
alt="Rules for Kubernetes clusters"
232+
caption="Rules for Kubernetes clusters"
225233
max-width="80%"
226234
%}
227235

@@ -297,6 +305,7 @@ Now we'll create the two teams, DevOps and Users.
297305
max-width="60%"
298306
%}
299307

308+
{:start="3"}
300309
1. Create a new team, Users.
301310

302311
<br>
@@ -348,52 +357,53 @@ Now we'll create three projects, with different tags. See [Create project for pi
348357
As the final step, let’s define the rules that govern access to pipelines in projects through the project tags.
349358

350359
We'll first define the access requirements for the pipelines:
351-
* Team `DevOps` has full permissions for pipelines in all projects with tags `backend`, `frontend` and `shared`
352-
* Team `Marvel` has full permissions for pipelines in all projects with tags `frontend` and `shared`
353-
* Team `Users` can view and run pipelines in all projects with tags `shared`
360+
* Team `DevOps` has full permissions for pipelines in all projects with _any of these_ tags (OR relationship): `backend`, `frontend` and `shared`
361+
* Team `Marvel` has full permissions for pipelines in all projects with _all of these_ tags (AND relationship) `frontend` and `shared`
362+
* Team `Users` can view and run pipelines in all projects with _all of these_ tags (AND relationship) `shared`
354363

355-
> Note: We are a defining the rule for pipelines _with project tags_ instead of _pipeline tags_.
364+
>**NOTE:**
365+
We are defining rules for pipelines _with project tags_ instead of _pipeline tags_.
356366

357367

358368
Here's how you would define the rules:
359369
We need to define a Create rule each for teams DevOps and Marvel, and then different rules for the three teams with the other permissions.
360370

361371
* For team DevOps:
362-
1. Rule 1: Create pipelines in projects with `frontend`, `backend`, or `shared` tags.
363-
1. Rule 2: All other permissions for pipelines in projects with `frontend`, `backend`, or `shared` tags.
372+
1. Rule 1: Create pipelines in projects with _any of these_ tags: `frontend` OR `backend` OR `shared`.
373+
1. Rule 2: All other permissions for pipelines in projects with _any of these_ tags: `frontend` OR `backend` OR `shared`.
364374

365375
{% include image.html
366376
lightbox="true"
367377
file="/images/administration/access-control/example-project-tags-devops.png"
368378
url="/images/administration/access-control/example-project-tags-devops.png"
369-
alt="Example: Unrestricted pipeline permissions for DevOps team by project tags"
370-
caption="Example: Unrestricted pipeline permissions for DevOps team by project tags"
371-
max-width="60%"
379+
alt="Example: Unrestricted pipeline permissions for DevOps team by _any_ project tags"
380+
caption="Example: Unrestricted pipeline permissions for DevOps team by _any_ project tags"
381+
max-width="70%"
372382
%}
373383

374384
* For team Marvel:
375-
1. Rule 1: Create pipelines in projects _only_ with `frontend` or `shared` tags.
376-
1. Rule 2: All other permissions for pipelines in projects _only_ with `frontend` or `shared` tags.
385+
1. Rule 1: Create pipelines in projects only with _all of these_ tags: both `frontend` AND `shared`.
386+
1. Rule 2: All other permissions for pipelines in projects only with _all of these_ tags: both `frontend` AND `shared`.
377387

378388
{% include image.html
379389
lightbox="true"
380390
file="/images/administration/access-control/example-project-tags-marvel.png"
381391
url="/images/administration/access-control/example-project-tags-marvel.png"
382-
alt="Example: Restricting pipeline permissions by project tags"
383-
caption="Example: Restricting pipeline permissions by project tags"
384-
max-width="60%"
392+
alt="Example: Restricting pipeline permissions by _all_ project tags"
393+
caption="Example: Restricting pipeline permissions by _all_ project tags"
394+
max-width="70%"
385395
%}
386396

387397
* For team Users:
388-
* Rule: View and run for pipelines in projects with `shared` tags.
398+
* Rule: View and run for pipelines in projects only with _all of these_ tags: `shared`.
389399

390400
{% include image.html
391401
lightbox="true"
392402
file="/images/administration/access-control/example-project-tags-users.png"
393403
url="/images/administration/access-control/example-project-tags-users.png"
394-
alt="Example: Restricting team permissions for pipelines by project tag"
395-
caption="Example: Restricting team permissions for pipelines by project tag"
396-
max-width="60%"
404+
alt="Example: Restricting team permissions for pipelines by _all_ project tags"
405+
caption="Example: Restricting team permissions for pipelines by _all_ project tags"
406+
max-width="70%"
397407
%}
398408

399409
## Git-repository access for pipeline definitions
@@ -459,6 +469,5 @@ By default, if configured for the account, users can also load pipeline definiti
459469

460470
## Related articles
461471
[Codefresh Provider for Terraform](https://registry.terraform.io/providers/codefresh-io/codefresh/latest/docs){:target="\_blank"}
462-
[Codefresh installation options]({{site.baseurl}}/docs/installation/installation-options/)
463472
[Managing your Kubernetes cluster]({{site.baseurl}}/docs/deployments/kubernetes/manage-kubernetes/)
464473

-63.7 KB
Loading
-64.2 KB
Loading
-65 KB
Loading
7.47 KB
Loading

0 commit comments

Comments
 (0)