policy/drools-pdp.git
2 years agofilter logging input data per sonar security issue 37/121937/2
jhh [Tue, 15 Jun 2021 19:50:20 +0000 (14:50 -0500)]
filter logging input data per sonar security issue

Issue-ID: POLICY-3289
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iad22a581a6bd98e7e210162d30ec7741972669d2

2 years agoUse re2j pattern for sonar vulnerabilities 08/121908/1
jhh [Mon, 14 Jun 2021 22:20:51 +0000 (17:20 -0500)]
Use re2j pattern for sonar vulnerabilities

Issue-ID: POLICY-3289
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Id6d58b5c8ac5f7715286f21274ccf5eea9155fd2

2 years agoAdd global dmaap https flag for configuration 26/121726/1
jhh [Mon, 7 Jun 2021 20:34:43 +0000 (15:34 -0500)]
Add global dmaap https flag for configuration

Since drools-pdp and derived applications typicall share
the same dmaap, this map will make easy to toggle between
https and http for those systems that need it.
https remains the default.

Issue-ID: POLICY-3366
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ib3556ed5f73e8a5485bc5c84a161753b1a50ce95

3 years agoRemove policies field references from tests 93/121593/1
waynedunican [Mon, 31 May 2021 10:21:07 +0000 (11:21 +0100)]
Remove policies field references from tests

Remove policies field references from drools-pdp as this has since been removed from the PdpUpdate class in policy-models

Issue-ID: POLICY-3339
Change-Id: Ib47408f54318a861fc569beed683e5cffcb2738e
Signed-off-by: waynedunican <wayne.dunican@est.tech>
Signed-off-by: WayneDunican <wayne.dunican@est.tech>
3 years agoFix sonar vulnerabilities logging user input 08/121408/1
jhh [Tue, 18 May 2021 22:11:31 +0000 (17:11 -0500)]
Fix sonar vulnerabilities logging user input

Issue-ID: POLICY-3230
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I05fb50ef3c4b6da0603e75084554e061a27a2202

3 years agoMerge "fix telemetry related sonar security issues"
Jim Hahn [Fri, 14 May 2021 20:55:18 +0000 (20:55 +0000)]
Merge "fix telemetry related sonar security issues"

3 years agoRemove csit folder from policy/drools-pdp 49/121349/1
Ram Krishna Verma [Thu, 13 May 2021 19:33:18 +0000 (15:33 -0400)]
Remove csit folder from policy/drools-pdp

The csit test files for all repos have been consolidated in policy/docker to maintain them at single place and allow us to trigger verify jobs in gerrit reviews.

Issue-ID: POLICY-3257
Change-Id: I8c3476ec9056f71c288784b73ef68d323cd9d4f2
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agodisable https server default for telemetry 29/121329/1
jhh [Wed, 12 May 2021 20:34:21 +0000 (15:34 -0500)]
disable https server default for telemetry

Issue-ID: POLICY-3230
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I2fd74011b649bca1acbef217bbf6ee222a6352eb

3 years agofix telemetry related sonar security issues 28/121328/1
jhh [Wed, 12 May 2021 20:08:04 +0000 (15:08 -0500)]
fix telemetry related sonar security issues

Issue-ID: POLICY-3257
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ic599b593abbc999c4e6a6fd4bc72acd5ec6e09f9

3 years agointerrupted exception and var usage sonars 42/121242/1
jhh [Mon, 10 May 2021 22:13:57 +0000 (17:13 -0500)]
interrupted exception and var usage sonars

Issue-ID: POLICY-3230
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I50a4ee81f0a1c97df25732a4e4507e8b7f8c8e4d

3 years agoMerge "sonars policy-utils and feature-lifecycle"
Ram Krishna Verma [Mon, 10 May 2021 16:58:49 +0000 (16:58 +0000)]
Merge "sonars policy-utils and feature-lifecycle"

3 years agoMerge "support no https or authentication in telemetry"
Jorge Hernandez [Mon, 10 May 2021 15:14:37 +0000 (15:14 +0000)]
Merge "support no https or authentication in telemetry"

3 years agosupport no https or authentication in telemetry 08/121208/3
jhh [Fri, 7 May 2021 22:39:06 +0000 (17:39 -0500)]
support no https or authentication in telemetry

Issue-ID: POLICY-3230
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I86a5f1081293a6b3d5f52c4462b947facbd9ee88
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agosonars policy-utils and feature-lifecycle 09/121209/1
jhh [Fri, 7 May 2021 23:09:13 +0000 (18:09 -0500)]
sonars policy-utils and feature-lifecycle

Issue-ID: POLICY-3289
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iaf7423f840fb39a27c3e5fd293159d1336d5557a

