policy/xacml-pdp.git
4 years agoRemove topic.properties and incorporate into overall config file for xacml 13/90913/1
a.sreekumar [Thu, 4 Jul 2019 14:14:39 +0000 (14:14 +0000)]
Remove topic.properties and incorporate into overall config file for xacml

Change-Id: I3be6248db65041f5d9b7acfcf0fcd2f49d9d70f8
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
4 years agoFix xacml decision policy-type 53/90853/3
Pamela Dragosh [Wed, 3 Jul 2019 18:29:37 +0000 (14:29 -0400)]
Fix xacml decision policy-type

Wrong attribute id was being used. Added info logging statement
to assist in debugging. Added JUnit to support this.

Issue-ID: POLICY-1843
Change-Id: I11d83574f91751804a45281d2e0c9cd3150e30eb
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUse ToStringTester from utils-test 36/90736/1
ramverma [Mon, 1 Jul 2019 15:48:07 +0000 (15:48 +0000)]
Use ToStringTester from utils-test

Changing ToStringTester from utils to utils-test.
Bumping the policy/common & policy/models version.

Change-Id: Idf665bc92345c445f483ebfb190d39c7019280aa
Issue-ID: POLICY-1746
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
4 years agoBump xacml-pdp to 2.1.1-SNAPSHOT 79/90679/1
Pamela Dragosh [Fri, 28 Jun 2019 17:54:59 +0000 (13:54 -0400)]
Bump xacml-pdp to 2.1.1-SNAPSHOT

Released 2.1.0

Issue-ID: POLICY-1737
Change-Id: Ieb3015e9373a9a71a71f2811cbc6db9315d58109
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoRemove POLICY_PDPX_HOME in policy-pdpx.sh and Dockerfile 95/90495/2
shaoqiu [Fri, 28 Jun 2019 05:03:09 +0000 (05:03 +0000)]
Remove POLICY_PDPX_HOME in policy-pdpx.sh and Dockerfile

Update the policy-pdpx.sh and Dockerfile according to the comments in
commit: https://gerrit.onap.org/r/c/policy/api/+/89972

Issue-ID: POLICY-1702
Change-Id: Id46c108f5893d3e81e2038d9d5063b9f8a5eb5ee
Signed-off-by: shaoqiu <tim.huang@est.tech>
4 years agoFix xacml-pdp latest tag 79/90479/2 2.1.0
Pamela Dragosh [Tue, 25 Jun 2019 19:00:24 +0000 (15:00 -0400)]
Fix xacml-pdp latest tag

Eliminating the patch - using Rashmi's changes.

Issue-ID: POLICY-1737
Change-Id: Iaacd198aeca5daef71e4356f7446e23b9c65d9ce
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Signed-off-by: pdragosh <pdragosh@research.att.com>
4 years agoUpgrade to release common & models 99/90399/1
Pamela Dragosh [Mon, 24 Jun 2019 15:48:59 +0000 (11:48 -0400)]
Upgrade to release common & models

Released common 1.5.0 and models 2.1.0

Issue-ID: POLICY-1737
Change-Id: Ia5bf6965c7c85b1de74b90b1d4fd179cac01bdea
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Create simple way to populate guard table"
Jorge Hernandez [Fri, 21 Jun 2019 15:12:53 +0000 (15:12 +0000)]
Merge "Create simple way to populate guard table"

4 years agoMerge "Upgrade to release 3.0.0 parent"
Jim Hahn [Thu, 20 Jun 2019 21:05:03 +0000 (21:05 +0000)]
Merge "Upgrade to release 3.0.0 parent"

4 years agoUpgrade to release 3.0.0 parent 53/90253/1
Pamela Dragosh [Thu, 20 Jun 2019 20:19:45 +0000 (16:19 -0400)]
Upgrade to release 3.0.0 parent

Policy/parent released

Issue-ID: POLICY-1737
Change-Id: I8814c011b923286b714ab5e97fb3665d58c9f40c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoCreate simple way to populate guard table 71/90171/5
Michael Mokry [Wed, 19 Jun 2019 15:21:18 +0000 (10:21 -0500)]
Create simple way to populate guard table

Created a script that takes in the guard type as argument and executes
the sql in a .sql file to insert data

Made changes based on review comments:
1) Moved it all to the testsuite package
2) Modified the script to remove the guard type argument and
replaced it with a parameter for the filename
3) added exit 1 where applicable
        4) renamed sql file to be more general and avoid a specific use
case.
Change-Id: I89a2fa81153449b6716d9d215aa2af56748212b4
Issue-ID: POLICY-1786
Signed-off-by: Michael Mokry <michael.mokry@att.com>
4 years agoUpdate totalPoliciesCount statistic 80/90180/1
Jim Hahn [Wed, 19 Jun 2019 18:24:31 +0000 (14:24 -0400)]
Update totalPoliciesCount statistic

Modified the code to set the policy count statistic at start-up
and whenever the policy list is changed.
Also fixed a couple of checkstyle issues in guard.

Change-Id: I92017fe64cd5d19c36908347193cc21d183f051e
Issue-ID: POLICY-1844
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoMerge "Create the operationshistory table from pdpx"
Pamela Dragosh [Wed, 19 Jun 2019 12:14:33 +0000 (12:14 +0000)]
Merge "Create the operationshistory table from pdpx"

