summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2020-12-18Make validators extensibleJim Hahn10-179/+996
Modified the validator to make it extensible. Also added annotations to: - cascade a validation to a sub-object - perform regex - examine items in a list - examine entries in a map Still need more junit tests. Issue-ID: POLICY-2648 Change-Id: I94f1b9e8fbf7a6b9b002d0b05cc9119bdfcf8bf2 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-14Convert YAML Double to Integer/LongJim Hahn3-3/+34
When a YAML number is decoded directly to type Object.class using the decode() or fromJson() methods of the StandardYamlCoder, the number is left as a Double. It should be converted to an Integer or Long, where possible. Issue-ID: POLICY-2900 Change-Id: I7707ac5c54167cbc3a4b23985c6e5fa1a507324e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-12-04Fixing sonar issues in policy-commona.sreekumar13-153/+167
Change-Id: I4dce0dbdf71d01fbb59e9bf861d1af1ab49e5ae7 Issue-ID: POLICY-2914 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-11-30Generalize LocalDateTimeTypeAdapterJim Hahn1-4/+12
The GSON DateTime type adapter uses a hard-coded formatter. Generalized it to allow a different formatter to be provided to the constructor. Issue-ID: POLICY-2903 Change-Id: Icdd51190f465bc4c73cd593d6d1b2003165a4b60 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-11-06Fix upcoming checkstyle issuesPamela Dragosh2-9/+9
When we upgrade to oparent, these will fail as oparent upgrades to 8.37 of puppycrawl which fixes a few bugs that should have flagged these previously. Issue-ID: POLICY-2887 Change-Id: I5618ce67d84e94321f884ed6d929c05fc33a0b3d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-10-29Remove server-side filtering from policy-endpointsJim Hahn5-163/+6
ONAP DMaaP Message Router no longer supports server-side filtering. Removed it from policy-endpoints. Issue-ID: POLICY-2881 Change-Id: I08157f7699608af63992dec78a61c5f9c55037b9 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-29Include jackson jar in policy-endpointsJim Hahn1-0/+6
Issue-ID: POLICY-2878 Change-Id: Ibfe4c220c7b15bb0b752537d080481350a1332e4 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-29Fix sonar security issue in CryptoUtilsJim Hahn3-9/+25
Sonar reports that CryptoUtils is using AES with CBC, which is known to be insecure. Switched to "AES/GCM/NoPadding". Note: values in any property files using encryption or the "enc:" prefix will have to be re-encrypted. Issue-ID: POLICY-2801 Change-Id: I41f00d4f3ee67a00b92135150120d1faa621655a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-10-27Bump common master to 1.8.0 SNAPSHOTJim Hahn11-13/+13
Bumping minor version now that guilin branch has been created. Issue-ID: POLICY-2875 Change-Id: Id812dfd1406f8567a17ce4037eaa8cf8e7e4be26 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-30Fix more sonars in policy/commonJim Hahn1-33/+23
Addressed the following sonar issues: - extract common test methods Issue-ID: POLICY-2650 Change-Id: I0b27c83d7bbe3d5fe83859b189c37507aabe7489 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-30Skip sonar in common utils-testJim Hahn1-1/+1
sonar.tests didn't work, so just switching to sonar.skip, because utils-test is not used in production code. Issue-ID: POLICY-2650 Change-Id: I67bf9abda724944e080bbbf3a9bdc108dbd629c8 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-28New sonars in policy-commonJim Hahn6-1653/+3064
Addressed the following sonars: - too many assertions in a test case - use parameterized test method Disabled production sonars for util-test, as the entire module is only used for testing other modules. Issue-ID: POLICY-2650-sonar Change-Id: If49775a6c95855dcd9601ee0d833bb00741b1550 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-08Bump common to 1.7.2Jim Hahn11-11/+11
Issue-ID: POLICY-2789 Change-Id: Ia29c63d215facba9796a9dabdd4e9ea6792a852a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-09-08Release common 1.7.17.0.0-ONAPJim Hahn1-0/+4
Issue-ID: POLICY-2789 Change-Id: Ifbbf7eadca68892254acabcecbb3710a0de41aff Signed-off-by: Jim Hahn <jrh3@att.com>
2020-08-14Adding common success/failure messages for policy componentsa.sreekumar1-0/+41
Change-Id: Ic1b0a3b467fd9e4f65b2e12d9f6ed33e38e4f44d Issue-ID: POLICY-2755 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-07-29Update INFO.yaml in policy-commonJim Hahn1-12/+16
Verified with Jessica W that the "type" should still be "Addition", even when updating the PTL. Updated to Mature, per TSC. Issue-ID: POLICY-2738 Change-Id: I9fd1adf4986edfe0b87b337a3e913608084da04d Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-23Add Ajith to policy-common infoJim Hahn1-17/+11
Issue-ID: POLICY-2738 Change-Id: I368308548f5f7d97db774ea27677171181d217b5 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-20Remove jackson from policy-commonJim Hahn9-251/+2
Issue-ID: POLICY-1528 Change-Id: Ic4b9314a770e53cefb93776bfede35591363690e Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-09Bump policy/common to 1.7.1-SNAPSHOTRam Krishna Verma11-11/+11
Issue-ID: POLICY-2695 Change-Id: I75fef54eb4bad2cb4b1430618d0ac3de4ecb9493 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-09Release policy/common 1.7.0Ram Krishna Verma1-0/+4
Issue-ID: POLICY-2695 Change-Id: I3605de083efbaeae276a09da409ce44c982bc173 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-09Refer to released parent in policy/commonRam Krishna Verma1-1/+1
Issue-ID: POLICY-2695 Change-Id: Ife7a14cbc1197dd45281f1e846a906310496bf3a Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-02Merge "Removing hamcrest and openpojo from utils pom"Jorge Hernandez1-10/+0
2020-07-02Removing hamcrest and openpojo from utils pomRossC1-10/+0
Issue-ID: POLICY-2387 Change-Id: I43916ce97c43892fed4ed3a78f972f6b97e3237f Signed-off-by: RossC <ross.carter@est.tech>
2020-07-02Merge "Updating common dependencies"Jorge Hernandez4-6/+6
2020-07-01Updating common dependenciesRossC5-7/+6
Issue-ID: POLICY-2387 Change-Id: Ib2b14f66f6416ca3b8d6353bb6aa19fa2f41ebbb Signed-off-by: RossC <ross.carter@est.tech>
2020-07-01Fix build breakage in policy-commonJim Hahn4-8/+16
When the commit for https://gerrit.onap.org/r/c/policy/parent/+/109705 was applied, it broke the changes to common to fix new sonar issues. Backed out some of those changes. Issue-ID: POLICY-2650 Change-Id: Id498392ff798e49c281296575223298c0b6e5143 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-30Fix sonars in common due to dependency upgradesJim Hahn5-16/+8
Fixed the following issues: - don't use annotation wrappers - version overridden in pom Issue-ID: POLICY-2650 Change-Id: Ia520037529861f8ace160c172ed70a5671b740d9 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-30Fix sonar about always-trust-managerJim Hahn2-25/+7
This trust manager is not secure and should be avoided. However, it is only used when the configuration explicitly says to allow self-signed certificates. Modified the code to use an apache trust manager, thus avoid the sonar complaint. Issue-ID: POLICY-2650 Change-Id: Iaf4c72689916ed5ed5e6864666f3f54b2c5e0f12 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-29Fix new logger sonars in policy-commonJim Hahn3-24/+24
Not sure if this was introduced with the new logger version, but now seeing a number of new sonars about using "{}". Fixed those. Issue-ID: POLICY-2650 Change-Id: If36b2e89aa9151700bb9cea2906b6afaad5c4c72 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-29Merge "upgrade eelf-core dependency: 1.0.0 -> 2.0.0-oss"Ram Krishna Verma4-8/+18
2020-06-29Fix issues in common for new sonar rulesJim Hahn12-51/+67
Addressed issues reported due to updates to the sonar rules: - invoke only one method in a junit lambda - complete the assertion - add DOCTYPE to html Issue-ID: POLICY-2650 Change-Id: Ib8b8a2e4736cc23849c0f7aef972ffa3365a3e00 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-29upgrade eelf-core dependency: 1.0.0 -> 2.0.0-ossjhh4-8/+18
Issue-ID: POLICY-2387 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I837c2e958a388e8b6f2df2aff9f995359e44ad62
2020-06-25Merge "Fix deprecated method in policy-common"Pamela Dragosh1-2/+3
2020-06-25Fix Junit failed after AAF version change 2.1.21Utkarsh Jauhari1-0/+7
Issue-ID: POLICY-2623 Signed-off-by: Utkarsh Jauhari <uj426b@att.com> Change-Id: I86c5b6efac8f62dd0d4ba576d8ec49cfa63a58bb
2020-06-24Fix deprecated method in policy-commonJim Hahn1-2/+3
Probably due to a jar update, some methods are now deprecated. Fixed them. Issue-ID: POLICY-2650 Change-Id: I48aabd4552faaf88671dfbe6556dc739a8c94809 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-19Merge "More sonar issues in policy-common"Pamela Dragosh3-23/+31
2020-06-18More sonar issues in policy-commonJim Hahn3-23/+31
Addressed the following sonar issues: - add parameters to types - ObjectInputStream.readObject() is unsafe Issue-ID: POLICY-2650 Change-Id: I41e1bd08643b04f409ce87c884cb0c28995e431b Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-18Changes for checkstyle 8.32liamfallon22-82/+42
Issue-ID: POLICY-2188 Change-Id: I00843c61a6567001fc35c3ebb77b6843a1eb7da2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-06-17Cleanup various sonar issues in policy-commonJim Hahn60-299/+237
Addressed the following issues: - unused imports - unused method parameters - use assertEquals, assertSame instead of assertTrue - provide the parametrized type for this generic Also fixed some checkstyle issues: - removed blank lines between "import" groups Issue-ID: POLICY-2650 Change-Id: I004bb650ac10c49ccd0fc405f6959896fec39f9b Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-12Merge "Remove logback.xml files bundled as part of jar"Ram Krishna Verma3-777/+0
2020-06-12Remove logback.xml files bundled as part of jara.sreekumar3-777/+0
Change-Id: Ia98493a3ec6ad91a46c88ab71998eb039da44842 Issue-ID: POLICY-2627 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-06-11Removing log4j from policy/commonuj426b9-1052/+5
Change-Id: Ib662556533f72c99180b611d0a1933f20e231b2c Issue-ID: POLICY-2623 Signed-off-by: uj426b <uj426b@att.com>
2020-06-02Code changes for dmaap-client upgradeJim Hahn1-4/+11
Issue-ID: POLICY-1996 Change-Id: Id8a3acf9406c6acada4c3ffee679f2baf819cded Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-28jetty-servlets now defined in oparentPamela Dragosh1-3/+0
latest oparent has this new dependency in it. Issue-ID: POLICY-2319 Change-Id: If3b9f64caa41923da1fabc6183434fc21ec00548 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-05-28Point to parent SNAPSHOTPamela Dragosh1-1/+1
So we can tackle security dependency upgrades Issue-ID: POLICY-2391 Change-Id: Iffbcc045d487045a982035e1f832f8eede59c919 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-05-27Make GSON the default serializerJim Hahn2-6/+8
The default serialization provider for HttpClient and HttpServletServer was Jackson. Modified to use GSON instead. Issue-ID: POLICY-1526 Change-Id: Ic6282d119fa63d12470903a4f1eb4da3afd6efe7 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-05-19Bump common master to 1.7.0Pamela Dragosh11-12/+12
Issue-ID: POLICY-2514 Change-Id: Ic7bcf44a9f0c887d6c99edb8609725a15c4aa9a7 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-05-05Bump common to 1.6.6-SNAPSHOTPamela Dragosh11-11/+11
Issue-ID: POLICY-2514 Change-Id: Ied6a2571a0f1008eefa87b8aefdde12bd494a79b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-05-05Release common 1.6.5 java6.0.0-ONAPPamela Dragosh1-0/+4
Issue-ID: POLICY-2514 Change-Id: Idc7bb4791743c52a0ceaef4316d7c4c47271ec05 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-05-05Point to released parentPamela Dragosh1-1/+1
Issue-ID: POLICY-2514 Change-Id: I5de2239e78761d0e4433521054fa9e3cad5f5a99 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>