3 years agoRemove deprecated method from drools-pdp csit 05/121205/1
Ram Krishna Verma [Fri, 7 May 2021 21:08:12 +0000 (17:08 -0400)]
Remove deprecated method from drools-pdp csit

Issue-ID: POLICY-3257
Change-Id: I1051063677921a04ba536deac6ddedf04d360fd2
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agosupport for PAP delta updates 40/121040/3
jhh [Wed, 28 Apr 2021 21:24:44 +0000 (16:24 -0500)]
support for PAP delta updates

Issue-ID: POLICY-3187
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I91b343feb28fdff6b2391387e51defbdcfbe7b0f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoMerge "Make skipping of deployment configurable"
Liam Fallon [Wed, 21 Apr 2021 08:01:28 +0000 (08:01 +0000)]
Merge "Make skipping of deployment configurable"

3 years agoFix no-lock service loader incorrect metadata 24/120724/1
jhh [Tue, 20 Apr 2021 13:45:13 +0000 (08:45 -0500)]
Fix no-lock service loader incorrect metadata

Issue-ID: POLICY-3202
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iac6d9c7459718df1aae97e0b56f51178cd6b172e

3 years agoMake skipping of deployment configurable 40/120640/1
liamfallon [Mon, 19 Apr 2021 13:15:10 +0000 (14:15 +0100)]
Make skipping of deployment configurable

This change makse skipping of deployment configurable so that its
setting can be overridden.

Issue-ID: POLICY-2971
Change-Id: I963c5cae831d10ac7ab1e220ebbba91ec3369188
Signed-off-by: liamfallon <liam.fallon@est.tech>
3 years agoAdd legacy-config new feature 21/120521/4
jhh [Tue, 13 Apr 2021 22:27:35 +0000 (17:27 -0500)]
Add legacy-config new feature

This feature makes the legacy configuration optional.
It was used by brmsgw and other tooling to provision
via its DMaaP channel.   The capability to configure
via PdpConfiguration object is kept in the core
preserving backwards compatibility, but the DMaaP
provisioning channel(s) are optional.

Issue-ID: POLICY-2618
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ia7198ac3b2810d85133c06ba5217a9c28e07ac4c
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoUse sh instead of ash in drools-pdp 79/120279/2
Jim Hahn [Wed, 7 Apr 2021 13:32:31 +0000 (09:32 -0400)]
Use sh instead of ash in drools-pdp

Issue-ID: POLICY-3160
Change-Id: I37b2b75d010781108e40ae39d3742bc2c2e2fd7e
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoUpdate cert stores configuration 56/119656/1
jhh [Tue, 23 Mar 2021 17:53:01 +0000 (12:53 -0500)]
Update cert stores configuration

Issue-ID: POLICY-3158
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iee453ea70e0ebd9a82c0126ffedd8f5632783d6f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoDelete keystores from drools 53/119553/1
Jim Hahn [Fri, 19 Mar 2021 16:05:11 +0000 (12:05 -0400)]
Delete keystores from drools

The Keystore is no longer needed in the tarball, as it is supplied
externally by the CSITs and Helm charts.  Deleted that file.

Issue-ID: POLICY-3143
Change-Id: I5f80f7e25a86b903fd67080adbf15ab090c4b346
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoChange Dockerfile httpie version to fix telemetry 48/119448/1
jhh [Wed, 17 Mar 2021 16:30:49 +0000 (11:30 -0500)]
Change Dockerfile httpie version to fix telemetry

telemetry based tools do not work as the http-prompt
version installed has changed in alpine repositories.

Issue-ID: POLICY-3138
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ib838dabedacd03a72bd018f1d66ace95cbb0c511

3 years agoUpdate policy-keystore with newer certificates 85/119385/1
jhh [Tue, 16 Mar 2021 15:34:15 +0000 (10:34 -0500)]
Update policy-keystore with newer certificates

Issue-ID: POLICY-3139
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I4b0cc4e1a1f6de36857f3e6e73b3dc6b1f9d8b87

3 years agoAddress plugin-not-found issues 60/119260/4
Jim Hahn [Fri, 12 Mar 2021 16:17:00 +0000 (11:17 -0500)]
Address plugin-not-found issues

Removed references to archetype-packaging and lifecycle-mapping, where
unnecessary due to pom inheritance.
Also removed unnecessary checkstyle plugins.

Issue-ID: POLICY-3126
Change-Id: Ia2bc398c7adbf13e925dd6329411310472c7ee35
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agobump pom versions to 1.9.0-SNAPSHOT 96/119196/1
jhh [Fri, 12 Mar 2021 00:40:45 +0000 (18:40 -0600)]
bump pom versions to 1.9.0-SNAPSHOT