4 years agoCreate the operationshistory table from pdpx 06/89206/8
Michael Mokry [Mon, 3 Jun 2019 20:13:03 +0000 (15:13 -0500)]
Create the operationshistory table from pdpx

Added create table sql statement to the policy-pdpx.sh to create the operationshistory table during
xacml-pdp installation
Added changes per Jorge's review
1) Added sql file with create table statement
2) Added bash script to execute sql file
3) modified policy-pdpx.sh to execute new bash script
4) other changes

Change-Id: Iaae63dc65db1ff9181de12928e072f04c87e50e7
Issue-ID: POLICY-1827
Signed-off-by: Michael Mokry <michael.mokry@att.com>
4 years agoChange getCanonicalName() to getName() in xacml-pdp 13/90013/1
Jim Hahn [Mon, 17 Jun 2019 14:30:20 +0000 (10:30 -0400)]
Change getCanonicalName() to getName() in xacml-pdp

Per javadocs, getName() should generally be used instead of
Class.getCanonicalName(). This change only applies to classes; it
does not apply to File objects.

Change-Id: Id9ad514a7ba10e7cdbf292bba2b07135bdbd2572
Issue-ID: POLICY-1646
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoFix xacml docker chmod 71/89371/2
Jim Hahn [Wed, 5 Jun 2019 13:06:36 +0000 (09:06 -0400)]
Fix xacml docker chmod

The chmod in the docker builder for my local VM does not appear to
support the "+x" style options. Modified the xacml docker
file to use "755" instead.

Change-Id: I6cba12e62d84f626e03b3aee33d50d71faa602c4
Issue-ID: POLICY-1829
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoBump xacml-pdp to version 2.1.0 34/88934/1
Jim Hahn [Thu, 30 May 2019 16:34:09 +0000 (12:34 -0400)]
Bump xacml-pdp to version 2.1.0

Change-Id: I231fa4c077db75d426278f6f718876bb2c76a8db
Issue-ID: POLICY-1747
Signed-off-by: Jim Hahn <jrh3@att.com>
4 years agoBump to 2.0.2-SNAPSHOT 12/88412/1
Pamela Dragosh [Thu, 23 May 2019 20:43:33 +0000 (16:43 -0400)]
Bump to 2.0.2-SNAPSHOT

Released 2.0.1

Issue-ID: POLICY-1700
Change-Id: Idc1d8602b276c9ad3199c57723dd053fb1dd48a3
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoUpdate INFO.yaml to add Jim and Ram 60/88260/1 2.0.1 4.0.0-ONAP
liamfallon [Wed, 22 May 2019 14:42:24 +0000 (14:42 +0000)]
Update INFO.yaml to add Jim and Ram

Issue-ID: POLICY-1775
Change-Id: Id8da2edad9bbc5e47162b14eaea713ca66accc19
Signed-off-by: liamfallon <liam.fallon@est.tech>
4 years agoMerge "Add SON Handler monitoring policy type"
Jorge Hernandez [Fri, 17 May 2019 13:47:52 +0000 (13:47 +0000)]
Merge "Add SON Handler monitoring policy type"

4 years agoAdd SON Handler monitoring policy type 84/87984/2
Pamela Dragosh [Fri, 17 May 2019 12:28:24 +0000 (08:28 -0400)]
Add SON Handler monitoring policy type

Missing for this use case is the monitoring policy type
for the 5G OOF PCI use case.

Updated name to follow convention.

Issue-ID: POLICY-1779
Change-Id: I88c6c235288b9090161338695a2a55e5b1900b98
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoMerge "Change to fix SQLInvalidAuthorizationSpecException"
Pamela Dragosh [Thu, 16 May 2019 14:37:44 +0000 (14:37 +0000)]
Merge "Change to fix SQLInvalidAuthorizationSpecException"

4 years agoBump snapshot 2.0.1 82/87882/1
Pamela Dragosh [Thu, 16 May 2019 14:27:37 +0000 (10:27 -0400)]
Bump snapshot 2.0.1

Released so bumping to next patch

Issue-ID: POLICY-1630
Change-Id: Ib91063848e1a757b0a251052ce8ec61dace85d88
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
4 years agoChange to fix SQLInvalidAuthorizationSpecException 93/87793/6
Michael Mokry [Wed, 15 May 2019 17:54:25 +0000 (12:54 -0500)]
Change to fix SQLInvalidAuthorizationSpecException

Added code to decode password and set property

Change-Id: Ied806fcceeaa44d53ca39af636da620fb824e41d
Issue-ID: POLICY-1760
Signed-off-by: Michael Mokry <michael.mokry@att.com>
4 years agoUpgrade to release policy/models 28/87728/1 2.0.0
Pamela Dragosh [Wed, 15 May 2019 00:49:13 +0000 (20:49 -0400)]
Upgrade to release policy/models

Version 2.0.0

Issue-ID: POLICY-1630
Change-Id: I6255f19fe204e54dc6d52eae875071a946ebca8b
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoChanges to fix db connection issues in xacml-pdp 90/87390/4
Michael Mokry [Thu, 9 May 2019 19:50:20 +0000 (14:50 -0500)]
Changes to fix db connection issues in xacml-pdp

