|
1 | 1 | --- |
2 | 2 | title: Users and Groups |
3 | | -weight: 1215 |
| 3 | +weight: 1 |
4 | 4 | --- |
5 | 5 |
|
| 6 | +Rancher relies on users and groups to determine who is allowed to log in to Rancher and which resources they can access. When you configure an external authentication provider, users from that provider will be able to log in to your Rancher server. When a user logs in, the authentication provider will supply your Rancher server with a list of groups to which the user belongs. |
6 | 7 |
|
7 | | -## Managing Users and Groups |
| 8 | +Access to clusters, projects, multi-cluster apps, and global DNS providers and entries can be controlled by adding either individual users or groups to these resources. When you add a group to a resource, all users who are members of that group in the authentication provider, will be able to access the resource with the permissions that you've specified for the group. For more information on roles and permissions, see [Role Based Access Control]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/). |
8 | 9 |
|
9 | | -When you configure an authentication provider, users from that provider will be able to log into your Rancher server. When a user logs in, the authentication provider will supply your Rancher server with a list of groups to which the user belongs. |
| 10 | +## Managing Members |
10 | 11 |
|
11 | | -Access to cluster, projects, multi-cluster apps, and global DNS providers and entries can be controlled by adding either individual users or groups to the resource. When you add a group to a resources, all users who are a member of that group in the authentication provider will be able to access the resource with the permissions that you've specified. For more information on roles and permissions, see [Role Based Access Control]({{< baseurl >}}/rancher/v2.x/en/admin-settings/rbac/). |
| 12 | +When adding a user or group to a resource, you can search for users or groups by beginning to type their name. The Rancher server will query the authentication provider to find users and groups that match what you've entered. Searching is limited to the authentication provider that you are currently logged in with. For example, if you've enabled GitHub authentication but are logged in using a [local]({{< baseurl >}}/rancher/v2.x/en/admin-settings/authentication/local/) user account, you will not be able to search for GitHub users or groups. |
12 | 13 |
|
13 | | -When adding a new member to a resource, you can search for users or groups by beginning to type their name. The Rancher server will query the authentication provider to find users and groups that match what you've entered. |
| 14 | +All users, whether they are local users or from an authentication provider, can be viewed and managed. From the **Global** view, click on **Users**. |
14 | 15 |
|
15 | | -> **NOTE:** SAML-based authentication providers do not support user or group search. The only groups that you will see with these providers are the ones to which you belong. The only users you will see are ones that have already logged into your Rancher server. |
| 16 | +{{< saml_caveats >}} |
16 | 17 |
|
17 | | -> **NOTE:** Searching is limited to the authentication provider you are currently logged in with. For example, if you've enabled GitHub authentication but are logged in using a local user account, you will not be able to search for GitHub users or groups. |
| 18 | +## User Information |
18 | 19 |
|
19 | | -All users, whether they are local or from an authentication provider, can be viewed and managed from the **Global** **Users** page. New local users can be added from this page as well. |
| 20 | +Rancher maintains information about each user that logs in through an authentication provider. This information includes whether the user is allowed to access your Rancher server and the list of groups that the user belongs to. Rancher keeps this user information so that the CLI, API, and kubectl can accurately reflect the access that the user has based on their group membership in the authentication provider. |
20 | 21 |
|
| 22 | +Whenever a user logs in to the UI using an authentication provider, Rancher automatically updates this user information. |
21 | 23 |
|
22 | | -> **NOTE:** Local authentication does not support creating or managing groups. |
23 | | -
|
24 | | -## Refreshing User Information |
| 24 | +### Automatically Refreshing User Information |
25 | 25 |
|
26 | 26 | _Available as of v2.2.0_ |
27 | 27 |
|
28 | | -Rancher maintains information about each user that logs in through an authentication provider. This information includes a list of groups that the user belongs to and whether the user is allowed to access your Rancher server. Rancher does this so that the CLI, API, and kubectl can accurately reflect the access that the user has based on their group membership in the authentication provider. |
| 28 | +Rancher will periodically refresh the user information even before a user logs in through the UI. You can control how often Rancher performs this refresh. From the **Global** view, click on **Settings**. Two settings control this behavior: |
| 29 | + |
| 30 | +- **`auth-user-info-max-age-seconds`** |
| 31 | + |
| 32 | + This setting controls how old a user's information can be before Rancher refreshes it. If a user makes an API call (either directly or by using the Rancher CLI or kubectl) and the time since the user's last refresh is greater than this setting, then Rancher will trigger a refresh. This settting defaults to `3600` seconds, i.e. 1 hour. |
| 33 | + |
| 34 | +- **`auth-user-info-resync-cron`** |
| 35 | + |
| 36 | + This setting controls a recurring schedule for resyncing authentication provider information for all users. Regardless of whether a user has logged in or used the API recently, this will cause the user to be refreshed at the specified interval. This setting defaults to `0 0 * * *`, i.e. once a day at midnight. See the [Cron documentation](https://en.wikipedia.org/wiki/Cron) for more information on valid values for this setting. |
| 37 | + |
29 | 38 |
|
30 | | -When a user logs into the UI using an authentication provider, Rancher automatically updates this user information. Additionally, Rancher will periodically refresh this user information. You can contol how often Rancher performs this refresh by navigating to the **Global** **Settings** page. Two settings control this behavior: |
| 39 | +> **Note:** Since SAML does not support user lookup, SAML-based authentication providers do not support periodically refreshing user information. User information will only be refreshed when the user logs into the Rancher UI. |
31 | 40 |
|
32 | | -- **auth-user-info-max-age-seconds** |
| 41 | +### Manually Refreshing User Information |
33 | 42 |
|
34 | | - This setting controls how old a user's information can be before Rancher refreshes it. If a user makes an API call (either directly or by using the Rancher CLI or kubectl) and the time since the user's last refresh is greater than this setting, then Rancher will trigger a refresh. This settting defaults to `3600` seconds (1 hour). |
| 43 | +If you are not sure the last time Rancher performed an automatic refresh of user information, you can perform a manual refresh of all users. |
35 | 44 |
|
36 | | -- **auth-user-info-resync-cron** |
| 45 | +1. From the **Global** view, click on **Users** in the navigation bar. |
37 | 46 |
|
38 | | - This setting controls a recurring schedule for resyncing authentication provider information for all users. Regardless of whether a user has logged in or used the API recently, this will cause the user to be refreshed at the specified interval. This setting defaults to `0 0 * * *` (once a day at midnight). See the [Cron documentation](https://en.wikipedia.org/wiki/Cron) for more information on valid values for this setting. |
| 47 | +1. Click on **Refresh Global Memberships**. |
39 | 48 |
|
40 | | -It is also possible to manually refresh user information from the **Global** **Users** page. |
| 49 | +**Results:** Rancher refreshes the user information for all users. Requesting this refresh will update which users can access Rancher as well as all the groups that each user belongs to. |
41 | 50 |
|
42 | | -> **NOTE:** Since SAML does not support user lookup, SAML-based authentication providers do not support periodically refreshing user information. User information will only be refreshed when the user logs into the Rancher UI. |
| 51 | +>**Note:** Since SAML does not support user lookup, SAML-based authentication providers do not support the ability to manually refresh user information. User information will only be refreshed when the user logs into the Rancher UI. |
0 commit comments