Issue-ID: POLICY-3105
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0686675cdddf6fb5ce78f792484486f39d705a58

3 years agobump poms to 1.8.2-SNAPSHOT 86/119086/1
jhh [Wed, 10 Mar 2021 16:04:55 +0000 (10:04 -0600)]
bump poms to 1.8.2-SNAPSHOT

Issue-ID: POLICY-3127
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0cf960650fbd2010a7c747d4932fdf8226c1fa07

3 years agodocker image release 1.8.1 83/119083/1
jhh [Wed, 10 Mar 2021 15:37:29 +0000 (09:37 -0600)]
docker image release 1.8.1

Issue-ID: POLICY-3127
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iec454c8c56fbb6cd0a3b6f3d9066bec050370365

3 years agomaven release 1.8.1 79/119079/1
jhh [Wed, 10 Mar 2021 15:11:19 +0000 (09:11 -0600)]
maven release 1.8.1

Issue-ID: POLICY-3127
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I5273c846164413c510209605b8d6845fb740002d

3 years agopoint to released models 2.4.1 73/119073/1
jhh [Wed, 10 Mar 2021 14:18:46 +0000 (08:18 -0600)]
point to released models 2.4.1

Issue-ID: POLICY-3127
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ifa9e15c24245f195f7def2b831db9e24bbc108ce

3 years agoadd no locking feature 77/118977/5
jhh [Tue, 9 Mar 2021 16:01:17 +0000 (10:01 -0600)]
add no locking feature

It provides an interface to applications for locking
purposes that always succeeds.  It does not deny
acquiring resource locks.

Issue-ID: POLICY-3114
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I6aebb5f40e4176e0ff7b0e6c6d4042a79dd0b7a3
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agomodify filename and path for csit 56/118856/1
Taka Cho [Fri, 5 Mar 2021 15:24:25 +0000 (10:24 -0500)]
modify filename and path for csit

after doing a test in jenkins sandbox
found some errors have to be fixed.

Issue-ID: POLICY-2895
Change-Id: I2bd6d79c71070ef7ce9ec179a1838d51b886b2ae
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "Fix default timestamp in upgrade script"
Jorge Hernandez [Thu, 4 Mar 2021 21:46:09 +0000 (21:46 +0000)]
Merge "Fix default timestamp in upgrade script"

3 years agoFix default timestamp in upgrade script 30/118830/3
Jim Hahn [Thu, 4 Mar 2021 19:03:42 +0000 (14:03 -0500)]
Fix default timestamp in upgrade script

The 1811 upgrade script for distributed locking is failing, because the
default timestamp value is invalid for the new column type.  Modified
the value and also added one for the downgrade script.

Issue-ID: POLICY-3117
Change-Id: I8dff748cb089db551820418b1d597a1be207c9b5
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoenable viewing lifecycle statistics with telemetry 66/118766/2
jhh [Wed, 3 Mar 2021 18:05:02 +0000 (12:05 -0600)]
enable viewing lifecycle statistics with telemetry

Issue-ID: POLICY-3121
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I25e8c4439c0a6beabe532c17cc58919f369f17f0
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoAdd quotes around variable in db script 96/118696/2
Jim Hahn [Tue, 2 Mar 2021 15:09:42 +0000 (10:09 -0500)]
Add quotes around variable in db script

Apparently, ash doesn't like "[ -z ${xxx} ]" if the content of $xxx
contains spaces.  Added quotes around ${xxx}.
Also fixed:
- a couple of "[" "]" mismatches
- a logic error in the selection of upgrade scripts

Issue-ID: POLICY-3117
Change-Id: I99c977825fe9df8a44c288b6307cd3e55c504f86
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agomove drools-pdp csit to project level 12/118612/1
Taka Cho [Fri, 26 Feb 2021 16:02:51 +0000 (11:02 -0500)]
move drools-pdp csit to project level

move tests/plans from
csit repot to drools-pdp repo

Issue-ID: POLICY-2895
Change-Id: I8fd43ca763d74d6db7950b1b5d3502f3da73e09e
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoUpdate info.yaml in drools-pdp 02/118402/1
Ram Krishna Verma [Wed, 24 Feb 2021 15:42:37 +0000 (10:42 -0500)]
Update info.yaml in drools-pdp

Issue-ID: POLICY-3028
Change-Id: I951ae73be6a42184f9fa72e4bac4432ae9b552b1
Signed-off-by: Ram Krishna Verma <ram_krishna.verma@bell.ca>
3 years agobump poms to 1.8.1-SNAPSHOT 78/118378/1
jhh [Wed, 24 Feb 2021 13:53:26 +0000 (07:53 -0600)]
bump poms to 1.8.1-SNAPSHOT

