blob: 2eb3e88f08a2851c1929a7ba1cfc56af6726834e [file] [log] [blame]
Pamela Dragosh1bf45492018-11-23 09:44:00 -05001.. This work is licensed under a
2.. Creative Commons Attribution 4.0 International License.
Pamela Dragosh5ed4e852017-09-22 12:26:16 -04003.. http://creativecommons.org/licenses/by/4.0
LF Jenkins CI7a34e0d2020-04-08 20:22:03 +00004.. _architecture:
Pamela Dragosh5ed4e852017-09-22 12:26:16 -04005
6
7Architecture
8------------
Saryu Shah84e9e3b2017-09-29 15:53:37 +00009
Pamela Dragosh1bf45492018-11-23 09:44:00 -050010.. contents::
Saryu Shah84e9e3b2017-09-29 15:53:37 +000011 :depth: 3
12
Pamela Dragosh1bf45492018-11-23 09:44:00 -050013POLICY is a subsystem of ONAP that maintains, distributes, and operates on the
LF Jenkins CI7a34e0d2020-04-08 20:22:03 +000014set of rules that underlie ONAP's control, orchestration, and management
Pamela Dragosh1bf45492018-11-23 09:44:00 -050015functions.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000016
Pamela Dragosh1bf45492018-11-23 09:44:00 -050017POLICY provides a logically centralized environment for the creation and
18management of policies, including conditional rules. This provides the
19capability to **create** and **validate** policies/rules, **identify
20overlaps**, **resolve conflicts**, and **derive** additional policies as
21needed. Policies are used to **control**, **influence**, and help **ensure
22compliance** with goals. Policies can support infrastructure, products and
23services, operation automation, and security. Users, including network and
24service designers, operations engineers, and security experts, can easily
25**create**, **change**, and **manage** policy rules from the POLICY Manager
26in the ONAP Portal.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000027
28The figure below represents the target POLICY Architecture.
29
Saryu Shah3eddd582017-10-12 22:03:55 +000030.. image:: PolicyTargetArchitecture.png
Saryu Shah1e2f68b2017-09-26 17:14:12 +000031
32
33The figure below represents the current POLICY Architecture.
34
Saryu Shah3eddd582017-10-12 22:03:55 +000035.. image:: PolicyR1Architecture.png
Saryu Shah1e2f68b2017-09-26 17:14:12 +000036
37
Pamela Dragosh1bf45492018-11-23 09:44:00 -050038A policy is defined to create a condition, requirement, constraint, decision,
39or a need that must be provided, evaluated, maintained, and/or enforced. The
40policy is validated and corrected for any conflicts, and then placed in the
41appropriate repository, and made available for use by other subsystems and
42components. Alternately, some policies are directly distributed to policy
43decision engines such as Drools or XACML. In this manner, the constraints,
44decisions and actions to be taken are distributed.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000045
Saryu Shah1e2f68b2017-09-26 17:14:12 +000046
47System Architecture
48^^^^^^^^^^^^^^^^^^^
49
Pamela Dragosh1bf45492018-11-23 09:44:00 -050050ONAP POLICY is composed of several subcomponents: the **Policy Administration
51Point (PAP)**, which offers interfaces for policy creation, and two types of
52**Policy Decision Point (PDP)**, each based on a specific rules technology.
53PDP-X is based on XACML technology and PDP-D is based on Drools technology.
54PDP-X is **stateless** and can be deployed as a resource pool of PDP-X servers.
55The number of servers can be grown to increase both capacity (horizontal
56scalability) and to increase availability. The PDP-D is **stateful**, as it
57utilizes Drools in its native, stateful way and transactions persist so long as
58the PDP-D is active. Persistent Drools sessions, state management, local and
59geo-redundancy have been deactivated for the initial release of ONAP POLICY
60and can be turned on in a future release. Additional instances of XACML/Drools
61engines and assigned roles/purposes may also be added in the future to
62provide a flexible, expandable policy capability.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000063
Pamela Dragosh1bf45492018-11-23 09:44:00 -050064As illustrated in the Figure below, the POLICY components are supported by a
65number of interfaces and subsystems. The ONAP Portal provides a human
66interface for the creation, management and deployment of policies. It is a
67web-based system that utilizes internal APIs in the PAP.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000068
Saryu Shah3eddd582017-10-12 22:03:55 +000069.. image:: PolicyArchitectureDetails.png
Saryu Shah1e2f68b2017-09-26 17:14:12 +000070
71
Saryu Shah82b62ca2018-03-19 22:18:13 +000072.. image:: PolicyArchitectureDetailsKey.png
73
74
Pamela Dragosh1bf45492018-11-23 09:44:00 -050075The PAP provides interfaces for the management of policies. It utilizes the
76XACML database to store policies, which are then distributed to the PDPs.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000077
Pamela Dragosh1bf45492018-11-23 09:44:00 -050078The XACML and Drools databases are hosted in a MariaDB cluster. The XACML
79database is used to persist policies and policy dictionaries and provide a
80point for PDPs to retrieve policies. The XACML database also has tables used
81for node state management, detection of node failure and failover. As indicated
82above, the state management tables will only include entries for the PAP and
83PDP-X as the testing is not yet complete for the PDP-D.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000084
Pamela Dragosh1bf45492018-11-23 09:44:00 -050085The PDP-X receives deployed policies and has interfaces to handle XACML policy
86transactions. These transactions are stateless and once complete, they are
87removed from memory. If a policy that is deployed to the PDP-X is of an
88operational nature it will contain Drools rules and Java executables. These
89artifacts are processed into Maven artifacts and pushed to the Maven
90repository. The PDP-D is then notified a new policy has been deployed.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000091
Pamela Dragosh1bf45492018-11-23 09:44:00 -050092When the PDP-D is notified a new policy has been deployed, it downloads it from
93the Maven repository and assigns it to an internal controller. This controller
94provides the external Closed Loop interfaces to the DMaaP message bus over
95which events and messages are exchanged with external systems. As events or
96messages arrive at the PDP-D, they are assigned to the appropriate controller
97and a Drools session is either created or retrieved from memory. The events,
98messages or facts are passed to the Drools session and the corresponding rule
99is fired, resulting in a change of internal session state and possibly actions
100taken in response to the rule processing. Response messages and requests are
101passed by the controller back over the DMaaP message bus to the appropriate
102system. The Drools session can also have timers and autonomous events. In a
103future release the PDP-D can enable the node state management and session
104persistence in the Drools DB.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000105
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500106Casablanca Additions to Architecture
107^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
108The Casablanca Release introduced two new applications into the Architecture:
109The Policy SDC Distribution Application and the Apex PDP Engine. These are not
110depicted in the picture above.
111
112The Policy SDC Service Distribution application connects to SDC Service
113Distribution notification flow to automatically create policies. It is
114integrated with the current API. For more details on this applications
115documentation, please see :ref:`apex-doc` for more information.
116
117The Apex PDP Engine was ingested into the platform. This integration was as is
118and did not formalize the Apex engine into the current policy API creation and
119distribution flows. For more details on the Apex PDP Engine, please see
120:ref:`policy-ssd-doc` for more information.
121
122Further integration of these components is planned for Dublin release.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000123
124Policy Creation
125^^^^^^^^^^^^^^^
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500126The Policy Creation component of the Policy subsystem enables creation of new
127policies and modification of existing polices, both during the design phase
128and during runtime. Policy Creation is targeted to be integrated to a unified
129Service Design and Creation (SDC) environment.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000130
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500131A policy can be defined at a high level to create a condition, requirement,
132constraint, decision or a need that must be provided, evaluated, maintained,
133and/or enforced. A policy can also be defined at a lower or functional level,
134such as a machine-readable rule or software condition/assertion which enables
135actions to be taken based on a trigger or request, specific to particular
136selected conditions in effect at that time.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000137
138Some examples of types of policies are:
139
LF Jenkins CI7a34e0d2020-04-08 20:22:03 +0000140* VNF placement - rules governing where VNFs should be placed, including
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500141 affinity rules
LF Jenkins CI7a34e0d2020-04-08 20:22:03 +0000142* Data and feed management - what data to collect and when, retention periods,
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500143 and when to send alarms about issues
LF Jenkins CI7a34e0d2020-04-08 20:22:03 +0000144* Access control - who (or what) can have access to which data
145* Trigger conditions and actions - what conditions are actionable, and what to
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500146 do under those conditions
LF Jenkins CI7a34e0d2020-04-08 20:22:03 +0000147* Interactions - how interactions between change management and
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500148 fault/performance management are handled (for example, should closed loops be
149 disabled during maintenance?)
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000150
151
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500152Policy Distribution To PDPs
153^^^^^^^^^^^^^^^^^^^^^^^^^^^
Saryu Shah1a307682017-09-29 00:31:12 +0000154
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500155After a policy has been initially created or an existing policy has been
156modified, the Policy Distribution Framework sends the policy from the
157repository to its points of use, which include Policy Decision Points (PDPs)
158and Policy enforcement points (DCAE, Controllers, etc), before the policy is
159actually needed.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000160
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500161The decisions and actions taken by the policy are distributed. Policies are
162distributed either in conjunction with installation packages (for example,
163related to service instantiation) or independently, if unrelated to a
164particular service. Some policies can be configured (e.g., configuring policy
165parameters within microservices), while other polices are delivered to policy
166engines such as XAMCL and Drools. With this methodology, policies will already
167be available when needed by a component, minimizing real-time requests to a
168central policy engine or PDP (Policy Decision Point). This improves scalability
169and reduces latency.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000170
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500171Separate notifications or events communicate the link or URL for a policy to
172the components that need it. Then, when a component needs the policy, it uses
173the link to fetch it. Components in some cases might also publish events
174indicating that they need new policies, eliciting a response with updated links
175or URLs. Also, in some cases, policies can indicate to components that they
176should subscribe to one or more policies, so that they receive automatic
177updates to those policies as they become available.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000178
179
180Policy Decision and Enforcement
181^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
182
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500183Run-time policy enforcement is performed by ONAP subsystems that are
184policy-enabled or can respond to commands from a policy-enabled element such as
185a PDP. For example, policy rules for data collection are enforced by the data
186collection functionality of DCAE. Analytic policy rules, identification of
187anomalous or abnormal conditions, and publication of events signaling detection
188of such conditions are enforced by DCAE analytic applications. Policy rules for
189associated remedial actions, or for further diagnostics, are enforced by the
190correct component in a control loop such as the MSO, a Controller, or DCAE.
191Policy engines such as XACML and Drools also enforce policies and can trigger
192other components as a result (for example, causing a controller to take
193specific actions specified by the policy). Additionally, some policies
LF Jenkins CI7a34e0d2020-04-08 20:22:03 +0000194("Guard Policies") may enforce checks against decided actions.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000195
196
197Policy Unification and Organization
198^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500199Because the POLICY framework is expandable and multipurpose, it is likely to
200contain many types of policies which require organization according to some
201useful dimensions. Users can define attributes that specify the scope of
202policies, and these attributes can be extended to the policy-enabled functions
203and components. Useful policy organizing dimensions might include:
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000204
205* Policy type or category (taxonomical)
Saryu Shah1a307682017-09-29 00:31:12 +0000206* Policy life cycle
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000207* Policy ownership or administrative domain
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500208* Geographic area or location,
209* Technology type
210* Policy language and version
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000211* Security level or other security-related values, specifiers, or limiters
212
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500213Attributes can be specified for each dimension. In addition to being defined
214for individual policies themselves, these attributes can be used to define the
215scope of these additional additional policy-related functions:
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000216
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500217* Policy events or requests/triggers
218* Policy decision, enforcement, or other functions
219* Virtual functions of any type
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000220
Pamela Dragosh1bf45492018-11-23 09:44:00 -0500221Policy writers can define attributes so that policy events or requests
222self-indicate their scope. The scope is then examined by a suitable function
223and subsequently acted upon accordingly. Policy decisions and enforcement
224functions can self-indicate their scope of decision-making, enforcement, or
225other capabilities. Virtual functions can be automatically attached to the
226appropriate POLICY Framework and distribution mechanisms.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000227
228
Saryu Shah82b62ca2018-03-19 22:18:13 +0000229.. image:: PolicySummary.png
230
Saryu Shah3198d6d2017-11-07 21:40:27 +0000231End of Document
232