Added code to copy the oom xacml.properties file to the proper directory
Made change based on Jorge's comments

Change-Id: I0c46a01ca4407fa4d18391ca9ad81d37a0f46969
Issue-ID: POLICY-1760
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoUpgrade policy/parent & policy/common in xacml-pdp 78/87578/1
ramverma [Mon, 13 May 2019 16:38:13 +0000 (16:38 +0000)]
Upgrade policy/parent & policy/common in xacml-pdp

Change-Id: I5e3f41ed4f69eeab41a852f2372f43a81890b46f
Issue-ID: POLICY-1630
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
5 years agoChange debug to info logs 36/87236/1
Pamela Dragosh [Wed, 8 May 2019 12:24:05 +0000 (08:24 -0400)]
Change debug to info logs

A lot of debug should really be info for logs. To assist
with debugging but also really need to be there for auditing.

Issue-ID: POLICY-1730
Change-Id: I5c41e056775c24797d257504e9c6495fa3127e45
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoDecision should return dictionary 21/86921/1
Pamela Dragosh [Fri, 3 May 2019 17:58:18 +0000 (13:58 -0400)]
Decision should return dictionary

When scanning obligation, should return a map of
policy id as dictionary.

Issue-ID: POLICY-1735
Change-Id: I46375d761e04c3cc8bd2d428a9d843b3f24478ca
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoChanges to support previous review comments 26/86726/2
Michael Mokry [Wed, 1 May 2019 15:40:03 +0000 (10:40 -0500)]
Changes to support previous review comments

Added new generated request id when sending terminate message
changed to send clone of PdpStatus

Change-Id: Ia60469c8a62d3c2eff63fd592984cade4760b2bc
Issue-ID: POLICY-1645
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoAdded code to send Termination message to PAP 62/86662/5
Michael Mokry [Tue, 30 Apr 2019 18:04:12 +0000 (13:04 -0500)]
Added code to send Termination message to PAP

Fixed checkstyle issues
Made changes to include PdpGroup and PdpSubGroup in termination message

Change-Id: I772404adbbe9be18001554616eb0c935317bdaba
Issue-ID: POLICY-1645
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoRefactor xacml-pdp to remove various statics 33/86333/7 3.0.2-ONAP
jh7358 [Fri, 26 Apr 2019 00:15:28 +0000 (20:15 -0400)]
Refactor xacml-pdp to remove various statics

Refactored xacml-pdp to eliminate a number of static fields.
Modified junit tests to allocate new ports for each test.
Also modified XacmlPolicyUtilsTest to convert path names to match
the file system so that the junit will work in OSs other than
linux.
Replaced logback.xml with a copy of the one from PAP to resolve
some issues.
Don't print entire message when discarding, as each PDP receives
messages for ALL PDPs.
Remove shutdown class from Main - just invoke this.shutdown()
directly.
Added additional comments to CommonRest.  Also modified port test
parameters.

Change-Id: Id8bf7216cdcb59a1a2cb4cb957fa44f640315cfe
Issue-ID: POLICY-1645
Signed-off-by: Jim Hahn <jrh3@att.com>
5 years agoHardcode monitoring policy types 19/86419/1
Pamela Dragosh [Fri, 26 Apr 2019 17:09:45 +0000 (13:09 -0400)]
Hardcode monitoring policy types

For Dublin, hard code these so they are available to
pdp group.

Issue-ID: POLICY-1705
Change-Id: I705f2fc01864458e3d8ef569d24e51e0d565aed6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFix nullpointer issue in pdpx heartbeat 06/86406/2
Michael Mokry [Fri, 26 Apr 2019 14:20:12 +0000 (09:20 -0500)]
Fix nullpointer issue in pdpx heartbeat

1. Added a null check against XacmlPdpActivator.getCurrent() method to
fix the following exception

Exception in thread "Timer-0" java.lang.NullPointerException

Change-Id: Ia6c7efc2bd317dd52e9e89dd4f9f59d9d66d0857
Issue-ID: POLICY-1703
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoRebase image on policy-common-alpine 69/83469/2
Dmitry Puzikov [Tue, 26 Mar 2019 08:24:50 +0000 (09:24 +0100)]
Rebase image on policy-common-alpine

Issue-ID: INT-1003
Change-Id: I671156732399a8cd6f4a68e29f35112b8aa7657f
Signed-off-by: Dmitry Puzikov <dmitry.puzikov@tieto.com>
5 years agoFix xacml pdp registration issue 83/85983/5
Michael Mokry [Mon, 22 Apr 2019 16:36:20 +0000 (11:36 -0500)]
Fix xacml pdp registration issue

1. Added appliesTo() check to state change and PDP update listeners.
2. Made changes to record the extracted pdpUpdate values.
3. Removed pdpState instance variable from heartbeat publisher
4. Split XacmlPdpMessage.updateInternalStatus() into two methods to handle
PdpStateChange and PdpUpdate messages separately
5. Cleaned up unused imports

Change-Id: I76c68d925e46d475c086bd5b86851ea44d821b28
Issue-ID: POLICY-1673
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoMerge "One year cert with new component names"
Pamela Dragosh [Tue, 16 Apr 2019 13:35:14 +0000 (13:35 +0000)]
Merge "One year cert with new component names"