Issue-ID: POLICY-3088
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I2210fcc34c9f69c3ea42c07543ffb9834f719620

3 years agodocker image release 1.8.0 26/118326/1
jhh [Tue, 23 Feb 2021 23:01:44 +0000 (17:01 -0600)]
docker image release 1.8.0

Issue-ID: POLICY-3088
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I54d4c113e558f8392ad10a7e4e8aff3d9b9ff508

3 years agomaven release 1.8.0 25/118325/1
jhh [Tue, 23 Feb 2021 22:21:21 +0000 (16:21 -0600)]
maven release 1.8.0

Issue-ID: POLICY-3088
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: If9d4eedc7d2710143588b0c2313628c2d9634c13

3 years agoUpgrade hibernate dependency version in drools-pdp 20/118320/1
Jim Hahn [Tue, 23 Feb 2021 21:19:11 +0000 (16:19 -0500)]
Upgrade hibernate dependency version in drools-pdp

The FOSS report for drools-pdp showed that hibernate-commons-annotations
uses the LGPL 2 license, which means it should be kept up to date, if
possible.  However, it is still version 5.0.1.Final, which was released
in 2015, while 5.1.2.Final was released in 2020.  Upgraded to the new
version.
Verified junits still pass in both drools-pdp & drools-apps.

Issue-ID: POLICY-3005
Change-Id: I1c42b14cfa812299797de002a7fa2e20b49dea6e
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agorearrange asserts in DroolsRunnable tests 14/118314/1
jhh [Tue, 23 Feb 2021 19:32:38 +0000 (13:32 -0600)]
rearrange asserts in DroolsRunnable tests

There are consistent failures when doing staging builds
in policy-core junits.  This problem shows only in stage builds.
It is suspected to be a race conditioning with the internal
scheduling of rules and insertion of events.

Issue-ID: POLICY-3097
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0f2df770dfdda6d23e9cb29253f4152a0365d33a

3 years agouse policy-jdk-alpine:2.2.1 base image 82/118282/1
jhh [Tue, 23 Feb 2021 16:16:29 +0000 (10:16 -0600)]
use policy-jdk-alpine:2.2.1 base image

Issue-ID: POLICY-3088
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I2c891acddcce74297cf03d696af8472c127d27ea

3 years agoversions: 1.8.0 common, 2.4.0 models, 3.3.0 parent 58/118258/1
jhh [Tue, 23 Feb 2021 15:22:34 +0000 (09:22 -0600)]
versions: 1.8.0 common, 2.4.0 models, 3.3.0 parent

Issue-ID: POLICY-3088
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I34009c5916b04d1272b1d528272945fabe22a56c

3 years agoDeprecate feature-simulators from drools 07/118207/1
Jim Hahn [Mon, 22 Feb 2021 21:50:27 +0000 (16:50 -0500)]
Deprecate feature-simulators from drools

feature-simulators was only used by server-pool.  Now that server-pool
has been deprecated, the simulators can be deprecated, too.

Issue-ID: POLICY-3079
Change-Id: I4555432d90f99735de2f189ce626befb414027cb
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "support policy execution counts in lifecycle"
Ram Krishna Verma [Mon, 22 Feb 2021 19:19:09 +0000 (19:19 +0000)]
Merge "support policy execution counts in lifecycle"

3 years agosupport policy execution counts in lifecycle 84/118184/1
jhh [Mon, 22 Feb 2021 16:54:15 +0000 (10:54 -0600)]
support policy execution counts in lifecycle

Issue-ID: POLICY-3033
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ic9150b9b76a04ee39cb0c0a78081ad22b21dcd02

3 years agoMerge "convert date to instant for statistics"
Jorge Hernandez [Mon, 22 Feb 2021 15:50:39 +0000 (15:50 +0000)]
Merge "convert date to instant for statistics"

3 years agoconvert date to instant for statistics 65/118165/1
jhh [Mon, 22 Feb 2021 14:50:05 +0000 (08:50 -0600)]
convert date to instant for statistics

Issue-ID: POLICY-3069
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I72f9db0cd70fc24a21425ad071717fc0e704bb59

3 years agodeprecate server-pool in droolspdp 05/118105/2
Taka Cho [Fri, 19 Feb 2021 14:00:43 +0000 (09:00 -0500)]
deprecate server-pool in droolspdp

deprecate server-pool in droolspdp

Issue-ID: POLICY-3079
Change-Id: Id25aea57cc4d119bba73de22c6dc77ab9a56c95f
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "remove TransMetric - not needed"
Ram Krishna Verma [Fri, 19 Feb 2021 17:29:16 +0000 (17:29 +0000)]
Merge "remove TransMetric - not needed"

