aboutsummaryrefslogtreecommitdiffstats
path: root/applications
AgeCommit message (Collapse)AuthorFilesLines
2019-07-23Add more junit coverage to xacml-pdp (round #2)Jim Hahn9-81/+932
Also removed unused methods. Also extracted constants. Change-Id: I8d2cff05a365f145f2080369e9ea52d08be7e508 Issue-ID: POLICY-1772 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-23Add junit coverage to xacml-pdpJim Hahn2-48/+192
Change-Id: I9b59dcd27705e40c424b6a76420e0395adbe44bb Issue-ID: POLICY-1772 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-10Added comment to checkstyle suppressionJim Hahn1-5/+11
Change-Id: I7c7c89e8b4367bbc2ea7a97e403eb253e955a9a5 Issue-ID: POLICY-1074 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-03Fix xacml decision policy-typePamela Dragosh3-9/+27
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>
2019-06-28Bump xacml-pdp to 2.1.1-SNAPSHOTPamela Dragosh5-5/+5
Released 2.1.0 Issue-ID: POLICY-1737 Change-Id: Ieb3015e9373a9a71a71f2811cbc6db9315d58109 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-06-19Update totalPoliciesCount statisticJim Hahn3-0/+3
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>
2019-05-30Bump xacml-pdp to version 2.1.0Jim Hahn5-5/+5
Change-Id: I231fa4c077db75d426278f6f718876bb2c76a8db Issue-ID: POLICY-1747 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-05-23Bump to 2.0.2-SNAPSHOTPamela Dragosh5-5/+5
Released 2.0.1 Issue-ID: POLICY-1700 Change-Id: Idc1d8602b276c9ad3199c57723dd053fb1dd48a3 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-17Merge "Add SON Handler monitoring policy type"Jorge Hernandez1-0/+3
2019-05-17Add SON Handler monitoring policy typePamela Dragosh1-0/+3
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>
2019-05-16Merge "Change to fix SQLInvalidAuthorizationSpecException"Pamela Dragosh3-1/+19
2019-05-16Bump snapshot 2.0.1Pamela Dragosh5-5/+5
Released so bumping to next patch Issue-ID: POLICY-1630 Change-Id: Ib91063848e1a757b0a251052ce8ec61dace85d88 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-16Change to fix SQLInvalidAuthorizationSpecExceptionMichael Mokry3-1/+19
Added code to decode password and set property Change-Id: Ied806fcceeaa44d53ca39af636da620fb824e41d Issue-ID: POLICY-1760 Signed-off-by: Michael Mokry <michael.mokry@att.com>
2019-05-08Change debug to info logsPamela Dragosh7-38/+38
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>
2019-05-03Decision should return dictionaryPamela Dragosh2-31/+39
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>
2019-04-26Refactor xacml-pdp to remove various statics3.0.2-ONAPjh73581-1/+12
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>
2019-04-26Hardcode monitoring policy typesPamela Dragosh1-1/+9
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>
2019-04-15Fix a couple of sonar issues one blockerMichael Mokry2-17/+15
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>
2019-04-15Fix incorrect policy with time-in-rangePamela Dragosh4-7/+8
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>
2019-04-12Add statistics and sonar cleanup and blacklistPamela Dragosh29-204/+269
* 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>
2019-04-12Merge "Add Control Loop Coordination policy."Pamela Dragosh31-466/+1591
2019-04-11Add Control Loop Coordination policy.Joshua Reich31-467/+1591
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>
2019-04-11Changes to handle PDPX deploy/undeployMichael Mokry6-11/+185
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>
2019-04-10XACML PDP DmaaP Deploy/UnDeploy FunctionMichael Mokry18-802/+430
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>
2019-04-10Test decision from main entryPamela Dragosh16-129/+223
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>
2019-04-01Adding guard PIPPamela Dragosh18-96/+918
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>
2019-03-26Fix comments and add debuggingPamela Dragosh4-52/+57
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>
2019-03-25Adding optimization application finish guardPamela Dragosh30-582/+2837
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>
2019-03-21Reorder xacml 2.0.0 loadingPamela Dragosh1-0/+5
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>
2019-03-20Use Policy Translator abstract classPamela Dragosh13-592/+844
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>
2019-03-19Fix sonar issues xacml pdpPamela Dragosh4-8/+10
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>
2019-03-18Started with test decision JSON objects.Pamela Dragosh20-425/+1274
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>
2019-03-15Monitoring policy creation foundationPamela Dragosh37-44/+2640
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>
2019-03-04Foundation for Monitoring DecisionsPamela Dragosh11-0/+519
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>