summaryrefslogtreecommitdiffstats
path: root/utils
AgeCommit message (Collapse)AuthorFilesLines
2022-12-13Use managed versions of dependenciesliamfallon1-1/+0
Issue-ID: POLICY-4482 Change-Id: I6d25d41c32de8f5c1dfb36e3883bb144a070978e Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-10-21Set snapshot and/or references of policy/common for new releaseliamfallon1-1/+1
policy/common updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4408 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I235db15a4de1b683406457bad33e45599a5c49f5
2022-10-20Update snapshot and/or references of policy/common to latest snapshotsliamfallon1-1/+1
policy/common updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4408 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I9805920f11b3a527fca02a591e7cb06273e75543
2022-09-22Update snapshot and/or references of policy/common to latest snapshotsliamfallon1-1/+1
policy/common updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4343 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I4a15ca61a97a3d65728f4dfbed73fd3a653ec771
2022-08-01Use the dependency version from policy/parentRam Krishna Verma1-1/+0
Removing the version attribute from this pom, so that the same gets derived from policy/parent and managed at one location. Issue-ID: POLICY-4291 Change-Id: Idfa3ab68f1e80ad951460842dfaeaabdc5779b22 Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
2022-05-03Set snapshot and/or references of policy/common for new releaseliamfallon1-1/+1
policy/common updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4073 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I79c806af98b2fc157852d0da98ed5dd0b47bfdfc Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-04-27Update snapshot and/or references of policy/common to latest snapshotsliamfallon1-1/+1
policy/common updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4089 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I6fab0ebe25ec33ad171a1f2ce37736b550a00954
2022-04-22Fix unit test failing due to GSON upgradeliamfallon1-2/+3
The result returned by the new GSON version has a forward slash at the end. Issue-ID: POLICY-4070 Change-Id: I218be9a3d21a78071323ae2127efa74353022800 Signed-off-by: liamfallon <liam.fallon@est.tech>
2022-04-12Update snapshot and/or references of policy/common to latest snapshotsliamfallon1-1/+1
policy/common updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-4089 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I337927f55a7b846ab311db23bb5db05ce70c0cec
2022-03-09Update snapshot and/or references of policy/common to latest snapshotsliamfallon1-1/+1
policy/common updated to its latest own and reference snapshots *** This commit is generated by a PF release script *** Issue-ID: POLICY-3982 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: Ie568311ebab28837dd70fad6f603fd14d356318e
2022-02-08add constants for policy execution latency metricjhh1-0/+12
Issue-ID: POLICY-3761 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: Ib4885e8f412c540796de37d18fc553da0a04f46c
2022-02-07add global constant for policy execution metricRashmi Pujar1-1/+28
Issue-ID: POLICY-3845 Signed-off-by: Rashmi Pujar <rashmi.pujar1@bell.ca> Change-Id: Ib72691a80aa56249532058dac9c9e59936254fff
2022-02-02add global constants for prometheus usagejhh1-0/+68
Issue-ID: POLICY-3761 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I3f11d2fdb49d5b38d51add86ab6989e5d93584e9
2022-01-17Fix test case broken by new GSON versionliamfallon1-1/+1
The "com/google" resource bundle now contains more than 189 files, so this test is changed to insetead check for the existence of "com/google/gson", otherwise this test could break every time we update gson. Issue-ID: POLICY-3849 Change-Id: Id979bb7a3d2453956701f64057accb08228a774d Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-11-24Update snapshot of policy/common to 1.10.1-SNAPSHOTliamfallon1-1/+1
*** This commit is generated by a PF release script *** This commit updates the snapshot of the repo to the next patch version. Issue-ID: POLICY-3827 Signed-off-by: liamfallon <liam.fallon@est.tech> Change-Id: I4ce7c53f5df1e0e1ad954146240899230a45d945
2021-10-13Bump policy/common master to 1.10.0-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: I3710faca8799cfdbf0d6c75ae286b1765ddf6b97 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-10-13Bump policy/common to 1.9.2-SNAPSHOTliamfallon1-1/+1
Issue-ID: POLICY-3696 Change-Id: I599ac2e36c45ba6882c95681a531da8b57efbb58 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-09-13Bump snapshot versionliamfallon1-1/+1
Issue-ID: POLICY-3587 Change-Id: I11043890dfd4dfbc19ec24eb15a546745393d105 Signed-off-by: liamfallon <liam.fallon@est.tech>
2021-09-02Create methods for creating temp filesJim Hahn6-67/+224
Created utility methods to create temp files and set default permissions. These can be used in other repos to satisfy sonar. Also added code to close streams and clean up temp files created by some junit tests. Modified to use IOUtils to read a stream. Issue-ID: POLICY-3289 Change-Id: Ic83e4f4d7745be7b37ebb42bf1d81e303d8dadc9 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-23Merge "Prevent deadlock in ServiceManager"Ram Krishna Verma1-9/+10
2021-08-23Prevent deadlock in ServiceManagerJim Hahn1-9/+10
Modified the ServiceManager code so that isAlive() can be invoked without requiring synchronization, thus eliminating one potential area of deadlock. Issue-ID: POLICY-3531 Change-Id: I27d060c3a7cfad8dab20a197d1e42c4ee607a1e2 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-20Fix sonars and java warnings in commonJim Hahn2-36/+5
Issue-ID: POLICY-3284 Change-Id: I13fc28c6ae681871be8bb9cf3d222d7c65459a44 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-08-04refactor slf4j logger to common utilTaka Cho4-1/+286
avoid EELF lib dependency, was suggested to move to common util instead Issue-ID: POLICY-3087 Change-Id: I79a2f5ba32fd3fc496ef3f72a02f4696b766f9c7 Signed-off-by: Taka Cho <takamune.cho@att.com>
2021-06-25Add name generator for PAP and PDPsJim Hahn2-1/+23
Added a method that PAPs and PDPs can use to generate a unique name or identifier to be used in PAP-PDP messages. Issue-ID: POLICY-3410 Change-Id: I22b075b123f79ba05e0884f743296c4bc64842b9 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-06-17Use lombok in policy-common utilsJim Hahn20-219/+104
Issue-ID: POLICY-3394 Change-Id: I42a18c115c3ca7110f37fc0ae8aeea3f2bbffb37 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-27Fix sonar issues in commonJim Hahn1-1/+1
Fixed sonar issue: - class should not be abstract Issue-ID: POLICY-3284 Change-Id: I9c4aa149b7321cbcaff8dce5e2999315a06f19b0 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-21Enhance toString methods in factory classesJim Hahn3-17/+9
The factory classes in policy-endpoints have toString() methods that return "[]" for their list contents. Updated the code to provide a list of the keys rather than just an empty list. Also replaced some toString() methods with lombok. Also replace StringBuilder with concatenation in some cases. Issue-ID: POLICY-3298 Change-Id: I64fca21a4b009f7e09fcc482b5d156753fb7e680 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-07Change java.util.regex to re2jJim Hahn2-2/+2
Sonar complains about java.util.regex. Thought I used re2j when creating all of the patterns, but apparently not. Fixed that oversight. Issue-ID: POLICY-3284 Change-Id: Idbec112ab0d4c3b477ce357f8a556d95e4dea083 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-05-06Fix sonars in policy-commonJim Hahn15-98/+101
Fixed sonars: - use "var" instead of actual type name - re-interrupt threads - use rej2 split() instead of String split() Issue-ID: POLICY-3285 Change-Id: I82261e0b8a53ee5c5264556fbf5cec37454f014e Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-13Merge "Revert "Modify StandardCoder to handle empty source""Pamela Dragosh2-55/+7
2021-04-13Revert "Modify StandardCoder to handle empty source"Jim Hahn2-55/+7
This reverts commit 04623fef95f2b164d79ad48de2ef3708d02eda80. Reason for revert: prefer consistency with gson Issue-ID: POLICY-3172 Change-Id: Ic2501abcc68ec1186142a7e520e7985c43fd3315 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-04-13Add command line handleradheli.tavares8-2/+523
Added a Handler for command line classes to share common strucutures. Issue-ID: POLICY-3128 Change-Id: I662911c467faf5c39b8db018bb1a564fba7587a6 Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
2021-04-07Modify StandardCoder to handle empty sourceJim Hahn2-7/+55
Currently, if the source string or source file is empty, the StandardCoder just returns null. Modified it to throw an exception in those cases. However, if the string reference is null, it will still return null. Issue-ID: POLICY-3172 Change-Id: Ie7d5e1b0328a24d94a75af8d18a341faebbe5d5f Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-12Address plugin-not-found issuesJim Hahn1-37/+0
Removed references to archetype-packaging and lifecycle-mapping, where unnecessary due to pom inheritance. Issue-ID: POLICY-3126 Change-Id: Ie31edcb7ae31e1bb495904fce2c8ed56d9bf10f5 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-03-10Bump version to 1.9.0 in commonJim Hahn1-1/+1
Issue-ID: POLICY-3105 Change-Id: I1fd654fef96a1e41f150ea13baf39acc882f6bb2 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-23Bump version to 1.8.1-SNAPSHOT in commonJim Hahn1-1/+1
Issue-ID: POLICY-3088 Change-Id: I1cc2d1d26c337d67b0ecadd852e43b603902415e Signed-off-by: Jim Hahn <jrh3@att.com>
2021-02-08Remove javax.persistence dependencyJim Hahn1-4/+4
Running into a dependency collision between two eclipselink jars. Turns out, we don't actually need to include the javax.persistence dependency, so removed it altogether. Issue-ID: POLICY-3005 Change-Id: I5f09ddc27cdaa329b4604e6c715879d52335f870 Signed-off-by: Jim Hahn <jrh3@att.com>
2021-01-16Add policy-clamp to policy Message constantsliamfallon1-0/+1
policy-clamp is now a valid component inthe policy framework and should be added to the message constants in policy common. Issue-ID: POLICY-2971 Change-Id: Iead3d4f854057c8e968d62928026b74c41bc1346 Signed-off-by: liamfallon <liam.fallon@est.tech>
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-11-06Fix upcoming checkstyle issuesPamela Dragosh1-8/+8
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-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 Hahn1-1/+1
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-28New sonars in policy-commonJim Hahn1-17/+8
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 Hahn1-1/+1
Issue-ID: POLICY-2789 Change-Id: Ia29c63d215facba9796a9dabdd4e9ea6792a852a 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-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-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-01Updating common dependenciesRossC1-3/+3
Issue-ID: POLICY-2387 Change-Id: Ib2b14f66f6416ca3b8d6353bb6aa19fa2f41ebbb Signed-off-by: RossC <ross.carter@est.tech>
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>