3 years agoremove TransMetric - not needed 78/118078/2
jhh [Thu, 18 Feb 2021 19:32:16 +0000 (13:32 -0600)]
remove TransMetric - not needed

Issue-ID: POLICY-3033
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I626de45b528bb891c79900085bfe783fe248b3fa
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agosupport pdp-type configuration for PAP status 74/118074/3
jhh [Thu, 18 Feb 2021 18:01:05 +0000 (12:01 -0600)]
support pdp-type configuration for PAP status

Issue-ID: POLICY-3070
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iaddd9bac102cbe79626fe91d78a457dcfd4cb1fb
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoMerge "deploy stats in lifecycle module"
Jorge Hernandez [Thu, 18 Feb 2021 16:50:06 +0000 (16:50 +0000)]
Merge "deploy stats in lifecycle module"

3 years agoMerge "Upgrade dependencies in drools-pdp for IQ issues"
Ram Krishna Verma [Thu, 18 Feb 2021 16:35:06 +0000 (16:35 +0000)]
Merge "Upgrade dependencies in drools-pdp for IQ issues"

3 years agodeploy stats in lifecycle module 28/117928/6
jhh [Wed, 17 Feb 2021 00:09:46 +0000 (18:09 -0600)]
deploy stats in lifecycle module

Issue-ID: POLICY-3033
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Iaa78aa48064e8288265aeb498279e9d8324538d8
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoexpose metric from mdctransaction 03/118003/1
jhh [Wed, 17 Feb 2021 22:03:42 +0000 (16:03 -0600)]
expose metric from mdctransaction

Issue-ID: POLICY-3033
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I484174ae3a09e6706a36984aa2708f8ffef17808

3 years agoUpgrade dependencies in drools-pdp for IQ issues 89/117989/1
Jim Hahn [Wed, 17 Feb 2021 16:51:52 +0000 (11:51 -0500)]
Upgrade dependencies in drools-pdp for IQ issues

IQ reports identified a couple of vulnerabilities in various
dependencies.  Upgraded to the latest version of them per SECCOM.

Issue-ID: POLICY-3005
Change-Id: I52f1137bfaeee0d715ee438b69e98f2d06849d38
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Fix sonars from dependency upgrade"
Pamela Dragosh [Fri, 12 Feb 2021 15:18:12 +0000 (15:18 +0000)]
Merge "Fix sonars from dependency upgrade"

3 years agoMerge "support transaction reports in engine"
Ram Krishna Verma [Fri, 12 Feb 2021 14:45:58 +0000 (14:45 +0000)]
Merge "support transaction reports in engine"

3 years agoFix sonars from dependency upgrade 91/117791/2
Jim Hahn [Fri, 12 Feb 2021 13:03:49 +0000 (08:03 -0500)]
Fix sonars from dependency upgrade

The dependency upgrades in policy-parent caused some new sonars.  In
particular, initMocks() has been deprecated - replaced with calls to the
Mockito Runner.  Changed one to openMocks() because using the Runner
caused it to fail on jenkins, but not in the local eclipse.
Also fixed a type safety issue with EMPTY_LIST.

Issue-ID: POLICY-2909
Change-Id: Iea9420190f208d7de3bf3ad531515c92e0fab83f
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agosupport transaction reports in engine 24/117724/5
jhh [Wed, 10 Feb 2021 22:20:35 +0000 (16:20 -0600)]
support transaction reports in engine

Issue-ID: POLICY-3033
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Id1f02c86be491d5145e74725f76953e294e2975c
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoMore sonars in drools-pdp 26/117726/1
Jim Hahn [Wed, 10 Feb 2021 22:41:25 +0000 (17:41 -0500)]
More sonars in drools-pdp

Addressed the following issues:
- log user-controlled data; moved the "NOSONAR" to a different line
- make constructors protected

Issue-ID: POLICY-2909
Change-Id: Ic69c100af777779e791c38cc444dd2ea726258f2
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoMerge "Upgrade dependencies"
Ram Krishna Verma [Tue, 9 Feb 2021 21:53:28 +0000 (21:53 +0000)]
Merge "Upgrade dependencies"

3 years agoUpgrade dependencies 48/117648/4
Jim Hahn [Tue, 9 Feb 2021 16:01:43 +0000 (11:01 -0500)]
Upgrade dependencies

Changes to eclipselink are incompatible with javax-persistence-api so
removed the latter.
Also added target-database property.
Also replaced string constants with eclipselink constants.
Per review comments, moved target-database values to property files.

Issue-ID: POLICY-3005
Change-Id: I043203a952d54406a5996c1e8b5ba8936bf558c0
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agopull generic code from mdctransaction into metric 66/117566/4
jhh [Fri, 5 Feb 2021 22:05:50 +0000 (16:05 -0600)]
pull generic code from mdctransaction into metric

