Skip to content

Commit e3525ff

Browse files
authored
Merge pull request #888 from run-ai/new-auth-articles
new-auth-articles
2 parents a861ff7 + 461a409 commit e3525ff

18 files changed

+792
-42
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
This article explains the procedure to manage Access rules.
2+
3+
Access rules provide users, groups, or applications privileges to system entities.
4+
5+
An access rule is the assignment of a role to a subject in a scope: \<Subject\> is a \<Role\> in a \<Scope\>.
6+
7+
For example, user **user@domain.com** is a **department admin** in **department A**.
8+
9+
## Access rules table
10+
11+
The Access rules table can be found under **Tools & Settings** in the Run:ai platform.
12+
13+
The Access rules table provides a list of all the access rules defined in the platform, and allows you to manage them.
14+
15+
16+
17+
!!! Note
18+
__Flexible management__
19+
20+
It is also possible to manage access rules directly for a specific user, application, project, or department.
21+
22+
![](img/accessrulestable.png)
23+
24+
The Access rules table consists of the following columns:
25+
26+
| Column | Description |
27+
| :---- | :---- |
28+
| Type | The type of subject assigned to the access rule (user, SSO group, or application). |
29+
| Subject | The user, SSO group, or application assigned with the role |
30+
| Role | The role assigned to the subject |
31+
| Scope | The scope to which the subject has access. Click the name of the scope to see the scope and its subordinates |
32+
| Authorized by | The user who granted the access rule |
33+
| Creation time | The timestamp for when the rule was created |
34+
| Last updated | The last time the access rule was updated |
35+
36+
### Customizing the table view
37+
38+
* Filter - Click ADD FILTER, select the column to filter by, and enter the filter values
39+
* Search - Click SEARCH and type the value to search by
40+
* Sort - Click each column header to sort by
41+
* Column selection - Click COLUMNS and select the columns to display in the table
42+
* Download table - Click MORE and then Click Download as CSV
43+
44+
## Adding new access rules
45+
46+
To add a new access rule:
47+
48+
1. Click **\+NEW ACCESS RULE**
49+
1. Select a subject **User, SSO Group**, or **Application**
50+
1. Select or enter the subject identifier:
51+
* **User Email** for a local user created in Run:ai or for SSO user as recognized by the IDP
52+
* **Group name** as recognized by the IDP
53+
* **Application name** as created in Run:ai
54+
1. Select a role
55+
1. Select a scope
56+
1. Click **SAVE RULE**
57+
58+
!!!Note
59+
An access rule consists of a single subject with a single role in a single scope. To assign multiple roles or multiple scopes to the same subject, multiple access rules must be added.
60+
61+
## Editing an access rule
62+
63+
Access rules cannot be edited. To change an access rule, you must delete the rule, and then create a new rule to replace it.
64+
65+
## Deleting an access rule
66+
67+
1. Select the access rule you want to delete
68+
1. Click **DELETE**
69+
1. On the dialog, click **DELETE** to confirm the deletion
70+
71+
## Using API
72+
73+
Go to the [Access rules](https://app.run.ai/api/docs#tag/Access-rules) API reference to view the available actions
74+
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
This article explains the procedure to manage applications and it’s permissions.
2+
3+
Applications are used for API integrations with Run:ai. An application contains a secret key. Using the secret key you can obtain a token and use it within subsequent API calls.
4+
5+
Applications are managed locally and assigned with Access Rules to manage its permissions.
6+
7+
For example, application **ci-pipeline-prod** assigned with a **Researcher** role in **Cluster: A**.
8+
9+
## Applications table
10+
11+
The Applications table can be found under **Tools & Settings** in the Run:ai platform.
12+
13+
The Applications table provides a list of all the applications defined in the platform, and allows you to manage them.
14+
15+
![](img/appstable.png)
16+
17+
18+
The Applications table consists of the following columns:
19+
20+
| Column | Description |
21+
| :---- | :---- |
22+
| Application | The name of the application |
23+
| Status | The status of the application |
24+
| Access rule(s) | The access rules assigned to the application |
25+
| Last login | The timestamp for the last time the user signed in |
26+
| Created by | The user who created the application |
27+
| Creation time | The timestamp for when the application was created |
28+
| Last updated | The last time the application was updated |
29+
30+
### Customizing the table view
31+
32+
* Filter \- Click ADD FILTER, select the column to filter by, and enter the filter values
33+
* Search \- Click SEARCH and type the value to search by
34+
* Sort \- Click each column header to sort by
35+
* Column selection \- Click COLUMNS and select the columns to display in the table
36+
* Download table \- Click MORE and then Click Download as CSV
37+
38+
## Creating an application
39+
40+
To create an application:
41+
42+
1. Click **\+NEW APPLICATION**
43+
1. Enter the application’s **Name**
44+
1. Click **CREATE**
45+
1. Copy the credentials and store it securely:
46+
* **Application name**
47+
* **Secret key**
48+
1. Click **DONE**
49+
50+
!!!Note
51+
The secret key is visible only at the time of creation, it cannot be recovered but can be regenerated.
52+
53+
## Adding an access rule to an application
54+
55+
To create an access rule:
56+
57+
1. Select the application you want to add an access rule for
58+
1. Click **ACCESS RULES**
59+
1. Click **\+ACCESS RULE**
60+
1. Select a role
61+
1. Select a scope
62+
1. Click **SAVE RULE**
63+
1. Click **CLOSE**
64+
65+
## Deleting an access rule from an application
66+
67+
To delete an access rule:
68+
69+
1. Select the application you want to remove an access rule from
70+
1. Click **ACCESS RULES**
71+
1. Find the access rule assigned to the user you would like to delete
72+
1. Click on the trash icon
73+
1. Click **CLOSE**
74+
75+
## Regenerating key
76+
77+
To regenerate an application’s key:
78+
79+
1. Select the application you want to regenerate it’s secret key
80+
1. Click **REGENERATE KEY**
81+
1. Click **REGENERATE**
82+
1. Review the user’s credentials and store it securely:
83+
* **Application** name
84+
* **Secret key**
85+
1. Click **DONE**
86+
87+
!!!Warning
88+
Regenerating an application key revokes its previous key.
89+
90+
## Deleting an application
91+
92+
1. Select the application you want to delete
93+
1. Click **DELETE**
94+
1. On the dialog, click **DELETE** to confirm the deletion
95+
96+
## Using API
97+
98+
Go to the [Applications](https://app.run.ai/api/docs#tag/Applications), [Access rules](https://app.run.ai/api/docs#tag/Access-rules) API reference to view the available actions
99+

docs/admin/runai-setup/authentication/authentication-overview.md

Lines changed: 38 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,66 @@
1-
## Authentication Overview
1+
# Authentication & Authorization
22

3-
To access Run:ai resources, you have to authenticate. The purpose of this document is to explain how authentication works at Run:ai.
3+
Run:ai Authentication & Authorization enables a streamlined experience for the user with precise controls covering the data each user can see and the actions each user can perform in the Run:ai platform.
44

5-
## Authentication Endpoints
5+
Authentication verifies user identity during login, and Authorization assigns the user with specific permissions according to the assigned access rules.
66

7-
Generally speaking, there are two authentication endpoints:
7+
Authenticated access is required to use all aspects of the Run:ai interfaces, including the Run:ai platform, the Run:ai Command Line Interface (CLI) and APIs.
88

9-
* The Run:ai control plane.
10-
* Run:ai GPU clusters.
9+
## Authentication
1110

12-
Both endpoints are accessible via APIs as well as a user interface.
11+
There are multiple methods to authenticate and access Run:ai.
1312

13+
### Single Sign-On (SSO)
1414

15-
## Identity Service
15+
Single Sign-On (SSO) is the preferred authentication method by large organizations, as it avoids the need to manage duplicate sets of user identities.
1616

17-
Run:ai includes an internal identity service. The identity service ensures users are who they claim to be and gives them the right kind of access to Run:ai.
18-
19-
## Users
17+
Run:ai offers SSO integration, enabling users to utilize existing organizational credentials to access Run:ai without requiring dedicated credentials.
2018

21-
Out of the box, The Run:ai identity service provides a way to create users and associate them with access roles.
19+
Run:ai supports three methods to setup SSO:
2220

23-
It is also possible to configure the Run:ai identity service to connect to a company directory using the SAML protocol. For more information see [single sign-on](sso.md).
21+
* [SAML](sso/saml.md)
22+
* [OpenID Connect (OIDC)](sso/openidconnect.md)
23+
* [OpenShift](sso/openshift.md)
2424

25-
## Authentication Method
25+
When using SSO, it is highly recommended to manage at least one local user, as a breakglass account (an emergency account), in case access to SSO is not possible.
2626

27-
Both endpoints described above are protected via time-limited oauth2-like JWT authentication tokens.
27+
### Username and password
2828

29-
There are two ways of getting a token:
29+
Username and password access can be used when SSO integration is not possible.
3030

31-
* Using a user/password combination.
32-
* Using [client applications](../../../developer/overview-developer.md) for API access.
31+
### Secret key (for Application programmatic access)
3332

33+
Secret is the authentication method for Applications. Applications use the Run:ai APIs to perform automated tasks including scripts and pipelines based on its assigned access rules.
3434

35-
## Authentication Flows
35+
## Authorization
3636

37-
### Run:ai control plane
37+
The Run:ai platform uses Role Base Access Control (RBAC) to manage authorization.
3838

39-
You can use the Run:ai user interface to provide user/password. These are validated against the identity service. Run:ai will return a token with the right access rights for continued operation.
39+
Once a user or an application is authenticated, they can perform actions according to their assigned access rules.
4040

41-
You can also use a client application to get a token and then connect directly to the [administration API endpoint](../../../developer/admin-rest-api/overview.md).
42-
### Run:ai GPU Clusters
41+
### Role Based Access Control (RBAC) in Run:ai
4342

44-
The Run:ai GPU cluster is a _Kubernetes_ cluster. All communication into Kubernetes flows through the [Kubernetes API server](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-apiserver/){target=_blank}.
43+
While Kubernetes RBAC is limited to a single cluster, Run:ai expands the scope of Kubernetes RBAC, making it easy for administrators to manage access rules across multiple clusters.
4544

46-
To facilitate authentication via Run:ai the Kubernetes API server must be configured to use the Run:ai identity service to validate authentication tokens. For more information on how to configure the Kubernetes API server see _Kubernetes configuration_ under [researcher authentication](researcher-authentication.md#mandatory-kubernetes-configuration).
45+
RBAC at Run:ai is configured using access rules.
4746

48-
## Inactivity timeout
47+
An access rule is the assignment of a role to a subject in a scope: `<Subject>` is a `<Role>` in a `<Scope>`.
4948

50-
:octicons-versions-24: Version 2.10 and later.
49+
* **Subject**
50+
* A user, a group, or an application assigned with the role
51+
* **Role**
52+
* A set of permissions that can be assigned to subjects
53+
* A permission is a set of actions (view, edit, create and delete) over a Run:ai entity (e.g. projects, workloads, users)
54+
* For example, a role might allow a user to create and read Project, but not update or delete them
55+
* Roles at Run:ai are system defined and cannot be created, edited or deleted
56+
* **Scope**
57+
* A set of resources that are accessible to a subject for a specific role
58+
* A scope is a part of an organization that can be accessed based on assigned roles. Scopes include Projects, Departments, Clusters, Account (all clusters)
5159

52-
Run:ai session should timeout after 1 hour of inactivity.
60+
Below is an example of an access rule: **username@company.com** is a **Department admin** in **Department: A**
5361

54-
!!! Note
55-
Timeout settings are configured in minutes.
5662

57-
To configure the inactivity timeout:
58-
1. Open `Settings | General`.
59-
2. Set the inactivity timeout in minutes. (Default is 60)
6063

61-
## See also
64+
![](img/auth-rbac.png)
65+
6266

63-
* To configure authentication for researchers [researcher authentication](researcher-authentication.md).
64-
* To configure single sign-on, see [single sign-on](sso.md).
Loading
Loading
Loading
Loading
Loading
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
This article explains the roles in the Run:ai platform.
2+
3+
A role is a set of permissions that can be assigned to a subject in a scope.
4+
5+
A permission is a set of actions (View, Edit, Create & Delete) over a Run:ai entity (e.g. projects, workloads, users).
6+
7+
## Roles table
8+
9+
The Roles table can be found under **Tools & Settings** in the Run:ai platform.
10+
11+
The Roles table displays a list of predefined roles available to users in the Run:ai platform. It is not possible to create additional rules or edit or delete existing rules.
12+
13+
![](img/rolestable.png)
14+
15+
16+
The Roles table consists of the following columns:
17+
18+
| Column | Description |
19+
| :---- | :---- |
20+
| Role | The name of the role |
21+
| Created by | The name of the role creator |
22+
| Creation time | The timestamp when the role was created |
23+
24+
### Customizing the table view
25+
26+
* Filter - Click ADD FILTER, select the column to filter by, and enter the filter values
27+
* Search - Click SEARCH and type the value to search by
28+
* Sort - Click each column header to sort by
29+
* Column selection - Click COLUMNS and select the columns to display in the table
30+
* Download table - Click MORE and then Click Download as CSV
31+
32+
## Reviewing a role
33+
34+
* **Role name** - The name of the role
35+
* **Permissions** - Displays the available permissions defining the role, as follows:
36+
37+
| Column | Description |
38+
| :---- | :---- |
39+
| Entity | A system-managed object that can be viewed, edited, created or deleted by a user based on their assigned role and scope |
40+
| View | If checked, an assigned user with this role can view instances of this type of entity within their defined scope |
41+
| Edit | If checked, an assigned user with this role can change the settings of an instance of this type of entity within their defined scope |
42+
| Create | If checked, an assigned user with this role can create new instances of this type of entity within their defined scope |
43+
| Delete | If checked, an assigned user with this role can delete instances of this type of entity within their defined scope |
44+
45+
*
46+
## Using API
47+
Go to the [Roles](https://app.run.ai/api/docs#tag/Roles) API reference to view the available actions
48+
Loading

0 commit comments

Comments
 (0)