5 years agoOne year cert with new component names 85/85385/1
jhh [Mon, 15 Apr 2019 23:23:55 +0000 (18:23 -0500)]
One year cert with new component names

Change-Id: I3c3a9174b2d90b4139f9ab4e805f9a87bb6d5d39
Issue-ID: POLICY-1580
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
5 years agoFix a couple of sonar issues one blocker 54/85354/2
Michael Mokry [Mon, 15 Apr 2019 17:47:46 +0000 (12:47 -0500)]
Fix a couple of  sonar issues one blocker

1. fixed nullpointer blocker issue in CoordinationGuardTranslator.java
2. fixed "log or rethrow exception" critical issue
3. throw exceptions instead of returning null values

Change-Id: I2d567fe566c6f761ec2699016c4a868f203c9a01
Issue-ID: POLICY-1451
Signed-off-by: Michael Mokry <michael.mokry@att.com>
Signed-off-by: Joshua Reich <jreich@research.att.com>
5 years agoMerge "DmaaP topic properties change for xacml-pdp"
Jorge Hernandez [Mon, 15 Apr 2019 15:36:03 +0000 (15:36 +0000)]
Merge "DmaaP topic properties change for xacml-pdp"

5 years agoDmaaP topic properties change for xacml-pdp 29/85329/1
Michael Mokry [Mon, 15 Apr 2019 14:48:34 +0000 (09:48 -0500)]
DmaaP topic properties change for xacml-pdp

Updated the topic.properties file with proper dmaap properties and
values

Change-Id: I691374eeed28c1f6235956a3a27c04e860411c4f
Issue-ID: POLICY-1451
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoFix incorrect policy with time-in-range 61/85261/5
Pamela Dragosh [Sat, 13 Apr 2019 15:42:55 +0000 (11:42 -0400)]
Fix incorrect policy with time-in-range

Changed policies to use Z vs -05:00 for timezone since
we cannot guarantee the timezone the VM's run in. The
test should be generalized.

Fixed a sonar issue in the test I was using to debug this.

Issue-ID: POLICY-1639
Change-Id: If3e52d199527a8a7e11c5fa994beb8fb886c93a6
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoAdd statistics and sonar cleanup and blacklist 23/85223/9
Pamela Dragosh [Fri, 12 Apr 2019 15:03:44 +0000 (11:03 -0400)]
Add statistics and sonar cleanup and blacklist

* Adding in the statistics for decisions and errors.
* Cleaned up sonar issues and added code coverage.
* Sped up JUnit tests
* Fix JUnit issues with not finding application path
* Fix TestDecision not finding persistence.xml
* Fix for lingering statistics from previous runs. That
needs to be addressed at a later time.
* Changed persistence to use properties for configuration
of database rather than hard coding the persistence.xml
* Fix for Josh's comment to use else-if
* Changed to use apache Pair
* Added blacklist guard policy

Issue-ID: POLICY-1440
Change-Id: I56af8c3dcc82463f7381f1eaea7f1440b76200bd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "Add Control Loop Coordination policy."
Pamela Dragosh [Fri, 12 Apr 2019 00:42:26 +0000 (00:42 +0000)]
Merge "Add Control Loop Coordination policy."

5 years agoAdd Control Loop Coordination policy. 49/84549/9
Joshua Reich [Mon, 8 Apr 2019 16:41:36 +0000 (09:41 -0700)]
Add Control Loop Coordination policy.

Refactor code to support multiple pip engines.
Add pip engine for outcome.
Modify LegacyGuardTranslator to use coordination translator's
convertPolicy function when processing coordination guard.
This version of convertPolicy intentionally uses string
replacement on template-like xacml coordination guard to
enable future support for API-based creation of new coordination
guard types.
Bug fixes and code cleanup.

* Unused imports, sonar problems.
* Consolidation of getAttribute method
* Only use TypedQuery for Pips

Issue-ID: POLICY-1471
Change-Id: I4e9365b7f23bee96cf438dad44feda97c65f6ecc
Signed-off-by: Joshua Reich <jreich@research.att.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "Changes to handle PDPX deploy/undeploy"
Pamela Dragosh [Thu, 11 Apr 2019 23:08:28 +0000 (23:08 +0000)]
Merge "Changes to handle PDPX deploy/undeploy"

5 years agoChanges to handle PDPX deploy/undeploy 01/85101/5
Michael Mokry [Thu, 11 Apr 2019 17:19:50 +0000 (12:19 -0500)]
Changes to handle PDPX deploy/undeploy

Added changes to handle incoming udpate for deploying or undeploying the
policies by comparing both sets.  STill need to add support for removing
the policies and getting the deployed ToscaPolicyIdentifiers for
PdpStatus response.

* PLD - added functionality to unload policies in the applications and
* PLD - added map of loaded policies

* Mike - made change to address Jim's and Joshua's comments
* Mike - Made change to use mapLoadedPolicies to get deployed policies
from the applications
* Mike - made change to assembly.xml to add support for apps directory.

Change-Id: If7d119197171b68b905b7fd0f2b5be6cf6f609e7
Issue-ID: POLICY-1451
Signed-off-by: Michael Mokry <michael.mokry@att.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoThe final fix for xacml-pdp CSIT failure 17/85117/1
Michael Mokry [Thu, 11 Apr 2019 19:22:37 +0000 (14:22 -0500)]
The final fix for xacml-pdp CSIT failure