created generic metric classes that would be used
now for 2 purposes: 1) existing logging framework of
metrics and transactions, 2) generic metric tracking to
be use to report pdp statistics.

Issue-ID: POLICY-3033
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I8f5d773f27871e19c8796d1fe2f3972b4c21fe67
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agosmall perf improvement passing policy map argument 15/117315/1
jhh [Fri, 29 Jan 2021 00:21:21 +0000 (18:21 -0600)]
small perf improvement passing policy map argument

Issue-ID: POLICY-2762
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I85aeba2e710f6637a6e6bdfd62e1bc8b70f4d19f
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agosonars - protected constructors and typecasting 23/117223/1
jhh [Thu, 28 Jan 2021 22:30:51 +0000 (16:30 -0600)]
sonars - protected constructors and typecasting

Issue-ID: POLICY-3017
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I7e7e384db26e244e2514aec3c3579b7b7f92f8a1

3 years agosync policies when native artifact policies added 27/116927/3
jhh [Fri, 15 Jan 2021 22:51:47 +0000 (16:51 -0600)]
sync policies when native artifact policies added

interoperability between native and non-native policies
present several difficulties.   The code submitted
operates in deltas where deploy and undeploy operations
are performed on the deltas of the updates.

In order to support interoperability, policies not
part of a delta update may need to be reapplied.
For example, in the case when the delta is just
a new native controller artifact, we should go
through the set of already deployed policies and
reapply non-native policies as long as the policy types that
the native artifact policy supports.

Issue-ID: POLICY-2762
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ieb8e5e17862e9d607433a1d4e86a026725d73498
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoadd methods to check if a fact exists. 55/116855/3
jhh [Wed, 13 Jan 2021 22:34:13 +0000 (16:34 -0600)]
add methods to check if a fact exists.

Issue-ID: POLICY-2762
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Ic00d2a548dbc904e044d2310c7d5439a1cb708a5
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoMerge "sort deploy and undeploy policy lists"
Jorge Hernandez [Mon, 11 Jan 2021 17:43:32 +0000 (17:43 +0000)]
Merge "sort deploy and undeploy policy lists"

3 years agosort deploy and undeploy policy lists 19/116719/1
jhh [Mon, 11 Jan 2021 13:39:17 +0000 (07:39 -0600)]
sort deploy and undeploy policy lists

An order is imposed in the deployment and undeployment actions when
the list of active policies is retrieved from PAP.   This is to
ensure that the operations are applied in a sane way, for example
to try to prevent to undeploy policies before deleting a controller,
etc ..

The deployment order is 1) native controller, 2) native rule, and 3)
non-native policies.

The undeployment order is 1) non-native, 2) native rule, and 3)
native controller policies.

Issue-ID: POLICY-2762
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Icb15dcec87fd5d9917ee152ab15ca7277e13590a

3 years agodrools-pdp docker build fail 87/116687/1
Taka Cho [Thu, 7 Jan 2021 19:18:58 +0000 (14:18 -0500)]
drools-pdp docker build fail

after official jre 2.2.0 released
there is no /root/.cache exist
based on jenkins build

Issue-ID: POLICY-2999
Change-Id: I6c7db9dce3269bdcd26016d4049364bc72310dac
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoMerge "Changed identifiers to concept identifiers"
Jim Hahn [Wed, 6 Jan 2021 18:07:54 +0000 (18:07 +0000)]
Merge "Changed identifiers to concept identifiers"

3 years agouse jdk base 2.2.0 - drools 14/116614/1
Taka Cho [Tue, 5 Jan 2021 20:14:51 +0000 (15:14 -0500)]
use jdk base 2.2.0 - drools

use jdk base 2.2.0

Issue-ID: POLICY-2917
Change-Id: Ib7692dd05290dcb672a30174ed90441d364a4b83
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoChanged identifiers to concept identifiers 70/116570/1
liamfallon [Mon, 4 Jan 2021 15:58:25 +0000 (15:58 +0000)]
Changed identifiers to concept identifiers

The policy models tosca classes ToscaPolicyIdentifier and
ToscaPolicyIdentifierOptVersion can be used to identify any TOSCA
concept, not just TOSCA policies so they are renamed to
ToscaConceptIdentifier and ToscaCinceptIdentifierOptVersion
respectively.

The class ToscaPolicyTypeIdentifier is redundant and is replaced by
ToscaConceptIdentifier.

