summaryrefslogtreecommitdiffstats
path: root/ONAP-PAP-REST/src/main/java/org
AgeCommit message (Collapse)AuthorFilesLines
2019-03-26Added changes to save original model fileHOCKLA1-2/+2
When a user imports a model, save the original model file Issue-ID: POLICY-1423 Change-Id: Ic7ccf2cc91ce466d7aac644cf566e35577888217 Signed-off-by: HOCKLA <ah999m@att.com>
2019-03-20use hibernate and breakup dbdao and papservletpa834y19-4187/+4707
Change-Id: Ifa655d56bda0ab4c748f188767122e7bd927155b Issue-ID: POLICY-1417 Signed-off-by: pa834y <pa834y@att.com>
2019-01-22Increase JUnit Code Coverage for PolicyDBDaoMichael Mokry1-1/+13
Added Junit tests for PolicyDBDao methods that were not covered after observing that the code coverage dropped below 50% in SONAR. Modified license headers with correct copywrite Change-Id: Iad8e18d978236f4391363d963eb4624744f45099 Issue-ID: POLICY-1448 Signed-off-by: Michael Mokry <michael.mokry@att.com>
2018-09-11New min/max Guard PolicyMichael Mokry2-16/+51
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-11/+13
Issue-ID: POLICY-902 Change-Id: If22627dfe7df993b5c725ddf3a66c10ebbaa73ca Signed-off-by: rb7147 <rb7147@att.com>
2018-09-05XACML Platform Enhancementsrb71474-477/+526
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-11Fix comparison issues in onap pap restkrishnajinka13-2067/+2461
Fix issues about incorrect comparison in pap rest modules indicated by analysis tools.Rework to fix review comments1 Issue-ID: POLICY-1016 Change-Id: I7a0ee45a721307fc3ba89ab65e807613a3df2542 Signed-off-by: krisjinka <kris.jinka@samsung.com>
2018-08-03Modify ONAP PAP REST classes basic checkstyleKrishnajinka29-7861/+7861
Modify tabs to space for checkstyle issue fix in ONAP PAP REST module. It helps future reviews and refactoring. Remaining classes Issue-ID: POLICY-1014 Change-Id: I677eadac9e8364b388be922024528c27fd1e2545 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-08-02Convert tabs to space in ONAP PAP REST1Krishnajinka29-9382/+9382
Modify tabs to space for checkstyle issue fix in ONAP PAP REST module. It helps future reviews and refactoring Issue-ID: POLICY-1014 Change-Id: Idcf45689565f039c76a3ef0f40ad9a46b41bd8d6 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-25Merge "Decision BlackList Guard Enhancements"Jorge Hernandez2-3/+25
2018-07-25Fix sonar issue about nested stmtsKrishnajinka1-24/+24
Refactor code to not nest more than 3 condition or loop stmts in policy PolicyEngineUtils. Rework based on review comments Issue-ID: POLICY-1003 Change-Id: I95fcfa0f99c517c02357c85ca39cd2f934e8da4d Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-07-24Decision BlackList Guard Enhancementsrb71472-3/+25
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-23Add modified copyright noticeKrishnajinka5-320/+325
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-20FIX SONAR ISSUE NESTED TRY BLOCKSKrishnajinka3-189/+200
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 RESOURCESKrishnajinka4-3355/+3321
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 Hernandez4-10/+40
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 blockKrishnajinka4-40/+10
Issue-ID: POLICY-961 Change-Id: Ia1f388368007a4a82a57520dc6ddd99cc484a393 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
2018-06-20Change PrefixList.class to Zone.classJim Hahn1-1/+1
Changed the class. Modified the junit test to catch that type of issue, refactoring it to extract common code. Change-Id: Ibc3d22821f103cd3954d2f2f54d4d62307dbf4c6 Issue-ID: POLICY-909 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-04-12Merge "OOF Policy Config File Creation Issue"v1.2.0Jorge Hernandez1-3/+5
2018-04-12OOF Policy Config File Creation IssueMichael Mokry1-3/+5
Fixed the issue with creating the config file with the wrong file name so that the PDP can pick it up when pushing the policy and getCOnfig will return the Config retrieved rather than a CONFIG_NOT_FOUND 400 status. I found this issue in the new CSIT tests for HPA policies and this should also resolve the failed test in Integration as well. Change-Id: I617133a188f3ba915feafd79da4f3e9d0b0eb4a6 Issue-ID: POLICY-738 Signed-off-by: Michael Mokry <mm117s@att.com>
2018-04-11Fix Fortify Header Manipulation IssueWang,Frank(gw1218)1-1/+8
Fix Forfity issue on group Id by adding a validation on this input value. Issue-ID: POLICY-734 Change-Id: I83321a5ffd1ddca84f985b5fd8659e502ca967d7 Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
2018-03-26New Optimization PolicyMichael Mokry15-136/+1589
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-23Fix final 10 vulnerabilities in policy/engineeramkve12-34/+46
Code fixes for final 10 vulnerabilities in policy/engine Change-Id: I234194b596bdacd5f3f9fd1becd4da9d6d0b5cf4 Issue-ID: POLICY-662 Signed-off-by: eramkve <ram.krishna.verma@ericsson.com>
2018-03-23Merge "Resolved the Policy Removal issue from PDP"Jorge Hernandez1-1/+1
2018-03-22Resolved the Policy Removal issue from PDPrb71471-1/+1
Issue-ID: POLICY-706 Change-Id: I2425e305ed660ea07662e0a26e713cc91ed92e72 Signed-off-by: rb7147 <rb7147@att.com>
2018-03-21Fix vulnerabilities and bugs in policy/engineeramkve2-39/+53
Code fixes for 1 bug and 17 vulnerabilities reported by Sonar in policy/engine Change-Id: I7b641795c790ec15418bd9ae3a414279e1b0f733 Issue-ID: POLICY-662 Signed-off-by: eramkve <ram.krishna.verma@ericsson.com>
2018-03-20Fix all bugs reported by Sonar in policy/engineeramkve10-111/+153
Code fixes for 27 bugs reported by Sonar in policy/engine Change-Id: I96da96b38a2e2954ec549e5cdf6ed3ad1d76722c Issue-ID: POLICY-662 Signed-off-by: eramkve <ram.krishna.verma@ericsson.com>
2018-03-13Merge "Policy:Blocker"Pamela Dragosh1-4/+1
2018-03-13Sonar MajorSP005016381-1/+1
Move the api string literal on the left side of this string comparison XACMLPapServlet.java:L1179 Sonar Link: https://sonar.onap.org/issues?myIssues=true&open=AV2blOo25bp_wwmIUQnh&resolved=false&severities=MAJOR Location: ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/XACMLPapServlet.java Line Number:1179 Change-Id: I937caaca01107d2a11be4050ff7be5e5dc66acb6 Issue-ID: POLICY-690 Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
2018-03-13Policy:BlockerManamohan Satapathy1-4/+1
Use try-with-resources to close this JarFile:L264 L265 Issue-ID: POLICY-683 Sonar Link: https://sonar.onap.org/issues?myIssues=true&open=AWF91iwf8TZzbCgU6arv&resolved=false Location:ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/ActionPolicy.java Change-Id: Ie9adb5b50dbb61c923bf73fa107fd19366f24304 Signed-off-by: Manamohan Satapathy <MS00534989@techmahindra.com>
2018-03-13Sonar BlockerSP005016381-20/+9
Use try-with-resources or close this BufferedWriter in a finally clause FirewallConfigPolicy.java:107 Sonar Link: https://sonar.onap.org/project/issues?id=org.onap.policy.engine%3APolicyEngineSuite&myIssues=true&open=AWF91ixe8TZzbCgU6ar2&resolved=false&severities=BLOCKER Location: ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/FirewallConfigPolicy.java Change-Id: I0ab8bf61fb9a6eb32ebdb5fccb66a67a8ac36b77 Issue-ID: POLICY-687 Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
2018-03-13Sonar MajorSP005016381-3/+1
Merge this if statement with the enclosing one CreateBrmsParamPolicy.java:L218 Sonar Link: hhttps://sonar.onap.org/project/issues?id=org.onap.policy.engine%3APolicyEngineSuite&myIssues=true&open=AV2blOqK5bp_wwmIUQqX&resolved=false&severities=MAJOR Location: ONAP-PAP-REST/src/main/java/org/onap/policy/pap/xacml/rest/components/CreateBrmsParamPolicy.java Change-Id: I0f9885a2491735878d688a2c812afd15a052f481 Issue-ID: POLICY-686 Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
2018-03-09Sonar MajorSP005016381-1/+1
Remove this useless assignment to local variable temp CreateNewMicroServiceModel.java:L195 Sonar Link: https://sonar.onap.org/issues?assignees=swapnalipode&open=AV2blOqq5bp_wwmIUQr6&resolved=false Location: src/main/java/org/onap/policy/pap/xacml/rest/components/CreateNewMicroServiceModel.java Change-Id: Icdd79502962e1173d83bca442d2d739b058932ba Issue-ID: POLICY-682 Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
2018-03-08Sonar MajorSP005016381-1/+1
Remove this useless assignment to local variable em PolicyDBDao.java:L361 Sonar Link: https://sonar.onap.org/issues?assignees=swapnalipode&open=AV2blOr_5bp_wwmIUQxy&resolved=false Location: src/main/java/org/onap/policy/pap/xacml/rest/components/PolicyDBDao.java Change-Id: I2ef3046c1902768589db51127aaf320f94342a9c Issue-ID: POLICY-679 Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
2018-03-08Sonar MajorSP005016381-1/+1
Remove this useless assignment to local variable xMessage ElkConnectorImpl.java:L169 Sonar Link: https://sonar.onap.org/issues?assignees=swapnalipode&open=AV2blOwt5bp_wwmIUREc&resolved=false Location: src/main/java/org/onap/policy/pap/xacml/rest/elk/client/ElkConnectorImpl.java Change-Id: Ia397ffa7cb93b8c1ce8f5f02a09685656c74ddc0 Issue-ID: POLICY-678 Signed-off-by: SP00501638 <SP00501638@techmahindra.com>
2018-03-05Remove auto generated rule to the drlpa834y1-58/+22
Issue-ID: POLICY-488 Change-Id: Id6915407a6f030b77ae2d18ad3665af9d0feb34b Signed-off-by: pa834y <pa834y@att.com>
2018-03-01Added Junits for Policy PAP-RESTrb71474-233/+213
Issue-ID: POLICY-600 Change-Id: Icb67ac587e614f663416b3ea0a03ca6e5b02c621 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-27Added Junits for Policy PAP-RESTrb71473-470/+228
Issue-ID: POLICY-600 Change-Id: I1d42a3a880c9d81115d48794a77fadb89562e136 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-27Code Clean Up for Policy PAP-RESTrb714712-5175/+2124
Cleaned the duplicate code for all dictionary controllers and created Utils class. Issue-ID: POLICY-600 Change-Id: I65b8574d9f667758407515a5c55bc28f636be477 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-22Fix Fortify Path Manipulation Issueguangxingwang2-0/+142
Fix Fortify path manipulation issue by adding a validation on dictionary name. Issue-ID: POLICY-541 Change-Id: I87492b0d80bf96bebfc029d7d164cdd20ca5ef0f Signed-off-by: guangxingwang <gw1218@att.com>
2018-02-20Added Junits for Policy PAP-RESTrb714711-1469/+369
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:guangxingwang4-76/+86
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-19Fix compilation issue due to generic ExceptionJim Hahn1-1/+32
After modifying common to remove generic Exceptions, policy/engine would no longer compile. Had to modify policy/engine to accomodate the specific exception. Change-Id: If339285235994119009a8dcf9484bc81016e2600 Issue-ID: POLICY-246 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-02-16Added Junis for Policy ONAP-RESTrb71472-12/+10
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-13Added Junits for Policy PAP-RESTrb71471-8/+8
Cleaned the unnecessary constructors and methods in onap-rest. Added Junits for JPA Classes in ONAP-REST. Issue-ID: POLICY-338 Change-Id: I7e4f928342315475db96d89e9ad3adac5cb7eb00 Signed-off-by: rb7147 <rb7147@att.com>
2018-02-13Merge "Added Junits for Policy PAP-REST"Jorge Hernandez8-241/+190
2018-02-13Merge "Fix Fortify Scan Issue"Jorge Hernandez1-10/+48
2018-02-12Added Junits for Policy PAP-RESTrb71478-241/+190
Resolved the sonar issues. Added JUnits for ONAP-PAP-REST and ONAP-REST Component. Issue-ID: POLICY-338 Change-Id: Ibec2613f4f61e9ed426583af17c2a9d5b8c8d85d Signed-off-by: rb7147 <rb7147@att.com>
2018-02-12Fix Fortify Scan Issueguangxingwang1-10/+48
Fix Fortify Header Manipulation Issue by checking the format of a string before adding it to response header. Issue-ID: POLICY-543 Change-Id: I6539d22d5f8933ea29932361b152d34dd4f8857a Signed-off-by: guangxingwang <gw1218@att.com>
2018-02-09Added Junits for ONAP-PAP-RESTrb71476-199/+43
Cleaned up unused imports. Cleaned up unused code. Added Junits for Dictionary controllers. Issue-ID: POLICY-338 Change-Id: If29b934e95fdaf60dcf82300a95a23ac3c980419 Signed-off-by: rb7147 <rb7147@att.com>