summaryrefslogtreecommitdiffstats
path: root/POLICY-SDK-APP/src/main/java
AgeCommit message (Collapse)AuthorFilesLines
2018-09-18Merge "Added validation on matching required fields"Jorge Hernandez1-380/+712
2018-09-18Merge "AAF integration in Policy SDK"Pamela Dragosh2-1001/+1146
2018-09-17Added validation on matching required fieldsWang,Frank(gw1218)1-380/+712
Import policy should report to end users if there are missing required matching fields in policy template. Issue-ID: POLICY-1117 Change-Id: Iac4485259b73784e641f42a22d5a12c524f4b8e2 Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com> Signed-off-by: Wang, Frank(gw1218) <gw1218@att.com>
2018-09-17AAF integration in Policy SDKrb71472-1001/+1146
Upgraded SDK version. Added SQL script with encrypt key. Added a function to save role on reading from session in PolicyController.java Addressed Check Style warnings in PolicyController.java Issue-ID: POLICY-1088 Change-Id: I446b6c1a0db2a989ad3f4e982e5cdba845f81045 Signed-off-by: rb7147 <rb7147@att.com>
2018-09-11New min/max Guard PolicyMichael Mokry1-1/+10
Made changes to support Guard policy create/update and other policy manager functions including deletePolicy and pushPolicy. Includes changes for new Guard policy support using GUI and API (Rest and Java Client) Made changes to address Jim's comments Made changes to address Liam's comments Change-Id: I133fe1fd9287ea77ea41a2788de90c7642c36b6a Issue-ID: POLICY-1038 Signed-off-by: Mike Mokry <mm117s@att.com>
2018-09-10Resolved XACML Platform Sonar issuesrb71471-26/+27
Issue-ID: POLICY-902 Change-Id: If22627dfe7df993b5c725ddf3a66c10ebbaa73ca Signed-off-by: rb7147 <rb7147@att.com>
2018-09-05XACML Platform Enhancementsrb71471-295/+356
To Support Raw Policy Creation from GUI and API. GetDecision on combining algorithim with Policy Set. Issue-ID: POLICY-902 Change-Id: Ie3189f8ded2e03366bc7d65d15b95b88c89b0acd Signed-off-by: rb7147 <rb7147@att.com>
2018-08-23Enhancement on DashboardWang,Frank(gw1218)1-362/+649
Enhancement on dashboard by including more info related to CRUD actions on policies and also providing an advanced search feature. Issue-ID: POLICY-1042 Change-Id: I987e0ca13824413f90299a366fb4464fca7de06a Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-08-14Resolved the Sonar issuesrb71471-25/+25
Issue-ID: POLICY-901 Change-Id: I30e1d075dd8eb4739bcb5aa1f2503a016900ff75 Signed-off-by: rb7147 <rb7147@att.com>
2018-08-06Modify Policy manager servlet for sonar issuesKrishnajinka1-103/+100
Fix basic sonar issues in policy manager servlet major and minor issues reported by sonar Basic refactoring Issue-ID: POLICY-1016 Change-Id: If3c19943c04d9af43807090b6340547d69ca6a19 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-08-03Fix major sonar issues in SDK APP admin modKrishnajinka3-479/+524
Fix Sonar reported major issues regarding extracting constants, method complexity, duplicated code blocks, more than 3 nested control blocks. Rework3 after self review. Issue-ID: POLICY-1016 Change-Id: Icbf940c966c51a8ef4319a94a3832cb1e8c360ba Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-31Fix major sonar issues in SDK APPKrishnajinka2-666/+714
Fix major issues reported by sonar in POLICY SDK APP files such as CreateBRMSParamController, PolicyManagerServlet. Also modify tabs to space. Rework2 based on review comments Issue-ID: POLICY-1016 Change-Id: I5407ade1ce9f597fa91d9ca18506f5ac2d8b1411 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-26Merge "Fix issues reported by sonar"Liam Fallon5-709/+703
2018-07-25Fix issues reported by sonarKrishnajinka5-709/+703
Fix issues related to unused method variables, extract constants, not nest more than 3 control stmts, use try with res in policy engine project. Rework for comments Issue-ID: POLICY-1008 Change-Id: If0953de9e802110df14862707f3b525652cdf112 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-25Merge "Decision BlackList Guard Enhancements"Jorge Hernandez1-0/+380
2018-07-24Decision BlackList Guard Enhancementsrb71471-0/+380
While creating a decision Bl Guard Policy we are allowing to add Blacklist entries through file upload for bulk from GUI. Issue-ID: POLICY-901 Change-Id: I4031fd4a96937b9facc330cecf72777d701d4678 Signed-off-by: rb7147 <rb7147@att.com>
2018-07-24Merge "Refactor PolicyNotificationMail for sonar issues"Pamela Dragosh1-118/+152
2018-07-23Add modified copyright noticeKrishnajinka5-82/+87
For the files which are modified add modified copyright notices as per comments from earlier review Issue-ID: POLICY-1002 Change-Id: I873b3ccc986d5f3d138ddb9e9b3c2307a0b127a6 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-23Refactor PolicyNotificationMail for sonar issuesKrishnajinka1-118/+152
SONAR flagged issues related with complexity of method being high and more than 3 nested loops in the PolicyNotificationMail Issue-ID: POLICY-986 Change-Id: Ife3e6b5610cec4bcf3898fdcad4cc2c9a3d61932 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-20FIX SONAR ISSUE NESTED TRY BLOCKSKrishnajinka5-1685/+1724
refactor the code for nested try blocks and rework based on comments and fix nested loops complexity Issue-ID: POLICY-976 Change-Id: Ied02b7838b5e4839a4906f79ff37c4fd6afeccfe Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-17USE TRY WITH RESOURCESKrishnajinka2-849/+860
Fix sonar issues to convert try blocks to try with resources plus change tabs 2 space Issue-ID: POLICY-961 Change-Id: I553d6a42f1efaab5b7eb3a53bab945a3360e69bb Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-13Reverting "Merge "fix try block""Jorge Hernandez2-18/+8
This reverts commit 240bbdbdc76e0e91af9f18164eadb2708d14c6fb, reversing changes made to 3ee69f1af0acddd1e06060ad88c0029fe7ceeaaf. Change-Id: I61f07ead1d7d3e89c512a2224efecf9ac440df10 Issue-ID: POLICY-961 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-07-13fix try blockKrishnajinka2-8/+18
Issue-ID: POLICY-961 Change-Id: Ia1f388368007a4a82a57520dc6ddd99cc484a393 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-04-03Add More Validations on TOSCA Model FormatWang,Frank(gw1218)1-1/+11
Add more validations on TOSCA MS model file name and content format Issue-ID: POLICY-721 Change-Id: Ic3dfe1887791be1e11bca5695866a77909334536 Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-04-02Support CSIT tests for OOF PolicyMichael Mokry1-5/+5
I added an INSERT to the sql upgrade file and some sonar fixes and Junits Change-Id: I37139d5a8ad78d9d46ee01f81c2edd052672712e Issue-ID: POLICY-639 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-03-26New Optimization PolicyMichael Mokry4-505/+1045
This is the new Optimization Policy to support the Integration of the OOF Policy Model into the Policy Platform. Added changes from Frank Wang to fix the following issues with existing Model Parser: 1. TOSCA Rendering issues 2. Matching Attributes support 3. ImportModelAPI to support TOSCA model upload via REST API Running local Sonar tonight to start fixing Sonar issues Added changes per review comments and fixed Sonar issues Change-Id: Ia8ce09c28a718ce4460475e76a750caef774bd6b Issue-ID: POLICY-622 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-03-20Add Matching Fields For MS ModelWang,Frank(gw1218)1-4/+30
Fixed the missing function of matching fields for TOSCA Model Issue-ID: POLICY-655 Change-Id: I41017a4cf01df7f4c36e086f76d169e3e216dc34 Signed-off-by: guangxingwang <gw1218@att.com> Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-03-15JUnit addition for SDK-APPbobbymander1-59/+0
Issue-ID: POLICY-604 Change-Id: I9abc8418ddab1f487385c38c0424db601f8746e2 Signed-off-by: bobbymander <bobby.mander@att.com>
2018-03-13Merge "Fixed the SDK Junits and cleaned unused code"Jorge Hernandez2-491/+7
2018-03-13Merge "Sonar Major"Pamela Dragosh1-1/+1
2018-03-13Sonar MajorSP005016381-1/+1
Move the GUARD_BL_YAML string literal on the left side of this string comparison DecisionPolicyController.java:L208 Sonar Link: https://sonar.onap.org/issues?myIssues=true&open=AV2blO9u5bp_wwmIURef&resolved=false&severities=CRITICAL%2CMAJOR Location: POLICY-SDK-APP/src/main/java/org/onap/policy/controller/DecisionPolicyController.java Line Number:208 Change-Id: I04199190cbb4afd50bcfa0a2725e6f2fef8dddba Issue-ID: POLICY-689 Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
2018-03-13Fixed the SDK Junits and cleaned unused coderb71472-491/+7
Moved file tmp object from try resources block. due to not closing the stream the inputstream read by xacmlpolicyscanner ended with premature file error. Cleaned unused code. Issue-ID: POLICY-584 Change-Id: I92c4d000d94a144736d9ac46db384785a7512593 Signed-off-by: rb7147 <rb7147@att.com>
2018-03-12Sonar MajorSP005016381-1/+1
Move the null string literal on the left side of this string comparison CreateFirewallController.java:L347 Sonar Link: https://sonar.onap.org/project/issues?id=org.onap.policy.engine%3APolicyEngineSuite&myIssues=true&open=AWBFphN0-08if2a6vI7H&resolved=false&severities=MAJOR Location: POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateFirewallController.java Change-Id: I744a66f3622fb7db0933c7c7dabc520e859cff4d Issue-ID: POLICY-685 Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
2018-03-06Added Junits for POLICY-SDK-APPrb71471-1/+5
Issue-ID: POLICY-600 Change-Id: Ib96b7ccede0fa09e71f02ff073c89682e9aa7089 Signed-off-by: rb7147 <rb7147@att.com>
2018-03-05Remove auto generated rule to the drlpa834y1-28/+33
Issue-ID: POLICY-488 Change-Id: Id6915407a6f030b77ae2d18ad3665af9d0feb34b Signed-off-by: pa834y <pa834y@att.com>
2018-02-27Policy:MajorManamohan Satapathy1-6/+6
Local variables should not shadow class field:L992 L1719 Issue-ID: POLICY-649 Sonar Link: https://sonar.onap.org/issues?myIssues=true&projectUuids=AV2blNLJ5bp_wwmIUP3L&resolved=false&severities=CRITICAL%2CMAJOR&types=CODE_SMELL Location:POLICY-SDK-APP\src\main\java\org\onap\policy\controller\CreateDcaeMicroServiceController.java Change-Id: I1d038829867c7d019473909650946a9539b5e736 Signed-off-by: Manamohan Satapathy <MS00534989@techmahindra.com>
2018-02-21Merge "Added Junits for POLICY-SDK-APP controllers"Jorge Hernandez2-3/+14
2018-02-21Added Junits for POLICY-SDK-APP controllersuj426b2-3/+14
Issue-ID: POLICY-584 Change-Id: I306f3484f466accf11ca4fd59864a4b402dcb733 Signed-off-by: uj426b <uj426b@att.com>
2018-02-20Added Junits for Policy PAP-RESTrb71477-751/+4
Clenaed the unsued code. Cleaned the duplication of code and moved to ONAP-REST. Added Junits for PAP-REST Issue-ID: POLICY-600 Change-Id: I56e6e8f2f547def9eaf8624a9e0dd52dc05ad136 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-19Fix Fortify Scan Issue:guangxingwang3-9/+12
1) Fix Fortify Header Manipulation issue by checking the format of the message before adding it response header. 2) Fix Fortify Hardcoded Password issue by using encryption and decryption Issue-ID: POLICY-543 Change-Id: I16b44b9b0670b1af75094c9ae9d1f7d352fa894a Signed-off-by: guangxingwang <gw1218@att.com>
2018-02-16Added Junis for Policy ONAP-RESTrb71471-14/+1
Cleaned the unused constructors. Cleaned the unused code. Added Junits for all JPAS. Renamed the Junit class names on removing classes. Issue-ID: POLICY-603 Change-Id: I0709ccecd7a2f3ec49367ff85f5a6d273479493e Signed-off-by: rb7147 <rb7147@att.com>
2018-02-08MS Model Input ValidationMichael Mokry1-9/+11
- Provides validation for MS policy input content body that matches the GUI validations when create/update MS policy from API - Added changes to satisfy review comments and updated copywright headers for modified and new files Change-Id: I02bfa639bffb48520badd0e4fa34eb36418547ae Issue-ID: POLICY-377 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-02-06Policy Resiliency Code Fixesrb71473-202/+314
Resolved the issue on updating the configuration files when rename/clone/export/move actions are done through GUI. Fixed the PolicyManagerServlet code. Added test cases for newly added files. Issue-ID: POLICY-609 Change-Id: I9d14f19fe20bbc0e3b3844f85d81f26e34bb26ec Signed-off-by: rb7147 <rb7147@att.com>
2018-02-05Remove technical debtPamela Dragosh4-16/+22
* String literals on the left * Unnecessary initialization of variables * Change ArrayList to using List * Remove extra semicolons * Empty Constructor comments * Useless parenthesis I also added a comment on some code that is suspicious. Not comfortable with changing that code. Issue-ID: POLICY-482 Change-Id: I89d889737d398d047fab4b25cb5d962ee1ecdd03 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-02-02Resolved Fortify System Information Leak issuesrb71473-3/+6
Issue-ID: POLICY-550 Change-Id: I2145ecb6de43b69d6faf44c6395b119134a9904f Signed-off-by: rb7147 <rb7147@att.com>
2018-02-01Included Policy GUI Enhancements and validationsrb71474-184/+145
Added hover messages for all policy templates. Resolved few sonar issues. Added fixes for Policy GUI Validations. Issue-ID: POLICY-597 Change-Id: I74abb92dd6ac8722d7869b6a316fad1d8db11d9c Signed-off-by: rb7147 <rb7147@att.com>
2018-02-01Merge "Reduce technical debt"Jorge Hernandez3-102/+87
2018-01-31Fixed the Sonar technical debt.Ankitkumar Patel1-1/+1
Fixed the sonar technical dept primarily for the POLICY-REST module, and accordingly updated the other policy-engine modules for successful built. Issue-ID: POLICY-476 Change-Id: I0e9bd7209a7f9af247fa409a1682683082f92698 Signed-off-by: Ankitkumar Patel <ankit@research.att.com>
2018-01-31Reduce technical debtPamela Dragosh3-102/+87
The last for technical debt I believe. The last try-with-resources I dare to fix. Useless import that I missed last time. Did a couple of minor reductions in cyclomatic complexity that I think are harmless. And lastly introduce a new variable instead of reusing a parameter. Issue-ID: POLICY-482 Change-Id: I5f2e5abbdd472496b48cf12e485fc9b4d903f35a Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-01-31Adding code coverage reduce duplicate linesPamela Dragosh6-123/+134
Removed some duplicate code across some of the classes. For CheckPDP, got the code coverage above 80%. Issue-ID: POLICY-482 Change-Id: I41495cf9f92e8fd248350bf33f5a183c876f38f2 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>