policy/engine.git
6 years agoFix compilation issue due to generic Exception 19/32119/3
Jim Hahn [Mon, 19 Feb 2018 16:53:40 +0000 (11:53 -0500)]
Fix compilation issue due to generic Exception

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>
6 years agoMerge "Added Junis for Policy ONAP-REST"
Jorge Hernandez [Sun, 18 Feb 2018 17:58:30 +0000 (17:58 +0000)]
Merge "Added Junis for Policy ONAP-REST"

6 years agoAdded Junis for Policy ONAP-REST 05/32005/1
rb7147 [Fri, 16 Feb 2018 18:46:06 +0000 (13:46 -0500)]
Added Junis for Policy ONAP-REST

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>
6 years agoResolved the POLICY-SDK-APP junit issue. 01/32001/1
uj426b [Fri, 16 Feb 2018 18:26:53 +0000 (13:26 -0500)]
Resolved the POLICY-SDK-APP junit issue.

Issue-ID: POLICY-584
Change-Id: I90aaec29e908b742f0866d2754d426f75e1b8953
Signed-off-by: uj426b <uj426b@att.com>
6 years agoMerge "New JUnit for PolicyEngineAPI"
Pamela Dragosh [Fri, 16 Feb 2018 17:34:00 +0000 (17:34 +0000)]
Merge "New JUnit for PolicyEngineAPI"

6 years agoMerge "JUnit test for policy/engine ONAP-XACML"
Pamela Dragosh [Fri, 16 Feb 2018 17:31:11 +0000 (17:31 +0000)]
Merge "JUnit test for policy/engine ONAP-XACML"

6 years agoNew JUnit for PolicyEngineAPI 91/31991/1
bobbymander [Fri, 16 Feb 2018 16:09:36 +0000 (11:09 -0500)]
New JUnit for PolicyEngineAPI

Issue-ID: POLICY-338
Change-Id: I711bb0c219534a537c3d35331b8ef8703423ad63
Signed-off-by: bobbymander <bobby.mander@att.com>
6 years agoModify sonar settings to include all sub-modules 89/31989/1
Pamela Dragosh [Fri, 16 Feb 2018 16:18:09 +0000 (11:18 -0500)]
Modify sonar settings to include all sub-modules

We are now including all the sub-modules coverage into one file.
This will now reflect correct statistics for any sub-module that
tests code located in another sub-module.

Issue-ID: POLICY-634
Change-Id: I1eeb52c893aea96b3b031fabceb92e3b07f6c02c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoJUnit test for policy/engine ONAP-XACML 51/31951/1
mmis [Fri, 16 Feb 2018 12:34:39 +0000 (12:34 +0000)]
JUnit test for policy/engine ONAP-XACML

Increased junits in package org.onap.policy.xacml.test.std.pap in policy/engine ONAP-XACML

Change-Id: Ifef6fcc36044039b2c3d0c0dbffecffd3e242434
Issue-ID: POLICY-605
Signed-off-by: mmis <michael.morris@ericsson.com>
6 years agoAdding Junits in ONAP-PDP-REST 29/31829/2
Michael Mokry [Thu, 15 Feb 2018 13:23:11 +0000 (07:23 -0600)]
Adding Junits in ONAP-PDP-REST

 - This commit adds one Junit for PAPServices
 - I needed to make a minor modification to the PAPServices class in
 order to set the PAPs

Change-Id: Ia54650307e8d9e96d40ce6e68ad18508d4030a4a
Issue-ID: POLICY-338
Signed-off-by: Michael Mokry <mm117s@att.com>
6 years agoMerge "Added Junits for Policy PAP-REST"
Jorge Hernandez [Wed, 14 Feb 2018 19:28:14 +0000 (19:28 +0000)]
Merge "Added Junits for Policy PAP-REST"

6 years agoMake drlRuleAndUIParams transient or serializable 83/31683/1
Swapnali Pode [Wed, 14 Feb 2018 07:05:30 +0000 (12:35 +0530)]
Make drlRuleAndUIParams transient or serializable

Make drlRuleAndUIParams transient or serializable
StdPAPPolicy.java:L72

Sonar Link:
https://sonar.onap.org/project/issues?assignees=swapnalipode&id=org.onap.policy.engine%3APolicyEngineSuite&open=AWF91ipr8TZzbCgU6aom&resolved=false

Location:
src/main/java/org/onap/policy/xacml/std/pap/StdPAPPolicy.java

