blob: 19f774c655b43db6024537cb5fb8658cd10f4f83 [file] [log] [blame]
Pamela Dragosh0cc4c8f2018-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
4
5
6Architecture
7------------
Saryu Shah84e9e3b2017-09-29 15:53:37 +00008
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -05009.. contents::
Saryu Shah84e9e3b2017-09-29 15:53:37 +000010 :depth: 3
11
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -050012POLICY is a subsystem of ONAP that maintains, distributes, and operates on the
13set of rules that underlie ONAPs control, orchestration, and management
14functions.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000015
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -050016POLICY provides a logically centralized environment for the creation and
17management of policies, including conditional rules. This provides the
18capability to **create** and **validate** policies/rules, **identify
19overlaps**, **resolve conflicts**, and **derive** additional policies as
20needed. Policies are used to **control**, **influence**, and help **ensure
21compliance** with goals. Policies can support infrastructure, products and
22services, operation automation, and security. Users, including network and
23service designers, operations engineers, and security experts, can easily
24**create**, **change**, and **manage** policy rules from the POLICY Manager
25in the ONAP Portal.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000026
27The figure below represents the target POLICY Architecture.
28
Saryu Shah3eddd582017-10-12 22:03:55 +000029.. image:: PolicyTargetArchitecture.png
Saryu Shah1e2f68b2017-09-26 17:14:12 +000030
31
32The figure below represents the current POLICY Architecture.
33
Saryu Shah3eddd582017-10-12 22:03:55 +000034.. image:: PolicyR1Architecture.png
Saryu Shah1e2f68b2017-09-26 17:14:12 +000035
36
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -050037A policy is defined to create a condition, requirement, constraint, decision,
38or a need that must be provided, evaluated, maintained, and/or enforced. The
39policy is validated and corrected for any conflicts, and then placed in the
40appropriate repository, and made available for use by other subsystems and
41components. Alternately, some policies are directly distributed to policy
42decision engines such as Drools or XACML. In this manner, the constraints,
43decisions and actions to be taken are distributed.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000044
Saryu Shah1e2f68b2017-09-26 17:14:12 +000045
46System Architecture
47^^^^^^^^^^^^^^^^^^^
48
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -050049ONAP POLICY is composed of several subcomponents: the **Policy Administration
50Point (PAP)**, which offers interfaces for policy creation, and two types of
51**Policy Decision Point (PDP)**, each based on a specific rules technology.
52PDP-X is based on XACML technology and PDP-D is based on Drools technology.
53PDP-X is **stateless** and can be deployed as a resource pool of PDP-X servers.
54The number of servers can be grown to increase both capacity (horizontal
55scalability) and to increase availability. The PDP-D is **stateful**, as it
56utilizes Drools in its native, stateful way and transactions persist so long as
57the PDP-D is active. Persistent Drools sessions, state management, local and
58geo-redundancy have been deactivated for the initial release of ONAP POLICY
59and can be turned on in a future release. Additional instances of XACML/Drools
60engines and assigned roles/purposes may also be added in the future to
61provide a flexible, expandable policy capability.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000062
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -050063As illustrated in the Figure below, the POLICY components are supported by a
64number of interfaces and subsystems. The ONAP Portal provides a human
65interface for the creation, management and deployment of policies. It is a
66web-based system that utilizes internal APIs in the PAP.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000067
Saryu Shah3eddd582017-10-12 22:03:55 +000068.. image:: PolicyArchitectureDetails.png
Saryu Shah1e2f68b2017-09-26 17:14:12 +000069
70
Saryu Shah82b62ca2018-03-19 22:18:13 +000071.. image:: PolicyArchitectureDetailsKey.png
72
73
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -050074The PAP provides interfaces for the management of policies. It utilizes the
75XACML database to store policies, which are then distributed to the PDPs.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000076
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -050077The XACML and Drools databases are hosted in a MariaDB cluster. The XACML
78database is used to persist policies and policy dictionaries and provide a
79point for PDPs to retrieve policies. The XACML database also has tables used
80for node state management, detection of node failure and failover. As indicated
81above, the state management tables will only include entries for the PAP and
82PDP-X as the testing is not yet complete for the PDP-D.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000083
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -050084The PDP-X receives deployed policies and has interfaces to handle XACML policy
85transactions. These transactions are stateless and once complete, they are
86removed from memory. If a policy that is deployed to the PDP-X is of an
87operational nature it will contain Drools rules and Java executables. These
88artifacts are processed into Maven artifacts and pushed to the Maven
89repository. The PDP-D is then notified a new policy has been deployed.
Saryu Shah1e2f68b2017-09-26 17:14:12 +000090
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -050091When the PDP-D is notified a new policy has been deployed, it downloads it from
92the Maven repository and assigns it to an internal controller. This controller
93provides the external Closed Loop interfaces to the DMaaP message bus over
94which events and messages are exchanged with external systems. As events or
95messages arrive at the PDP-D, they are assigned to the appropriate controller
96and a Drools session is either created or retrieved from memory. The events,
97messages or facts are passed to the Drools session and the corresponding rule
98is fired, resulting in a change of internal session state and possibly actions
99taken in response to the rule processing. Response messages and requests are
100passed by the controller back over the DMaaP message bus to the appropriate
101system. The Drools session can also have timers and autonomous events. In a
102future release the PDP-D can enable the node state management and session
103persistence in the Drools DB.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000104
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500105Casablanca Additions to Architecture
106^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107The Casablanca Release introduced two new applications into the Architecture:
108The Policy SDC Distribution Application and the Apex PDP Engine. These are not
109depicted in the picture above.
110
111The Policy SDC Service Distribution application connects to SDC Service
112Distribution notification flow to automatically create policies. It is
113integrated with the current API. For more details on this applications
114documentation, please see :ref:`apex-doc` for more information.
115
116The Apex PDP Engine was ingested into the platform. This integration was as is
117and did not formalize the Apex engine into the current policy API creation and
118distribution flows. For more details on the Apex PDP Engine, please see
119:ref:`policy-ssd-doc` for more information.
120
121Further integration of these components is planned for Dublin release.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000122
123Policy Creation
124^^^^^^^^^^^^^^^
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500125The Policy Creation component of the Policy subsystem enables creation of new
126policies and modification of existing polices, both during the design phase
127and during runtime. Policy Creation is targeted to be integrated to a unified
128Service Design and Creation (SDC) environment.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000129
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500130A policy can be defined at a high level to create a condition, requirement,
131constraint, decision or a need that must be provided, evaluated, maintained,
132and/or enforced. A policy can also be defined at a lower or functional level,
133such as a machine-readable rule or software condition/assertion which enables
134actions to be taken based on a trigger or request, specific to particular
135selected conditions in effect at that time.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000136
137Some examples of types of policies are:
138
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500139* VNF placement rules governing where VNFs should be placed, including
140 affinity rules
141* Data and feed management what data to collect and when, retention periods,
142 and when to send alarms about issues
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000143* Access control who (or what) can have access to which data
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500144* Trigger conditions and actions what conditions are actionable, and what to
145 do under those conditions
146* Interactions how interactions between change management and
147 fault/performance management are handled (for example, should closed loops be
148 disabled during maintenance?)
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000149
150
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500151Policy Distribution To PDPs
152^^^^^^^^^^^^^^^^^^^^^^^^^^^
Saryu Shah1a307682017-09-29 00:31:12 +0000153
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500154After a policy has been initially created or an existing policy has been
155modified, the Policy Distribution Framework sends the policy from the
156repository to its points of use, which include Policy Decision Points (PDPs)
157and Policy enforcement points (DCAE, Controllers, etc), before the policy is
158actually needed.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000159
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500160The decisions and actions taken by the policy are distributed. Policies are
161distributed either in conjunction with installation packages (for example,
162related to service instantiation) or independently, if unrelated to a
163particular service. Some policies can be configured (e.g., configuring policy
164parameters within microservices), while other polices are delivered to policy
165engines such as XAMCL and Drools. With this methodology, policies will already
166be available when needed by a component, minimizing real-time requests to a
167central policy engine or PDP (Policy Decision Point). This improves scalability
168and reduces latency.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000169
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500170Separate notifications or events communicate the link or URL for a policy to
171the components that need it. Then, when a component needs the policy, it uses
172the link to fetch it. Components in some cases might also publish events
173indicating that they need new policies, eliciting a response with updated links
174or URLs. Also, in some cases, policies can indicate to components that they
175should subscribe to one or more policies, so that they receive automatic
176updates to those policies as they become available.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000177
178
179Policy Decision and Enforcement
180^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
181
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500182Run-time policy enforcement is performed by ONAP subsystems that are
183policy-enabled or can respond to commands from a policy-enabled element such as
184a PDP. For example, policy rules for data collection are enforced by the data
185collection functionality of DCAE. Analytic policy rules, identification of
186anomalous or abnormal conditions, and publication of events signaling detection
187of such conditions are enforced by DCAE analytic applications. Policy rules for
188associated remedial actions, or for further diagnostics, are enforced by the
189correct component in a control loop such as the MSO, a Controller, or DCAE.
190Policy engines such as XACML and Drools also enforce policies and can trigger
191other components as a result (for example, causing a controller to take
192specific actions specified by the policy). Additionally, some policies
193(“Guard Policies”) may enforce checks against decided actions.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000194
195
196Policy Unification and Organization
197^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500198Because the POLICY framework is expandable and multipurpose, it is likely to
199contain many types of policies which require organization according to some
200useful dimensions. Users can define attributes that specify the scope of
201policies, and these attributes can be extended to the policy-enabled functions
202and components. Useful policy organizing dimensions might include:
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000203
204* Policy type or category (taxonomical)
Saryu Shah1a307682017-09-29 00:31:12 +0000205* Policy life cycle
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000206* Policy ownership or administrative domain
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500207* Geographic area or location,
208* Technology type
209* Policy language and version
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000210* Security level or other security-related values, specifiers, or limiters
211
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500212Attributes can be specified for each dimension. In addition to being defined
213for individual policies themselves, these attributes can be used to define the
214scope of these additional additional policy-related functions:
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000215
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500216* Policy events or requests/triggers
217* Policy decision, enforcement, or other functions
218* Virtual functions of any type
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000219
Pamela Dragosh0cc4c8f2018-11-23 09:44:00 -0500220Policy writers can define attributes so that policy events or requests
221self-indicate their scope. The scope is then examined by a suitable function
222and subsequently acted upon accordingly. Policy decisions and enforcement
223functions can self-indicate their scope of decision-making, enforcement, or
224other capabilities. Virtual functions can be automatically attached to the
225appropriate POLICY Framework and distribution mechanisms.
Saryu Shah1e2f68b2017-09-26 17:14:12 +0000226
227
Saryu Shah82b62ca2018-03-19 22:18:13 +0000228.. image:: PolicySummary.png
229
Saryu Shah3198d6d2017-11-07 21:40:27 +0000230End of Document
231