Doc for sa pap; sa pdp-x, activestdby mgmt
[policy/engine.git] / docs / platform / swarch_pdpx.rst
1
2 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
3 .. http://creativecommons.org/licenses/by/4.0
4
5 ***************************
6 PDP-X Software Architecture
7 ***************************
8
9 .. contents::
10     :depth: 3
11
12 Overview
13 ^^^^^^^^
14 The PDP (Policy Decision Point) is the main decision engine of POLICY. The decisions taken are based on the policy set which has been assigned by PAP.  **PDP** is a part of **XACML** family and, hence, referred to as **PDP-X**. The PDP-X receives XACML requests and returns XACML responses which are either Permit, Deny or Indeterminate.  The software contains wrapper code to wrap the internal XACML structures with a request and response structure that is commonly used in ONAP.
15
16 PDP Application container
17 ^^^^^^^^^^^^^^^^^^^^^^^^^
18 - PDP Application containers run as standalone containers which when requested for decision give appropriate responses. 
19 - If configured with PAP it would be able to modify the PDP's policy set. In absence of PAP the PDP would utilize its existing set of policies to take decisions. 
20 - In order to scale up and handle multiple requests, Multiple PDP's can be started and used to serve the requests. 
21
22 Core Software
23 ^^^^^^^^^^^^^
24 - The core software of PDP-X is the divided into two projects:
25     - ONAP-PDP (core PDP decision components) 
26     - ONAP-PDP-REST (Rest wrapper around PDP to support communications with PAP and take in requests from clients)
27  
28 - ONAP-PDP-REST is the project which has the wrapper code and hosts the Policy APIs, which also acts as a proxy for Policy administration related APIs. 
29 - ONAP-PDP-REST project comprises of:
30     - Servlet code implementation which handles the requests from PAP's and legacy XACML requests from clients. 
31     - Spring REST controller implementation handles the Policy API's that are widely used within ONAP.  Swagger documentation is tied with the API code which are available with the PDP container when executed.
32     - Notification server which sends notification to the connected clients via Websocket, DMaaP or UEB. Policy Internal components use Websocket as the notification medium. 
33     - Runs a thread to communicate with PAP about any updates in policy configurations.
34  
35 - ONAP-PDP project is an extension of XACML implementation of PDP which contains the core XACML function and definition which are used in the policy decision process. 
36 - Tomcat 8 is used as the web server to host PDP-X. 
37 - File system and properties file are used to store policy information so that PDP can recover in case of failure. 
38 - In memory cache is used by PDP to store policy information after startup in order to serve requests quickly. 
39
40 Package Overview
41 ^^^^^^^^^^^^^^^^
42 - ONAP-PDP-REST package structure is discussed here:
43     - rest is the main package which contains servlet code. 
44     - controller package consists of the spring rest controller which handles the API requests from clients. 
45     - service package consists of the service layer code for different policy API services. 
46     - notifications package consists of the notification service that is offered by PDP-X. 
47     - config package consists of the spring and swagger configurations.
48  
49 - Extensions
50     - Any new addition to the service can be added to the service layer and appropriate API call can be added to the controller code. 
51
52 Configuration
53 ^^^^^^^^^^^^^
54 - All configurations related to PDP are present in xacml.pdp.properties file. This can be changed if required in the docker setup or policy installation setup.
55
56
57 .. seealso:: The PDP implementation references the XACML AT&T https://github.com/att/XACML project. 
58
59
60 End of Document
61
62 .. SSNote: Wiki page ref. https://wiki.onap.org/display/DW/PDP-X+Software+Architecture
63
64