Change-Id: I3524881e76c69518949a622a23084e0bc8ef26a2
Issue-ID: POLICY-631
Signed-off-by: Swapnali Pode <SP00501638@techmahindra.com>
6 years agoAdded Junits for Policy PAP-REST 71/31671/2
rb7147 [Tue, 13 Feb 2018 23:17:22 +0000 (18:17 -0500)]
Added Junits for Policy PAP-REST

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>
6 years agoMerge "Fix a Bug on Editor Screen"
Pamela Dragosh [Wed, 14 Feb 2018 00:30:16 +0000 (00:30 +0000)]
Merge "Fix a Bug on Editor Screen"

6 years agoMerge "Added Junits for Policy PAP-REST"
Jorge Hernandez [Tue, 13 Feb 2018 22:44:07 +0000 (22:44 +0000)]
Merge "Added Junits for Policy PAP-REST"

6 years agoFix a Bug on Editor Screen 37/31637/1
guangxingwang [Tue, 13 Feb 2018 19:25:42 +0000 (13:25 -0600)]
Fix a Bug on Editor Screen

On editor screen, sometimes click on + button only one click, it creates
more than text fields

Issue-ID: POLICY-629
Change-Id: I9acc95fa0a4a7df3828e579f994c06bfa3199eb5
Signed-off-by: guangxingwang <gw1218@att.com>
6 years agoMerge "Fix Fortify Scan Issue"
Jorge Hernandez [Tue, 13 Feb 2018 15:40:22 +0000 (15:40 +0000)]
Merge "Fix Fortify Scan Issue"

6 years agoAdded Junits for Policy PAP-REST 59/31559/1
rb7147 [Tue, 13 Feb 2018 03:46:09 +0000 (22:46 -0500)]
Added Junits for Policy PAP-REST

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>
6 years agoFix Fortify Scan Issue 99/31099/4
guangxingwang [Fri, 9 Feb 2018 16:22:21 +0000 (10:22 -0600)]
Fix Fortify Scan Issue

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>
6 years agoMerge "Added Junits for ONAP-PAP-REST"
Pamela Dragosh [Sat, 10 Feb 2018 15:26:26 +0000 (15:26 +0000)]
Merge "Added Junits for ONAP-PAP-REST"

6 years agoAdded Junits for ONAP-PAP-REST 09/31109/4
rb7147 [Fri, 9 Feb 2018 19:30:14 +0000 (14:30 -0500)]
Added Junits for ONAP-PAP-REST

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>
6 years agoMerge "Upgrading XACML jar"
Jorge Hernandez [Fri, 9 Feb 2018 15:53:13 +0000 (15:53 +0000)]
Merge "Upgrading XACML jar"

6 years agoMerge "Added JUNITS for ONAP-REST Component"
Jorge Hernandez [Fri, 9 Feb 2018 14:55:18 +0000 (14:55 +0000)]
Merge "Added JUNITS for ONAP-REST Component"

6 years agoUpgrading XACML jar 91/31091/1
Pamela Dragosh [Fri, 9 Feb 2018 14:50:17 +0000 (09:50 -0500)]
Upgrading XACML jar

XACML was released with minor fixes for XML files with comments. Mainly
it contained upgrade to dependencies that had fixed security issues. One
still remains but will not be able to be fixed.

Issue-ID: POLICY-617
Change-Id: Ib143c87156ed6a15cf4f0fe0ecbedb2407ca5b0d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoAdded JUNITS for ONAP-REST Component 79/30979/1
rb7147 [Fri, 9 Feb 2018 05:04:44 +0000 (00:04 -0500)]
Added JUNITS for ONAP-REST Component

Added JUnits for all Pojo classes.

Issue-ID: POLICY-338
Change-Id: I0142903899f0793a8e147a01aeea83d467e49981
Signed-off-by: rb7147 <rb7147@att.com>
6 years agoRemove Password from Logging 37/30937/1
guangxingwang [Thu, 8 Feb 2018 23:11:34 +0000 (17:11 -0600)]
Remove Password from Logging

Fix Fortify logging issue

Issue-ID: POLICY-544
Change-Id: Ibfc7665dcab229a705ec3f999545b14675c24430
Signed-off-by: guangxingwang <gw1218@att.com>
6 years agoMerge "MS Model Input Validation"
Pamela Dragosh [Thu, 8 Feb 2018 17:55:25 +0000 (17:55 +0000)]
Merge "MS Model Input Validation"

