Container runtime environment with distributed monitoring tasks and lowest rights
By dividing monitoring tasks into multiple categories and launching monitoring instances with the lowest permissions in the container runtime environment, the problems of excessive permissions and poor scalability in the existing technology are solved, and more secure and efficient container monitoring and load balancing are achieved. .
Patent Information
- Application Number
- CN202380022061.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-02-16
- Filing Date
- 2023-01-30
- Publication Date
- 2024-09-27
AI Technical Summary
The monitoring components of existing container runtime environments usually require high permissions, resulting in excessive permissions, making it difficult to restrict user permissions, and the inability to effectively expand monitoring instances when resources are insufficient, resulting in performance issues and security risks.
Divide monitoring tasks into multiple categories. Each category launches a container monitoring instance with the minimum required permissions and scales by replicating monitoring instances when needed. Employ segmented permissions and rule sets to limit and monitor container operations. Use eBPF Programs and kernel modules perform load balancing and traffic monitoring.
It reduces the permissions required to monitor the container runtime environment, improves the scalability of monitoring instances, and enhances security and performance through fine-grained permission management and load balancing to prevent permission abuse and performance bottlenecks.
Smart Images

Figure CN118715508A
Abstract
Description
Technical Field
[0001] The present invention relates to a container runtime environment and associated technical devices and associated systems. Background Art
[0002] There are many ways and methods to monitor and restrict container instances. One possible solution is for a privileged process outside the container instance to monitor the container instance and other instances if necessary, and restrict the operations of these instances or trigger an alarm if they are not compliant.
[0003] In the case of container runtime environments, especially Docker (application container engine), such solutions can usually also access interfaces (especially Docker Socket) through which the status information of the current container instance is queried, resources are created, and thus full control of the container runtime environment is achieved. These monitoring and restriction components can also be implemented as container instances, whereupon the monitoring and restriction components include corresponding permissions (in the form of access authorizations for the Docker Socket, especially in the form of file system authorizations or process authorizations for the corresponding instances), and can be extended or restricted, in particular, by means of Seccomp profiles and capabilities, which results in the container instance having to have very high permissions in the runtime environment in order to be able to perform monitoring and restriction.
[0004] Another possibility for monitoring and restrictions is to start the monitoring components as so-called sidecar containers for the actual container instances and to monitor them by sharing the corresponding Linux namespace and assigning permissions (especially with the help of Linux capabilities or Seccomp profiles). If necessary, unauthorized operations can be prevented by the containerized monitoring components.
[0005] The known solutions have the following problems:
[0006] - In known implementations of such monitoring components, a large number of functions are mapped to container instances with high permissions in such instances. Therefore, these components actually obtain a lot of permissions required for different monitoring tasks. In particular, many known implementations require access to the Docker Socket, which can be used to take over the full control of the container runtime environment.
[0007] - If the monitoring component is implemented via a sidecar container, the user who wants to launch the actual workload container instance will be granted all the permissions required to launch the (monitoring) sidecar container. Therefore, the runtime operator cannot enforce that the user who launches the container is granted only the minimum permissions.
[0008] - If more resources are needed on the platform for monitoring instances than are allocated to the monitoring component, this can only be achieved by dynamically allocating more CPU and (main) memory to the monitoring instance, or by dropping events generated by the instance in overload situations or processing them with considerable delay. Scaling monitoring instances for workload container instances is currently unknown.
[0009] The following problem arises due to the high permissions: the user (in this case the attacker) in the described scenario will obtain very wide-reaching permissions upon successful attack on the monitoring instance, which in most cases are actually indistinguishable from the underlying system.
[0010] The object of the present invention is to provide a solution for improving the monitoring of a container runtime environment and to implement countermeasures when necessary. Summary of the invention
[0011] The invention is derived from the features of the independent claims. Advantageous further developments and embodiments are the subject matter of the dependent claims. Embodiments, possible applications and advantages of the invention are apparent from the following description and the drawings.
[0012] The present invention relates to a container runtime environment having:
[0013] -Container application examples,
[0014] -Container monitoring instance,
[0015] The container monitoring instance is configured to monitor the container application instance.
[0016] The monitoring of application instances is divided into monitoring tasks.
[0017] At least one authority is assigned to each monitoring task, and the at least one authority is only capable of executing the monitoring task to which the at least one authority is assigned.
[0018] The execution of the monitoring task includes the implementation of the assigned rule set (Regelwerk),
[0019] where monitoring tasks are assigned to each container monitoring instance, and
[0020] Each container monitoring instance has at least one permission assigned to its monitoring task.
[0021] Therefore, one aspect of the present invention may be described herein as dividing the container runtime environment into categories and launching its own container monitoring instance with the minimum required permissions for each category (also referred to as segment).
[0022] According to another aspect of the present invention, the container monitoring instance can be replicated when the corresponding instance is overloaded, that is, expansion is performed.
[0023] In other words, the present invention provides a solution that reduces the permissions required to monitor a container runtime environment by segmenting individual functions into individual container monitoring instances, while allowing these container monitoring instances to have better scalability.
[0024] In one embodiment of the invention, the monitoring task is designed as follows:
[0025] - monitor started processes,
[0026] - establish a network connection,
[0027] - monitor active network connections,
[0028] - monitor write access,
[0029] - Check for vulnerabilities,
[0030] - limit system calls,
[0031] - assign permissions, and / or
[0032] -Monitor process permissions.
[0033] The advantage of this is that the monitoring of application instances is divided into monitoring tasks. At least one permission is assigned to each monitoring task, which is only sufficient to execute the monitoring task to which the at least one permission is assigned. The execution of the monitoring task also includes the implementation of the assigned rule set, thereby limiting the operation of the application instance and / or triggering an alarm, especially in the case of non-compliance. The assigned rule set describes which requests from the container monitoring instance and / or to the application instance are allowed, and / or in which state of the application instance these requests should be restricted. In particular, the execution of processes with specific process permissions is not allowed in the process, and in particular individual components are only started if they do not have vulnerabilities. In the case of performing certain operations, it is also possible to completely stop the instance, in particular to stop write access to specific areas of the file system.
[0034] This involves monitoring active network connections and monitoring the traffic that is taking place. An example of application could be, in particular, a layer 7 firewall function that performs content inspection. Content inspection is to be understood as the inspection of network connections at the application level via a boundary, in particular a firewall. It is thus ensured that not only a layer 4 inspection of addresses and ports is carried out, but also that the expected application protocol is used via the connection. In particular, in this case it is checked whether an http connection between two communication partners stored at the boundary also uses the application protocol http.
[0035] By monitoring the establishment of network connections, it is possible to monitor network traffic only at the transport layer (setting up a layer 4 firewall), but current enterprise firewalls can also monitor traffic at runtime using content inspection (setting up a layer 7 firewall).
[0036] In another embodiment of the present invention, the at least one authorization is designed so that the container monitoring instance can execute the monitoring task assigned to it but cannot execute other monitoring tasks. This has the effect that each container monitoring instance has only the minimum necessary authorization.
[0037] In another embodiment of the invention, a first of the monitoring tasks has a task part that is not a task part of the second monitoring task. This has the advantage that the first container monitoring instance is responsible for and has authority over the individual monitoring tasks and the associated rule sets.
[0038] In another embodiment of the invention, each monitoring task has a task part which is not a task part of the other monitoring tasks. This has the advantage that each container monitoring instance is responsible for and has authority over the individual monitoring tasks and the associated rule sets.
[0039] In another extension of the invention, the same monitoring task is assigned to multiple container monitoring instances. This can also be referred to as the extension of the container monitoring instance. If an overload is detected for a container monitoring instance (also referred to as an enforcer type), in particular the number of application instances (also referred to as workload containers), the number of network connections established within a specific time window, the enforcer coordination instance can restart another enforcer instance of the same type and provide a load balancer function. Thus, the extension of the monitoring instance is outsourced to the enforcer coordination instance's own coordinator and is separated from the normal coordinator that performs the extension of the application instance.
[0040] The problem of using a common coordinator for monitoring instances and application instances is that the coordinator must be widely exposed to deliver coordination information. The advantage of separating from the common coordinator is that the common coordinator can be better protected.
[0041] Furthermore, the two coordinators (one each for the monitoring instance and the application instance) may be designed as container instances with permissions, but are typically independent systems.
[0042] Depending on the type, the load balancer functionality can be ensured when necessary by restarting the corresponding container or the load balancer resources managed by the orchestrator that is aware of the functionality on the application side.
[0043] In another embodiment of the invention, a plurality of monitoring tasks are at least partially assigned to each container monitoring instance. This embodiment only concerns relatively uncomplicated, coherent tasks which can be linked together due to the permissions required for this purpose. The core of the invention is the division of the monitoring tasks and the assignment of the minimum necessary permissions.
[0044] In another extension of the present invention, the container runtime environment runs on the following:
[0045] - Industrial systems,
[0046] -Industrial computers,
[0047] - Industrial equipment,
[0048] -computer,
[0049] -mobile device,
[0050] - control equipment,
[0051] -Devices in IoT environments,
[0052] -Edge devices,
[0053] - Server, and / or
[0054] -Cloud servers.
[0055] The present invention also includes a technical device having a container runtime environment according to the present invention. The container runtime environment according to the present invention can be designed in particular as a Docker runtime environment.
[0056] The present invention also includes a system comprising:
[0057] - a technical device according to the invention, and
[0058] - Assigned to the upper management system of technical equipment.
[0059] In another embodiment of the invention, the container monitoring instance is started by an extension component specially designed for this purpose (in particular a monitor coordination instance of a higher-level management system, also called an execution coordinator instance). This has the advantage that the extension component is specially designed for starting the container monitoring instance and this is not performed by the extension component responsible for the workload instance.
[0060] In another embodiment of the present invention, the container monitoring instance is already started by an extension component specially designed for this purpose and configured in the container runtime environment. This has the advantage that the extension component is configured as a container instance.
[0061] In another embodiment of the invention, the expansion component is designed to start a further container monitoring instance with the same monitoring task as a function of the load rate of the container monitoring instance.
[0062] The advantage of this is that a central executor coordination instance (also referred to as monitor coordinator instance), which is in particular also only assigned to the corresponding instance, decides which and how many monitoring instances should be started, or in the case of coordination solutions such as Kubernetes, the workload coordinator itself decides which and how many monitoring instances should be started.
[0063] The practitioner coordination instance is only given the authority to interpret the practitioner guidelines to determine which different monitoring instances are needed and to start and monitor additional instances with corresponding minimum permissions when necessary. The practitioner coordination instance is not further exposed in other cases and has no additional connections and functions.
[0064] In another embodiment of the invention, monitoring instance criteria are used by the extension component.
[0065] If an overload situation is identified for an actor type (particularly the number of workload containers, the number of network connections established within a certain time window), the actor coordination instance can restart another actor instance of the same type and provide a load balancer function to distribute tasks between actor instances of this type. Depending on the type, the load balancer function can be ensured if necessary by restarting the corresponding container or consolidating load balancer resources managed by actor instances or monitoring instances that are aware of this function on the application side.
[0066] Alternatively, the load balancer functionality can also be implemented in the kernel in such a way that the eBPF program or kernel module required for the analysis alternately forwards information about the operations performed by the workload instance to the corresponding actor instance. Thus, once an extension is made (i.e. another container instance is provided), the actor coordinator must know which interfaces are required to read the data and inform these interfaces to which instances to deliver the information. This adaptation can be performed in particular by loading additional eBPF programs or by means of corresponding configuration interfaces of the kernel module for exporting / providing information.
[0067] Furthermore, the actor guidelines are used by the actor coordinator, in which it is defined which actor types should be used (=ET; in particular ETA, for checking read() system calls of all workload containers), when a specific actor should be extended (e.g. one additional ETA' for every four workload containers), or which apps should be monitored exclusively with actor types (in particular apps from third-party providers should be monitored with the aid of sidecar containers ETC in network traffic). The guidelines for the individual actor types are provided together with these actor types. For example, the actor itself can be implemented as a container, whereby the policy can be provided in particular as part of the container image for the actor type.
[0068] If a specific actor type should be started on the system, the actor agent first establishes the corresponding interface that provides the data to be analyzed. This may include, for example, loading kernel modules and eBPF programs. In the above embodiment, before starting an actor container of type B, which is used to monitor which processes are started in the container and which Linux capabilities are used by these containers, an eBPF program or a kernel module is loaded to export the exec*() system calls executed by the container and the capable() functions inside the kernel. The actor container of type B uses the existing interfaces to obtain the information and then evaluate it, which interfaces can be used as virtual files in particular in the case of kernel modules.
[0069] The actor agent can be implemented as a coordination backend that is provided as a separate process for the actor, or it can be provided and implemented as a container instance. In order to ensure that the actor agent is executed before the actor container, the actor agent can be manually set by the administrator on the relevant system before the function is set up. In the example application Kubernetes, so-called daemon sets exist for this purpose, which ensure that the corresponding agents are running on all relevant systems.
[0070] If the conditions for extending the actor type are met (e.g., in the example shown, extending the ETA), the actor proxy adapts the corresponding interface so that it can now be used by multiple actor containers, because, for example, processing many read() system calls becomes increasingly complex with an increasing number of workload containers. The data can here, for example, be provided to the ETA or ETA' randomly or alternately (simple load balancing). It is also conceivable to distribute the system call data of a specific workload container to the actor container. In particular in the case of eBPF programs, the adaptation of the interface can be performed by loading a further eBPF program.
[0071] In another embodiment of the invention, the system according to the invention further comprises:
[0072] - A monitoring agent, the monitoring agent being configured to:
[0073] oEstablish an interface between the extension and the container monitoring instance, and / or
[0074] oEstablish an interface between the data source and the container monitoring instances, through which the container monitoring instances obtain data to perform the monitoring tasks of these container monitoring instances.
[0075] In another variant, it should be possible that, when performing a software update on individual executor components, two different version instances of the same type are started and corresponding system calls and / or execution-related data streams are exported to both versions in parallel within a time period defined in the criteria (e.g., one hour) and the results are compared by a comparator component that is also activated by the executor coordination component in the kernel.
[0076] There are at least two possible solutions for this. In the first alternative, the first old previous version is implemented, and the second newly started instance is also monitored but not implemented, so the second instance is in audit mode and the results are compared. In the second alternative, neither the old previous version nor the new version is implemented, only audited. In both cases, the comparator component is started as an additional instance, which monitors both actor versions and / or receives the reported results.
[0077] The comparator component compares the results. If the results are the same, the comparator component ensures that the new version of the generated commands are reported as successful, even if they are not executed. If a deviation is determined between the two actor containers, in addition to filtering the system calls, an alert is sent to the actor orchestrator component.
[0078] This can then prevent the new version of the actuator component from being retired and the old version from remaining active. The administrator of the actuator component can then decide whether to proceed with the update anyway, or first clarify with the manufacturer, for example, whether the changed behavior is desired and will not negatively impact the restricted application components, or whether configuration changes need to be made within the new actuator version to ensure problem-free application operation.
[0079] It is also conceivable that in order to not lose security events when updating the actor type but to achieve a seamless transition, actor containers of the old and new variants are first run in parallel. In this case, these actor containers may process the same data in parallel. If these actor versions provide different results for an event, the result of the new actor is used. The old version can then be stopped from a specific point in time.
[0080] In a further embodiment of the system according to the invention, the container application instance has been started by an application coordination instance which is not designed to start a container monitoring instance.
[0081] In principle, the two coordination components could also be merged into one coordination component, as well as the corresponding agents on the target system.
[0082] Separating these coordination components is advantageous if, for example, they should be executed on different systems or should be managed by different administrators. If the connection between the actuator coordinator instance and the corresponding agent is interrupted, the actuator coordinator instance can report this to the workload coordination instance, thereby, for example, prompting the migration of the workload container to another target system that has a working and reachable actuator agent. In particular, separation is also advantageous in cases where central components of the actuator coordinator (especially the services for calling credentials) do not need to be exposed to the workload container and the risk of harm caused by the container is thereby minimized. The same applies to the interface with the user (administrator) of the coordinator API. The ordinary coordinator can thus be opened to a larger user group and access to the actuator coordinator is only allowed from a special administrator network.
[0083] Typically, a coordinator coordinates not only one runtime environment, but multiple runtime environments on different systems.
[0084] The advantages of dividing into different types of practitioners are:
[0085] - Enforcer containers require fewer rights as they are only responsible for monitoring and / or limiting specific workload container actions / events.
[0086] - By scaling out actor instances, specific monitoring tasks that need to process more events than other monitoring tasks can be executed more reliably and with less latency.
[0087] - The orchestration function of the implementer is separated from the actual workload orchestration. This allows the security functions on the orchestrated infrastructure to be better protected from workload containers and workload administrators.
[0088] - The differences in behavior of each actor type in terms of limiting workload containers can be compared with the old version for a defined period of time and activated only after a defined period of time. This is particularly beneficial for critical applications because the risk of the actor manufacturer shipping a wrong version and affecting the application is minimized. The same applies to cases where a new actor version has a new behavior by design and therefore a configuration change is necessary. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The features and advantages of the present invention can be seen from the following description of a number of embodiments based on schematic diagrams.
[0090] Figure 1 A system according to the invention is shown. DETAILED DESCRIPTION
[0091] Figure 1 A system 6 according to the invention is shown, having:
[0092] - technical equipment 2, and
[0093] A higher-level management system 1 which is assigned to the technical device 2. Furthermore, further technical devices can be assigned to the management system 1.
[0094] The technical device 2 has a container runtime environment 3. The container runtime environment 3 has a container application instance C and a container monitoring instance ET-C.
[0095] The container monitoring instance ET-C is configured to monitor the container application instance C. The monitoring of the container application instance C is divided into monitoring tasks, wherein at least one authorization is assigned to each monitoring task, and the at least one authorization is only competent for executing the monitoring task to which the at least one authorization is assigned. The execution of the monitoring task also includes the implementation of the assigned rule set.
[0096] Monitoring tasks are respectively assigned to these container monitoring instances ET-C, wherein these container monitoring instances ET-C respectively have at least one authority assigned to their monitoring tasks.
[0097] The container monitoring instance ET-C has been started by an extension component 5 specially designed for this purpose, in particular a monitor coordination instance 5 of the higher-level management system 1 .
[0098] The extension component 5 is configured to start another container monitoring instance ET-C with the same monitoring task according to the load rate of the container monitoring instance ET-C.
[0099] The monitoring instance criteria 8 are used by the extension component 5 to extend the container monitoring instance ET-C.
[0100] The system 6 also has a monitoring agent 7, which is configured to establish an interface between the extension component and the container monitoring instance ET-C and / or between the data source and the container monitoring instance ET-C, through which the container monitoring instance ET-C obtains data to perform monitoring tasks of these container monitoring instances.
[0101] The container application instance C (also referred to as App) has been started by the application coordination instance 4 which is not configured to start the container monitoring instance ET-C.
[0102] exist Figure 1In the ES, "ES" stands for "Event sources" which are checked to determine whether events are allowed to occur on the operating system ("OS kernel"). "ET" stands for actor type.
[0103] Although the present invention has been illustrated and described in more detail by way of embodiments, the present invention is not limited to the disclosed examples and a person skilled in the art may derive other variations from these examples without departing from the scope of protection of the present invention.
Claims
1. A container runtime environment (3), comprising: -Container application instance (C), -Container Monitoring Instance (ET-C), wherein the container monitoring instance (ET-C) is configured to monitor the container application instance (C), The monitoring of the container application instance (C) is divided into monitoring tasks. wherein at least one authority is assigned to each monitoring task, and the at least one authority is only capable of executing the monitoring task to which the at least one authority is assigned, wherein the execution of the monitoring task includes implementing the assigned rule set, wherein a monitoring task is assigned to each of said container monitoring instances (ET-C), and Each of the container monitoring instances (ET-C) has at least one permission assigned to its monitoring task.
2. The container runtime environment (3) according to claim 1, The monitoring task is structured as follows: - monitor started processes, - establish a network connection, - monitor active network connections, - monitor write access, - Check for vulnerabilities, - limit system calls, - assign permissions, and / or -Monitor process permissions.
3. The container runtime environment (3) according to any one of the preceding claims, The at least one authorization is designed in such a way that the container monitoring instance (ET-C) can execute the monitoring tasks assigned to it but cannot execute other monitoring tasks.
4. The container runtime environment (3) according to any one of the preceding claims, The first monitoring task among the monitoring tasks has the following task part, which is not the task part of the second monitoring task.
5. The container runtime environment (3) according to any one of the preceding claims, The monitoring tasks each have a task part which is not a task part of the remaining monitoring tasks.
6. The container runtime environment (3) according to any one of the preceding claims, The same monitoring task is assigned to multiple container monitoring instances (ET-C).
7. The container runtime environment (3) according to any one of the preceding claims, Therein, a plurality of monitoring tasks are respectively assigned at least partially to the container monitoring instance (ET-C).
8. The container runtime environment (3) according to any one of the preceding claims, The container runtime environment (3) runs on the following: - Industrial Systems (2), -Industrial computers (2), - Industrial equipment (2), - Computer (2), - mobile devices (2), - a control device (2), - Devices in IoT environments (2), - Edge devices (2), - Server (2), and / or - Cloud Server (2).
9. A technical device (2) having a container runtime environment (3) according to any one of claims 1 to 8.
10. A system (6) comprising: - a technical device (2) according to claim 9, and - A higher-level management system (1) assigned to the technical installation (2).
11. The system (6) according to claim 10, The container monitoring instance (ET-C) has been started by an extension component (5) specially constructed for this purpose, in particular a monitor coordination instance (5) of the upper management system (1), or the container monitoring instance (ET-C) has been started by an extension component (5) specially constructed for this purpose and constructed within the container runtime environment (3).
12. The system (6) according to claim 10, The expansion component (5) is configured to start another container monitoring instance (ET-C) with the same monitoring task according to the load rate of the container monitoring instance (ET-C).
13. The system (6) according to any one of claims 10 to 12, The monitoring instance criteria (8) are used by the extension component (5).
14. The system (6) according to any one of claims 10 to 13, further comprising: - A monitoring agent (7), said monitoring agent being configured to: o establishing an interface between the extension component and the container monitoring instance (ET-C), and / or o An interface is established between the data source and the container monitoring instance (ET-C), and the container monitoring instance (ET-C) obtains data through the interface to perform the monitoring task of the container monitoring instance.
15. System (6) according to any one of claims 10 to 14, The container application instance (C) has been started by an application coordination instance (4) which is not configured to start the container monitoring instance (ET-C).
