summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-03-24Release policy/xacml-pdp2.2.0jenkins-releng16-16/+16
2020-03-23Point to released artifacts and use operationPamela Dragosh4-43/+43
Minor fix to use "operation" vs "recipe" in the guard request. parent, common and models are released. Issue-ID: POLICY-2378 Change-Id: I4c5005c08fef2e184ce2dccefdef0c2c2ea2dc08 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-20use shutdown to clear handle leakPamela Dragosh10-8/+111
The XACML github was released with a new method to allow context factories and PIP engines to release any handles before releasing the PDP engine. This review includes that artifact and adds tests to support it. In addition, added more tests to get code coverage over 90% for both PIPs in ONAP. Some cleanup in the Matchable types based on last review. Issue-ID: POLICY-2242 Change-Id: I312f06380ff4d2e16bcfd25b6d1f36ce5dd030e6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-19Merge "Re-factor matchable to reduce complexity"Jim Hahn24-542/+1641
2020-03-19Re-factor matchable to reduce complexityPamela Dragosh24-542/+1641
This solution is much cleaner than what is in StdMatchableTranslator. Over 90% code coverage on it - utilizes a callback to retrieve DataType and PolicyTypes. Support for missing timestamp TOSCA type. Also can do a better job differentiating between a property contained in the policy vs a schema. Changed StdMatchableTranslator to utilize these classes. And removed the old spaghetti. Added some JUnit coverage for ToscaPolicyTranslatorUtils. Removed duplicate code in the XACML Native Exception classes. Issue-ID: POLICY-2242 Change-Id: I18f898d9e65f6da28e3b27517d40f8d389de18a0 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-18renew policy certs till 03/17/2021jhh2-0/+0
Issue-ID: POLICY-2402 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I111f60b9ef60ee9524808653be020f94ae9db170
2020-03-16Missing support for PolicySetTypePamela Dragosh16-45/+178
Adds support for PolicySetType specifically for Native policies. When/If the other applications change to support they can easily do so. Adding some more code coverage for Native application and translator. Issue-ID: POLICY-2433 Change-Id: I463ca9f04928d759624a2176598b463057d386bd Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-14Add code coverage XacmlPolicyUtilsPamela Dragosh2-2/+33
Fix spelling error and add code cover >95% for the XacmlPolicyUtils. Issue-ID: POLICY-2242 Change-Id: I21f239e6bd42073ff84883d04f2b8bee1466b8e0 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-13Bump XacmlPdpApplicationManager code coveragePamela Dragosh2-3/+213
From under 50% to over 90%. Issue-ID: POLICY-2242 Change-Id: Ie061bddbdd2fcdb37bed608847449e5bc92173b5 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-12Better error handling for decisionsPamela Dragosh19-87/+78
Throw exceptions when requests cannot be created and return error information back. Consolidated some code to avoid sonar duplication issues. Companion review to https://gerrit.onap.org/r/c/policy/models/+/103548 Issue-ID: POLICY-2242 Change-Id: Ic873af933dab82e3aeef6335f55939666be20385 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-11Merge "Added support for application/xacml+json in native app"Pamela Dragosh5-25/+115
2020-03-11Added support for application/xacml+json in native appChenfei Gao5-25/+115
Issue-ID: POLICY-2182 Change-Id: I13246e08afdc2f5a380b5737c72851f271211d46 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2020-03-11Fix sonar logging bugsPamela Dragosh8-14/+14
These did not show up locally - sonarqube must have a new version or rules to pick these up. Issue-ID: POLICY-2242 Change-Id: I3df5aee84f696cde6b07c68913bbd55e95c8ba3b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-10Misc XACML code coveragePamela Dragosh11-215/+329
Removed duplicate code from operations history classes. added code coverage to other classes. cleared sonar in main for args Issue-ID: POLICY-2242 Change-Id: Ief548c96a180c132a3f17681d9cbc018c62e42ac Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-10Bump monitoring app code coveragePamela Dragosh3-33/+108
Cleaned up some code to remove unnecessary branches. Add more test cases specifically for query parameters. Coverage should be above 90% for this repo. Issue-ID: POLICY-2242 Change-Id: I20a75aacd75f9b8c87abb47e88b81ab8f2d30626 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-10Fix optimization bug add coverage plusPamela Dragosh13-87/+406
Fix a NPE bug and add more code coverage. Also is missing returning of context details for subscriber policies. This code is a bit ad-hoc and there is a separate JIRA POLICY-2147 to support re-factoring this codebase. Added scanning for advice to be returned. For optimization, because of the need for some changes in XACML github dependency, we are stuck with a little narly code to get it to fully work. POLICY-2417 is created to address this in Guilen. Upgraded to released XACML artifact - this has been tested locally for a few weeks with naming, guard and this optimzation code. It removed Jackson in lieu of Json, cleaned up some security fixes, upgraded dependencies, and added more code coverage. Issue-ID: POLICY-2066 Change-Id: I3cae99de265c815200ec2ce71e471338772bdb5b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-09Updates to support fixed guard policy typesPamela Dragosh23-1101/+1321
Because the new TOSCA compliant policy types support required fields, we can simplify the guard translator to utilize Match in the target vs the previous complicated Condition usage. Added test coverage to bump above 90% specifically for the guard and coordination code. Added a sonar exclusion for the test module. Issue-ID: POLICY-2244 Change-Id: Ia90d117bd7b86d28a2268fd5ab8315dce7bf0c12 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-05Added xacml.properties to packages for native appChenfei Gao4-28/+46
Issue-ID: POLICY-2182 Change-Id: Ife38e989aeda445c9fc2531bb92426f2d28bb818 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2020-03-01Point to docker 2.0.1Pamela Dragosh1-1/+1
policy/docker is released Issue-ID: POLICY-2378 Change-Id: I1ca967d48dca59d72d3490044ee499770d04f286 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-01Merge "Build XACML PDP support for native xacml policy type"Ram Krishna Verma30-12/+1480
2020-02-28Build XACML PDP support for native xacml policy typeChenfei Gao30-12/+1480
Added a new native application to the service loader framework Added a new translator for the native application Added custom serialization providers for xacml+json and xacml+xml Added a new endpoint for native xacml decision api Added a new api provider function to handle the native xacml api calls Added corresponding junit tests Issue-ID: POLICY-2182 Change-Id: I30fa4637612c324d543f9952386cf1a27a52d76c Signed-off-by: Chenfei Gao <cgao@research.att.com>
2020-02-28XACML pdp support for clc.pramod.jamkhedkar6-7/+366
Added policies for SON and PCI to support each blocking the other, with test cases and appropriate requests Issue-ID: POLICY-2163 Change-Id: I8153f9cd973a7cd6824fcd6c9787628a74148d46 Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
2020-02-24Upgrades to cucumberPamela Dragosh2-5/+5
To keep in step with policy/parent upgrades. Issue-ID: POLICY-2381 Change-Id: Ic25821bcf410e2fdf261abd155eb21030c509aa1 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-02-19Use datatype in matchable translatorPamela Dragosh7-219/+443
With the new changes to models/api, the full policy template will be retrieved along with inherited policy types and datatypes. Changed api caller to return tosca template instead of individual policy type so all policy types and data types are available. Changed stdmatchabletranslator to be able to flexibly go deep with list/map of datatypes of attributes. NOTE: This should be re-factored at a later date as its a bit messy. The naming application was used to test this code, but it was determined by the CCSDK team that they will not do filtering this release. Instead, switched to combined results policy type to return the full policy type. Issue-ID: POLICY-1740 Change-Id: Ieb4e46e7fb2c639a1155be3bc07f5587c4f7b09a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-02-13Add missing apps/naming directory for testingPamela Dragosh1-0/+31
Just clears a warning from main JUnit tests. Issue-ID: POLICY-1740 Change-Id: Ie9e5bb0463bf5827085a714a61a5d87021f37860 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-02-07Review intellij git ignored filesBruno Sakoto1-1/+4
Issue-ID: POLICY-2359 Signed-off-by: Bruno Sakoto <bruno.sakoto@bell.ca> Change-Id: Ie2203067494ee9f59c56fd9cfc7ed9023b797e44
2020-02-06Updating module names to resolve conflictsRam Krishna Verma7-10/+17
Issue-ID: POLICY-2355 Change-Id: I2933cf17fa790113eaaf8b9adc199c3b8fdc0e75 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-01-21Remove assembly warningPamela Dragosh1-10/+10
Use ${file.separator} Issue-ID: POLICY-2329 Change-Id: I1bca4f17ea562d656edc368aa8fc34d59206203d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-01-16Use alpine image for xacml-pdpJim Hahn1-3/+4
Issue-ID: POLICY-1586 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: I4ed9fa70dd95d061f0cd4c81822853b92387e2f6
2020-01-16Merge "Ensure one jacoco output file"Pamela Dragosh1-1/+5
2020-01-16Add missing property file to xacml tarballJim Hahn1-2/+11
When attempting to run the xacml-pdp CSIT, the log file contains a complain about a missing apps/naming/xacml.properties file; it was missing from the tarball. Issue-ID: POLICY-1586 Signed-off-by: Jim Hahn <jrh3@att.com> Change-Id: Ie967efb9b82b0aabe513df9ea213867faca06840
2020-01-16Ensure one jacoco output filePamela Dragosh1-1/+5
Sub-modules under sub-modules need to set the path to ensure a single jacoco-ut.exec file is produced and appended to. This doesn't seem to affect the results, but I'd like to be consistent. Issue-ID: POLICY-2321 Change-Id: Ia2223df55ce0f4be6e81fa61bf7df711e12ad760 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-01-15Update policy-xacml-pdp for java11 dockerJim Hahn2-3/+3
Issue-ID: POLICY-1586 Change-Id: I6ff51d191a506297cbe69161114c0721b59bb5d2 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-01-14Update sonar configurationPamela Dragosh3-73/+16
policy/parent now has the configuration don't need to evaluate packages and testsuites Issue-ID: POLICY-2321 Change-Id: I957e0d69845afa2fed5907ab3edd8dcf69596a0e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-01-14policy/xacml-pdp jdk11 upgradesHOCKLA9-24/+68
Issue-ID: POLICY-1596 Change-Id: I00164ea17eb9d547b45c01e5f46f7aaf0f9a25e2 Signed-off-by: HOCKLA <ah999m@att.com>
2020-01-10Point to policy/models release versionHOCKLA1-2/+2
Issue-ID: POLICY-1592 Change-Id: Ie53416e58b439f4dfec17eb260ece3326eaf53d3 Signed-off-by: HOCKLA <ah999m@att.com>
2020-01-09Enabling logback file to be loaded using oom configmapa.sreekumar1-2/+7
Change-Id: Icda10390a6ff3b6b524907562050658f3b283afd Issue-ID: POLICY-2308 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2020-01-06Removed supported policy types from Pdp-Status messageHOCKLA2-4/+0
Issue-ID: POLICY-2230 Change-Id: I363dc450b6d7aaf13696c50792cbea5a8d643413 Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-23Add optimization subscriber requestPamela Dragosh10-30/+515
Adding support for a preliminary request to pull subscriber details. The returned decision adds scope attributes for the original request. Fixed some checkstyle issues due to new checkstyle requirements. Issue-ID: POLICY-2066 Change-Id: Ief02d896ce33e4864bb20e9185b0d0f5eb254bfd Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-12-17Add SDNC naming applicationPamela Dragosh12-29/+600
Requires changes to StdMatchableTranslator to go deeper when searching for matchable attributes. NOTE: will re-visit the StdMatchableTranslator at a later date in order to support more robust Policy Types. And document best practices for defining matchables. Issue-ID: POLICY-1740 Change-Id: I291cf1c2e6eba0a677a3312dd11f0e56178a805b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-12-08Changes for optimization refactoringPamela Dragosh3-39/+45
Companion review to https://gerrit.onap.org/r/c/policy/models/+/99288 The policy types for optimization were refactored, so the xacml optimization application tests need to accomodate that. Issue-ID: POLICY-2066 Change-Id: Ibc03b0652e771175a2fa38f5c3a3d81c7e371147 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-12-06Point to release versions of policy/parent and policy/commonHOCKLA1-2/+2
Issue-ID: POLICY-1583 Change-Id: I0fb606c7ba7334a6826a1246c76fe1970b1f9a44 Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-02Clear some simple xacml sonarPamela Dragosh7-16/+34
Missing assertions in JUnit test cases. Use replace vs replaceAll Swapping arguments Issue-ID: POLICY-2079 Change-Id: I5accd462eab3d4f6b3321e375d4ba1084caf4b8c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-11-15Changed Xacml-pdp to report pdp group defined in XacmlPdpParameters config fileHOCKLA19-37/+144
Ignore the pdp group specified in the PdpUpdate message. Updated junits and test resources. Issue-ID: POLICY-2229 Change-Id: I0c7a33c45424cef6440b0837e1dd22a7487c5d44 Signed-off-by: HOCKLA <ah999m@att.com>
2019-11-14Merge "Added 'onap.monitoring.*' in list of supported policy types"Liam Fallon1-1/+8
2019-11-13Added 'onap.monitoring.*' in list of supported policy typesAli Hockla1-1/+8
Issue-ID: POLICY-2223 Change-Id: I1a7a1b4083ff74ca86455e1ab6ae7f96b8c04d35 Signed-off-by: Ali Hockla <ah999m@att.com>
2019-11-13Do not hardcode io.fabric8 pluginPamela Dragosh1-1/+0
policy/parent now has this defined Issue-ID: POLICY-2222 Change-Id: Ia054539a41f58dde26bf30d9d3b0f7f95da3b20d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-11-13Merge "Implement closest match algorithm"Jorge Hernandez15-153/+1281
2019-11-12Implement closest match algorithmPamela Dragosh15-153/+1281
Needed to add more obligations, which make it easier to scan through obligations and be able to pull information about the policy. Adding weight as an obligation for Optimization policies in order to implement "closest match" algorithm. Moved Obligation to a support class. Added JUnit code coverage on the translator classes. Split some methods up to reduce complexity via sonar. Issue-ID: POLICY-2066 Change-Id: Ibb13d2dc0a63ab2a6d585b0697a0c1d129fa8f7b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-11-12Added support to return status and error if pdp-x failed to load policyAli Hockla9-43/+98
Issue-ID: POLICY-2175 Change-Id: I32d2fe78846f58d6e700100dd523732817f1f04d Signed-off-by: Ali Hockla <ah999m@att.com>