Issue-ID: POLICY-2900
Change-Id: I677cc1f8730001b300ab2041f2d57c2485cbc4ed
Signed-off-by: liamfallon <liam.fallon@est.tech>
3 years ago[docker] use `--no-cache-dir` flag to `pip` in dockerfiles to save space 44/116544/1
Pratik raj [Wed, 30 Dec 2020 14:18:54 +0000 (19:48 +0530)]
[docker] use `--no-cache-dir` flag to `pip` in dockerfiles to save space

using "--no-cache-dir" flag in pip install ,make sure downloaded
packages by pip don't cached on system . This is a best practice
which make sure to fetch from repo instead of using local cached one .
Further , in case of Docker Containers , by restricting caching ,
we can reduce image size.
In term of stats , it depends upon the number of python packages
multiplied by their respective size . e.g for heavy packages with a lot
of dependencies it reduce a lot by don't caching pip packages.

Further , more detail information can be found at

https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6

Issue-ID: POLICY-2948
Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
Change-Id: I0c4c6ba511bca93a1389c53a91bae9b2d4546ee6

3 years agoMerge "remove all GPL-3.0 and plus license package - drools pdp"
Ram Krishna Verma [Fri, 4 Dec 2020 14:59:53 +0000 (14:59 +0000)]
Merge "remove all GPL-3.0 and plus license package - drools pdp"

3 years agoMerge "move all bash to ash shell scripts"
Jim Hahn [Wed, 2 Dec 2020 19:03:23 +0000 (19:03 +0000)]
Merge "move all bash to ash shell scripts"

3 years agomove all bash to ash shell scripts 64/114864/17
Taka Cho [Thu, 12 Nov 2020 22:48:30 +0000 (17:48 -0500)]
move all bash to ash shell scripts

this gerrit would be the first step
to not to use any GPL-3.0 and plus license

Issue-ID: POLICY-2847
Change-Id: I09a571f14ef8c6983f9051068c2bad5acc173787
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoremove all GPL-3.0 and plus license package - drools pdp 43/115143/1
Taka Cho [Thu, 19 Nov 2020 19:55:57 +0000 (14:55 -0500)]
remove all GPL-3.0 and plus license package - drools pdp

this gerrit would be the second step
to not to use any GPL-3.0 and plus license

Issue-ID: POLICY-2847
Change-Id: I67f9f4be6aba6e91e53a7462db79e60c73e58144
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoverify schema validation for any policy type 64/115064/2
jhh [Wed, 18 Nov 2020 22:40:39 +0000 (16:40 -0600)]
verify schema validation for any policy type

Issue-ID: POLICY-2880
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: I0cc6e8967d42d347415857dc77976f2b8ab86516
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agosupport for not validated policy types 14/115014/2
jhh [Tue, 17 Nov 2020 20:40:16 +0000 (14:40 -0600)]
support for not validated policy types

Issue-ID: POLICY-2880
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
Change-Id: Id816bb3edd44c34a342cd7ada95dd8f2f9d1b0a6
Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
3 years agoMake feature-pooling-dmaap work without filtering 21/114421/5
Jim Hahn [Thu, 29 Oct 2020 22:15:51 +0000 (18:15 -0400)]
Make feature-pooling-dmaap work without filtering

As DMaaP server-side filtering has been deprecated, modified
feature-pooling-dmaap to work without it.  The new design assumes that
each pdp gets its own unique consumer group, thus all pdps receive all
events.  Each pdp then uses the bucket assignments to determine whether
or not to process the event.  Note: this means that events no longer
have to be forwarded to the correct host, thus the "Forward" class has
been deleted.

Other than that, the code already did post-filtering of events so most
of it still works even without server-side filtering.  As a result, most
of the effort was in simply removing code that no longer applies.

Per review comments:
Modified code to use the event hash code instead of the request ID has
code when routing events.  This eliminated the need for the extractor
classes and related properties.
Replaced amsterdam and beijing properties with usecases properties.

Issue-ID: POLICY-2881
Change-Id: I87e4f98c14f419593879c278d7da053c80575553
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRe-encrypt drools-pdp properties 02/114402/1
Jim Hahn [Wed, 28 Oct 2020 20:28:41 +0000 (16:28 -0400)]
Re-encrypt drools-pdp properties

To satisfy sonar, the algorithm for policy/common CryptoUtils has been
changed, necessitating the properties be re-encrypted.

Issue-ID: POLICY-2801
Change-Id: I59e63d68c1c7f62e321aa729e11fe41e13efd396
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoBump drools-pdp master to 1.8.0-SNAPSHOT 25/114325/1
Jim Hahn [Tue, 27 Oct 2020 19:06:03 +0000 (15:06 -0400)]
Bump drools-pdp master to 1.8.0-SNAPSHOT

Bumping minor version now that guilin branch has been created.
Also repointed to snapshot versions for dependencies.

