Container runtime environment with distributed monitoring tasks and minimum privileges
Patent Information
- Application Number
- EP2023704261
- Authority / Receiving Office
- EP · EP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-02-16
- Filing Date
- 2023-01-30
- Publication Date
- 2024-10-16
Smart Images

Figure 1.1
Abstract
Description
[0001] Description
[0002] Container runtime environment with distributed monitoring tasks and minimal privileges
[0003] BACKGROUND OF THE INVENTION
[0004] Field of the invention
[0005] The present invention relates to a container runtime environment and an associated technical device and associated system.
[0006] Description of the state of the art
[0007] Container instances can be monitored and restricted in several ways. One possibility is for a privileged process outside the container instance to monitor this and possibly other instances and restrict their operations or trigger an alarm in case of non-compliance.
[0008] In the use case of container runtime environments, especially Docker, such solutions often also have access to an interface, in particular a Docker socket, via which status information of the current container instances is queried, resources are created and thus full control over the container runtime environment is enabled. These monitoring and restriction components can also be implemented as a container instance, which then includes the corresponding privileges in the form of access permissions to the Docker socket, in particular in the form of file system permissions or process permissions of the respective instance and these can be extended or restricted in particular with the help of Seccomp profiles and capabilities, which means that this container instance must be very highly privileged on a runtime environment in order to be able to carry out monitoring and restrictions.
[0009] Another monitoring and restriction option is to launch the monitoring component as a so-called sidecar container to the actual container instance and monitor it by sharing appropriate Linux namespaces and assigning privileges, particularly with the help of Linux capabilities or Seccomp profiles. If necessary, the containerized monitoring component can prevent unauthorized operations.
[0010] The following problems arise with the known approaches:
[0011] • In known implementations of such monitoring components, a multitude of functionalities are mapped into a very highly privileged container instance. The component thus de facto receives a large number of privileges, which are needed for various monitoring tasks. In particular, many known implementations require access to the Docker socket, which allows full control over the container runtime environment.
[0012] • If a monitoring component is implemented using a sidecar container, the user who wants to start the actual workload container instance receives all the privileges required to start the (monitoring) sidecar container. This prevents the operator of the runtime environment from ensuring that the user who starts the container receives only the minimum rights.
[0013] • If more resources are required on a platform to monitor an instance than are allocated to the monitoring component, this can only be achieved by dynamically allocating more CPU and (main) memory for the monitoring instance, or events generated by the instance are discarded in an overload situation or processed with a significant delay. Scaling of the monitoring instances for a workload container instance is currently unknown.
[0014] Due to the high level of authorization, the problem arises that a user, in this case an attacker, receives very extensive authorizations in the scenarios described in the event of a successful attack on the monitoring instance, which in most cases are de facto no different from the underlying system.
[0015] The object of the invention is to provide a solution for improved monitoring of a container runtime environment and implementation of countermeasures if necessary.
[0016] SUMMARY OF THE INVENTION
[0017] The invention is based on the features of the independent claims. Advantageous developments and refinements are the subject of the dependent claims. Refinements, possible applications, and advantages of the invention will become apparent from the following description and the drawings.
[0018] The invention relates to a container runtime environment comprising:
[0019] - Container application instances,
[0020] - Container monitoring instances, wherein the container monitoring instances are designed to monitor the container application instances, wherein the monitoring of the application instances is divided into monitoring tasks, wherein each monitoring task is assigned at least one privilege which exclusively enables the execution of the monitoring task to which it is assigned, wherein the execution of the monitoring tasks comprises an enforcement of an assigned set of rules, wherein the container monitoring instances are each assigned a monitoring task and wherein the container monitoring instances each have at least one privilege assigned to their monitoring task.
[0021] One aspect of the invention can thus be described in that a container runtime environment is divided into categories and for each category, also referred to as segmentation, a separate container monitoring instance is started with minimally required privileges.
[0022] According to a further aspect of the invention, the container monitoring instances can be replicated in the event of a corresponding overload, i.e., scaling is carried out.
[0023] In other words, a solution is provided that reduces the privileges required to monitor the container runtime environment by segmenting each function into individual container monitoring instances, while enabling better scalability for those container monitoring instances.
[0024] In a further development of the invention, the monitoring task is as follows:
[0025] - Monitoring started processes,
[0026] - Establishment of network connections,
[0027] - Monitoring active network connections,
[0028] - Monitoring of write accesses,
[0029] - Check for vulnerabilities,
[0030] - Limiting syscalls,
[0031] - Assignment of privileges and / or
[0032] - Monitoring of process privileges has been developed. This has the advantage that the monitoring of application instances is divided into monitoring tasks. Each monitoring task is assigned at least one privilege, which only enables the execution of the monitoring task to which it is assigned. The execution of the monitoring tasks also includes the enforcement of an assigned set of rules, which in particular restricts operations of the application instances in the event of non-conformity and / or triggers an alarm. The assigned set of rules describes which requests from a container monitoring instance and / or to an application instance are permitted and / or under which state of an application instance it should be restricted.In particular, processes must not be executed with certain process privileges, and individual components may only be started if they do not contain vulnerabilities. Certain operations may also completely stop the instance, particularly write access to a specific area of a file system.
[0033] This includes the monitoring of active network connections and the monitoring of ongoing traffic. One application example would be Layer 7 firewall functionality, where content inspection is carried out. Content inspection is understood to mean the checking of a network connection at the application level by a perimeter, such as a firewall in particular. This ensures that not only a Layer 4 check for addresses and ports takes place, but that the expected application protocol is also used over the connection. In particular, it is checked whether the http application protocol is also used by both communication partners over an http connection stored in the perimeter.
[0034] Exclusive monitoring of network traffic at the transport layer (Layer 4 firewalling) can be carried out by monitoring the establishment of network connections, but current enterprise firewalls also offer runtime monitoring of traffic using content inspection (Layer 7 firewalling).
[0035] In a further development of the invention, the at least one privilege is configured such that the container monitoring instances can perform the monitoring task assigned to them but not any further monitoring tasks. This has the effect that each container monitoring instance has only the minimum necessary privileges.
[0036] In a further development of the invention, a first monitoring task of the monitoring tasks has a task portion that is not a task portion of a second monitoring task. This has the advantage that a first container monitoring instance is responsible and privileged for individual monitoring tasks and associated rule sets.
[0037] In a further development of the invention, the monitoring tasks each have a task share that is not a task share of the remaining monitoring tasks. This has the advantage that each container monitoring instance is responsible and privileged for individual monitoring tasks and associated rule sets.
[0038] In a further development of the invention, the same monitoring task is assigned to several container monitoring instances. This can also be referred to as scaling of the container monitoring instances. If an overload situation 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 a workload container, the number of network connections established in a certain time window, an enforcer orchestration instance can restart another enforcer instance of the same type and provide load balancer functionality. The scaling is thus outsourced to a separate orchestrator, the enforcer orchestration instance, for the monitoring instance and is separate from a normal orchestrator that carries out the scaling of the application instances.
[0039] The problem with a common orchestrator for monitoring and application instances is that it would have to be widely exposed in order to transfer orchestration information.
[0040] Separating it from the normal orchestrator offers the advantage that it can be better secured.
[0041] Both orchestrators, the one for monitoring and the one for application instances, can also be implemented as privileged container instances, but are typically standalone systems.
[0042] Depending on the type, the load balancer functionality can be ensured by restarting a corresponding container or load balancer resource managed by the orchestrator, which performs this functionality on the application side.
[0043] In a further development of the invention, the container monitoring instances are at least partially assigned multiple monitoring tasks. This implementation concerns only relatively uncomplex, related tasks, which can be combined due to the necessary privileges. The core of the invention is the division into monitoring tasks and the distribution of the minimum necessary privileges.
[0044] In a further development of the invention, the container runtime environment runs on:
[0045] - an industrial system,
[0046] - an industrial computer,
[0047] - an industrial device,
[0048] - a computer,
[0049] - a mobile device,
[0050] - a control unit,
[0051] - a device in an Internet of Things environment, - an edge device,
[0052] - a server and / or
[0053] - a cloud server.
[0054] The invention further comprises a technical device comprising the container runtime environment according to the invention. The container runtime environment according to the invention can be designed, in particular, as a Docker runtime environment.
[0055] The invention also includes a system comprising:
[0056] - a technical device according to the invention and
[0057] - a higher-level management system that is assigned to the technical device.
[0058] In a further development of the invention, the container monitoring instances are started by a specially designed scaling component, in particular a monitoring orchestration instance, also referred to as an enforcement orchestrator instance, of the higher-level management system. This has the advantage that the scaling component is specifically designed to start the container monitoring instances, and this is not performed by the scaling component responsible for the workload instances.
[0059] In a further development of the invention, the container monitoring instances are started by a specially designed scaling component, which is implemented within the container runtime environment. This has the advantage that the scaling component is implemented as a container instance.
[0060] In a further development of the invention, the scaling component is configured to launch additional container monitoring instances with the same monitoring tasks depending on the utilization of the container monitoring instances. This has the advantage that the decision as to which and how many monitoring instances should be launched is made by a central enforcer orchestration instance, in particular one assigned only to the respective instance (also referred to as a monitor orchestrator instance), or, in the case of orchestrated solutions such as Kubernetes, by the workload orchestrator itself.
[0061] This Enforcer orchestration instance is only granted permission to interpret the Enforcer policy to decide which different monitoring instances are needed and, if necessary, to start and monitor additional instances with the appropriate minimal permissions. Otherwise, it is not exposed and has no further connections or functions.
[0062] In a further development of the invention, a monitoring instance guideline is used by the scaling component.
[0063] If an overload situation is detected for an Enforcer type (in particular, the number of workload containers, the number of network connections established in a specific time window), the Enforcer orchestration instance can restart another Enforcer instance of the same type and provide load balancing functionality to distribute tasks between the Enforcer instances of that type. Depending on the type, the load balancing functionality can be ensured by restarting a corresponding container or by integrating a load balancing resource managed by the Enforcer instance or monitoring instance, which performs this functionality on the application side.
[0064] Alternatively, the load balancer functionality can be implemented within the kernel by having the eBPF programs or kernel modules required for analysis alternately forward the information on the operations performed by the workload instances to the respective Enforcer instances. As soon as scaling occurs (i.e., another container instance is deployed), the Enforcer orchestrator must know which interfaces are required to read the data and tell them which instances the information should be passed to. This adaptation can be carried out, in particular, by loading additional eBPF programs or with the help of corresponding configuration interfaces of the kernel modules used to retrieve / provide the information.
[0065] Furthermore, the Enforcer orchestrator uses an Enforcer policy that defines which Enforcer types (= ET; in particular ET A for checking read() system calls of all workload containers) should be used, when a certain Enforcer should be scaled (e.g. one additional ET A' for every four workload containers), or which apps should be specifically monitored with an Enforcer type (in particular, the network traffic of third-party apps should be monitored using the sidecar container ET C). The policy for the individual Enforcer types is provided together with them. For example, the Enforcers themselves can be implemented as containers, which means that the policy can be provided as part of the container image for the Enforcer type.
[0066] If a specific Enforcer type is to be started on the system, the Enforcer agent first sets up the corresponding interfaces that provide the data to be analyzed. This can, for example, include loading a kernel module and an eBPF program. In the above embodiment, before starting a Type B Enforcer container, which is used to monitor which processes are started in containers and which Linux capabilities they use, eBPF programs or kernel modules for initiating the exec*() system calls executed by containers as well as kernel-internal capable() functions are loaded. The Type B Enforcer container uses the now available interfaces, which are available as virtual files in the case of a kernel module, to obtain and then evaluate the information.
[0067] The Enforcer agent can be implemented as an orchestration backend, deployed as a standalone process for the Enforcer, or it can be deployed and executed as a container instance. To ensure that it runs before the Enforcer containers, it can be manually configured by the administrator on the relevant systems before setting up the functionality. In the Kubernetes application example, there are so-called daemon sets for this purpose, which ensure that the respective agents are running on all relevant systems.
[0068] If a condition for scaling an Enf orcer type is met, e.g. scaling of ETA in the example shown, because, for example, processing the many read() system calls becomes more and more complex with an increasing number of workload containers, the Enf orcer agent adapts the corresponding interface so that it can now be used by multiple Enf orcer containers. The data can, for example, be made available randomly or alternately to either ETA or ETA' (simple load balancing). It is also conceivable that the system call data of specific workload containers is assigned to the Enf orcer containers. The interfaces can be adapted, particularly in the case of eBPF programs, by loading additional eBPF programs.
[0069] In a further development of the invention, the system according to the invention also comprises:
[0070] - a monitoring agent which is designed to establish o an interface between the scaling component and the container monitoring instances and / or o an interface between data sources and the container monitoring instances, via which the container monitoring instances obtain data to carry out their monitoring tasks.
[0071] In a further variant, it should be possible for two instances of the same type with different versions to be started during software updates for individual Enf orcer components and for the corresponding syscalls and / or data streams relevant for the enforcement to be forwarded in parallel to both versions for a period of time to be defined in the policy ( e . g . one hour ) and the results to be compared by a comparator component that is also activated by the Enf orcer orchestration component in the kernel.
[0072] There are at least two possibilities for this. In the first alternative, the old, previous version enforces the check, while the second, newly started instance also monitors but does not enforce the check. It is therefore in audit mode, and the results are compared. In the second alternative, the old, previous version and the new version do not enforce the check and only audit. In both cases, the comparator component is started as an additional instance that monitors the two Enforcer versions and / or receives reports of the results.
[0073] The comparator component compares the results. If the results are identical, the comparator component ensures that the commands generated in the new version are reported as successful, even if they were not executed. If a discrepancy is detected between the two Enforcer containers, in addition to filtering the syscall, an alarm is sent to the Enforcer orchestrator component.
[0074] This can then prevent the new version of the Enforcer component from being rolled out, leaving the old version active. The administrator for the Enforcer components can then decide whether to perform an update anyway or, for example, first clarify with the manufacturer whether the changed behavior is desired and will not have a negative impact on the restricted application components, or whether a configuration change within the new Enforcer version is necessary to ensure trouble-free application operation.
[0075] Furthermore, to ensure a seamless transition and avoid losing security events when updating an Enforcer type, it is conceivable to initially run Enforcer containers of the old and new versions in parallel. They would process the same data in parallel. If the Enforcer versions deliver different results for an event, the result of the new Enforcer is used. At a certain point in time, the old version can then be stopped.
[0076] In a further development of the system according to the invention, the container application instances were started by an application orchestration instance which is not designed to start the container monitoring instances.
[0077] In principle, both orchestration components can also be combined into one orchestration component, as can the corresponding agents on the target system.
[0078] Separation is advantageous if, for example, the containers are to be run on different systems or managed by different administrators. If the connection between the Enforcer orchestrator instance and a corresponding agent is interrupted, the Enforcer orchestrator instance can report this to the workload orchestration instance and thus, for example, cause the workload containers to be migrated to another target system with a functioning and accessible Enforcer agent. Separation is particularly advantageous in cases where central components of an Enforcer orchestrator, especially services for retrieving credentials, do not need to be exposed to the workload containers, thus minimizing the risk of compromise by the containers. The same applies to the interfaces to the user (administrator) of the orchestrator API.This allows you to open the normal orchestrator to a larger user group and only allow access to the Enforcer orchestrator from a special admin network.
[0079] Typically, an orchestrator orchestrates not just one runtime environment, but multiple runtime environments on different systems.
[0080] Advantages of dividing into different Enf orcer types are:
[0081] Enforcer containers require fewer privileges because they are only responsible for monitoring and / or restricting specific workload container actions / events.
[0082] Certain monitoring tasks that require more events to be processed than other monitoring tasks can be performed more reliably and with less latency by scaling Enforcer instances.
[0083] Orchestration functions for the Enforcers are separated from the actual workload orchestration. This allows security functions on an orchestrated infrastructure to be better protected from both the workload containers and the workload administrators.
[0084] - Differences in the behavior of individual Enforcer types regarding workload container restrictions can be compared with the old version over a defined period of time and only activated after a defined period. This is particularly advantageous for critical applications, as it minimizes the risk that an Enforcer manufacturer will deliver a faulty version, which will impact the application. The same applies if a new Enforcer version has new behavior by design, requiring the configuration to be changed.
[0085] BRIEF DESCRIPTION OF THE DRAWINGS
[0086] The special features and advantages of the invention will become apparent from the following explanations of several embodiments based on the schematic drawings.
[0087] It shows
[0088] Fig. 1 shows a system according to the invention.
[0089] DETAILED DESCRIPTION OF THE INVENTION
[0090] Fig. 1 shows a system 6 according to the invention, comprising:
[0091] - a technical device 2 and
[0092] - a higher-level management system 1 that is assigned to the technical device 2. Additional technical devices can also be assigned to the management system 1.
[0093] The technical device 2 has a container runtime environment 3. The container runtime environment 3 has container application instances C and container monitoring instances ET-C.
[0094] The container monitoring instances ET-C are designed to monitor the container application instances C. The monitoring of the container application instances C is divided into monitoring tasks, with each monitoring task being assigned at least one privilege that exclusively enables the execution of the monitoring task to which it is assigned. The execution of the monitoring task also includes the enforcement of an associated set of rules. The container monitoring instances ET-C are each assigned a monitoring task, with the container monitoring instances ET-C each having at least one privilege associated with their monitoring task.
[0095] The container monitoring instances ET-C were started by a scaling component 5 specially designed for this purpose, in particular a monitor orchestration instance 5 of the higher-level management system 1.
[0096] The scaling component 5 is designed to start additional container monitoring instances ET-C with the same monitoring tasks depending on the utilization of the container monitoring instances ET-C.
[0097] The scaling component 5 uses a monitoring instance policy 8 to scale the container monitoring instances ET-C.
[0098] The system 6 also has a monitoring agent 7 which is designed to establish an interface between the scaling component and the container monitoring instances ET-C and / or an interface between data sources and the container monitoring instances ET-C, via which the container monitoring instances ET-C obtain data to carry out their monitoring tasks.
[0099] The container application instances C, also referred to as apps, were started by an application orchestration instance 4, which is not configured to start the container monitoring instances ET-C.
[0100] In Fig. 1, "ES" stands for "Event sources," which are checked to determine whether an event may occur on the operating system ("OS kernel") or not. "ET" stands for Enforcer Type. Although the invention has been illustrated and described in detail by the exemplary embodiments, the invention is not limited by the disclosed examples, and other variations can be derived therefrom by those skilled in the art without departing from the scope of the invention.
Claims
Patent claims 1. Container runtime environment (3) , comprising: - Container application instances (C) , - Container monitoring instances (ET-C) , wherein the container monitoring instances (ET-C) are configured to monitor the container application instances (C), wherein the monitoring of the container application instances (C) is divided into monitoring tasks, wherein each monitoring task is assigned at least one privilege which exclusively enables the execution of the monitoring task to which it is assigned, wherein the execution of the monitoring task includes the enforcement of an assigned rule set, wherein each container monitoring instance (ET-C) is assigned a monitoring task and wherein each container monitoring instance (ET-C) has at least one privilege assigned to its monitoring task.
2. Container runtime environment (3) according to claim 1, wherein the monitoring function would be: - Monitoring of started processes, - Establishing network connections, - Monitoring of active network connections, - Monitoring of write accesses, - Check for vulnerabilities, - Limiting system calls, - Allocation of privileges and / or - is trained in monitoring the privileges of the processes.
3. Container runtime environment (3) according to one of the preceding claims, wherein the at least one privilege is configured such that the container monitoring instances (ET-C) can perform the monitoring tasks assigned to them but cannot perform any further monitoring tasks.
4. Container runtime environment (3) according to one of the preceding claims, wherein a first monitoring task includes a task component which is not a task component of a second monitoring task.
5. Container runtime environment (3) according to one of the preceding claims, wherein the monitoring tasks each have a task component which is not a task component of the remaining monitoring tasks.
6. Container runtime environment (3) according to one of the preceding claims, wherein several container monitoring instances (ET-C) are assigned the same monitoring task.
7. Container runtime environment (3) according to one of the preceding claims, wherein the container monitoring instances (ET-C) are at least partially assigned several monitoring tasks.
8. Container runtime environment (3) according to any one of the preceding claims, wherein the container runtime environment (3) is based on: - an industrial system (2) , - an industrial computer (2) , - an industrial device (2) , - a computer (2) , - a mobile device (2) , - a control unit (2) , - a device in an Internet of Things environment (2) , - an Edge device (2) , - a server (2) and / or - a cloud server (2) is running .
9. Technical device (2) comprising the container runtime environment (3) according to any one of claims 1 to 8.
10. System (6) , comprising: - a technical device (2) according to claim 9 and - a higher-level management system (1) that is assigned to the technical device (2).
11. System (6) according to claim 10, wherein the container monitoring instances (ET-C) were started by a specially designed scaling component (5), in particular a monitoring orchestration instance (5) of the higher-level management system (1), or wherein the container monitoring instances (ET-C) were started by a specially designed scaling component (5) which is formed within the container runtime environment (3).
12. System (6) according to claim 10, wherein the scaling component (5) is configured to start further container monitoring instances (ET-C) with the same monitoring tasks depending on the utilization of the container monitoring instances (ET-C).
13. System (6) according to one of claims 10 to 12, wherein a monitoring instance guideline (8) is used by the scaling component (5).
14. System (6) according to any one of claims 10 to 13, further comprising: - a monitoring agent (7) which is trained to provide an interface between the scaling component and the container monitoring instances (ET-C) and / or an interface between data sources and the To establish container monitoring instances (ET-C) from which the container monitoring instances (ET-C) obtain data to carry out their monitoring tasks.
15. System (6) according to any one of claims 10 to 14, wherein the container application instances (C) were started by an application orchestration instance (4) which is not configured to start the container monitoring instances (ET-C).