6 years agoDowngraded the POLICY-SDK spring version 05/30905/1
rb7147 [Thu, 8 Feb 2018 17:31:44 +0000 (12:31 -0500)]
Downgraded the POLICY-SDK spring version

Issue-ID: POLICY-620
Change-Id: Ib7cf286f62e945edcf5720ce2c53957b8456126d
Signed-off-by: rb7147 <rb7147@att.com>
6 years agoMerge "Upgrade jackson-databind to fix security"
Jorge Hernandez [Thu, 8 Feb 2018 16:34:32 +0000 (16:34 +0000)]
Merge "Upgrade jackson-databind to fix security"

6 years agoUpgrade jackson-databind to fix security 93/30893/1
Pamela Dragosh [Thu, 8 Feb 2018 16:09:31 +0000 (11:09 -0500)]
Upgrade jackson-databind to fix security

Missed this, I should have earlier upgraded to 2.9.4

Issue-ID: POLICY-507
Change-Id: Ic75cfd2d5a265f4a728e59777eac287a3d0894d1
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "FFix the Bug of Missing fields on View Screen"
Jorge Hernandez [Thu, 8 Feb 2018 15:22:15 +0000 (15:22 +0000)]
Merge "FFix the Bug of Missing fields on View Screen"

6 years agoMS Model Input Validation 37/30337/8
Michael Mokry [Mon, 5 Feb 2018 15:48:59 +0000 (09:48 -0600)]
MS Model Input Validation

- 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>
6 years agoMerge "Upgrade dependencies to clear security issues"
Jorge Hernandez [Thu, 8 Feb 2018 03:48:24 +0000 (03:48 +0000)]
Merge "Upgrade dependencies to clear security issues"

6 years agoFFix the Bug of Missing fields on View Screen 13/30713/1
guangxingwang [Wed, 7 Feb 2018 21:07:27 +0000 (15:07 -0600)]
FFix the Bug of Missing fields on View Screen

Missing extra fields added by clicking add buton if they are more than
10 on view screen

Issue-ID: POLICY-613
Change-Id: I9e718b62301f24b71a4f6506d3e63e6185e0b1ce
Signed-off-by: guangxingwang <gw1218@att.com>
6 years agoUpgrade dependencies to clear security issues 05/30705/2
Pamela Dragosh [Wed, 7 Feb 2018 20:41:30 +0000 (15:41 -0500)]
Upgrade dependencies to clear security issues

A bit of consolidation too - which could use a lot more work. These
were simple security upgrades for fixes identified by LF weekly LCM job.
Added some missing license headers.

Issue-ID: POLICY-507
Change-Id: If285b0f95d30a1084c9363bf6a41b48d52fb3aff
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoFixed the sonar issues in ONAP-REST. 85/30685/1
Ankitkumar Patel [Wed, 7 Feb 2018 16:12:27 +0000 (11:12 -0500)]
Fixed the sonar issues in ONAP-REST.

Minor Sonar issues are fixed in the ONAP_REST module.
The copyright headers of the changed files are also updated.

Issue-ID: POLICY-476
Change-Id: I920d8bcdd7b855e3e1660a002fb0e4e8d1674e44
Signed-off-by: Ankitkumar Patel <ankit@research.att.com>
6 years agoMerge "Implement Encryption on Passwords"
Jorge Hernandez [Wed, 7 Feb 2018 15:33:02 +0000 (15:33 +0000)]
Merge "Implement Encryption on Passwords"

6 years agoMerge "Adding JUNITs for ONAP-PAP-REST"
Pamela Dragosh [Wed, 7 Feb 2018 14:10:21 +0000 (14:10 +0000)]
Merge "Adding JUNITs for ONAP-PAP-REST"

6 years agoMerge "Continue addressing technical debt for ONAP-XACML"
Pamela Dragosh [Wed, 7 Feb 2018 12:24:28 +0000 (12:24 +0000)]
Merge "Continue addressing technical debt for ONAP-XACML"

6 years agoMerge "Implement Encryption on Passwords"
Jorge Hernandez [Tue, 6 Feb 2018 20:34:26 +0000 (20:34 +0000)]
Merge "Implement Encryption on Passwords"

6 years agoAdding JUNITs for ONAP-PAP-REST 95/30495/3
uj426b [Tue, 6 Feb 2018 16:13:21 +0000 (11:13 -0500)]
Adding JUNITs for ONAP-PAP-REST