Bilal found the issue in assembly.xml, we needed to add properties to
the <include>

Change-Id: Icb84db76b8a4ab240e3ad9c562334dab116a118b
Issue-ID: POLICY-1449
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoFixing install script that is failing CSIT 68/85068/1
Michael Mokry [Thu, 11 Apr 2019 14:35:19 +0000 (09:35 -0500)]
Fixing install script that is failing CSIT

1.) Made a change to address syntax error in script

Change-Id: I671e533c7ba09f0a75f871f1a47b42cbe8a91b37
Issue-ID: POLICY-1449
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoMerge "XACML PDP DmaaP Deploy/UnDeploy Function"
Pamela Dragosh [Thu, 11 Apr 2019 11:26:42 +0000 (11:26 +0000)]
Merge "XACML PDP DmaaP Deploy/UnDeploy Function"

5 years agoFix the xacml-pdp CSIT failures 41/85041/1
Michael Mokry [Thu, 11 Apr 2019 11:07:17 +0000 (06:07 -0500)]
Fix the xacml-pdp CSIT failures

Looks like CSIT uses docker to install xacml-pdp so a change in OOM is
not necessary to fix this problem.  I took a look at the PAP script and
found some small differenences and made those changes in xacml-pdp.  I
have not been able to successfully test this as I spent all night trying
to figure out how to execute it in my VM with and without arguments. I
added some debugger code in as well to get more information in the logs
and see if the property file is actually being found.

Change-Id: Ib6ca95edab4483aa4e65efca73a9f58342cc1ec0
Issue-ID: POLICY-1449
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoXACML PDP DmaaP Deploy/UnDeploy Function 01/84901/9
Michael Mokry [Wed, 10 Apr 2019 14:53:44 +0000 (09:53 -0500)]
XACML PDP DmaaP Deploy/UnDeploy Function

1. Added PDPUpdate listener
2. Added PDPUpdate Publisher
3. Added code to handle PdpUpdate messages and load policies being
deployed
4. Modified Activator to register listener
5. Provided placeholder code to get policies from pdpx for return
PdpStatus response to the PAP
6. Other minor modifications
7. Fix XacmlPdpApplicationManager to only load policy if supports
policy type.
8. Checkstyle fixes
9. Updated applications to support loadPolicy(ToscaPolicy) and
all the translators, JUnit tests.
10. Consolidated some duplicate code in the applications. Can probably
do more in that area.
11. Fixed bug in Properties not really having a copy constructor.

Change-Id: Ic29ad426061cbdb79c1339314667bb8ff8decb88
Issue-ID: POLICY-1451
Signed-off-by: Michael Mokry <michael.mokry@att.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "Test decision from main entry"
Jorge Hernandez [Wed, 10 Apr 2019 14:20:47 +0000 (14:20 +0000)]
Merge "Test decision from main entry"

5 years agoTest decision from main entry 23/84523/7
Pamela Dragosh [Mon, 8 Apr 2019 12:47:38 +0000 (08:47 -0400)]
Test decision from main entry

Tests a decision upon startup. This also updates the use of
ToscaPolicyTypeIdentifier for all the applications.

Very basic packaging for applications and their properties.

Added cleaning of unused imports to remove sonar issues.

Added production persistence.xml file to guard application.
Not sure if we need a copy in the application/common resource
directory.

Issue-ID: POLICY-1440
Change-Id: If96eef5a9e0a7c6cc5461c0bdb6f0cd708cc41bb
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoAdds basic performance tests for XACML PDP 65/84565/1
Bilal A [Mon, 8 Apr 2019 20:53:43 +0000 (16:53 -0400)]
Adds basic performance tests for XACML PDP

Includes
1) Basic health check and stats performance test
2) Analysis script
3) Fixed https protocol in stability test

Change-Id: I78a6daf3cae40daf4779ced515283abb19743e4b
Issue-ID: POLICY-1461
Signed-off-by: Bilal A <bilal@research.att.com>
5 years agoXacml PDP Register/Unregister Changes 69/83969/9
Michael Mokry [Tue, 2 Apr 2019 12:33:28 +0000 (07:33 -0500)]
Xacml PDP Register/Unregister Changes

1) Modified activator
- Extend and use ServiceManagerContainer
- add topicSink and topicSource properties to TopicEndpoint
manager
2) Added PAP registration class
3) Added PDP message formatting class
4) Added PDP State Change listener to listen for state change and send
back PDP Status.. then start heartbeat if not started already
5) Added Heartbeat publisher code to send heartbeat status on periodic
interval
6) UPDATE: Made changes to satisfy Jim's review comments
7) Added code to XacmlPdpApplicationManager to get supportedPolicyTypes
8) UPDATE: more changes to satisfy Jim's latest review comments
9) Fixed the failed Junits causing build failure
10) Made change to use NetworkUtil for getting PdpStatus name value per
Jorge's comment

Still need to in separate review:
1) Write Junits for new code

Registration and heartbeat flow as I understand it:
1) PDP starts and sends initial status to PAP with PASSIVE state
2) PDP listens for State Change from the PAP
3) PDP sends updated Active state to the AP
4) PDP begins sending periodic heartbeat status to the PAP