Issue-ID: POLICY-2875
Change-Id: Ic3d5b96e610db0487ce316a9397d2f9ecb04bda6
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoBump drools-pdp to 1.7.5 SNAPSHOT 54/114054/1
Jim Hahn [Tue, 20 Oct 2020 14:54:36 +0000 (10:54 -0400)]
Bump drools-pdp to 1.7.5 SNAPSHOT

Issue-ID: POLICY-2869
Change-Id: Id2fcbfcb5435f79b5ebb74a403fd6133d1b79a7c
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRelease drools-pdp 1.7.4 docker 48/114048/1 7.0.0-ONAP
Jim Hahn [Tue, 20 Oct 2020 14:36:46 +0000 (10:36 -0400)]
Release drools-pdp 1.7.4 docker

Issue-ID: POLICY-2869
Change-Id: I4e92d996dc55d000c4150c9e983bdc4904c30699
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoRelease drools-pdp 1.7.4 artifacts 39/114039/1
Jim Hahn [Tue, 20 Oct 2020 14:06:33 +0000 (10:06 -0400)]
Release drools-pdp 1.7.4 artifacts

Issue-ID: POLICY-2869
Change-Id: I4121fefa2ddcefb0f8c2cca15990a1d494c64827
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoPoint drools to models 2.3.5 28/114028/1
Pamela Dragosh [Tue, 20 Oct 2020 12:07:13 +0000 (08:07 -0400)]
Point drools to models 2.3.5

Issue-ID: POLICY-2869
Change-Id: I00931ad9b9df9c1f9ca893e0967693356c9eccfa
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
3 years agoenforce httpie 1.0.3 installed 07/113807/1
Taka Cho [Mon, 12 Oct 2020 17:00:27 +0000 (13:00 -0400)]
enforce httpie 1.0.3 installed

http-prompt has a compatibility
issue with httpie 2.x.x
enforce to use httpie 1.0.3

Issue-ID: POLICY-2864
Change-Id: Ibfdd9afb48d0f755051516edb9ab790f12331cdc
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agobump drools-pdp to 1.7.4-SNAPSHOT 43/113743/1
Taka Cho [Sat, 10 Oct 2020 01:04:07 +0000 (21:04 -0400)]
bump drools-pdp to 1.7.4-SNAPSHOT

Issue-ID: POLICY-2839
Change-Id: I85d286a012d7b54b8c847d94951703d2e6462e13
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agorelease policy-drool 1.7.3 docker 42/113742/1
Taka Cho [Sat, 10 Oct 2020 00:38:21 +0000 (20:38 -0400)]
release policy-drool 1.7.3 docker

Issue-ID: POLICY-2839
Change-Id: I496b7b992a5c2843e3e9fac933e1f376f03feb0f
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agorelease drools-pdp 1.7.3 artifact 40/113740/1
Taka Cho [Sat, 10 Oct 2020 00:21:13 +0000 (20:21 -0400)]
release drools-pdp 1.7.3 artifact

Issue-ID: POLICY-2839
Change-Id: I1088f94022e370a9d4029fb47666b776c5ccd979
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoPoint to model 2.3.4 38/113738/1
Taka Cho [Fri, 9 Oct 2020 22:32:06 +0000 (18:32 -0400)]
Point to model 2.3.4

Issue-ID: POLICY-2839
Change-Id: Ifbc8239f9f5912eb7d1074424cf7c8060f71fdda
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoPoint to model 2.3.3 34/113734/1
Taka Cho [Fri, 9 Oct 2020 21:19:07 +0000 (17:19 -0400)]
Point to model 2.3.3

Issue-ID: POLICY-2839
Change-Id: I0bab7451436d5f76c19b743fe384cc0303a41228
Signed-off-by: Taka Cho <takamune.cho@att.com>
3 years agoUse models 2.3.3-SNAPSHOT in drools-pdp 28/113728/1
Jim Hahn [Fri, 9 Oct 2020 16:46:35 +0000 (12:46 -0400)]
Use models 2.3.3-SNAPSHOT in drools-pdp

Issue-ID: POLICY-2863
Change-Id: Iaffc87711f33e4a5c35d1fdcaa21f8ec0d742baf
Signed-off-by: Jim Hahn <jrh3@att.com>
3 years agoBump drools-pdp to 1.7.3 snapshot 56/113656/1
Taka Cho [Wed, 7 Oct 2020 22:08:23 +0000 (18:08 -0400)]
Bump drools-pdp to 1.7.3 snapshot

Issue-ID: POLICY-2839
Change-Id: I750b5130c421dafd95dc4f323e891384a7815841
Signed-off-by: Taka Cho <takamune.cho@att.com>