aboutsummaryrefslogtreecommitdiffstats
path: root/integrity-audit
AgeCommit message (Collapse)AuthorFilesLines
2020-09-08Bump common to 1.7.2Jim Hahn1-1/+1
Issue-ID: POLICY-2789 Change-Id: Ia29c63d215facba9796a9dabdd4e9ea6792a852a Signed-off-by: Jim Hahn <jrh3@att.com>
2020-07-09Bump policy/common to 1.7.1-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2695 Change-Id: I75fef54eb4bad2cb4b1430618d0ac3de4ecb9493 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-07-01Fix build breakage in policy-commonJim Hahn1-2/+4
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 Hahn2-4/+2
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-29upgrade eelf-core dependency: 1.0.0 -> 2.0.0-ossjhh1-0/+5
Issue-ID: POLICY-2387 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I837c2e958a388e8b6f2df2aff9f995359e44ad62
2020-06-18Changes for checkstyle 8.32liamfallon1-5/+5
Issue-ID: POLICY-2188 Change-Id: I00843c61a6567001fc35c3ebb77b6843a1eb7da2 Signed-off-by: liamfallon <liam.fallon@est.tech>
2020-06-17Cleanup various sonar issues in policy-commonJim Hahn8-35/+18
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 Verma2-518/+0
2020-06-12Remove logback.xml files bundled as part of jara.sreekumar2-518/+0
Change-Id: Ia98493a3ec6ad91a46c88ab71998eb039da44842 Issue-ID: POLICY-2627 Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
2020-06-11Removing log4j from policy/commonuj426b1-5/+1
Change-Id: Ib662556533f72c99180b611d0a1933f20e231b2c Issue-ID: POLICY-2623 Signed-off-by: uj426b <uj426b@att.com>
2020-05-19Bump common master to 1.7.0Pamela Dragosh1-1/+1
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 Dragosh1-1/+1
Issue-ID: POLICY-2514 Change-Id: Ied6a2571a0f1008eefa87b8aefdde12bd494a79b Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-14Bump common to 1.6.5-SNAPSHOTRam Krishna Verma1-1/+1
Issue-ID: POLICY-2378 Change-Id: I0012a2cd7acbb9d634b1fc7226992b873142016a Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2020-04-10Bump common to 1.6.4-SNAPSHOTPamela Dragosh1-1/+1
Issue-ID: POLICY-2378 Change-Id: Ib3afcf81460f42e1a62d51a484184763d61dace6 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-04-07Update licenses on sonar fixes in commonJim Hahn1-1/+1
Forgot to update licenses on some of the files that were modified as part of addressing sonar issues. Updated. Issue-ID: POLICY-2305 Change-Id: I9858bfb54be5b8eb42406e944361ec100ae238ff Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-06More sonar issues in commonJim Hahn1-9/+11
Fixed additional sonar issues: - infinit loop; while the issue is bogus, it was easy enough to modify the code to satisfy sonar - doesn't like "volatile"; again, the issue is bogus, but easy enough to modify the code Disabled a couple of sonars in NetworkUtil, as they are not actually an issue. Issue-ID: POLICY-2305 Change-Id: I5500183e3fe4060696994cff55bdae4ba7e138c7 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-04-06Address sonar issues in commonJim Hahn2-34/+24
Addressed the following sonar issues: - missing assertion in junit test case - disable sonars about setAccessible() as it's required for jackson emulation - sleep in junit - don't use wild-cards (e.g., "*") with java.util Pattern - use re2j instead of java.util Pattern - use String methods (e.g., startsWith()) - duplicate method bodies - duplicate code in Coder classes - string concatenation in logger calls - UTF-8 encoding - return primitive instead of boxed primitive - add assertion to tests - renamed support methods from doTestXxx to verifyXxx - cognitive complexity - use AtomicRef instead of volatile - use specific Functionals (e.g., IntConsumer) - function always returns the same value - serializable vs transient Issue-ID: POLICY-2305 Change-Id: I08eb7aa495a80bdc1d26827ba17a7946c83b9828 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-03-27More sonar issues cleanupPamela Dragosh1-13/+6
Either log or rethrow Use boolean expression Add at least one test Remove commented out code Issue-ID: POLICY-2204 Change-Id: I4fdf31aea75303e4f49d25198eb3b12341995bfe Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-03-20Bump common to 1.6.3-SNAPSHOTPamela Dragosh1-1/+1
Released 1.6.2 Issue-ID: POLICY-2378 Change-Id: I12c93a88af2b00c25d457ff9aa9e50c1845e004c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2020-01-14Sonar cleanup overrides and fixesPamela Dragosh1-2/+2
Removal of UTF-8 because its already set capabilities doesn't generate any code, no need to include override false positives for passwords etc. override for logging and exception throw that we want add synchronized to overrides that are synchronized ignore checking of some conditions adding synchronized to match set* methods Issue-ID: POLICY-2321 Change-Id: I26d9ca22a0cdd67fdaae9c44b718b8dc103f190e Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-12-16Added JDK 11 upgrades and point to parent java 11 branchHOCKLA3-19/+20
Issue-ID: POLICY-1583 Change-Id: Ic46ffcb6eb5b0d18f9cb0a6a2ec46374e523f54a Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-06Merge "Minor changes for new Eclipse checkstyle checks"Pamela Dragosh8-374/+681
2019-12-06Bumped policy/common patch version to 1.6.2-SNAPSHOTHOCKLA1-1/+1
Issue-ID: POLICY-1583 Change-Id: I4a1c5848f158d10b4b6f21f048f92d69ccc90a83 Signed-off-by: HOCKLA <ah999m@att.com>
2019-12-06Minor changes for new Eclipse checkstyle checksliamfallon8-374/+681
The laest Eclipse checkstyle version 8.26.0 does more thorough checking and identified a number of small issues in the apex-pdp codebase. This review fixes those issues. logging pattern in logback.xml files amended to be less than 120 characters. Test case added for checking parameter is valid. Issue-ID: POLICY-2204 Change-Id: Id7293e44b56c225afc6290e1c599603e9ebedb19 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-12-05Changed project version to 1.6.1-SNAPSHOT to isolate for java 11 upgradesHOCKLA1-1/+1
Issue-ID: POLICY-1583 Change-Id: I805ebed75e7e0cb5109946328958341018421aad Signed-off-by: HOCKLA <ah999m@att.com>
2019-09-06Bump version in policy/common masterJim Hahn1-1/+1
Change-Id: If86cac60ee143b1d8ae92fd3893ea33a0d3e1b81 Issue-ID: POLICY-2045 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-27Remove AlertSeverity from logback in policy/commonJim Hahn3-105/+105
Replaced AlertSeverity with severity in logback xml files, because the MDC only has severity. Change-Id: I118b195b65555c915c723faf117c4f4854e990f3 Issue-ID: POLICY-1989 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-02Bump version in policy/commonJim Hahn1-1/+1
Change-Id: I7efbdf7c36907eb10ae5ce4c9d7d4988d7e2d68a Issue-ID: POLICY-1965 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-03Fix remaining sonar issues in Integrity AuditJim Hahn7-71/+71
Renamed enums to upper case - this might disrupt other repos, though it should be minimal. Renamed constants in a junit test. Change-Id: Ifd864bb61eec3d9b3c7a0321fe3841696046f6f6 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-27Allow empty DB password in IntegrityAuditJim Hahn1-2/+4
With the sonar fixes, IntegrityAudit is no longer allowing an empty DB password. This breaks some junits in other policy repos. Corrected the issue. Change-Id: I291d1592ffd80ee76dd9758b3b7156436c579dab Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-24Fix more sonar issues in Integrity Audit & MonitorJim Hahn1-120/+75
Removed duplicate code in DbDao by refactoring common code into a new updateIae() method. Removed duplicate code in IntegrityMonitor by refactoring common code into a new withinTransaction() method. Removed duplicate code in StateManagementEntity, StateElement by replacing with lombok Getter & Setter annotations. Removed duplicate code in StateManagement by refactoring common code into new setState() and getState() methods. Also removed logger.isDebugEnabled() tests. Added coverage for StateChangeNotifier. Change-Id: I2e29b836dafc5de569a2267206a6a34105e44021 Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-21Fix sonar issues in integrity auditJim Hahn14-635/+702
Mostly used Eclipse Refactor->Extract Method to reduce cyclomatic complexity. Also combined a few "if" statements to reduce nesting levels. Also addressed some sonar issues in the tests (e.g., use "<>" where appropriate). Did not attempt to increase junit coverage. Change-Id: I9d6c1305ce455f0d64249b548d123bb9bf37292a Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-06-21Bump common to 1.5.1 SNAPSHOTPamela Dragosh1-1/+1
Released 1.5.0 Issue-ID: POLICY-1737 Change-Id: I51b1c264d52cab2b2501dce7c5b0e7805d39ad5c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-06-13More sonar fixes in policy/commonJim Hahn2-36/+33
Note: this does not increase code coverage, but should fix other code issues. Resolved cyclomatic complexity issue in ParameterValidationResult. Refactored duplicate code in GroupValidationResult. Removed IOException from NetworkUtil "throws". Replaced null/empty string tests with StringUtils.isBlank(). Added @FunctionalInterface where needed. Replaced anonymous classes with lambda expressions. Replaced duplicate strings with a constant. Added private constructors for utility classes. Removed sleep() from tests. Removed unused parameter from method call. Made some protected methods private. Compute integrity monitor's state-transition table once. Use for-loop instead of iterator. Moved constructors. Fixed some checkstyle issues (tabs => spaces, trailing spaces). Change-Id: I9a962ca45c4ff3f212c6014da799d06f07b232ef Issue-ID: POLICY-1791 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-05-28Change version to 1.5.0Pamela Dragosh1-1/+1
Upgrade minor review for El Alto. Update to policy/parent Issue-ID: POLICY-1747 Change-Id: I5c54479d7b1e1951e52580c40127177e5f6d389d Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-05-01Bump common snapshotPamela Dragosh1-1/+1
In prep for next version. Issue-ID: POLICY-1700 Change-Id: I4dec2414dbd3d0d941bf24e9cd359265d7105371 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2019-01-09Remove policy/common integrity-audit suppressionsJim Hahn9-133/+102
Changed "DbDAO" to "DbDao". Change-Id: I51a6706cceef6857404ae7c12ce43e553ea0da29 Issue-ID: POLICY-1133 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-10-31Set new master version for Dublinliamfallon1-5/+3
Issue-ID: POLICY-1232 Change-Id: Icb6179ace3f320bdda3da2160afd2d058762ae5e Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-10-24Fix refering to snapshot in policy/common1.3.1ramverma1-1/+1
Issue-ID: POLICY-1213 Change-Id: Id34f28a3f41687993009128940e9ddec69d5b88f Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
2018-10-01Fix minor sonarPamela Dragosh2-65/+87
These are mainly duplicate strings. But also combined if statements and fixing some debug messages missing arguments or format specifiers. Some duplicates I left alone as it seemed unreadable to change them. Also moving variables to their correct place (before constructors). Issue-ID: POLICY-1130 Change-Id: I8018c676b22fe8fec635f129fa37921ad1004569 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-21Fix policy/common checkstyle issuesPamela Dragosh2-90/+160
The root pom.xml had a syntax error in a declaration. The suppressions xml was not being found by the sub-modules. It was better to create a copy in each of the sub-modules where we will not be fixing abbreviations or the interface declarations in own java file. Added specific checkstyle files for each submodule. One interesting note for the InheritDoc tag. It seems that the mvn compile has a bug that interprets these as missing a period after the tag. Even though the parent interface has it correctly. It was easier to just remove it than duplicate. There are new JIRA's for that work to be done in Dublin. Fixed some spacing in pom's. Issue-ID: POLICY-1131 Change-Id: I5f845958ccefd50a3b7290662da43c994870f1f7 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-09-07Remove changing of access on par fieldsliamfallon1-1/+0
Parameter handling refactored to remove changing of access on fields in parameters, new implementation requires getters to be defined for all fields. Note: This change causes a knock on into distribution Change-Id: I172f5d9310caf92d6ea825ff93292019c00a47c3 Issue-ID: POLICY-1095 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-08-15Fix checkstyle comments etc.Pamela Dragosh1-1/+2
Adding javadoc comments, renaming variables names, fixed whitespace and 120 length. Also some variables were made final since they were declared further from usage. Splitting out Asserts. Still remaining are the abbreviations. Issue-ID: POLICY-881 Change-Id: I31ce5a9eea02578bce023c0c607a19108bb726fa Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-08-14Fixes for checkstyle issuesPamela Dragosh8-36/+52
More fixes for spacing, adding comments, adding period at the end, and move code closer to usage. Issue-ID: POLICY-881 Change-Id: Ife99eaf627a221e87d65d24dfd145b0ee4e06d21 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
2018-06-21IntegrityAuditor: remove sleep from junit testsJim Hahn14-332/+270
Modified the code to use a CurrentTime object for its "time" operations (e.g., sleep(), currentTimeInMillis()). Modified junit tests to replace the CurrentTime object with TestTime objects so they don't actually do any sleeping. Reformat "commit" message. Remove TODO from junit test. Init testTime in junit setUp(). Add AuditorTime and test classes. Change "latch" to "semaphore" in comments. Change time units in junit test from SECONDS to MILLISECONDS. Add sleep() method to auditor test class. Reorder field qualifiers. Change utils scope to "compile" in pom. Change-Id: I8aa8b642b315156c00422192e4aa8e47b4503c2f Issue-ID: POLICY-908 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-20IntegrityAudit - remove latches from non-test codeJim Hahn3-117/+115
Change-Id: I5d5cc7d581f78d5551e2fe7447720403bb63ada2 Issue-ID: POLICY-908 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-08Remove "&quot;" from logback xml filesJim Hahn3-7/+7
Logback complains if %d{} values contain "&quot;", but it works fine without them, thus they have been removed. Update license header. Change-Id: Ie72cc5ec922c161e1fd5058021a57282c4f0134b Issue-ID: POLICY-785 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-06-05Update policy-common to SNAPSHOT-1.3.0liamfallon1-1/+1
Snapshot updated for Casablanca. Change-Id: Ife941f771b02be68e35fd638adfac78cf2b3ba99 Issue-ID: POLICY-875 Signed-off-by: liamfallon <liam.fallon@ericsson.com>
2018-05-21Use ${POLICY_LOGS} for log directoryv1.2.32.0.0-ONAPbeijing2.0.0-ONAPJim Hahn1-3/+3
Update license date. Change-Id: I912e1d8ab56b124178b4bfdd8646ee62b48b386c Issue-ID: POLICY-759 Signed-off-by: Jim Hahn <jrh3@att.com>
2018-05-21Update Policy Common to 1.2.3-SNAPSHOTliamfallon1-1/+1
These reviews must be merged in order because of layering. This review should be merged FIRST. Issue-ID: POLICY-844 Change-Id: I7cf07902c3b2d7766dc64f1c1dd80d91dee18467 Signed-off-by: liamfallon <liam.fallon@ericsson.com>