Issue-ID: POLICY-338
Change-Id: I123a92872a236b23144c59e87ea2dffc9ee7fc48
Signed-off-by: uj426b <uj426b@att.com>
6 years agoContinue addressing technical debt for ONAP-XACML 15/30515/2
Gao, Chenfei (cg287m) [Tue, 6 Feb 2018 17:42:50 +0000 (12:42 -0500)]
Continue addressing technical debt for ONAP-XACML

Fix all sonar issues that do not require code refactoring

Issue-ID: POLICY-475
Change-Id: Iefa91e0048b7041c96d47bce7ec99034d6fcc427
Signed-off-by: Gao, Chenfei (cg287m) <cgao@research.att.com>
6 years agoImplement Encryption on Passwords 75/30475/1
guangxingwang [Tue, 6 Feb 2018 15:36:25 +0000 (09:36 -0600)]
Implement Encryption on Passwords

Fix Fortify scan issue - hardcoded password in properties file

Issue-ID: POLICY-542
Change-Id: Iea7b292c4dccf5f400320cd3f63309e955953f2d
Signed-off-by: guangxingwang <gw1218@att.com>
6 years agoPolicy Resiliency Code Fixes 61/30461/3
rb7147 [Tue, 6 Feb 2018 14:07:12 +0000 (09:07 -0500)]
Policy Resiliency Code Fixes

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>
6 years agoImplement Encryption on Passwords 35/30335/3
guangxingwang [Mon, 5 Feb 2018 20:01:00 +0000 (14:01 -0600)]
Implement Encryption on Passwords

Fix Fortify scan issue - hardcoded password in properties file

Issue-ID: POLICY-542
Change-Id: Icefd4097dc2e20c0ec2b78c002599defb6034267
Signed-off-by: guangxingwang <gw1218@att.com>
6 years agoMerge "Fix last technical debt"
Jorge Hernandez [Mon, 5 Feb 2018 21:39:47 +0000 (21:39 +0000)]
Merge "Fix last technical debt"

6 years agoMerge "Technical debt and fix JUnit test"
Jorge Hernandez [Mon, 5 Feb 2018 21:39:00 +0000 (21:39 +0000)]
Merge "Technical debt and fix JUnit test"

6 years agoMerge "Remove technical debt"
Jorge Hernandez [Mon, 5 Feb 2018 21:04:44 +0000 (21:04 +0000)]
Merge "Remove technical debt"

6 years agoFix last technical debt 19/30319/1
Pamela Dragosh [Mon, 5 Feb 2018 17:51:51 +0000 (12:51 -0500)]
Fix last technical debt

Last one that I dare to fix.

Issue-ID: POLICY-477
Change-Id: Ieb1c159b781fa2f0dd80f7dea92dcbf72c3e8364
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoTechnical debt and fix JUnit test 17/30317/1
Pamela Dragosh [Mon, 5 Feb 2018 17:50:06 +0000 (12:50 -0500)]
Technical debt and fix JUnit test

* One statement per line
* private constructor for class with statics
* Fix silly JUnit test

Issue-ID: POLICY-474
Change-Id: Ie760826879febbbc4db4f03079ae1f847f2194dd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoImplement Encryption on Passwords 15/29715/7
guangxingwang [Wed, 31 Jan 2018 02:18:31 +0000 (20:18 -0600)]
Implement Encryption on Passwords

Fix Fortify scan issue - hardcoded password

Issue-ID: POLICY-542
Change-Id: I722b9143fbddc48b67592bb35a44f36ed8b38aad
Signed-off-by: guangxingwang <gw1218@att.com>
6 years agoRemove technical debt 91/30291/1
Pamela Dragosh [Mon, 5 Feb 2018 14:38:29 +0000 (09:38 -0500)]
Remove technical debt

* 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>
6 years agoMerge "Technical debt reduction"
Jorge Hernandez [Fri, 2 Feb 2018 20:26:43 +0000 (20:26 +0000)]
Merge "Technical debt reduction"

6 years agoResolved Fortify System Information Leak issues 53/30053/3
rb7147 [Thu, 1 Feb 2018 21:29:04 +0000 (16:29 -0500)]
Resolved Fortify System Information Leak issues

