aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/test/resources
AgeCommit message (Collapse)AuthorFilesLines
2023-02-02Replace Eclipselink with Hibernateliamfallon1-3/+3
Issue-ID: POLICY-4533 Change-Id: I56cfd55cd66e228e3012152a8fcc11e3011c8a3c Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-07-16Add exclusions parameterPamela Dragosh2-0/+37
Adds the exclusions parameter to exclude applications that are in the java classpath. This allows overriding default packaged applications with another that can support new policy types and/or modify existing functionality. Issue-ID: POLICY-3326 Change-Id: Iaad8d26fc4122ad17226ad1e83b72c9f284e6ebd Signed-off-by: Pamela Dragosh <pd1248@att.com>
2021-07-13Change config to add Application groupPamela Dragosh7-7/+21
First step for configuration which applications should be loaded and mapped to actions is to add a new parameter group for application parameters. Issue-ID: POLICY-3326 Change-Id: I3867b4e927d57e1e81519dee32d10eed3dabc667 Signed-off-by: Pamela Dragosh <pd1248@att.com>
2021-03-19Delete keystores from xacmlJim Hahn1-0/+0
The Keystore is no longer needed in the tarball, as it is supplied externally by the CSITs and Helm charts. Deleted that file. Also modified the junits to use utils-test to generates keystores at runtime, thus deleted the junit keystore file, too. Issue-ID: POLICY-3143 Change-Id: If4966538452a16b22ea3a338eb9656a295641402 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-17Change RestServerParameters to BusTopicParamsJim Hahn8-13/+13
HTTP client parameters should be based on BusTopicParams instead of RestServerParameters, modified the policyApiParameters. Issue-ID: POLICY-3147 Change-Id: I73aa34bec3ab7e27e7a3474260f411ed55b6f933 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-16Update policy-keystore with newer certificatesjhh1-0/+0
Issue-ID: POLICY-3139 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ia0c86441b1c95b45959be070015ea57f106d7002
2021-02-16Make xacml pdpType configurablePamela Dragosh4-0/+34
Adding code to enable the pdp type to be configurable. Issue-ID: POLICY-3071 Change-Id: I51c873f68bff1866c6b2e96958b6c33872aea2c8 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2021-02-10Upgrade dependenciesJim Hahn1-0/+1
Updated properties to work with the new version of eclipselink. Issue-ID: POLICY-3005 Change-Id: I88091a90387e235ef5c168de7a3275056327d83e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-24update default keystoresjhh1-0/+0
Issue-ID: POLICY-2827 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Icbe559ceb51f34ec7596516ba0ebe735e086b312
2020-08-25Add new Match application to XACMLPamela Dragosh1-0/+31
Add new generic match application to XACML PDP. This app will allow ONAP users to design their own matchable policy types and use StdMatchableTranslator out-of-the box without any modification. Fills the gap left behind since "configure" via the Monitoring can support StdCombinedResultsTranslator, but the Optimization policy types have a specific "closest match" algorithm tied to them. Gives flexibility. removed unused import Issue-ID: POLICY-2596 Change-Id: I0aebae706fb9634e7bb13d78eff0ccc1ae4d752f Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-06-01Use OperationsHistory from modelsJim Hahn1-2/+2
Deleted Dbao and replaced it with the shared class in policy-models. Also had to update the queries and the persistence.xml accordingly. Issue-ID: POLICY-2581 Change-Id: I59dfa2f37c272796ccebc0f578c9f4e8e1b9c8ab Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-18renew policy certs till 03/17/2021jhh1-0/+0
Issue-ID: POLICY-2402 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I111f60b9ef60ee9524808653be020f94ae9db170
2020-03-11Added support for application/xacml+json in native appChenfei Gao1-0/+41
Issue-ID: POLICY-2182 Change-Id: I13246e08afdc2f5a380b5737c72851f271211d46 Signed-off-by: Chenfei Gao <cgao@research.att.com>
2020-02-28Build XACML PDP support for native xacml policy typeChenfei Gao4-0/+64
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-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>
2019-11-15Changed Xacml-pdp to report pdp group defined in XacmlPdpParameters config fileHOCKLA7-5/+40
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-10-28Optimization improvements and test casesPamela Dragosh1-12/+0
* 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-09-09Integrate using Policy Type to find MatchablePamela Dragosh1-2/+4
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-4/+67
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-22update keystorejhh1-0/+0
Issue-ID: POLICY-1988 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I544a0bdf63582cdff74765d7fad1b7f993d0bfa0 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-07-04Remove topic.properties and incorporate into overall config file for xacmla.sreekumar5-25/+51
Change-Id: I3be6248db65041f5d9b7acfcf0fcd2f49d9d70f8 Issue-ID: POLICY-1744 Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
2019-04-26Refactor xacml-pdp to remove various statics3.0.2-ONAPjh73581-1/+1
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-12Add statistics and sonar cleanup and blacklistPamela Dragosh6-2/+155
* 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-11Add Control Loop Coordination policy.Joshua Reich3-48/+0
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-05Xacml PDP Register/Unregister ChangesMichael Mokry1-0/+22
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>
2019-04-04Tie XACML REST DecisionPamela Dragosh3-3/+6
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>
2019-04-01Adding guard PIPPamela Dragosh5-3/+37
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 Dragosh3-3/+3
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 Dragosh6-12/+34
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-20Use Policy Translator abstract classPamela Dragosh4-0/+34
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-18Started with test decision JSON objects.Pamela Dragosh6-0/+292
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-11Added HTTPS and CADI/AAF Support for PDP-XMichael Mokry2-0/+10
- 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>
2019-02-11PDPX Healthcheck/Statistic RESTful API entry pointMichael Mokry9-0/+57
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>