Change-Id: Iafa06ae3f1ee195c7da3710a12d9c095c5413ec2
Issue-ID: POLICY-1449
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoTie XACML REST Decision 12/84012/6
Pamela Dragosh [Tue, 2 Apr 2019 21:48:38 +0000 (14:48 -0700)]
Tie XACML REST Decision

Ties the decision API to the applications. Adds a static
application manager class to manager the applications.

Added applicationPath as a parameter to be supported in
the Json parameter group.

Issue-ID: POLICY-1440
Change-Id: I43cb44b3e308aadcf258fd987f3b53944c2edb72
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoAdding guard PIP 60/83460/10
Pamela Dragosh [Wed, 27 Mar 2019 10:40:18 +0000 (06:40 -0400)]
Adding guard PIP

Adding the PIP support into the translator to setup the count
attribute as an attribute generated by PIP and not sent by
calling application.

Added JUnit for OperationsHistoryPipEngine.

Issue-ID: POLICY-1471
Change-Id: I71773ee8ea0e6c02873506d973a604899383d4b5
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFix comments and add debugging 65/83365/2
Pamela Dragosh [Tue, 26 Mar 2019 15:19:12 +0000 (11:19 -0400)]
Fix comments and add debugging

Added some fixes from previous review and some debugging
for the JUnits. The merge failed in the JUnits and I
could not see why. I think the wrong request was sent, but
I'm not sure why the JUnits woulnd't fail locally or in
the verify job. We need to do a lot of testing with these
policy translations.

Also fixed the guard policies to use correct VF Module Create
recipe.

Issue-ID: POLICY-1273
Change-Id: I813bcca92436d356c43da5613eab7ba7746a4e3d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoAdding optimization application finish guard 62/83062/6
Pamela Dragosh [Fri, 22 Mar 2019 18:12:52 +0000 (14:12 -0400)]
Adding optimization application finish guard

Created Optimization application and created a translator
for it. The translator makes an assumption that OOF wants
to query on policyScope and policyType properties.

Rearranged some of the test code for re-usability.

Guard policies are now creating for frequency limiter
and min max. Probably could use some clean up.

Upgraded to xacml 2.0.1 to include a fix for handling
null attribute values.

Added some code to test missing values.

Issue-ID: POLICY-1273
Change-Id: Ia3dbfa992bbe0cbb5aa294c38aa2aff430a3230a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoReorder xacml 2.0.0 loading 90/82990/1
Pamela Dragosh [Thu, 21 Mar 2019 23:45:45 +0000 (19:45 -0400)]
Reorder xacml 2.0.0 loading

This dependency should only be in the applications area.
Reordering may help ensure that the correct jackson is loaded
for glassfish.

Issue-ID: POLICY-1609
Change-Id: I727a5266204e8e2e5c35b7a326baff854b55e523
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoMerge "Use Policy Translator abstract class"
Jorge Hernandez [Thu, 21 Mar 2019 13:03:49 +0000 (13:03 +0000)]
Merge "Use Policy Translator abstract class"

5 years agoMerge "Fix sonar issues xacml pdp"
Jorge Hernandez [Wed, 20 Mar 2019 13:44:28 +0000 (13:44 +0000)]
Merge "Fix sonar issues xacml pdp"

5 years agoUse Policy Translator abstract class 16/82716/3
Pamela Dragosh [Tue, 19 Mar 2019 20:08:58 +0000 (16:08 -0400)]
Use Policy Translator abstract class

Instead of applications implementing the converter, use a
protected abstract class that implements common code.

Newer applications could re-use existing application, and
shared code can be put into the base translator class.

Fixed sonar issue and changed guard xml.

Removed Converter and made translator into an implementation
class that is an object in the Application Provider.

Issue-ID: POLICY-1273
Change-Id: I9b48cbcdaf80d6d2ef19ef53e4b7cd4830e7e7b2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoExclude jackson-annotations 48/82748/1
Pamela Dragosh [Wed, 20 Mar 2019 01:34:44 +0000 (21:34 -0400)]
Exclude jackson-annotations

Jackson 2.9.8 databind references annotations 2.9.0.

This seems to break jersey which needs an earlier
annotations version.

I think we can safely exclude Xacml for now.

Issue-ID: POLICY-1609
Change-Id: I60b76e742412ffe36c83e58863902b35b23148fb
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFix sonar issues xacml pdp 98/82698/1
Pamela Dragosh [Tue, 19 Mar 2019 17:45:15 +0000 (13:45 -0400)]
Fix sonar issues xacml pdp

Fixed some small sonar issues. Some of the others will be
taken care of when we implement things.

Issue-ID: POLICY-1602
Change-Id: I745962feaf00904c39b2e80e00bcc565f51dc8fd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoStarted with test decision JSON objects. 73/82473/8
Pamela Dragosh [Fri, 15 Mar 2019 18:30:00 +0000 (14:30 -0400)]
Started with test decision JSON objects.

Added new Policy Finder Factory that ONAP will use and
got the code working with new policy/models (see other
review which will have to be merged first).

Added some new conversion methods to convert from a
Xacml request to an Onap request.

Added some property methods for XACML Properties objects
and JUnit tests.