Issue-ID: POLICY-550
Change-Id: I2145ecb6de43b69d6faf44c6395b119134a9904f
Signed-off-by: rb7147 <rb7147@att.com>
6 years agoTechnical debt reduction 51/30151/1
Pamela Dragosh [Fri, 2 Feb 2018 14:43:33 +0000 (09:43 -0500)]
Technical debt reduction

* empty constructor
* Unnecessary imports
* try-with-resources
* missing @Override
* useless parens
* proper boolean detection
* useless imports
* Use Set vs HashSet
* moving statements to separate lines

Issue-ID: POLICY-477
Change-Id: I5fae9c5c8e7d30f731a1caefc8a5271cf382e0a0
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoResolve LF license header issue 49/30049/2
Pamela Dragosh [Thu, 1 Feb 2018 20:05:16 +0000 (15:05 -0500)]
Resolve LF license header issue

These were simple, we just forgot to remove the old license headers. Also
needed to add a missed fix for a JUnit test. Not sure how this made it past
verify.

Issue-ID: POLICY-552
Change-Id: I30610ba4f8440ee16d0a5c372985f50429d60a34
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "Included Policy GUI Enhancements and validations"
Jorge Hernandez [Thu, 1 Feb 2018 19:43:13 +0000 (19:43 +0000)]
Merge "Included Policy GUI Enhancements and validations"

6 years agoIncluded Policy GUI Enhancements and validations 21/30021/4
rb7147 [Thu, 1 Feb 2018 17:07:13 +0000 (12:07 -0500)]
Included Policy GUI Enhancements and validations

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>
6 years agoReduce technical debt and add JUnit 23/30023/2
Pamela Dragosh [Thu, 1 Feb 2018 17:22:30 +0000 (12:22 -0500)]
Reduce technical debt and add JUnit

* Addressed some very simple cyclic complexity
* Added simple JUnit tests and finished others
* Removed useless assignments

Issue-ID: POLICY-477
Change-Id: Ic919bbf78ad2732a430c32f1feb3c88678be710d
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoMerge "Reduce technical debt"
Jorge Hernandez [Thu, 1 Feb 2018 17:20:09 +0000 (17:20 +0000)]
Merge "Reduce technical debt"

6 years agoMerge "Continue addressing technical debt for ONAP-XACML"
Jorge Hernandez [Thu, 1 Feb 2018 15:11:20 +0000 (15:11 +0000)]
Merge "Continue addressing technical debt for ONAP-XACML"

6 years agoContinue addressing technical debt for ONAP-XACML 89/29889/1
Gao, Chenfei (cg287m) [Wed, 31 Jan 2018 22:01:05 +0000 (17:01 -0500)]
Continue addressing technical debt for ONAP-XACML

Follow the list of acceptable fixes in POLICY-336 description

Issue-ID: POLICY-475
Change-Id: I67f46bb383db1ac4feecb0223df98d180733fc95
Signed-off-by: Gao, Chenfei (cg287m) <cgao@research.att.com>
6 years agoFixed the Sonar technical debt. 73/29573/4
Ankitkumar Patel [Tue, 30 Jan 2018 03:42:19 +0000 (22:42 -0500)]
Fixed the Sonar technical debt.

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>
6 years agoReduce technical debt 79/29879/1
Pamela Dragosh [Wed, 31 Jan 2018 18:55:59 +0000 (13:55 -0500)]
Reduce technical debt

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>
6 years agoAdding code coverage reduce duplicate lines 37/29837/1
Pamela Dragosh [Wed, 31 Jan 2018 13:15:42 +0000 (08:15 -0500)]
Adding code coverage reduce duplicate lines

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>
6 years agoMerge "Fix technical debt and reduce lines"
Pamela Dragosh [Wed, 31 Jan 2018 13:05:40 +0000 (13:05 +0000)]
Merge "Fix technical debt and reduce lines"

6 years agoMerge "Addressing Technical Debt for ONAP-XACML"
Pamela Dragosh [Wed, 31 Jan 2018 13:02:46 +0000 (13:02 +0000)]
Merge "Addressing Technical Debt for ONAP-XACML"

6 years agoFix technical debt and reduce lines 51/29651/1
Pamela Dragosh [Tue, 30 Jan 2018 13:28:25 +0000 (08:28 -0500)]
Fix technical debt and reduce lines

Focused on iterating over entrySet along with more fixes for
dead stores, unnecessary exceptions. I'm also starting to work
on reducing the number of code lines.

* Iterate using entrySet
* Remove useless assignments
* Unnecessary exceptions
* Use StringBuilder instead of StringBuffer due to synchronization
* Potential null exceptions being thrown
* Returning a empty collection vs null

