aboutsummaryrefslogtreecommitdiffstats
path: root/applications
AgeCommit message (Collapse)AuthorFilesLines
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-14policy/xacml-pdp jdk11 upgradesHOCKLA5-9/+20
Issue-ID: POLICY-1596 Change-Id: I00164ea17eb9d547b45c01e5f46f7aaf0f9a25e2 Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-23Add optimization subscriber requestPamela Dragosh9-28/+512
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 Dragosh10-29/+564
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-02Clear some simple xacml sonarPamela Dragosh2-4/+7
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-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-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 Hockla3-8/+7
Issue-ID: POLICY-2175 Change-Id: I32d2fe78846f58d6e700100dd523732817f1f04d Signed-off-by: Ali Hockla <ah999m@att.com>
2019-11-04More examples of optimization policies and cleanupPamela Dragosh3-129/+214
Fixed a couple of sonar issues - log exception and do not nest more 3 if-else-try. Cleaned up the JUnit test to make debugging a bit easier. Added more examples for testing optimization tests. Moved the target back into the Policy and kept the Condition on the Rule. Works exactly the same, just a bit cleaner and one less rule to deal with. Issue-ID: POLICY-2066 Change-Id: Ife28dc2ce959dcf1fb8ca72061ebc5dca862a7f4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-11-01Add common Jersey versionliamfallon1-1/+3
Add a common version of Jersey for all Policy Framework components. Issue-ID: POLICY-2209 Change-Id: I0d61800b423bffbe584e29621a87068eef4c1e6c Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-10-28Optimization improvements and test casesPamela Dragosh6-60/+586
* StdBaseTranslator added helpful support methods and can now add obligations to either rule, policy or policy sets. * StdMatchablePolicyRequest improved to support optional policy-type as part of the request to refine the output results. * Added more tests to ensure that the decision is returning the appropriate results. * Added more Javadoc for code. * Added some sonar fix for either log or throw exception. Issue-ID: POLICY-2066 Change-Id: I90d6d90c2cdbb627e96cfce1d2632b2439a1e477 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-24Merge "Fix sonar and coverage"Liam Fallon2-30/+115
2019-10-24Fix sonar and coveragePamela Dragosh2-30/+115
Turns out cyclomatic complexity is there in one method. The other JUnits in the applications cover the rest of the class, when time permits I will add that in there for completeness. Issue-ID: POLICY-2066 Change-Id: I31fd43625883bd569d4078bbd684554f6f3fbf53 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-24Merge "Removed type_version from abbreviated Monitor decision results"Pamela Dragosh1-0/+1
2019-10-23Removed type_version from abbreviated Monitor decision resultsHOCKLA1-0/+1
Issue-ID: POLICY-2126 Change-Id: I2a4907bb61651d9cfe2793e69404d9ccbe41ccd8 Signed-off-by: HOCKLA <ah999m@att.com>
2019-10-23Consolidate common translatable code some sonarPamela Dragosh13-340/+225
There is duplicate code for some common translation of policy decision responses and for scanning obligations. Removed some TODO items (left others because I want to look at them more closely). Stored System.lineSeparator into a static var so that I can remove some unnecessary ifs. There's still one left that I am not worried about. Gson as a static variable. Issue-ID: POLICY-2066 Change-Id: I9c8162d5ad1c5f884be347dd94631fa74ca76f85 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-21Use yaml policies in models-examplesPamela Dragosh6-260/+20
Now that yaml is supported, use those policies that are stored in the models-examples that are preloaded into the api. Fixed a minor checkstyle issue. Not sure why it was missed. Issue-ID: POLICY-2066 Change-Id: I2f4384a310bfa818555de5dacb477daf82fac6de Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-18Modified Decision API to accept query parameters and abbreviate Monitor ↵HOCKLA8-22/+79
decision results Issue-ID: POLICY-2126 Change-Id: I18d50a8746ede792ec9507ab98125383c5914ba1 Signed-off-by: HOCKLA <ah999m@att.com>
2019-10-09Sonar xacml-pdp issuesPamela Dragosh4-87/+101
Either log or re-throw exception Refactor to not nest more than 3 statements Refactor to throw at most one exception Move variable to comply with Java Code conventions String literal on LHS Issue-ID: POLICY-2079 Change-Id: Iac33623ef4694cf38c4a69c8f0b9040d8439998e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-10-02Removed TestUtils from common and into a 'xacml-test' projectAli Hockla9-93/+23
Issue-ID: POLICY-2090 Change-Id: Id688e305f878f56e374e6bd9047d9d6c75fbe0c6 Signed-off-by: Ali Hockla <ah999m@att.com>
2019-09-13Upgrade to Tosca derivedFrom fixPamela Dragosh4-76/+71
Upgrade to models fix for derivedFrom() append of 0.0.0 And some sonar fixes for: Exceptions should be either logged or rethrown but not both Preconditions" and logging arguments should not require evaluation Reduced cognitive complexity Issue-ID: POLICY-2079 Change-Id: Ied8630020e8a737c33b1484db953df133c89398f Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-09-12Add yaml support to xacml-pdp rest serverJim Hahn5-25/+17
Also modified code to use StandardYamlCoder. Change-Id: I0596c8b054339ac68ef8c4250cd25b9ff88d47e4 Issue-ID: POLICY-2085 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-10Bump versions for xacml-pdp masterJim Hahn5-5/+5
Change-Id: I6ca46b3bbc9529c6fef5a332b224a4de69e3cdef Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-09-09Integrate using Policy Type to find MatchablePamela Dragosh22-166/+1171
Utilize's Jim's helper class to pull from API policy types definitions so that Xacml PDP can determine which properties are "matchable". Override initialize to set translator parameters. Utilize the metadata section of ToscaProperties to store the matchable field. Updated Matchable Request to be dynamic with respect to the incoming resource attributes. Stored the policy types as JSON. Issue-ID: POLICY-1899 Change-Id: Icff3605495b0a34ebfcdfa54346095ce2d8468a4 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-08-30Get policy type from policy-apiJim Hahn6-0/+430
Added a class to retrieve a policy type from the policy-api. Updated property files to include parameters that are needed to configure it. Updates per review comments: - change PolicyApi to PolicyApiCaller - use HttpClientFactory - removed superfluous constructors from exception classes - changed parameters to use RestServerParameters instead of BusTopicParams Change-Id: I8aad6ca5a733c8ad9cc983496e745ebe7400dd17 Issue-ID: POLICY-1911 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-07Bump version of policy/xacml-pdpJim Hahn5-5/+5
Change-Id: I2770d2803c79b5eb72b69bb6aa4a1da43a0f6a0b Issue-ID: POLICY-1965 Signed-off-by: Jim Hahn <jrh3@att.com>
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