Started filling in some Guard application details and
combining code.

Issue-ID: POLICY-1602
Change-Id: I5235b74f3b036dcf05779b655a03ac290d594354
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoAdd NSS libraries to images 33/82533/1
Jorge Hernandez [Sun, 17 Mar 2019 05:27:53 +0000 (00:27 -0500)]
Add NSS libraries to images

Alpine OpenJDK was updated 2 days ago (3/14), this
upgrade seems to break java applications that depend on libnss*.so
OS libraries, which seem are no longer installed with the jdk

Change-Id: Iac67f7ff2e74f36369e8ce7b8ef91a940ae5c4d8
Issue-ID: POLICY-1604
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
5 years agoUpdate INFO.yaml file 98/82498/1
Jessica Wagantall [Fri, 15 Mar 2019 20:54:23 +0000 (13:54 -0700)]
Update INFO.yaml file

Update missing information blocks and
indentation to pass verify job.

Change-Id: I302d33ba73fd583989d6a0f8f0b460329f83537e
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
5 years agoMonitoring policy creation foundation 90/81890/16
Pamela Dragosh [Sat, 9 Mar 2019 16:48:44 +0000 (11:48 -0500)]
Monitoring policy creation foundation

Upgrde to xacml v2.0.0 release artifact.

Some re-arrangement of classes. New class to support a
common dictionary among the monitoring applications. I
may move it to a common under the main since some of the
values are shareable.

Created application service provider, so the XACML
main knows what policy types are pre-loaded and can
report them back to the PAP.

struggled with cucumber, which does not create
TemporaryFolder although the documentation says its
supported.

Added a new Policy Finder specific to ONAP which does
quicker job to load policies.

Issue-ID: POLICY-1273
Change-Id: I4af15a64da3b42d48f29809710421b1649625adc
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoAdded HTTPS and CADI/AAF Support for PDP-X 63/79263/7
Michael Mokry [Wed, 27 Feb 2019 13:42:20 +0000 (07:42 -0600)]
Added HTTPS and CADI/AAF Support for PDP-X

- Yay I found the mysterious https issue that caused the junit to fail.
Please don't laugh, it was a typo :)

- Made changes per review comments
1) Added builder class for RestServer constructor
2) removed some try/catch blocks in junit
3) Other minor changes

- More changes per review comments
- Added changes per Ram's review comments (not lombrok yet)
- Made changes for ONAP API CVS guidelines

Change-Id: Ie1a6225459b3ce235cd73828ccddec04c690f5fd
Issue-ID: POLICY-1436
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoMerge "Use Alpine as base docker image in xacml-pdp"
Jorge Hernandez [Thu, 7 Mar 2019 15:19:46 +0000 (15:19 +0000)]
Merge "Use Alpine as base docker image in xacml-pdp"

5 years agoMerge "Adds basic stability tests for XACML PDP"
Jorge Hernandez [Thu, 7 Mar 2019 15:07:49 +0000 (15:07 +0000)]
Merge "Adds basic stability tests for XACML PDP"

5 years agoUse Alpine as base docker image in xacml-pdp 73/79873/1
shaoqiu [Thu, 7 Mar 2019 05:39:37 +0000 (05:39 +0000)]
Use Alpine as base docker image in xacml-pdp

Issue-ID: POLICY-1554
Change-Id: Ia80f01317f2f224e55ddc18139ac49ca19883cd1
Signed-off-by: shaoqiu <tim.huang@est.tech>
5 years agoAdds basic stability tests for XACML PDP 27/79727/1
Bilal A [Tue, 5 Mar 2019 18:18:49 +0000 (13:18 -0500)]
Adds basic stability tests for XACML PDP

Includes
1) Basic health check test
2) Statistics API test

Change-Id: I41156007dfb70702822d50f5bb32dbaae36bc610
Issue-ID: POLICY-1461
Signed-off-by: Bilal A <bilal@research.att.com>
5 years agoFoundation for Monitoring Decisions 77/79577/4
Pamela Dragosh [Mon, 4 Mar 2019 00:01:08 +0000 (19:01 -0500)]
Foundation for Monitoring Decisions

This sets the foundation for building the XACML PDP
engine that supports Decisions for onap.Monitoring
policy types.

Mostly stubbed code for now, will most likely get
re-arranged.

Put in the cucumber basics, but no implementation yet.

Need policy/parent to be merged before this will pass.

* Fixed checkstyle license date

Issue-ID: POLICY-1273
Change-Id: Ifb455065316fd3ec0a025b5833b334ee72f65adc
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoChange package name to fix docker image issue 75/79475/1
Michael Mokry [Fri, 1 Mar 2019 19:22:19 +0000 (13:22 -0600)]
Change package name to fix docker image issue

Change package name used in the policy-pdpx.sh for
org.onap.policy.pdpx.main.startstop.Main

Change-Id: Ibfc68827f8675ae447aa2797c8a0a42fc6c502d5
Issue-ID: POLICY-1436
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoFix pdp-x docker image build problems 11/79411/1
Jorge Hernandez [Fri, 1 Mar 2019 00:08:54 +0000 (18:08 -0600)]
Fix pdp-x docker image build problems