Issue-ID: POLICY-482
Change-Id: If6ac8e812237f37b2b10c534535df4090a5073dd
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoAddressing Technical Debt for ONAP-XACML 49/29349/5
Gao, Chenfei (cg287m) [Thu, 25 Jan 2018 22:22:23 +0000 (17:22 -0500)]
Addressing Technical Debt for ONAP-XACML

Follow the list of acceptable fixes in POLICY-336 description

Issue-ID: POLICY-475
Change-Id: I45cfb55c571d32601049beb8e5be8676216dcf5c
Signed-off-by: Gao, Chenfei (cg287m) <cgao@research.att.com>
6 years agoReduce technical debt 35/29535/1
Pamela Dragosh [Mon, 29 Jan 2018 16:59:40 +0000 (11:59 -0500)]
Reduce technical debt

Focusing on easy try-with-resources changes. Plus some other minor items.
I did not get all of them yet, as some have some heavy refactoring. These
try-with-resources seem to be fairly harmless.

* Utilize try-with-resources
* Remove unnecessary parenthesis
* Merging simple if statements
* Remove useless assignment
* Moving string literals to left hand side

Issue-ID: POLICY-482
Change-Id: If519ec8ea96f6b90bf82ac2676ffea9cd0cd2daf
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoUse try-with-resources 37/29337/1
Pamela Dragosh [Fri, 26 Jan 2018 18:32:21 +0000 (13:32 -0500)]
Use try-with-resources

Also enhanced JUnit tests to ensure this will work. Reduced code.

Issue-ID: POLICY-482
Change-Id: If07e17df274bdb709f7ca60078bd1fbd78d1aaaa
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoReduce technical debt 67/28967/1
Pamela Dragosh [Wed, 24 Jan 2018 00:39:07 +0000 (19:39 -0500)]
Reduce technical debt

Mainly use StringBuilder() to improve speed

* Use StringBuilder
* Remove superflous exceptions in constructor
* Remove unnecessary casts
* Remove unnecessary toString()
* Combine return into one statement
* Move string literal to LHS

Issue-ID: POLICY-482
Change-Id: Id196728d92dda7fab7e83d6eea07633c5be37f7c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoAddressing Technical Debt for POLICY-SDK-APP 45/28945/1
Pamela Dragosh [Tue, 23 Jan 2018 15:58:28 +0000 (10:58 -0500)]
Addressing Technical Debt for POLICY-SDK-APP

* Using booleans true and false
* Using already predefined static strings
* Adding private constructors to hide implicit
* Adding empty constructor comment to satisfy SONAR
* Using single quotes for indexOf to use faster method
* Preferred use of .isEmpty()
* Ordering of public static synchronized syntax
* Removing commented out code
* Using an already defined constant
* Unnecessary declaration of runtime exceptions
* Unnecessary casts
* Unused variables and imports
* Unnecessary use of toString()
* Just using return vs storing into a local var and returning that
* Extra semicolons

Issue-ID: POLICY-482
Change-Id: I6b9dcc5211dd52895a8787239b9df3059928fa45
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
6 years agoResolved the Critical issue reported by Sonar 65/28665/1
rb7147 [Fri, 19 Jan 2018 15:10:18 +0000 (10:10 -0500)]
Resolved the Critical issue reported by Sonar

Issue-ID: POLICY-521
Change-Id: I2a7072076a1ed0924bfeacd6f3d2b6a910f30338
Signed-off-by: rb7147 <rb7147@att.com>
6 years agoResolved Security Vulnerability issues 21/28421/2
rb7147 [Wed, 17 Jan 2018 15:29:04 +0000 (10:29 -0500)]
Resolved Security Vulnerability issues

Issue-ID: POLICY-553
Change-Id: I3e0e6a31226e561cef9ec578790659d57b2f65f4
Signed-off-by: rb7147 <rb7147@att.com>
6 years agoMerge "Restrict file upload size in policy editor"
Jorge Hernandez [Tue, 16 Jan 2018 20:57:41 +0000 (20:57 +0000)]
Merge "Restrict file upload size in policy editor"

6 years agoRestrict file upload size in policy editor 75/27875/4
Magnusen, Drew (dm741q) [Wed, 10 Jan 2018 20:41:24 +0000 (14:41 -0600)]
Restrict file upload size in policy editor

