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: ee/ucp/admin/configure/configure-rbac-kube.md
+17-22Lines changed: 17 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,47 +15,42 @@ UCP 3.0 used its own role-based access control (RBAC) for Kubernetes clusters. N
15
15
16
16
Kubernetes RBAC is turned on by default for Kubernetes clusters when customers upgrade to UCP 3.1. See [Using RBAC Authorization](https://kubernetes.io/docs/reference/access-authn-authz/rbac/) in the v1.11 documentation for more information about Kubernetes role-based access control.
17
17
18
-
Starting with UCP 3.1, Kubernetes and Swarm roles have separate views. You can view all the roles for a particular cluster under **Access Control**then**Roles**. Select Kubernetes or Swarm to view the specific roles for each.
18
+
Starting with UCP 3.1, Kubernetes and Swarm roles have separate views. You can view all of the roles for a particular cluster under **Access Control**>**Roles**. Select **Kubernetes** or **Swarm** to view the specific roles for each.
19
19
20
20
## Creating roles
21
-
22
-
You create Kubernetes roles either through the CLI using `kubectl` or through the UCP web interface.
23
-
24
-
To create a Kubernetes role in the UCP web interface:
21
+
You can create Kubernetes roles through either the CLI using [kubectl](https://kubernetes.io/docs/reference/kubectl/overview/) or the UCP user interface (the procedure that follows).
25
22
26
23
1. From the UCP UI, select **Access Control**.
27
24
2. From the left navigation menu, select **Roles**.
28
25

29
26
3. Select the **Kubernetes** tab at the top of the window.
30
27
4. Select **Create** to create a Kubernetes role object in the following dialog:
31
28

32
-
5. Select a namespace from the **Namespace** drop-down list. Selecting a specific namespace creates a role for use in that namespace, but selecting all namespaces creates a `ClusterRole` where you can create rules for cluster-scoped Kubernetes resources as well as namespaced resources.
29
+
5. Select a namespace from the **Namespace** drop-down list. Selecting a specific namespace creates a role for use in that namespace, however selecting all namespaces creates a ClusterRole where you can create rules for cluster-scoped Kubernetes resources as well as namespaced resources.
33
30
6. Provide the YAML for the role, either by entering it in the **Object YAML** editor or select **Click to upload a .yml file** to choose and upload a .yml file instead.
34
-
7.When you have finished specifying the YAML, Select **Create** to complete role creation.
31
+
7. Select **Create**.
35
32
36
33
## Creating role grants
37
34
38
-
Kubernetes provides 2 types of role grants:
39
-
40
-
-`ClusterRoleBinding` which applies to all namespaces
41
-
-`RoleBinding` which applies to a specific namespace
35
+
Kubernetes provides two types of role grants, **ClusterRoleBinding** (which applies to all namespaces) and **RoleBinding** (which applies to a specific namespace).
42
36
43
-
To create a grant for a Kubernetes role in the UCP web interface:
37
+
To create a grant for a Kubernetes role in the UCP UI:
44
38
45
-
1.From the UCP UI, select**Access Control**.
39
+
1.Select**Access Control**.
46
40
2. From the left navigation menu, select **Grants**.
47
41

48
-
3. Select the **Kubernetes** tab at the top of the window. All grants to Kubernetes roles can be viewed in the Kubernetes tab.
49
-
4. Select **Create New Grant** to start the Create Role Binding wizard and create a new grant for a given user, team or service.
42
+
3. Select the **Kubernetes** tab at the top of the windowto view all of the grants available to Kubernetes roles.
43
+
4. Select **Create New Grant** to start the Create Role Binding wizard and create a new grant for a given user, team, or service.
50
44

51
-
5. Select the subject type. Your choices are:
52
-
-**All Users**
53
-
-**Organizations**
54
-
-**Service account**
45
+
5. Select the subject type, **All Users**, **Organizations**, or **Service Account**.
55
46
6. To create a user role binding, select a username from the **Users** drop-down list then select **Next**.
56
47
7. Select a resource set for the subject. The **default** namespace is automatically selected. To use a different namespace, select the **Select Namespace** button next to the desired namespace. For `Cluster Role Binding`, slide the **Apply Role Binding to all namespaces** selector to the right.
57
48

58
-
8. Select **Next** to continue.
59
-
9. Select the **Cluster Role** from the drop-down list. If you create a `ClusterRoleBinding` (by selecting **Apply Role Binding to all namespaces**) then you may only select ClusterRoles. Ifyou select a specific namespace, you can choose any role from that namespace or any ClusterRole.
49
+
8. Select **Next**.
50
+
9. Select the **Cluster Role** from the drop-down list. If you select **Apply Roles Binding to all namespaces** to create a ClusterRolebinding, only **ClusterRoles** can be selected. If, though, you select a specific namespace you can choose any role from that namespace or any ClusterRole.
60
51

61
-
10. Select **Create** to complete creating the grant.
Audit logs are a chronological record of security-relevant activities by
11
-
individual users, administrators or software components that have affected the
11
+
individual users, administrators, or software components that have affected the
12
12
system. They are focused on external user/agent actions and security rather than
13
13
understanding state or events of the system itself.
14
14
15
15
Audit logs capture all HTTP actions (GET, PUT, POST, PATCH, DELETE) to all UCP
16
-
API, Swarm API and Kubernetes API endpoints that are invoked (except for the
17
-
ignored list) and sent to Docker Engine via stdout. Creating audit logs is a UCP
18
-
component that integrates with Swarm, Kubernetes, and UCP APIs.
16
+
API, Swarm API, and Kubernetes API endpoints that are invoked (except for the
17
+
ignored list) and sent to Docker Engine through standard output (stdout). Creating audit logs is a UCP component that integrates with Swarm, Kubernetes, and UCP APIs.
19
18
20
19
## Logging levels
21
20
22
-
To allow more control to administrators over the audit logging, three audit
23
-
logging levels are provided:
21
+
Three audit logging levels are provided to give administrators more control:
24
22
25
-
-**None**: audit logging is disabled
26
-
27
-
-**Metadata**: includes the following:
23
+
-**None:** Audit logging is disabled.
24
+
-**Metadata:** Includes the following:
28
25
- Method and API endpoint for the request
29
26
- UCP user who made the request
30
27
- Response Status (success or failure)
31
28
- Timestamp of the call
32
29
- Object ID of any created or updated resource (for create or update API
33
-
calls). We do not include names of created or updated resources
30
+
calls). The names of created or updated resources are not included.
34
31
- License Key
35
32
- Remote Address
36
-
37
-
-**Request**: includes all fields from the Metadata level as well as the
33
+
-**Request:** Includes all fields from the Metadata level as well as the
38
34
request payload.
39
35
40
36
> Note
41
37
>
42
38
> Once UCP audit logging has been enabled, audit logs can be found within the
43
39
> container logs of the `ucp-controller` container on each UCP manager node.
> configured appropriately with log rotation set as audit logging can start to
47
-
> generate a lot of data.
48
-
49
-
## Benefits
50
-
51
-
You can use audit logs to help with the following use cases:
40
+
> Ensure that you have a [logging driver](../../../../config/containers/logging/configure/)
41
+
> configured appropriately with log rotation set, as audit logging can generate a large amount of data.
52
42
53
-
-**Historical troubleshooting** - Audit logs are helpful in determining a
54
-
sequence of past events that explain why an issue occurred.
43
+
## Benefits of audit logging
55
44
56
-
-**Security analysis and auditing** - Security is one of the primary uses for
57
-
audit logs. A full record of all user interactions with the container
58
-
infrastructure gives your security team full visibility to questionable or
59
-
attempted unauthorized accesses.
60
-
61
-
-**Chargeback** - You can use audit logs and information about the resources to
62
-
generate chargeback information.
63
-
64
-
-**Alerting** - If there is a watch on an event stream or a notification
65
-
created by the event, alerting features can be built on top of event tools that
66
-
generate alerts for ops teams (PagerDuty, OpsGenie, Slack, or custom solutions).
45
+
Audit logs can be of help with historical troubleshooting, security analysis and auditing, generating chargeback information, and creating useful alerts.
67
46
68
47
## Enabling UCP audit logging
69
48
70
-
UCP audit logging can be enabled via the UCP web user interface, the UCP API or
71
-
via the UCP configuration file.
49
+
Enable audit logging using either the UCP UI, the UCP API, or the UCP configuration file.
72
50
73
-
### Enabling UCP audit logging using the web UI
51
+
### Enabling UCP audit logging through the UI
74
52
75
-
1. Log in to the **UCP** Web User Interface
76
-
2. Navigate to **Admin Settings**
77
-
3. Select **Audit Logs**
78
-
4. In the **Configure Audit Log Level** section, select the relevant logging
53
+
1. Access the UCP UI and browse to the Admin Settings page.
54
+
2. Select **Audit Logs.**
55
+
3. In the **Configure Audit Log Level** section, select the relevant logging
79
56
level.
80
57
81
58
{: .with-border}
82
59
83
-
5. Click **Save**
60
+
4. Click **Save.**
84
61
85
62
### Enabling UCP audit logging using the API
86
63
87
-
1. Download the UCP Client bundle [Download client bundle from the command line](https://success.docker.com/article/download-client-bundle-from-the-cli).
64
+
1. Download the UCP Client bundle [from the command line](https://success.docker.com/article/download-client-bundle-from-the-cli).
88
65
89
-
2. Retrieve JSON for current audit log configuration.
66
+
2. Retrieve the JSON file for the current audit log configuration.
3. Open auditlog.json to modify the 'auditlevel' field to `metadata` or `request`.
73
+
3. Open auditlog.json to modify the `auditlevel` field to `metadata` or `request`.
97
74
98
75
```
99
76
{
@@ -111,7 +88,7 @@ level.
111
88
112
89
### Enabling UCP audit logging using the configuration file
113
90
114
-
Enabling UCP audit logging via the UCP configuration file can be done before
91
+
Enabling UCP audit logging through the UCP configuration file can be done before
115
92
or after a UCP installation. Refer to the [UCP configuration file](./ucp-configuration-file/) topic for more information.
116
93
117
94
The section of the UCP configuration file that controls UCP auditing logging is:
@@ -124,22 +101,20 @@ The section of the UCP configuration file that controls UCP auditing logging is:
124
101
125
102
The supported variables for `level` are `""`, `"metadata"` or `"request"`.
126
103
127
-
> Note
104
+
> Important
128
105
>
129
106
> The `support_dump_include_audit_logs` flag specifies whether user identification information from the ucp-controller container logs is included in the support dump. To prevent this information from being sent with the support dump, make sure that `support_dump_include_audit_logs` is set to `false`. When disabled, the support dump collection tool filters out any lines from the `ucp-controller` container logs that contain the substring `auditID`.
130
107
{: .important}
131
108
132
109
## Accessing audit logs
133
110
134
-
The audit logs are exposed today through the `ucp-controller` logs. You can
111
+
The audit logs are exposed through the `ucp-controller` logs. You can
135
112
access these logs locally through the Docker CLI or through an external
136
-
container logging solution, such as [ELK](https://success.docker.com/article/elasticsearch-logstash-kibana-logging)
113
+
container logging solution, such as [ELK](https://success.docker.com/article/elasticsearch-logstash-kibana-logging).
137
114
138
115
### Accessing audit logs using the Docker CLI
139
116
140
-
To access audit logs using the Docker CLI:
141
-
142
-
1. Source a UCP Client Bundle
117
+
1. Source a UCP client bundle.
143
118
2. Run `docker logs` to obtain audit logs. In the following example,
144
119
we are tailing the command to show the last log entry.
145
120
@@ -204,7 +179,7 @@ events and may create a large amount of log entries.
204
179
205
180
## API endpoint information redacted
206
181
207
-
Information for the following API endpoints is redacted from the audit logs for security purposes:
182
+
Information for the following API endpoints is redacted from the audit logs for security purposes.
208
183
209
184
- `/secrets/create` (POST)
210
185
- `/secrets/{id}/update` (POST)
@@ -215,5 +190,5 @@ Information for the following API endpoints is redacted from the audit logs for
215
190
216
191
## Where to go next
217
192
218
-
- [Collect UCP Cluster Metrics with Prometheus](collect-cluster-metrics.md)
193
+
- [Collect UCP cluster metrics with Prometheus](collect-cluster-metrics.md)
219
194
- [Learn more about the UCP Configuration File](ucp-configuration-file.md)
With Docker Universal Control Plane you can enforce applications to only use
10
-
Docker images signed by UCP users you trust. When a user tries to deploy an
11
-
application to the cluster, UCP checks if the application uses a Docker image
12
-
that is not trusted, and won’t continue with the deployment if that’s the case.
9
+
With Docker Universal Control Plane (UCP), you can enforce applications to only use Docker images signed by UCP users you trust. Each time a user attempts to deploy an application to the cluster, UCP checks whether the application is using a trusted Docker image (and will halt the deployment if that is not the case).
By signing and verifying the Docker images, you ensure that the images being
17
-
used in your cluster are the ones you trust and haven’t been altered either in
18
-
the image registry or on their way from the image registry to your UCP cluster.
13
+
By signing and verifying Docker images, you ensure that:
19
14
20
-
## Example workflow
15
+
* The images used in your cluster are ones that you trust.
16
+
* The images have not been altered either in the image registry or on their way from the image registry to your UCP cluster.
21
17
22
-
Here's an example of a typical workflow:
18
+
## Example workflow
23
19
24
-
1. A developer makes changes to a service and pushes their changes to a version
25
-
control system.
26
-
2. A CI system creates a build, runs tests, and pushes an image to DTR with the
27
-
new changes.
28
-
3. The quality engineering team pulls the image and runs more tests. If
29
-
everything looks good they sign and push the image.
30
-
4. The IT operations team deploys a service. If the image used for the service
31
-
was signed by the QA team, UCP deploys it. Otherwise UCP refuses to deploy.
20
+
1. A developer makes changes to a service and pushes the changes to a version control system.
21
+
2. A continuous integration (CI) system creates a build, runs tests, and pushes an image to Docker Trusted Registry (DTR) with the new changes.
22
+
3. The quality engineering team pulls the image and runs more tests. If the tests are successful, the team signs and then pushes the image.
23
+
4. The IT operations team deploys a service. If the image used for the service was signed by the QA team, UCP deploys it. Otherwise, UCP refuses to deploy the image.
32
24
33
25
## Configure UCP
34
26
35
-
To configure UCP to only allow running services that use Docker images you
36
-
trust, go to the UCP web UI, navigate to the **Admin Settings** page, and in
37
-
the left pane, click **Docker Content Trust**.
27
+
To configure UCP to only allow running services that use Docker trusted images:
28
+
29
+
1. Access the UCP UI and browse to the **Admin Settings** page.
30
+
2. In the left navigation pane, click **Docker Content Trust**.
31
+
3. Select the **Run only signed images** option.
38
32
39
-
Select the **Run Only Signed Images** option to only allow deploying
If you specify multiple teams, the image needs to be signed by a member of each
43
+
team, or by someone that is a member of all of those teams.
51
44
52
-
If you specify multiple teams, the image needs to be signed by a member of each
53
-
team, or someone that is a member of all those teams.
45
+
4. Click **Save.**
54
46
55
-
Click **Save** for UCP to start enforcing the policy. From now on, existing
56
-
services will continue running and can be restarted if needed, but UCP will only
57
-
allow deploying new services that use a trusted image.
47
+
At this point, UCP starts enforcing the policy. Existing services will continue running and can be restarted if needed, however UCP only allows the deployment of new services that use a trusted image.
0 commit comments