# Modeling and Security in Cloud Ecosystems
## 4 A Model for a Cloud Ecosystem
### Pattern Diagram of the Ecosystem  
Figure 1 shows our current cloud ecosystem. The Cloud Reference Architecture (Cloud RA) is the main pattern that defines the ecosystem (the hub) [9]. As indicated, this can be converted into a Cloud Security RA (Cloud SRA) by adding security patterns to control its identified threats. The Cloud SRA includes, among others, patterns for Authentication, Authorization, and Logging [8]. We just defined a cloud HIPAA-compliant RA [19]. Threats can be enumerated in several ways and we use an approach based on activities in an activity diagram describing its use cases [8]. Cloud Web Application Firewalls and Security Group Firewalls provide filtering functions that can be provided as services through NFVs (see below) or on their own.  
The service layers of a cloud are themselves compound patterns and we have written patterns for IaaS, PaaS, and SaaS [36]. They describe the services sold by the cloud provider. Telecommunication companies have discovered that they can provide services to their customers by building their networks as services rented from some cloud provider [4]. The provision of network functions using virtualization, Network Functions Virtualization (NFV), is a network architecture where functions, such as load balancers, firewalls, Intrusion Detection Systems (IDSs), and accelerators, are built in software and offered as services. Each Virtualized Network Function (VNF) may use one or more virtual machines or containers running different software. Typically, NFVs come with some security mechanisms but which ones depend on the vendor. To make the model more flexible we have a pattern for the NFV without security and a derived pattern for the Secure NFV [37].  
Cloud Access Security Brokers (CASBs) are security enforcement points between consumers and service providers that apply security controls to access cloud services, usually SaaS services [38]. They may also control access to internal company resources. Security controls may include authentication (credentials and passwords), authorization policy enforcement, intrusion prevention, antimalarialware filters, security logging/auditing, and encryption. There is no pattern yet for the Virtualization Layer, although we defined a pattern for a Virtual Machine Operating System [8]. An important lower-level pattern for this function is an OpenStack pattern, part of a hierarchy of IaaS patterns [39].  
As indicated, analyzing threats and neutralizing them with patterns we arrived to secure units of the SRA. Figure 2 shows a class model for the secure Virtual Machine (VM) image repository system. The Virtual Machine Image Repository holds a set of Virtual Machine Images (VMIs) that can be used to instantiate virtual machines. The Reference Monitor uses a filter that scans all VM images before being published or retrieved. The Authenticator is an instance of the Authenticator Pattern that allows the Reference Monitor to authenticate the users who can publish or retrieve images if the Authorizer authorizes them. The Reference Monitor pattern enforces the authorization rights defined in the Authorizer. The Security Logger/Auditor keeps track of accesses to the repository. Our latest additions are the Container and the Fog Reference Architecture, described below.