Restrict file upload size in Policy Editory using a configurable value (in
bytes) set in xacml.admin.properties. Default value is 30MB.

Issue-ID: POLICY-538
Change-Id: I4d8539ab33320446aed250ea4fdc51de585d5f2a
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoPDPGroup Audit Fix 19/28319/1
Michael Mokry [Thu, 11 Jan 2018 21:23:36 +0000 (15:23 -0600)]
PDPGroup Audit Fix

*This fix will add new group to GroupEntity table if no default exists
during initialization and therefore provides a permanent solution to the
initialization errors on the PAP

Change-Id: Ie394d76b9cbc02cad15d62d6adea6fc17938f734
Issue-ID: POLICY-486
Signed-off-by: Michael Mokry <mm117s@att.com>
(cherry picked from commit 676d7d8dc9985e93d7c9cbc0412a26f2b19c23cd)

6 years agoMerge "Local and Class variable name conflict resolved"
Jorge Hernandez [Mon, 15 Jan 2018 23:36:03 +0000 (23:36 +0000)]
Merge "Local and Class variable name conflict resolved"

6 years agoMerge "Fixed as per Java Code Conventions"
Jorge Hernandez [Mon, 15 Jan 2018 23:35:51 +0000 (23:35 +0000)]
Merge "Fixed as per Java Code Conventions"

6 years agoMerge "Sonar cleanup for PolicyEngineUtils"
Jorge Hernandez [Fri, 12 Jan 2018 20:19:06 +0000 (20:19 +0000)]
Merge "Sonar cleanup for PolicyEngineUtils"

6 years agoLocal and Class variable name conflict resolved 25/28025/1
SRINIVAS V [Fri, 12 Jan 2018 09:20:30 +0000 (14:50 +0530)]
Local and Class variable name conflict resolved

*Renamed the local variable to othername

Change-Id: I5f1e1b8b9140acf73de241f78b0437dc9e5805b5
Issue-ID: POLICY-336
Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
6 years agoFixed as per Java Code Conventions 21/28021/1
root1 [Fri, 12 Jan 2018 09:14:46 +0000 (14:44 +0530)]
Fixed as per Java Code Conventions

*Moved the constructors after the variables

Change-Id: I099f75aea285f0bb845d464065d1e5f031d44a13
Issue-ID: POLICY-336
Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
6 years agoRemoved useless parentheses 07/27707/2
root1 [Tue, 9 Jan 2018 10:59:05 +0000 (16:29 +0530)]
Removed useless parentheses

*Removed those useless parentheses

Change-Id: I19e9e027182dfd7dc2211d71fbb4acd8bf6b8be5
Issue-ID: POLICY-336
Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
6 years agoMerge "Fixed as code optimization"
Pamela Dragosh [Thu, 11 Jan 2018 18:50:44 +0000 (18:50 +0000)]
Merge "Fixed as code optimization"

6 years agoFixed as per Java Code Conventions 05/27705/2
root1 [Tue, 9 Jan 2018 10:52:49 +0000 (16:22 +0530)]
Fixed as per Java Code Conventions

*Moved the constructors after the variables

Change-Id: I531a911570867e05d2eabca98d349f4f2f26d0f9
Issue-ID: POLICY-336
Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
6 years agoFixed as code optimization 45/27645/2
SRINIVAS V [Mon, 8 Jan 2018 15:48:40 +0000 (21:18 +0530)]
Fixed as code optimization

*no need to create seperate object, so optimized

Change-Id: I245d7fd26c0fabb26de6e9eb7c8bedf405d9d602
Issue-ID: POLICY-336
Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
6 years agoFixed as per Java Code Conventions 11/27611/2
SRINIVAS V [Mon, 8 Jan 2018 06:37:39 +0000 (12:07 +0530)]
Fixed as per Java Code Conventions

*Moved the constructors after the variables
*Deleted the commented code

Change-Id: I6afa9ae5b04fe5c8280fc9e08352aef699117567
Issue-ID: POLICY-336
Signed-off-by: SRINIVAS V <srinivasa.mohan@huawei.com>
6 years agoMerge "Adding PolicyType to getConfig Response"
Pamela Dragosh [Wed, 3 Jan 2018 20:19:17 +0000 (20:19 +0000)]
Merge "Adding PolicyType to getConfig Response"

6 years agoMerge "Policy Elastic Search Validation Enhancements"
Pamela Dragosh [Wed, 3 Jan 2018 20:07:10 +0000 (20:07 +0000)]
Merge "Policy Elastic Search  Validation Enhancements"

