VNFRQTS - R-80335 change Warning Notice(s)
[vnfrqts/requirements.git] / docs / Chapter4.rst
1 **4. VNF Development Requirements**
2 ====================================
3
4 a. VNF Design
5 ==============
6
7 Services are composed of VNFs and common components and are designed to
8 be agnostic of the location to leverage capacity where it exists in the
9 Network Cloud. VNFs can be instantiated in any location that meets the
10 performance and latency requirements of the service.
11
12 A key design principle for virtualizing services is decomposition of
13 network functions using NFV concepts into granular VNFs. This enables
14 instantiating and customizing only essential functions as needed for the
15 service, thereby making service delivery more nimble. It provides
16 flexibility of sizing and scaling and also provides flexibility with
17 packaging and deploying VNFs as needed for the service. It enables
18 grouping functions in a common cloud data center to minimize
19 inter-component latency. The VNFs should be designed with a goal of
20 being modular and reusable to enable using best-in-breed vendors.
21
22 Section 5.a VNF Design in *VNF Guidelines* describes
23 the overall guidelines for designing VNFs from VNF Components (VNFCs).
24 Below are more detailed requirements for composing VNFs.
25
26 VNF Design Requirements
27
28 * R-58421 The VNF **SHOULD** be decomposed into granular re-usable VNFCs.
29 * R-82223 The VNF **MUST** be decomposed if the functions have significantly different scaling characteristics (e.g., signaling versus media functions, control versus data plane functions).
30 * R-16496 The VNF **MUST** enable instantiating only the functionality that is needed for the decomposed VNF (e.g., if transcoding is not needed it should not be instantiated).
31 * R-02360 The VNFC **MUST** be designed as a standalone, executable process.
32 * R-34484 The VNF **SHOULD** create a single component VNF for VNFCs that can be used by other VNFs.
33 * R-23035 The VNF **MUST** be designed to scale horizontally (more instances of a VNF or VNFC) and not vertically (moving the existing instances to larger VMs or increasing the resources within a VM) to achieve effective utilization of cloud resources.
34 * R-30650 The VNF **MUST** utilize cloud provided infrastructure and VNFs (e.g., virtualized Local Load Balancer) as part of the VNF so that the cloud can manage and provide a consistent service resiliency and methods across all VNF's.
35 * R-12709 The VNFC **SHOULD** be independently deployed, configured, upgraded, scaled, monitored, and administered by ONAP.
36 * R-37692 The VNFC **MUST** provide API versioning to allow for independent upgrades of VNFC.
37 * R-86585 The VNFC **SHOULD** minimize the use of state within a VNFC to facilitate the movement of traffic from one instance to another.
38 * R-65134 The VNF **SHOULD** maintain state in a geographically redundant datastore that may, in fact, be its own VNFC.
39 * R-75850 The VNF **SHOULD** decouple persistent data from the VNFC and keep it in its own datastore that can be reached by all instances of the VNFC requiring the data.
40 * R-88199 The VNF **MUST** utilize virtualized, scalable open source database software that can meet the performance/latency requirements of the service for all datastores.
41 * R-99656 The VNF **MUST** NOT terminate stable sessions if a VNFC instance fails.
42 * R-84473 The VNF **MUST** enable DPDK in the guest OS for VNF’s requiring high packets/sec performance.  High packet throughput is defined as greater than 500K packets/sec.
43 * R-54430 The VNF **MUST** use the NCSP’s supported library and compute flavor that supports DPDK to optimize network efficiency if using DPDK. [1]_
44 * R-18864 The VNF **MUST** NOT use technologies that bypass virtualization layers (such as SR-IOV) unless approved by the NCSP (e.g., if necessary to meet functional or performance requirements).
45 * R-64768 The VNF **MUST** limit the size of application data packets to no larger than 9000 bytes for SDN network-based tunneling when guest data packets are transported between tunnel endpoints that support guest logical networks.
46 * R-74481 The VNF **MUST** NOT require the use of a dynamic routing protocol unless necessary to meet functional requirements.
47
48 b. VNF Resiliency
49 =================
50
51 The VNF is responsible for meeting its resiliency goals and must factor
52 in expected availability of the targeted virtualization environment.
53 This is likely to be much lower than found in a traditional data center.
54 Resiliency is defined as the ability of the VNF to respond to error
55 conditions and continue to provide the service intended. A number of
56 software resiliency dimensions have been identified as areas that should
57 be addressed to increase resiliency. As VNFs are deployed into the
58 Network Cloud, resiliency must be designed into the VNF software to
59 provide high availability versus relying on the Network Cloud to achieve
60 that end.
61
62 Section 5.a Resiliency in *VNF Guidelines* describes
63 the overall guidelines for designing VNFs to meet resiliency goals.
64 Below are more detailed resiliency requirements for VNFs.
65
66 All Layer Redundancy
67 --------------------
68
69 Design the VNF to be resilient to the failures of the underlying
70 virtualized infrastructure (Network Cloud). VNF design considerations
71 would include techniques such as multiple vLANs, multiple local and
72 geographic instances, multiple local and geographic data replication,
73 and virtualized services such as Load Balancers.
74
75
76 All Layer Redundancy Requirements
77
78 * R-52499 The VNF **MUST** meet their own resiliency goals and not rely on the Network Cloud.
79 * R-42207 The VNF **MUST** design resiliency into a VNF such that the resiliency deployment model (e.g., active-active) can be chosen at run-time.
80 * R-03954 The VNF **MUST** survive any single points of failure within the Network Cloud (e.g., virtual NIC, VM, disk failure).
81 * R-89010 The VNF **MUST** survive any single points of software failure internal to the VNF (e.g., in memory structures, JMS message queues).
82 * R-67709 The VNF **MUST** be designed, built and packaged to enable deployment across multiple fault zones (e.g., VNFCs deployed in different servers, racks, OpenStack regions, geographies) so that in the event of a planned/unplanned downtime of a fault zone, the overall operation/throughput of the VNF is maintained.
83 * R-35291 The VNF **MUST** support the ability to failover a VNFC automatically to other geographically redundant sites if not deployed active-active to increase the overall resiliency of the VNF.
84 * R-36843 The VNF **MUST** support the ability of the VNFC to be deployable in multi-zoned cloud sites to allow for site support in the event of cloud zone failure or upgrades.
85
86 Minimize Cross Data-Center Traffic
87 ----------------------------------
88
89 Avoid performance-sapping data center-to-data center replication delay
90 by applying techniques such as caching and persistent transaction paths
91 - Eliminate replication delay impact between data centers by using a
92 concept of stickiness (i.e., once a client is routed to data center "A",
93 the client will stay with Data center “A” until the entire session is
94 completed).
95
96 Minimize Cross Data-Center Traffic Requirements
97
98 * R-92935 The VNF **SHOULD** minimize the propagation of state information across multiple data centers to avoid cross data center traffic.
99
100 Application Resilient Error Handling
101 ------------------------------------
102
103 Ensure an application communicating with a downstream peer is equipped
104 to intelligently handle all error conditions. Make sure code can handle
105 exceptions seamlessly - implement smart retry logic and implement
106 multi-point entry (multiple data centers) for back-end system
107 applications.
108
109 Application Resilient Error Handling Requirements
110
111 * R-26371 The VNF **MUST** detect connectivity failure for inter VNFC instance and intra/inter VNF and re-establish connectivity automatically to maintain the VNF without manual intervention to provide service continuity.
112 * R-18725 The VNF **MUST** handle the restart of a single VNFC instance without requiring all VNFC instances to be restarted.
113 * R-06668 The VNF **MUST** handle the start or restart of VNFC instances in any order with each VNFC instance establishing or re-establishing required connections or relationships with other VNFC instances and/or VNFs required to perform the VNF function/role without requiring VNFC instance(s) to be started/restarted in a particular order.
114 * R-80070 The VNF **MUST** handle errors and exceptions so that they do not interrupt processing of incoming VNF requests to maintain service continuity.
115 * R-32695 The VNF **MUST** provide the ability to modify the number of retries, the time between retries and the behavior/action taken after the retries have been exhausted for exception handling to allow the NCSP to control that behavior.
116 * R-48356 The VNF **MUST** fully exploit exception handling to the extent that resources (e.g., threads and memory) are released when no longer needed regardless of programming language.
117 * R-67918 The VNF **MUST** handle replication race conditions both locally and geo-located in the event of a data base instance failure to maintain service continuity.
118 * R-36792 The VNF **MUST** automatically retry/resubmit failed requests made by the software to its downstream system to increase the success rate.
119
120
121 System Resource Optimization
122 ----------------------------
123
124 Ensure an application is using appropriate system resources for the task
125 at hand; for example, do not use network or IO operations inside
126 critical sections, which could end up blocking other threads or
127 processes or eating memory if they are unable to complete. Critical
128 sections should only contain memory operation, and should not contain
129 any network or IO operation.
130
131
132 System Resource Optimization Requirements
133
134 * R-22059 The VNF **MUST NOT** execute long running tasks (e.g., IO, database, network operations, service calls) in a critical section of code, so as to minimize blocking of other operations and increase concurrent throughput.
135 * R-63473 The VNF **MUST** automatically advertise newly scaled components so there is no manual intervention required.
136 * R-74712 The VNF **MUST** utilize FQDNs (and not IP address) for both Service Chaining and scaling.
137 * R-41159 The VNF **MUST** deliver any and all functionality from any VNFC in the pool. The VNFC pool member should be transparent to the client. Upstream and downstream clients should only recognize the function being performed, not the member performing it.
138 * R-85959 The VNF **SHOULD** automatically enable/disable added/removed sub-components or component so there is no manual intervention required.
139 * R-06885 The VNF **SHOULD** support the ability to scale down a VNFC pool without jeopardizing active sessions. Ideally, an active session should not be tied to any particular VNFC instance.
140 * R-12538 The VNF **SHOULD** support load balancing and discovery mechanisms in resource pools containing VNFC instances.
141 * R-98989 The VNF **SHOULD** utilize resource pooling (threads, connections, etc.) within the VNF application so that resources are not being created and destroyed resulting in resource management overhead.
142 * R-55345 The VNF **SHOULD** use techniques such as “lazy loading” when initialization includes loading catalogues and/or lists which can grow over time, so that the VNF startup time does not grow at a rate proportional to that of the list.
143 * R-35532 The VNF **SHOULD** release and clear all shared assets (memory, database operations, connections, locks, etc.) as soon as possible, especially before long running sync and asynchronous operations, so as to not prevent use of these assets by other entities.
144
145
146 Application Configuration Management
147 ------------------------------------
148
149 Leverage configuration management audit capability to drive conformity
150 to develop gold configurations for technologies like Java, Python, etc.
151
152 Application Configuration Management Requirements
153
154 * R-77334 The VNF **MUST** allow configurations and configuration parameters to be managed under version control to ensure consistent configuration deployment, traceability and rollback.
155 * R-99766 The VNF **MUST** allow configurations and configuration parameters to be managed under version control to ensure the ability to rollback to a known valid configuration.
156 * R-73583 The VNF **MUST** allow changes of configuration parameters to be consumed by the VNF without requiring the VNF or its sub-components to be bounced so that the VNF availability is not effected.
157
158
159 Intelligent Transaction Distribution & Management
160 -------------------------------------------------
161
162 Leverage Intelligent Load Balancing and redundant components (hardware
163 and modules) for all transactions, such that at any point in the
164 transaction: front end, middleware, back end -- a failure in any one
165 component does not result in a failure of the application or system;
166 i.e., transactions will continue to flow, albeit at a possibly reduced
167 capacity until the failed component restores itself. Create redundancy
168 in all layers (software and hardware) at local and remote data centers;
169 minimizing interdependencies of components (i.e. data replication,
170 deploying non-related elements in the same container).
171
172 Intelligent Transaction Distribution & Management Requirements
173
174 * R-21558 The VNF **SHOULD** use intelligent routing by having knowledge of multiple downstream/upstream endpoints that are exposed to it, to ensure there is no dependency on external services (such as load balancers) to switch to alternate endpoints.
175 * R-08315 The VNF **SHOULD** use redundant connection pooling to connect to any backend data source that can be switched between pools in an automated/scripted fashion to ensure high availability of the connection to the data source.
176 * R-27995 The VNF **SHOULD** include control loop mechanisms to notify the consumer of the VNF of their exceeding SLA thresholds so the consumer is able to control its load against the VNF.
177
178 Deployment Optimization
179 -----------------------
180
181 Reduce opportunity for failure, by human or by machine, through smarter
182 deployment practices and automation. This can include rolling code
183 deployments, additional testing strategies, and smarter deployment
184 automation (remove the human from the mix).
185
186 Deployment Optimization Requirements
187
188 * R-73364 The VNF **MUST** support at least two major versions of the VNF software and/or sub-components to co-exist within production environments at any time so that upgrades can be applied across multiple systems in a staggered manner.
189 * R-02454 The VNF **MUST** support the existence of multiple major/minor versions of the VNF software and/or sub-components and interfaces that support both forward and backward compatibility to be transparent to the Service Provider usage.
190 * R-57855 The VNF **MUST** support hitless staggered/rolling deployments between its redundant instances to allow "soak-time/burn in/slow roll" which can enable the support of low traffic loads to validate the deployment prior to supporting full traffic loads.
191 * R-64445 The VNF **MUST** support the ability of a requestor of the service to determine the version (and therefore capabilities) of the service so that Network Cloud Service Provider can understand the capabilities of the service.
192 * R-56793 The VNF **MUST** test for adherence to the defined performance budgets at each layer, during each delivery cycle with delivered results, so that the performance budget is measured and the code is adjusted to meet performance budget.
193 * R-77667 The VNF **MUST** test for adherence to the defined performance budget at each layer, during each delivery cycle so that the performance budget is measured and feedback is provided where the performance budget is not met.
194 * R-49308 The VNF **SHOULD** test for adherence to the defined resiliency rating recommendation at each layer, during each delivery cycle with delivered results, so that the resiliency rating is measured and the code is adjusted to meet software resiliency requirements.
195 * R-16039 The VNF **SHOULD** test for adherence to the defined resiliency rating recommendation at each layer, during each delivery cycle so that the resiliency rating is measured and feedback is provided where software resiliency requirements are not met.
196
197 Monitoring & Dashboard
198 ----------------------
199
200 Promote dashboarding as a tool to monitor and support the general
201 operational health of a system. It is critical to the support of the
202 implementation of many resiliency patterns essential to the maintenance
203 of the system. It can help identify unusual conditions that might
204 indicate failure or the potential for failure. This would contribute to
205 improve Mean Time to Identify (MTTI), Mean Time to Repair (MTTR), and
206 post-incident diagnostics.
207
208 Monitoring & Dashboard Requirements
209
210 * R-34957 The VNF **MUST** provide a method of metrics gathering for each layer's performance to identify/document variances in the allocations so they can be addressed.
211 * R-49224 The VNF **MUST** provide unique traceability of a transaction through its life cycle to ensure quick and efficient troubleshooting.
212 * R-52870 The VNF **MUST** provide a method of metrics gathering and analysis to evaluate the resiliency of the software from both a granular as well as a holistic standpoint. This includes, but is not limited to thread utilization, errors, timeouts, and retries.
213 * R-92571 The VNF **MUST** provide operational instrumentation such as logging, so as to facilitate quick resolution of issues with the VNF to provide service continuity.
214 * R-48917 The VNF **MUST** monitor for and alert on (both sender and receiver) errant, running longer than expected and missing file transfers, so as to minimize the impact due to file transfer errors.
215 * R-28168 The VNF **SHOULD** use an appropriately configured logging level that can be changed dynamically, so as to not cause performance degradation of the VNF due to excessive logging.
216 * R-87352 The VNF **SHOULD** utilize Cloud health checks, when available from the Network Cloud, from inside the application through APIs to check the network connectivity, dropped packets rate, injection, and auto failover to alternate sites if needed.
217 * R-16560 The VNF **MUST** conduct a resiliency impact assessment for all inter/intra-connectivity points in the VNF to provide an overall resiliency rating for the VNF to be incorporated into the software design and development of the VNF.
218
219 c. VNF Security
220 ===============
221
222 The objective of this section is to provide the key security
223 requirements that need to be met by VNFs. The security requirements are
224 grouped into five areas as listed below. Other security areas will be
225 addressed in future updates. These security requirements are applicable
226 to all VNFs. Additional security requirements for specific types of VNFs
227 will be applicable and are outside the scope of these general
228 requirements.
229
230 Section 5.a Security in *VNF Guidelines* outlines
231 the five broad security areas for VNFs that are detailed in the
232 following sections:
233
234 -  **VNF General Security**: This section addresses general security
235    requirements for the VNFs that the VNF provider will need to address.
236
237 -  **VNF Identity and Access Management**: This section addresses
238    security requirements with respect to Identity and Access Management
239    as these pertain to generic VNFs.
240
241 -  **VNF API Security**: This section addresses the generic security
242    requirements associated with APIs. These requirements are applicable
243    to those VNFs that use standard APIs for communication and data
244    exchange.
245
246 -  **VNF Security Analytics**: This section addresses the security
247    requirements associated with analytics for VNFs that deal with
248    monitoring, data collection and analysis.
249
250 -  **VNF Data Protection**: This section addresses the security
251    requirements associated with data protection.
252
253 VNF General Security Requirements
254 ---------------------------------
255
256 This section provides details on the VNF general security requirements
257 on various security areas such as user access control, network security,
258 ACLs, infrastructure security, and vulnerability management. These
259 requirements cover topics associated with compliance, security patching,
260 logging/accounting, authentication, encryption, role-based access
261 control, least privilege access/authorization. The following security
262 requirements need to be met by the solution in a virtual environment:
263
264 General Security Requirements
265
266 Integration and operation within a robust security environment is necessary and expected. The security architecture will include one or more of the following: IDAM (Identity and Access Management) for all system and applications access, Code scanning, network vulnerability scans, OS, Database and application patching, malware detection and cleaning, DDOS prevention, network security gateways (internal and external) operating at various layers, host and application based tools for security compliance validation, aggressive security patch application, tightly controlled software distribution and change control processes and other state of the art security solutions. The VNF is expected to function reliably within such an environment and the developer is expected to understand and accommodate such controls and can expected to supply responsive interoperability support and testing throughout the product’s lifecycle.
267
268 * R-23740 The VNF **MUST** accommodate the security principle of “least privilege” during development, implementation and operation. The importance of “least privilege” cannot be overstated and must be observed in all aspects of VNF development and not limited to security. This is applicable to all sections of this document.
269 * R-61354 The VNF **MUST** implement access control list for OA&M services (e.g., restricting access to certain ports or applications).
270 * R-85633 The VNF **MUST** implement Data Storage Encryption (database/disk encryption) for Sensitive Personal Information (SPI) and other subscriber identifiable data. Note: subscriber’s SPI/data must be encrypted at rest, and other subscriber identifiable data should be encrypted at rest. Other data protection requirements exist and should be well understood by the developer.
271 * R-92207 The VNF **SHOULD** implement a mechanism for automated and frequent "system configuration (automated provisioning / closed loop)" auditing.
272 * R-23882 The VNF **SHOULD** be scanned using both network scanning and application scanning security tools on all code, including underlying OS and related configuration. Scan reports shall be provided. Remediation roadmaps shall be made available for any findings.
273 * R-46986 The VNF **SHOULD** have source code scanned using scanning tools (e.g., Fortify) and provide reports.
274 * R-55830 The VNF **MUST** distribute all production code from NCSP internal sources only. No production code, libraries, OS images, etc. shall be distributed from publically accessible depots.
275 * R-99771 The VNF **MUST** provide all code/configuration files in a "Locked down" or hardened state or with documented recommendations for such hardening. All unnecessary services will be disabled. VNF provider default credentials, community strings and other such artifacts will be removed or disclosed so that they can be modified or removed during provisioning.
276 * R-19768 The VNF **SHOULD** support L3 VPNs that enable segregation of traffic by application (dropping packets not belonging to the VPN) (i.e., AVPN, IPSec VPN for Internet routes).
277 * R-33981 The VNF **SHOULD** interoperate with various access control mechanisms for the Network Cloud execution environment (e.g., Hypervisors, containers).
278 * R-40813 The VNF **SHOULD** support the use of virtual trusted platform module, hypervisor security testing and standards scanning tools.
279 * R-56904 The VNF **MUST** interoperate with the ONAP (SDN) Controller so that it can dynamically modify the firewall rules, ACL rules, QoS rules, virtual routing and forwarding rules.
280 * R-26586 The VNF **SHOULD** support the ability to work with aliases (e.g., gateways, proxies) to protect and encapsulate resources.
281 * R-49956 The VNF **MUST** pass all access to applications (Bearer, signaling and OA&M) through various security tools and platforms from ACLs, stateful firewalls and application layer gateways depending on manner of deployment. The application is expected to function (and in some cases, interwork) with these security tools.
282 * R-69649 The VNF **MUST** have all vulnerabilities patched as soon as possible. Patching shall be controlled via change control process with vulnerabilities disclosed along with mitigation recommendations.
283 * R-78010 The VNF **MUST** use the NCSP’s IDAM API for Identification, authentication and access control of customer or VNF application users.
284 * R-42681 The VNF **MUST** use the NCSP’s IDAM API or comply with the requirements if not using the NCSP’s IDAM API, for identification, authentication and access control of OA&M and other system level functions.
285 * R-68589 The VNF **MUST**, if not using the NCSP’s IDAM API, support User-IDs and passwords to uniquely identify the user/application. VNF needs to have appropriate connectors to the Identity, Authentication and Authorization systems that enables access at OS, Database and Application levels as appropriate.
286 * R-52085 The VNF **MUST**, if not using the NCSP’s IDAM API, provide the ability to support Multi-Factor Authentication (e.g., 1st factor = Software token on device (RSA SecureID); 2nd factor = User Name+Password, etc.) for the users.
287 * R-98391 The VNF **MUST**, if not using the NCSP’s IDAM API, support Role-Based Access Control to permit/limit the user/application to performing specific activities.
288 * R-63217 The VNF **MUST**, if not using the NCSP’s IDAM API, support logging via ONAP for a historical view of “who did what and when”.
289 * R-62498 The VNF **MUST**, if not using the NCSP’s IDAM API, encrypt OA&M access (e.g., SSH, SFTP).
290 * R-79107 The VNF **MUST**, if not using the NCSP’s IDAM API, enforce a configurable maximum number of Login attempts policy for the users. VNF provider must comply with "terminate idle sessions" policy. Interactive sessions must be terminated, or a secure, locking screensaver must be activated requiring authentication, after a configurable period of inactivity. The system-based inactivity timeout for the enterprise identity and access management system must also be configurable.
291 * R-35144 The VNF **MUST**, if not using the NCSP’s IDAM API, comply with the NCSP’s credential management policy.
292 * R-75041 The VNF **MUST**, if not using the NCSP’s IDAM API, expire passwords at regular configurable intervals.
293 * R-46908 The VNF **MUST**, if not using the NCSP’s IDAM API, comply with "password complexity" policy. When passwords are used, they shall be complex and shall at least meet the following password construction requirements: (1) be a minimum configurable number of characters in length, (2) include 3 of the 4 following types of characters: upper-case alphabetic, lower-case alphabetic, numeric, and special, (3) not be the same as the UserID with which they are associated or other common strings as specified by the environment, (4) not contain repeating or sequential characters or numbers, (5) not to use special characters that may have command functions, and (6) new passwords must not contain sequences of three or more characters from the previous password.
294 * R-39342 The VNF **MUST**, if not using the NCSP’s IDAM API, comply with "password changes (includes default passwords)" policy. Products will support password aging, syntax and other credential management practices on a configurable basis.
295 * R-40521 The VNF **MUST**, if not using the NCSP’s IDAM API, support use of common third party authentication and authorization tools such as TACACS+, RADIUS.
296 * R-41994 The VNF **MUST**, if not using the NCSP’s IDAM API, comply with "No Self-Signed Certificates" policy. Self-signed certificates must be used for encryption only, using specified and approved encryption protocols such as LS 1.1 or higher or equivalent security protocols such as IPSec, AES.
297 * R-23135 The VNF **MUST**, if not using the NCSP’s IDAM API, authenticate system to system communications were one system accesses the resources of another system, and must never conceal individual accountability.
298
299 VNF Identity and Access Management Requirements
300 -----------------------------------------------
301
302 The following security requirements for logging, identity, and access
303 management need to be met by the solution in a virtual environment:
304
305
306 Identity and Access Management Requirements
307
308 * R-95105 The VNF **MUST** host connectors for access to the application layer.
309 * R-45496 The VNF **MUST** host connectors for access to the OS (Operating System) layer.
310 * R-05470 The VNF **MUST** host connectors for access to the database layer.
311 * R-99174 The VNF **MUST** comply with Individual Accountability (each person must be assigned a unique ID) when persons or non-person entities access VNFs.
312 * R-42874 The VNF **MUST** comply with Least Privilege (no more privilege than required to perform job functions) when persons or non-person entities access VNFs.
313 * R-71787 The VNF **MUST** comply with Segregation of Duties (access to a single layer and no developer may access production without special oversight) when persons or non-person entities access VNFs.
314 * R-86261 The VNF **MUST NOT** allow VNF provider access to VNFs remotely.
315 * R-49945 The VNF **MUST** authorize VNF provider access through a client application API by the client application owner and the resource owner of the VNF before provisioning authorization through Role Based Access Control (RBAC), Attribute Based Access Control (ABAC), or other policy based mechanism.
316 * R-31751 The VNF **MUST** subject VNF provider access to privilege reconciliation tools to prevent access creep and ensure correct enforcement of access policies.
317 * R-34552 The VNF **MUST** provide or support the Identity and Access Management (IDAM) based threat detection data for OWASP Top 10.
318 * R-29301 The VNF **MUST** provide or support the Identity and Access Management (IDAM) based threat detection data for Password Attacks.
319 * R-72243 The VNF **MUST** provide or support the Identity and Access Management (IDAM) based threat detection data for Phishing / SMishing.
320 * R-58998 The VNF **MUST** provide or support the Identity and Access Management (IDAM) based threat detection data for Malware (Key Logger).
321 * R-14025 The VNF **MUST** provide or support the Identity and Access Management (IDAM) based threat detection data for Session Hijacking.
322 * R-31412 The VNF **MUST** provide or support the Identity and Access Management (IDAM) based threat detection data for XSS / CSRF.
323 * R-51883 The VNF **MUST** provide or support the Identity and Access Management (IDAM) based threat detection data for Replay.
324 * R-44032 The VNF **MUST** provide or support the Identity and Access Management (IDAM) based threat detection data for Man in the Middle (MITM).
325 * R-58977 The VNF **MUST** provide or support the Identity and Access Management (IDAM) based threat detection data for Eavesdropping.
326 * R-24825 The VNF **MUST** provide Context awareness data (device, location, time, etc.) and be able to integrate with threat detection system.
327 * R-59391 The VNF provider **MUST**, where a VNF provider requires the assumption of permissions, such as root or administrator, first log in under their individual user login ID then switch to the other higher level account; or where the individual user login is infeasible, must login with an account with admin privileges in a way that uniquely identifies the individual performing the function.
328 * R-85028 The VNF **MUST** authenticate system to system access and do not conceal a VNF provider user’s individual accountability for transactions.
329 * R-80335 The VNF **MUST** make visible a Warning Notice: A formal statement of resource intent, i.e., a warning notice, upon initial access to a VNF provider user who accesses private internal networks or Company computer resources, e.g., upon initial logon to an internal web site, system or application which requires authentication.
330 * R-73541 The VNF **MUST** use access controls for VNFs and their supporting computing systems at all times to restrict access to authorized personnel only, e.g., least privilege. These controls could include the use of system configuration or access control software.
331 * R-64503 The VNF **MUST** provide minimum privileges for initial and default settings for new user accounts.
332 * R-86835 The VNF **MUST** set the default settings for user access to sensitive commands and data to deny authorization.
333 * R-77157 The VNF **MUST** conform to approved request, workflow authorization, and authorization provisioning requirements when creating privileged users.
334 * R-81147 The VNF **MUST** have greater restrictions for access and execution, such as up to 3 factors of authentication and restricted authorization, for commands affecting network services, such as commands relating to VNFs, must.
335 * R-49109 The VNF **MUST** encrypt TCP/IP--HTTPS (e.g., TLS v1.2) transmission of data on internal and external networks.
336 * R-39562 The VNF **MUST** disable unnecessary or vulnerable cgi-bin programs.
337 * R-15671 The VNF **MUST NOT** provide public or unrestricted access to any data without the permission of the data owner. All data classification and access controls must be followed.
338 * R-89753 The VNF **MUST NOT** install or use systems, tools or utilities capable of capturing or logging data that was not created by them or sent specifically to them in production, without authorization of the VNF system owner.
339 * R-19082 The VNF **MUST NOT** run security testing tools and programs, e.g., password cracker, port scanners, hacking tools in production, without authorization of the VNF system owner.
340 * R-19790 The VNF **MUST NOT** include authentication credentials in security audit logs, even if encrypted.
341 * R-85419 The VNF **SHOULD** use REST APIs exposed to Client Applications for the implementation of OAuth 2.0 Authorization Code Grant and Client Credentials Grant, as the standard interface for a VNF.
342 * R-86455 The VNF **SHOULD** support hosting connectors for OS Level and Application Access.
343 * R-48080 The VNF **SHOULD** support SCEP (Simple Certificate Enrollment Protocol).
344
345
346 VNF API Security Requirements
347 -----------------------------
348
349 This section covers API security requirements when these are used by the
350 VNFs. Key security areas covered in API security are Access Control,
351 Authentication, Passwords, PKI Authentication Alarming, Anomaly
352 Detection, Lawful Intercept, Monitoring and Logging, Input Validation,
353 Cryptography, Business continuity, Biometric Authentication,
354 Identification, Confidentiality and Integrity, and Denial of Service.
355
356 The solution in a virtual environment needs to meet the following API
357 security requirements:
358
359
360 API Requirements
361
362 * R-37608 The VNF **MUST** provide a mechanism to restrict access based on the attributes of the VNF and the attributes of the subject.
363 * R-43884 The VNF **MUST** integrate with external authentication and authorization services (e.g., IDAM).
364 * R-25878 The VNF **MUST** use certificates issued from publicly recognized Certificate Authorities (CA) for the authentication process where PKI-based authentication is used.
365 * R-19804 The VNF **MUST** validate the CA signature on the certificate, ensure that the date is within the validity period of the certificate, check the Certificate Revocation List (CRL), and recognize the identity represented by the certificate where PKI-based authentication is used.
366 * R-47204 The VNF **MUST** protect the confidentiality and integrity of data at rest and in transit from unauthorized access and modification.
367 * R-33488 The VNF **MUST** protect against all denial of service attacks, both volumetric and non-volumetric, or integrate with external denial of service protection tools.
368 * R-21652 The VNF **MUST** implement the following input validation control: Check the size (length) of all input. Do not permit an amount of input so great that it would cause the VNF to fail. Where the input may be a file, the VNF API must enforce a size limit.
369 * R-54930 The VNF **MUST** implement the following input validation control: Do not permit input that contains content or characters inappropriate to the input expected by the design. Inappropriate input, such as SQL insertions, may cause the system to execute undesirable and unauthorized transactions against the database or allow other inappropriate access to the internal network.
370 * R-21210 The VNF **MUST** implement the following input validation control: Validate that any input file has a correct and valid Multipurpose Internet Mail Extensions (MIME) type. Input files should be tested for spoofed MIME types.
371 * R-23772 The VNF **MUST** validate input at all layers implementing VNF APIs.
372 * R-87135 The VNF **MUST** comply with NIST standards and industry best practices for all implementations of cryptography.
373 * R-02137 The VNF **MUST** implement all monitoring and logging as described in the Security Analytics section.
374 * R-15659 The VNF **MUST** restrict changing the criticality level of a system security alarm to administrator(s).
375 * R-19367 The VNF **MUST** monitor API invocation patterns to detect anomalous access patterns that may represent fraudulent access or other types of attacks, or integrate with tools that implement anomaly and abuse detection.
376 * R-78066 The VNF **MUST** support requests for information from law enforcement and government agencies.
377
378
379 VNF Security Analytics Requirements
380 -----------------------------------
381
382 This section covers VNF security analytics requirements that are mostly
383 applicable to security monitoring. The VNF Security Analytics cover the
384 collection and analysis of data following key areas of security
385 monitoring:
386
387 -  Anti-virus software
388
389 -  Logging
390
391 -  Data capture
392
393 -  Tasking
394
395 -  DPI
396
397 -  API based monitoring
398
399 -  Detection and notification
400
401 -  Resource exhaustion detection
402
403 -  Proactive and scalable monitoring
404
405 -  Mobility and guest VNF monitoring
406
407 -  Closed loop monitoring
408
409 -  Interfaces to management and orchestration
410
411 -  Malformed packet detections
412
413 -  Service chaining
414
415 -  Dynamic security control
416
417 -  Dynamic load balancing
418
419 -  Connection attempts to inactive ports (malicious port scanning)
420
421 The following requirements of security monitoring need to be met by the
422 solution in a virtual environment.
423
424 Security Analytics Requirements
425
426 * R-48470 The VNF **MUST** support Real-time detection and notification of security events.
427 * R-22286 The VNF **MUST** support Integration functionality via API/Syslog/SNMP to other functional modules in the network (e.g., PCRF, PCEF) that enable dynamic security control by blocking the malicious traffic or malicious end users
428 * R-32636 The VNF **MUST** support API-based monitoring to take care of the scenarios where the control interfaces are not exposed, or are optimized and proprietary in nature.
429 * R-61648 The VNF **MUST** support event logging, formats, and delivery tools to provide the required degree of event data to ONAP
430 * R-22367 The VNF **MUST** support detection of malformed packets due to software misconfiguration or software vulnerability.
431 * R-31961 The VNF **MUST** support integrated DPI/monitoring functionality as part of VNFs (e.g., PGW, MME).
432 * R-20912 The VNF **MUST** support alternative monitoring capabilities when VNFs do not expose data or control traffic or use proprietary and optimized protocols for inter VNF communication.
433 * R-73223 The VNF **MUST** support proactive monitoring to detect and report the attacks on resources so that the VNFs and associated VMs can be isolated, such as detection techniques for resource exhaustion, namely OS resource attacks, CPU attacks, consumption of kernel memory, local storage attacks.
434 * R-58370 The VNF **MUST** coexist and operate normally with commercial anti-virus software which shall produce alarms every time when there is a security incident.
435 * R-56920 The VNF **MUST** protect all security audit logs (including API, OS and application-generated logs), security audit software, data, and associated documentation from modification, or unauthorized viewing, by standard OS access control mechanisms, by sending to a remote system, or by encryption.
436 * R-54520 The VNF **MUST** log successful and unsuccessful login attempts.
437 * R-55478 The VNF **MUST** log logoffs.
438 * R-08598 The VNF **MUST** log successful and unsuccessful changes to a privilege level.
439 * R-13344 The VNF **MUST** log starting and stopping of security logging
440 * R-07617 The VNF **MUST** log creating, removing, or changing the inherent privilege level of users.
441 * R-94525 The VNF **MUST** log connections to a network listener of the resource.
442 * R-31614 The VNF **MUST** log the field “event type” in the security audit logs.
443 * R-97445 The VNF **MUST** log the field “date/time” in the security audit logs.
444 * R-25547 The VNF **MUST** log the field “protocol” in the security audit logs.
445 * R-06413 The VNF **MUST** log the field “service or program used for access” in the security audit logs.
446 * R-15325 The VNF **MUST** log the field “success/failure” in the security audit logs.
447 * R-89474 The VNF **MUST** log the field “Login ID” in the security audit logs.
448 * R-04982 The VNF **MUST NOT** include an authentication credential, e.g., password, in the security audit logs, even if encrypted.
449 * R-63330 The VNF **MUST** detect when the security audit log storage medium is approaching capacity (configurable) and issue an alarm via SMS or equivalent as to allow time for proper actions to be taken to pre-empt loss of audit data.
450 * R-41252 The VNF **MUST** support the capability of online storage of security audit logs.
451 * R-41825 The VNF **MUST** activate security alarms automatically when the following event is detected: configurable number of consecutive unsuccessful login attempts
452 * R-43332 The VNF **MUST** activate security alarms automatically when the following event is detected: successful modification of critical system or application files
453 * R-74958 The VNF **MUST** activate security alarms automatically when the following event is detected: unsuccessful attempts to gain permissions or assume the identity of another user
454 * R-15884 The VNF **MUST** include the field “date” in the Security alarms (where applicable and technically feasible).
455 * R-23957 The VNF **MUST** include the field “time” in the Security alarms (where applicable and technically feasible).
456 * R-71842 The VNF **MUST** include the field “service or program used for access” in the Security alarms (where applicable and technically feasible).
457 * R-57617 The VNF **MUST** include the field “success/failure” in the Security alarms (where applicable and technically feasible).
458 * R-99730 The VNF **MUST** include the field “Login ID” in the Security alarms (where applicable and technically feasible).
459 * R-29705 The VNF **MUST** restrict changing the criticality level of a system security alarm to administrator(s).
460 * R-13627 The VNF **MUST** monitor API invocation patterns to detect anomalous access patterns that may represent fraudulent access or other types of attacks, or integrate with tools that implement anomaly and abuse detection.
461 * R-21819 The VNF **MUST** support requests for information from law enforcement and government agencies.
462 * R-56786 The VNF **MUST** implement “Closed Loop” automatic implementation (without human intervention) for Known Threats with detection rate in low false positives.
463 * R-25094 The VNF **MUST** perform data capture for security functions.
464 * R-04492 The VNF **MUST** generate security audit logs that must be sent to Security Analytics Tools for analysis.
465 * R-19219 The VNF **MUST** provide audit logs that include user ID, dates, times for log-on and log-off, and terminal location at minimum.
466 * R-30932 The VNF **MUST** provide security audit logs including records of successful and rejected system access data and other resource access attempts.
467 * R-54816 The VNF **MUST** support the storage of security audit logs for agreed period of time for forensic analysis.
468 * R-57271 The VNF **MUST** provide the capability of generating security audit logs by interacting with the operating system (OS) as appropriate.
469 * R-84160 The VNF **MUST** have security logging for VNFs and their OSs be active from initialization. Audit logging includes automatic routines to maintain activity records and cleanup programs to ensure the integrity of the audit/logging systems.
470
471 VNF Data Protection Requirements
472 --------------------------------
473
474 This section covers VNF data protection requirements that are mostly
475 applicable to security monitoring.
476
477
478 Data Protection Requirements
479
480 * R-58964 The VNF **MUST** provide the capability to restrict read and write access to data.
481 * R-99112 The VNF **MUST** provide the capability to restrict access to data to specific users.
482 * R-83227 The VNF **MUST** Provide the capability to encrypt data in transit on a physical or virtual network.
483 * R-32641 The VNF **MUST** provide the capability to encrypt data on non-volatile memory.
484 * R-13151 The VNF **SHOULD** disable the paging of the data requiring encryption, if possible, where the encryption of non-transient data is required on a device for which the operating system performs paging to virtual memory. If not possible to disable the paging of the data requiring encryption, the virtual memory should be encrypted.
485 * R-93860 The VNF **MUST** provide the capability to integrate with an external encryption service.
486 * R-73067 The VNF **MUST** use industry standard cryptographic algorithms and standard modes of operations when implementing cryptography.
487 * R-22645 The VNF **SHOULD** use commercial algorithms only when there are no applicable governmental standards for specific cryptographic functions, e.g., public key cryptography, message digests.
488 * R-12467 The VNF **MUST NOT** use the SHA, DSS, MD5, SHA-1 and Skipjack algorithms or other compromised encryption.
489 * R-02170 The VNF **MUST** use, whenever possible, standard implementations of security applications, protocols, and format, e.g., S/MIME, TLS, SSH, IPSec, X.509 digital certificates for cryptographic implementations. These implementations must be purchased from reputable vendors and must not be developed in-house.
490 * R-70933 The VNF **MUST** provide the ability to migrate to newer versions of cryptographic algorithms and protocols with no impact.
491 * R-44723 The VNF **MUST** use symmetric keys of at least 112 bits in length.
492 * R-25401 The VNF **MUST** use asymmetric keys of at least 2048 bits in length.
493 * R-95864 The VNF **MUST** use commercial tools that comply with X.509 standards and produce x.509 compliant keys for public/private key generation.
494 * R-12110 The VNF **MUST NOT** use keys generated or derived from predictable functions or values, e.g., values considered predictable include user identity information, time of day, stored/transmitted data.
495 * R-52060 The VNF **MUST** provide the capability to configure encryption algorithms or devices so that they comply with the laws of the jurisdiction in which there are plans to use data encryption.
496 * R-69610 The VNF **MUST** provide the capability of using certificates issued from a Certificate Authority not provided by the VNF provider.
497 * R-83500 The VNF **MUST** provide the capability of allowing certificate renewal and revocation.
498 * R-29977 The VNF **MUST** provide the capability of testing the validity of a digital certificate by validating the CA signature on the certificate.
499 * R-24359 The VNF **MUST** provide the capability of testing the validity of a digital certificate by validating the date the certificate is being used is within the validity period for the certificate.
500 * R-39604 The VNF **MUST** provide the capability of testing the validity of a digital certificate by checking the Certificate Revocation List (CRL) for the certificates of that type to ensure that the certificate has not been revoked.
501 * R-75343 The VNF **MUST** provide the capability of testing the validity of a digital certificate by recognizing the identity represented by the certificate — the "distinguished name".
502
503 d. VNF Modularity
504 =================
505
506 ONAP Heat Orchestration Templates: Overview
507 -------------------------------------------
508
509 ONAP supports a modular Heat Orchestration Template design pattern,
510 referred to as *VNF Modularity.*
511
512 ONAP VNF Modularity Overview
513 ----------------------------
514
515 With VNF Modularity, a single VNF may be composed from one or more Heat
516 Orchestration Templates, each of which represents a subset of the
517 overall VNF. These component parts are referred to as “\ *VNF
518 Modules*\ ”. During orchestration, these modules are deployed
519 incrementally to create the complete VNF.
520
521 A modular Heat Orchestration Template can be either one of the following
522 types:
523
524 1. Base Module
525
526 2. Incremental Module
527
528 3. Cinder Volume Module
529
530 * R-37028 The VNF **MUST** be composed of one “base” module.
531 * R-41215 The VNF **MAY** have zero to many “incremental” modules.
532 * R-20974 The VNF **MUST** deploy the base module first, prior to the incremental modules.
533
534 ONAP also supports the concept of an optional, independently deployed
535 Cinder volume via a separate Heat Orchestration Templates, referred to
536 as a Cinder Volume Module. This allows the volume to persist after a
537 Virtual Machine (VM) (i.e., OS::Nova::Server) is deleted, allowing the
538 volume to be reused on another instance (e.g., during a failover
539 activity).
540
541 * R-11200 The VNF MUST keep the scope of a Cinder volume module, when it exists, to be 1:1 with the VNF Base Module or Incremental Module.
542
543 * R-38474 The VNF MUST have a corresponding environment file for a Base Module.
544 * R-81725 The VNF MUST have a corresponding environment file for an Incremental Module.
545 * R-53433 The VNF MUST have a corresponding environment file for a Cinder Volume Module.
546
547 These concepts will be described in more detail throughout the document.
548 This overview is provided to set the stage and help clarify the concepts
549 that will be introduced.
550
551
552 ONAP VNF Modularity
553 -------------------
554
555 ONAP supports a modular Heat Orchestration Template design pattern,
556 referred to as *VNF Modularity.* With this approach, a single VNF may be
557 composed from one or more Heat Orchestration Templates, each of which
558 represents a subset of the overall VNF. These component parts are
559 referred to as “\ *VNF Modules*\ ”. During orchestration, these modules
560 are deployed incrementally to create the complete VNF.
561
562 A modular Heat Orchestration Template can be either one of the following
563 types:
564
565 1. Base Module
566
567 2. Incremental Module
568
569 3. Cinder Volume Module
570
571 A VNF must be composed of one “base” module and may be composed of zero
572 to many “incremental” modules. The base module must be deployed first,
573 prior to the incremental modules.
574
575 ONAP also supports the concept of an optional, independently deployed
576 Cinder volume via a separate Heat Orchestration Templates, referred to
577 as a Cinder Volume Module. This allows the volume to persist after a VM
578 (i.e., OS::Nova::Server) is deleted, allowing the volume to be reused on
579 another instance (e.g., during a failover activity).
580
581 The scope of a Cinder volume module, when it exists, must be 1:1 with a
582 Base module or Incremental Module.
583
584 A Base Module must have a corresponding environment file.
585
586 An Incremental Module must have a corresponding environment file.
587
588 A Cinder Volume Module must have a corresponding environment file.
589
590 A VNF module (base, incremental, cinder) may support nested templates.
591
592 A shared Heat Orchestration Template resource must be defined in the
593 base module. A shared resource is a resource that that will be
594 referenced by another resource that is defined in the Base Module and/or
595 one or more incremental modules.
596
597 When the shared resource needs to be referenced by a resource in an
598 incremental module, the UUID of the shared resource must be exposed by
599 declaring an ONAP Base Module Output Parameter.
600
601 Note that a Cinder volume is *not* a shared resource. A volume template
602 must correspond 1:1 with a base module or incremental module.
603
604 An example of a shared resource is the resource
605 OS::Neutron::SecurityGroup. Security groups are sets of IP filter rules
606 that are applied to a VNF’s networking. The resource OS::Neutron::Port
607 has a property security\_groups which provides the security groups
608 associated with port. The value of parameter(s) associated with this
609 property must be the UUIDs of the resource(s)
610 OS::Neutron::SecurityGroup.
611
612 *Note:* A Cinder volume is *not* considered a shared resource. A volume
613 template must correspond 1:1 with a base template or add-on module
614 template.
615
616 Suggested Patterns for Modular VNFs
617 -----------------------------------
618
619 There are numerous variations of VNF modularity. Below are two suggested
620 usage patterns.
621
622 **Option 1: Modules per VNFC type**
623
624 a. Base module contains only the shared resources.
625
626 b. Group all VMs (e.g., VNFCs) of a given type (i.e. {vm-type}) into its
627    own incremental module. That is, the VNF has an incremental module
628    for each {vm-type}.
629
630 c. For a given {vm-type} incremental module, the VNF may have
631
632    i.  One incremental module used for both initial turn up and re-used
633        for scaling. This approach is used when the number of VMs
634        instantiated will be the same for initial deployment and scaling.
635
636    ii. Two incremental modules, where one is used for initial turn up
637        and one is used for scaling. This approach is used when the
638        number of VMs instantiated will be different for initial
639        deployment and scaling.
640
641 **Option 2: Base VNF with Incremental Growth Modules**
642
643 a. Base module contains a complete initial VNF instance
644
645 b. Incremental modules for incremental scaling units
646
647    i.  May contain VMs of multiple types in logical scaling combinations
648
649    ii. May be separated by VM type for multi-dimensional scaling
650
651 With no growth units, Option 2 is equivalent to the “One Heat Template
652 per VNF” model.
653
654 Note that modularization of VNFs is not required. A single Heat
655 Orchestration Template (a base module) may still define a complete VNF,
656 which might be appropriate for smaller VNFs that do not have any scaling
657 options.
658
659 Modularity Rules
660 ----------------
661
662 There are some rules to follow when building modular VNF templates:
663
664 1. All VNFs must have one Base VNF Module (template) that must be the
665    first one deployed. The base template:
666
667    a. Must include all shared resources (e.g., private networks, server
668       groups, security groups)
669
670    b. Must expose all shared resources (by UUID) as “outputs” in its
671       associated Heat template (i.e., ONAP Base Module Output
672       Parameters)
673
674    c. May include initial set of VMs
675
676    d. May be operational as a stand-alone “minimum” configuration of the
677       VNF
678
679 2. VNFs may have one or more incremental modules which:
680
681    a. Defines additional resources that can be added to an existing VNF
682
683    b. Must be complete Heat templates
684
685       i. i.e. not snippets to be incorporated into some larger template
686
687    c. Should define logical growth-units or sub-components of an overall
688       VNF
689
690    d. On creation, receives appropriate Base Module outputs as
691       parameters
692
693       i.  Provides access to all shared resources (by UUID)
694
695       ii. must not be dependent on other Add-On VNF Modules
696
697    e. Multiple instances of an incremental Module may be added to the
698       same VNF (e.g., incrementally grow a VNF by a fixed “add-on”
699       growth units)
700
701 3. Each VNF Module (base or incremental) may have (optional) an
702    associated Cinder Volume Module (see Cinder Volume Templates)
703
704    a. Volume modules must correspond 1:1 with a base module or
705       incremental module
706
707    b. A Cinder volume may be embedded within the base module or
708       incremental module if persistence is not required
709
710 4. Shared resource UUIDs are passed between the base module and
711    incremental modules via Heat Outputs Parameters (i.e., Base Module
712    Output Parameters)
713
714    a. The output parameter name in the base must match the parameter
715       name in the add-on module
716
717 VNF Modularity Examples
718 -----------------------
719
720 *Example: Base Module creates SecurityGroup*
721
722 A VNF has a base module, named base.yaml, that defines a
723 OS::Neutron::SecurityGroup. The security group will be referenced by an
724 OS::Neutron::Port resource in an incremental module, named
725 INCREMENTAL\_MODULE.yaml. The base module defines a parameter in the out
726 section named dns\_sec\_grp\_id. dns\_sec\_grp\_id is defined as a
727 parameter in the incremental module. ONAP captures the UUID value of
728 dns\_sec\_grp\_id from the base module output statement and provides the
729 value to the incremental module.
730
731 Note that the example below is not a complete Heat Orchestration
732 Template. The {network-role} has been defined as oam to represent an oam
733 network and the {vm-type} has been defined as dns.
734
735 base\_MODULE.yaml
736
737 .. code-block:: yaml
738
739  parameters:
740    . . .
741
742  resources:
743    DNS_SECURITY_GROUP:
744      type: OS::Neutron::SecurityGroup
745      properties:
746        description: vDNS security group
747        name:
748          str_replace:
749            template: VNF_NAME_sec_grp_DNS
750            params:
751              VMF_NAME: {get_param: vnf_name}
752        rules: [. . . . .
753
754    . . .
755
756  outputs:
757    dns_sec_grp_id:
758      description: UUID of DNS Resource SecurityGroup
759      value: { get_resource: DNS_SECURITY_GROUP }
760
761
762 INCREMENTAL\_MODULE.yaml
763
764 .. code-block:: yaml
765
766  parameters:
767    dns_sec_grp_id:
768      type: string
769      description: security group UUID
770    . . .
771
772  resources:
773    dns_oam_0_port:
774      type: OS::Neutron::Port
775      properties:
776        name:
777          str_replace:
778            template: VNF_NAME_dns_oam_port
779            params:
780              VNF_NAME: {get_param: vnf_name}
781        network: { get_param: oam_net_name }
782        fixed_ips: [{ "ip_address": { get_param: dns_oam_ip_0 }}]
783        security_groups: [{ get_param: dns_sec_grp_id }]
784
785
786 *Examples: Base Module creates an internal network*
787
788 A VNF has a base module, named base\_module.yaml, that creates an
789 internal network. An incremental module, named incremental\_module.yaml,
790 will create a VM that will connect to the internal network. The base
791 module defines a parameter in the out section named int\_oam\_net\_id.
792 int\_oam\_net\_id is defined as a parameter in the incremental module.
793 ONAP captures the UUID value of int\_oam\_net\_id from the base module
794 output statement and provides the value to the incremental module.
795
796 Note that the example below is not a complete Heat Orchestration
797 Template. The {network-role} has been defined as oam to represent an oam
798 network and the {vm-type} has been defined as lb for load balancer.
799
800 base.yaml
801
802 .. code-block:: yaml
803
804  heat_template_version: 2013-05-23
805
806  resources:
807     int_oam_network:
808        type: OS::Neutron::Network
809        properties:
810           name: {… }
811           . . .
812  outputs:
813     int_oam_net_id:
814        value: {get_resource: int_oam_network }
815
816
817 incremental.yaml
818
819 .. code-block:: yaml
820
821  heat_template_version: 2013-05-23
822
823  parameters:
824     int_oam_net_id:
825        type: string
826        description: ID of shared private network from Base template
827     lb_name_0:
828        type: string
829        description: name for the add-on VM instance
830
831  Resources:
832     lb_server:
833        type: OS::Nova::Server
834        properties:
835           name: {get_param: lb_name_0}
836           networks:
837              - port: { get_resource: lb_port }
838           . . .
839
840     lb_port:
841        type: OS::Neutron::Port
842        properties:
843           network_id: { get_param: int_oam_net_id }
844  ...
845
846 e. VNF Devops
847 =============
848
849 This section includes guidelines for VNF providers to ensure that a Network
850 Cloud Service Provider’s operations personnel have a common and
851 consistent way to support VNFs and VNFCs.
852
853 NCSPs may elect to support standard images to enable compliance with
854 security, audit, regulatory and other needs. As part of the overall VNF
855 software bundle, VNF suppliers using standard images would typically
856 provide the NCSP with an install package consistent with the default OS
857 package manager (e.g. aptitude for Ubuntu, yum for Redhat/CentOS).
858
859 Section 5.a DevOps in *VNF Guidelines* describes
860 the DevOps guidelines for VNFs.
861
862 DevOps Requirements
863
864 * R-46960 NCSPs **MAY** operate a limited set of Guest OS and CPU architectures and families, virtual machines, etc.
865 * R-23475 VNFCs **SHOULD** be agnostic to the details of the Network Cloud (such as hardware, host OS, Hypervisor or container technology) and must run on the Network Cloud with acknowledgement to the paradigm that the Network Cloud will continue to rapidly evolve and the underlying components of the platform will change regularly.
866 * R-33846 The VNF **MUST** install the NCSP required software on Guest OS images when not using the NCSP provided Guest OS images. [1]_
867 * R-09467 The VNF **MUST**  utilize only NCSP standard compute flavors. [1]_
868 * R-02997 The VNF **MUST** preserve their persistent data. Running VMs will not be backed up in the Network Cloud infrastructure.
869 * R-29760 The VNFC **MUST** be installed on non-root file systems, unless software is specifically included with the operating system distribution of the guest image.
870 * R-20860 The VNF **MUST** be agnostic to the underlying infrastructure (such as hardware, host OS, Hypervisor), any requirements should be provided as specification to be fulfilled by any hardware.
871 * R-89800 The VNF **MUST NOT** require Hypervisor-level customization from the cloud provider.
872 * R-86758 The VNF **SHOULD** provide an automated test suite to validate every new version of the software on the target environment(s). The tests should be of sufficient granularity to independently test various representative VNF use cases throughout its lifecycle. Operations might choose to invoke these tests either on a scheduled basis or on demand to support various operations functions including test, turn-up and troubleshooting.
873 * R-39650 The VNF **SHOULD** provide the ability to test incremental growth of the VNF.
874 * R-14853 The VNF **MUST** respond to a "move traffic" [2]_ command against a specific VNFC, moving all existing session elsewhere with minimal disruption if a VNF provides a load balancing function across multiple instances of its VNFCs. Note: Individual VNF performance aspects (e.g., move duration or disruption scope) may require further constraints.
875 * R-06327 The VNF **MUST** respond to a "drain VNFC" [2]_ command against a specific VNFC, preventing new session from reaching the targeted VNFC, with no disruption to active sessions on the impacted VNFC, if a VNF provides a load balancing function across multiple instances of its VNFCs. This is used to support scenarios such as proactive maintenance with no user impact.
876 * R-64713 The VNF **SHOULD** support a software promotion methodology from dev/test -> pre-prod -> production in software, development & testing and operations. 
877
878 f. VNF Develop Steps
879 =======================
880
881 Aid to help the VNF provider to fasten the integration with the GVNFM, the
882 ONAP provides the VNF SDK tools, and the documents. In this charter,
883 the develop steps for VNF providers will be introduced.
884
885 First, using the VNF SDK tools to design the VNF with TOSCA model and
886 output the VNF TOSCA package. The VNF package can be validated, and
887 tested.
888
889 Second, the VNF provider should provide the VNF Rest API to integrate with
890 the GVNFM if needed. The VNF Rest API is aligned to the ETSI IFA
891 document.
892
893 Third, the TOSCA model supports the EPA feature.
894
895 Note:
896
897 1. The scripts to extend capacity to satisfy some special requirements.
898    In the R2, the scripts is not implemented fully, and will be provided
899    in the next release.
900
901 2. The monitoring and scale policy also be provide the next release.
902
903
904 .. [1]
905    Refer to NCSP’s Network Cloud specification
906
907 .. [2]
908    Not currently supported in ONAP release 1