Change-Id: I4023e4b5474b6ebb712179d134616f723e75432d
Issue-ID: POLICY-1436
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
5 years agoUpdate INFO.yaml Liam's email 75/79375/1
Pamela Dragosh [Thu, 28 Feb 2019 16:07:08 +0000 (11:07 -0500)]
Update INFO.yaml Liam's email

est.tech

Issue-ID: POLICY-1556
Change-Id: Ic7098aba510ddb4c0673bc1525710540578b5174
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoStubbed endpoints for Decision API and swagger 70/78870/4
Michael Mokry [Wed, 20 Feb 2019 16:13:53 +0000 (10:13 -0600)]
Stubbed endpoints for Decision API and swagger

Includes:
1) Decision API endpoint with Swagger annotations
2) Provider class for Decision added to new provider package
3) Moved other provider classes to provider package
4) Decision model class added to new model package

Note: This is just a draft and still needs a lot of work, please do not
merge.  Thanks in advance for the review comments.

Issue-ID: POLICY-1516
Change-Id: Id7414b6cb3eee1b877a0c11521babbef4938a68f
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoPackage and Create Docker Image for Xacml PDP 10/78410/1
Michael Mokry [Wed, 13 Feb 2019 16:34:48 +0000 (10:34 -0600)]
Package and Create Docker Image for Xacml PDP

- Creates docker image of policy xacml-pdp
- Creates zip package of policy xacml-pdp
- Also committed changes from Healthcheck/Statitics review that were
allowed to be deferred

Change-Id: Ia5fb72be05a30a341692453fe4ff32c7b112e861
Issue-ID: POLICY-1436
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoPDPX Healthcheck/Statistic RESTful API entry point 74/77674/9
Michael Mokry [Thu, 31 Jan 2019 19:16:55 +0000 (13:16 -0600)]
PDPX Healthcheck/Statistic RESTful API entry point

Includes:
- Basic code structure modeled after policy distribution
- Code implementation to support Healthcheck/Statistics RESTful API entry point
- JUnits
- Fixed Checkstyles issues and added some missing statistics classes and
Junits
- Made changes per Jim's comments
- Made more changes per Jim's comments
> made gson field static
> using AssertThatThrownBy() mechanic from AssertJ
> added setup and teardown to correctly terminate activator in
Junit
- Made corrections to the statitics endpoint and junits

Change-Id: Iad40272beceff8a0f99966440e96a84fc2043b12
Issue-ID: POLICY-1436
Signed-off-by: Michael Mokry <michael.mokry@att.com>
5 years agoUpgrade policy/parent 2.0.0 66/71266/1
Pamela Dragosh [Thu, 25 Oct 2018 17:59:35 +0000 (13:59 -0400)]
Upgrade policy/parent 2.0.0

Released parent v2.0.0

Issue-ID: POLICY-1213
Change-Id: I196fb14a1371e62cdf3ace7e40efd10a514c539a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoSetup checkstyle and coverage 69/68869/4
Pamela Dragosh [Tue, 25 Sep 2018 13:27:15 +0000 (09:27 -0400)]
Setup checkstyle and coverage

Setting this project up for future work.

Added checkstyle and jacoco coverage declarations.

Removed redundant version.

Added entries to gitignore for idea and checkstyle.

Issue-ID: POLICY-1136
Change-Id: I2068165a66c1dda29c2c4da5cf3c807b866912c2
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoFix warnings and artifactID name 17/55417/1
Pamela Dragosh [Tue, 26 Jun 2018 14:26:58 +0000 (10:26 -0400)]
Fix warnings and artifactID name

The extra version tag generates an eclipse warning.
Changing the artifactID so that it prepends the policy-

Issue-ID: POLICY-846
Change-Id: Ifa9d71e3b975a5e9790ea8c487b0aa51caf8bd8a
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoModify license header xacml-pdp 07/48707/1
Pamela Dragosh [Wed, 23 May 2018 15:47:11 +0000 (11:47 -0400)]
Modify license header xacml-pdp

The license isn't quite right, fixing it.

Issue-ID: POLICY-846
Change-Id: Ia517804850c359a533abcae131c44ea5fc24707e
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
5 years agoAdd pom and version files 69/48669/1
Pamela Dragosh [Wed, 23 May 2018 12:38:45 +0000 (08:38 -0400)]
Add pom and version files

Issue-ID: POLICY-846
Change-Id: I84aaaa0b39da007f36ba56089032555b802b61d4
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoInitialize repo 35/45435/1
Pamela Dragosh [Tue, 1 May 2018 12:50:32 +0000 (08:50 -0400)]
Initialize repo

Start with .gitreview, .gitignore, README, license

Change-Id: I980ad11811d3c31902e86bcd3adbc2ec5ce47b63
Issue-ID: POLICY-771
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoAdd INFO.yaml file 77/45377/2
Jessica Wagantall [Tue, 1 May 2018 03:08:50 +0000 (20:08 -0700)]
Add INFO.yaml file

Add INFO.yaml to list:
- Project description
- Properties
- PTL information
- Meeting information
- Committer information

Change-Id: Ifebd3eb6bfe699a1f4e4bdb74c604907f9c6afa9
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
6 years agoInitial empty repository
Jessica Wagantall [Tue, 1 May 2018 02:00:25 +0000 (02:00 +0000)]
Initial empty repository