6 years agoMerge "Adding SONAR fixes for"
Pamela Dragosh [Wed, 3 Jan 2018 16:35:39 +0000 (16:35 +0000)]
Merge "Adding SONAR fixes for"

6 years agoSonar cleanup for PolicyEngineUtils 37/26737/3
Magnusen, Drew (dm741q) [Thu, 21 Dec 2017 18:03:33 +0000 (12:03 -0600)]
Sonar cleanup for PolicyEngineUtils

Changes to resolve some sonar "major" issues in the PolicyEngineUtils
module.

Patch 2: Updated the NotificationStoreTest junit to account for the return
of a "Collections.emptyList()" rather than "null" in StdPDPNotification
class.

Patch 3: Updated the StdPDPNotificationTest junit to account for the
return of a "Collections.emptyList()" rather than "null" in
StdPDPNotifaction class.

Issue-ID: POLICY-474
Change-Id: I925774ac181fd38d1206637f47ab27ba499629ef
Signed-off-by: Magnusen, Drew (dm741q) <dm741q@att.com>
6 years agoPolicy Elastic Search Validation Enhancements 27/26127/2
rb7147 [Tue, 12 Dec 2017 15:56:11 +0000 (10:56 -0500)]
Policy Elastic Search  Validation Enhancements

Issue-ID: POLICY-497
Change-Id: If97fe30706bcdbeeafaf28e5cca8fae31998cb7c
Signed-off-by: rb7147 <rb7147@att.com>
6 years agoAdding PolicyType to getConfig Response 39/26139/2
Tej, Tarun [Tue, 12 Dec 2017 20:04:43 +0000 (15:04 -0500)]
Adding PolicyType to getConfig Response

Adding a new parameter PolicyType so that getConfig Response can be known
based on type of policy. Fixes for project warnings and unused imports.

Issue-ID: POLICY-434
Change-Id: I0874abb7e986a8bb42ae18561064a8d7534eade6
Signed-off-by: Tej, Tarun <tt3868@att.com>
6 years agoMerge "Add ELK Security"
Pamela Dragosh [Wed, 13 Dec 2017 18:03:57 +0000 (18:03 +0000)]
Merge "Add ELK Security"

6 years agoAdd ELK Security 25/26125/2
Temoc Rodriguez [Mon, 11 Dec 2017 23:24:23 +0000 (15:24 -0800)]
Add ELK Security

Add security to ELk such that only localhost is able to access ELK.
All other hosts will be denied service. This fixes the open elastic
serach security vulnerability.

Issue-ID: POLICY-495
Change-Id: I7f5d6fef5963f984c2bce6933c8b214c0bd3be2b
Signed-off-by: Temoc Rodriguez <cr056n@att.com>
6 years agoMerge "Fix audit log to contain ending timestamp"
Pamela Dragosh [Tue, 12 Dec 2017 19:13:28 +0000 (19:13 +0000)]
Merge "Fix audit log to contain ending timestamp"

6 years agoFix audit log to contain ending timestamp 97/25897/2
Mike Babinski [Fri, 8 Dec 2017 00:02:50 +0000 (00:02 +0000)]
Fix audit log to contain ending timestamp

Add transaction end  method

Change-Id: Ie818bb1650b0847800ce5481a85c5d2c8d7f4b9c
Issue-ID: POLICY-494
Signed-off-by: Mike Babinski <mb1915@att.com>
6 years agoResolved the Policy GUI Javascript issues 59/26059/1
rb7147 [Mon, 11 Dec 2017 21:25:23 +0000 (16:25 -0500)]
Resolved the Policy GUI Javascript issues

Issue-ID: POLICY-440
Change-Id: I44d5304699da19bee7ae2997565802fc7d44cb0e
Signed-off-by: rb7147 <rb7147@att.com>
6 years agoAdding SONAR fixes for 51/26051/1
Michael Mokry [Mon, 11 Dec 2017 16:07:43 +0000 (10:07 -0600)]
Adding SONAR fixes for

 - pushPolicy defect fixes for POLICY-486
 - Common Policy Validation feature for POLIYC-449

Change-Id: I8d54aa5a9b819c6eb4427dfa47c4ce963a21c2e0
Issue-ID: POLICY-449,POLICY-486
Signed-off-by: Michael Mokry <mm117s@att.com>