Age | Commit message (Collapse) | Author | Files | Lines |
|
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>
|
|
review comment
Making the method to update topic properties object more generic so that
it can be used by other components such as drools if needed.
Change-Id: I29c0f8fde5f4e1dd464072a9b06f2d93cc15b137
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
|
|
|
|
CryptoUtilsTest runs slowly because the SecureRandom that CryptoUtils
uses to generate an "iv" takes a while to create enough randomness.
However, as the "iv" is only used as a "salt", it is not necessary
to use SecureRandom; the values generated by Random are sufficient.
Change-Id: I1f3b03b85d28852a7969d3a83802a2691308caa5
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Refactored various classes to reduce cyclomatic complexity.
Introduced some endpoint utility classes to facilitate extraction
and conversion of property values, and populating of common
"builder" values.
Change-Id: Ie1c91cd94cb54700dc9127f72780b4d94b82ec39
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
1) Adding Topic parameters and REST parameters into policy-endpoints module as these
are used by other modules such as PAP, APEX and XACML PDPs.
2) ParameterUtils class is also added which can contain related utility methods
Change-Id: I5421fbf2234259305e3626ec0859aee0f36ed9b1
Issue-ID: POLICY-1744
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
|
|
|
|
Moving ToStringTester to utils-test as thos module holds all test
related utilities. Keeping the original one for now as it will break
build for all the repos.
Will delete the original one after pointing all the dependent repos to
the new one.
Change-Id: I5f90b722452178e1e1a30d759679b8738dadfb65
Issue-ID: POLICY-1746
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
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>
|
|
Used Eclipse Refactor->Extract Method to reduce cyclomatic
complexity.
Flattened nested FpManager class into IntegrityMonitor class.
Changed some strings to StringBuilder, where lots of concatenation
was being done.
Simplified some things by eliminating some try/catch blocks where
an exception can't actually (except may an out-of-memory exception).
Also addressed some sonar issues in the tests (e.g., use "<>" where
appropriate).
Eliminated some assertException methods, replacing them with assertj
methods.
Did not attempt to increase junit coverage.
Change-Id: I311acaffcd87f0cbbf382c06c7fa26177007abd5
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|
|
Released 1.5.0
Issue-ID: POLICY-1737
Change-Id: I51b1c264d52cab2b2501dce7c5b0e7805d39ad5c
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Policy/parent released
Issue-ID: POLICY-1737
Change-Id: I0fe368d5a4771813b1afb5fec5f9d48f7df39c87
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Per javadocs, getName() should generally be used instead of
Class.getCanonicalName().
This change only applies to classes; it does not apply to File
objects.
Change-Id: Iea0995d1167f4837607f194d35f0193eeedeacd7
Issue-ID: POLICY-1646
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
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>
|
|
Note: A number of these were identified, by SonarLint, in the Test
classes, which are not typically scanned by Sonar.
Removed unnecessary imports.
Removed unneeded "throws Xxx".
Replaced lambda with method references.
Replaced duplicate strings with constants.
Replaced try-fail-catch with assert-j methods to eliminate sonar
complaints about duplicate failure messages.
Added missing @Override annotations.
Use map.computeIfAbsent() where appropriate.
Also fixed some minor checkstyle issues.
Removed unneeded "volatile" declarations.
Replaced some if-else constructs with "?:" construct, per sonar.
Replaced Object.wait() with CountDownLatch.await(); according to sonar
(and javadocs), Object.wait() can return due to "spurious wakeups".
Fixed issue whereby CryptoUtilsTest wouldn't run in my Eclipse.
Change-Id: Ib6b71ed65662cfd6209400dac57ed69279bf29ec
Issue-ID: POLICY-1791
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I928eeb6bf52cb9e825db456278ce8bff449c692c
Issue-ID: POLICY-1762
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
No longer used.
Issue-ID: POLICY-1737
Signed-off-by: pdragosh <pdragosh@research.att.com>
Change-Id: Ia85139cbb200d3ca71bcdedd43e2ae838eeb79bb
Signed-off-by: pdragosh <pdragosh@research.att.com>
|
|
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>
|
|
Issue-ID: POLICY-1775
Change-Id: I7a1327a73617d5d7ffb07754b9b6f39abb089d99
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
|
|
Change-Id: Ibc15649c26eaafc620cec85876790fd2d73372fe
Issue-ID: POLICY-1630
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
In prep for next version.
Issue-ID: POLICY-1700
Change-Id: I4dec2414dbd3d0d941bf24e9cd359265d7105371
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
The gson code to convert Double to Long/Integer use a direct comparison
of the original double with a long. However, sonar does not like that
so changed the code to use the Double.compare() method instead.
Also fixed sonar issue with diamond operator.
Addressed some sonar issues in ServiceManager.
Addressed some sonar issues in Version.
Change-Id: I0959603918d251db671e87e12c295c6ec911f427
Issue-ID: POLICY-1707
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Policy/parent is released.
Issue-ID: POLICY-1700
Change-Id: I4a3f11bd069eefbe7205495b83fc8d8b68a221a9
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
|
|
Makes Junit debugging more simple.
Issue-ID: POLICY-1641
Change-Id: I5835f608e468e90e11d923973d726b0313e91189
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
Added implementations of ValidationResult for arbitrary objects and
for beans (i.e., containers of arbitrary objects).
Change-Id: I4c6f35bd19f1386062ce19125cbc648c399cc331
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
By default, gson treats all numbers as Double when placed into a
generic Map. This is not backward compatible with existing policy
APIs. Added a type adapter that walks Map objects and converts the
Double values to Integer or Long, where possible.
Made this the default behavior in the GsonMessageBodyHandler, the
JacksonHandler, and the StandardCoder.
Also fixed a couple of checkstyle errors in the gson project.
Change-Id: I9ac0c77e6592d1c039646f0662c077b77a1e9aaf
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Change-Id: I889cb9397b4b834ab273ec8f8ddc1af2b3c3c05e
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Issue-ID: POLICY-1095
Change-Id: Ib0d2c778f3e8dc5e52369e43b98249ed426fc14a
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Class written by Jim Hahn that implements Comparable for comparing
semantic versions. Lifted from policy models pap.
Issue-ID: POLICY-1095
Change-Id: Ie8c5f9066c06cb569085e1390b3de3e4aa580267
Signed-off-by: liamfallon <liam.fallon@est.tech>
|
|
Change-Id: I1b599ce62a4fab852420089b5d1d8ae8f5cfe7ca
Issue-ID: POLICY-1443
Signed-off-by: ramverma <ram.krishna.verma@est.tech>
|
|
Added Registry.get() that does not need a class argument.
Change-Id: I3e8b0e3cc14eda914e0b1b201e6ddf67a9e3462e
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
Typically, singleton classes have lots of static methods, or use
a getInstance() method to get the singleton. This provides an alternative
mechanism, similar to the JDNI and the common-paramater property registry,
where singletons can be registered.
Clean up registry after junit test.
Modified a few comments. (I prefer 90 characters for comments.)
Added a method to register or replace an existing key without throwing
an exception.
Change-Id: I3b62719013d3b5f71adb5e9299d3c1257fb55c80
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
This makes it easier for a class to implement a Startable interface,
using a ServiceManager internally, while preventing other classes from
adding services to the manager (as would be the case if the class were
simply subclassed from the ServiceManager).
Changed the field name to be more descriptive.
Fixed a typo in a comment.
Change-Id: I1bed6291114d21c20d2324cbda81518bf9183139
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
|
|
This reverts commit c8da79dec8d68cded0e1608c914364c2148bb6ec.
Change-Id: I8d9efd3c2d886e3d86ba3fdded3b057a45ed6ed3
Signed-Off-by: Pamela Dragosh <pdragosh@research.att.com>
Issue-ID: POLICY-1609
|
|
|
|
Issue-ID: POLICY-1609
Change-Id: I462f0cce8f8b189082bc2cb4bbd23b927f2cb871
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
|
|
regardless of type (source or sink)
Change-Id: Idaebae611746e364364d35375519173a7461ae61
Issue-ID: POLICY-1608
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
|
|
Change-Id: Ic529e166ce4cdc93830f7da06db5ae752d86260d
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|
|
|
|
Change-Id: I6b92dcc0f225aa712b34adb9a1f9ab47df412c81
Issue-ID: POLICY-1608
Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
|
|
Update code to fix sonar scan issues
Change-Id: I5ccf3d774651bd3d8df908c1e7fe83218016a007
Issue-ID: POLICY-1561
Signed-off-by: Chou, Joseph <jc2555@att.com>
|
|
Also added a "name" to the manager, for logger purposes.
Change-Id: Ide57cdec1fafc36c43b7f7584c0baad6261e8412
Issue-ID: POLICY-1542
Signed-off-by: Jim Hahn <jrh3@att.com>
|
|
|