aai/validation.git
6 years agoImprove error message for unknown entity-type 58/82158/1
mark.j.leonard [Wed, 13 Mar 2019 18:09:51 +0000 (18:09 +0000)]
Improve error message for unknown entity-type

When the Rule-driven Validator cannot find any rules for the event's
entity type, include the entity type in the content of the error message
that is logged and thrown as an Exception.

Change-Id: If037a0d512f690350caa169d3af2f0f152ac233b
Issue-ID: AAI-2259
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoFix Sonar vulnerability for SystemProperty enum 26/82026/1
mark.j.leonard [Tue, 12 Mar 2019 12:39:57 +0000 (12:39 +0000)]
Fix Sonar vulnerability for SystemProperty enum

Sonar wrongly identifies the public set() method as a setter for the
enum and logs a violation (enums should not be mutable).
Change the access level modifier (to make it not public) as lowering the
visibility suppresses the Sonar false positive.

Change-Id: Ic3e5ade0410a7702a89e22fd72b6fbe4d8db0dc4
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoSimplify JSON auth policy loading code 69/78769/2
mark.j.leonard [Tue, 19 Feb 2019 17:09:50 +0000 (17:09 +0000)]
Simplify JSON auth policy loading code

If the JSON filename or path cannot be located then attempt to resolve
the file location relative to firstly CONFIG_HOME and then CONFIG_HOME/auth

Change-Id: Ic8d6c7d6e129b09ac7fa72d733768d941826185b
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoAdd missing INFO.yaml blocks 64/79564/1
Jessica Wagantall [Sat, 2 Mar 2019 02:46:01 +0000 (18:46 -0800)]
Add missing INFO.yaml blocks

Add missing information so that the new verify
job passes.

Change-Id: I69b2abf2eb34a841aa59df29395badcb240e2162
Issue-ID: CIMAN-134
Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
6 years agoChange log level for filtered events 47/78747/1
ed852m [Tue, 19 Feb 2019 12:13:26 +0000 (12:13 +0000)]
Change log level for filtered events

Issue-ID: AAI-2160

Change-Id: I8dc3d3408fce4823cd8684377e788c788bdca72b
Signed-off-by: ed852m <ed.dening@amdocs.com>
6 years agoRemove unused test configuration files 93/78693/2
mark.j.leonard [Mon, 18 Feb 2019 16:03:02 +0000 (16:03 +0000)]
Remove unused test configuration files

Also fix some checkstyle warnings regarding Javadoc comments.

Issue-ID: AAI-2057
Change-Id: If654c63ec6a5f9888fdf597e51ad0cad9f363a90
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoVarious Sonar and Checkstyle issues 92/78692/2
mark.j.leonard [Fri, 15 Feb 2019 18:21:23 +0000 (18:21 +0000)]
Various Sonar and Checkstyle issues

Issue-ID: AAI-2057

Change-Id: I3b24ce6e5baddb409e3b1d89f411ee934c465284
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoCreate Application tests for KEY_STORE_PASSWORD 49/78549/3
mark.j.leonard [Fri, 15 Feb 2019 11:30:00 +0000 (11:30 +0000)]
Create Application tests for KEY_STORE_PASSWORD

Add a dummy keystore file for testing exceptions relating to opening the
key store (for the server cert) with an incorrect password.
This is intended to increase code coverage.

Make AAIMicroServiceAuthCore non-static to avoid some issues with Spring
initialization.

Change-Id: Ic512bd0934210fb016da9731e65ec0d858fa4ff7
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoConvert tests with Mocking to SpringBootTest 48/78548/1
mark.j.leonard [Fri, 15 Feb 2019 11:16:58 +0000 (11:16 +0000)]
Convert tests with Mocking to SpringBootTest

Remove the dependency on Mockito and instead use the Spring framework
for testing with Mocks. This allows greater control over the properties
that are used by the test classes.

Change-Id: I3a72d41f3015f831f425f99cf44417bccdb2c823
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoAdd support for common rules across types 95/78495/1
mark.j.leonard [Thu, 14 Feb 2019 13:51:11 +0000 (13:51 +0000)]
Add support for common rules across types

Refactor the Rule Driven Validator implementation for loading the Groovy
rules. Firstly, support multiple top-level folders. Secondly, include
each top-level folder in the set of paths to search for *.groovy files.

Pull a common rule up to the top-level to remove the duplication.

Add tests to exercise the exception handling code.

Change-Id: Ib70fe03ab5b1f2f8c1711760236b07850aaaa398
Issue-ID: AAI-2155
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoRefactor rule manager key generation 68/78468/1
mark.j.leonard [Thu, 14 Feb 2019 10:47:49 +0000 (10:47 +0000)]
Refactor rule manager key generation

Simplify the generateKey() method by using a Java List instead of an
Array. This makes the code easier to read.

Change-Id: Ida772d33af5a244bafa19b6fff465fd590ac6d1a
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoAdd a JUnit test for the Data Dictionary 04/78404/1
mark.j.leonard [Wed, 13 Feb 2019 15:44:48 +0000 (15:44 +0000)]
Add a JUnit test for the Data Dictionary

Create sample configuration for debugging the DataDictionary.java code.
Fix an issue in the Rule Driven Validator: re-enable invocation of the
default rules when no indexed rules are found for an event.

Change-Id: I85fb6c0797e1240c14997b6e8ba1f6c0304152db
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoAdd a topic protocol configuration setting 19/78319/2
mark.j.leonard [Tue, 12 Feb 2019 16:49:30 +0000 (16:49 +0000)]
Add a topic protocol configuration setting

Use the latest version of the event-client for DMaaP.

Read an (optional) protocol value from each topic configuration
properties file, and pass this to the Consumer and/or Publisher.
Use the default protocol if the configuration is not supplied.

Change-Id: I3d6264e1f32c1fbba097eafbe7fe7fbd744f1373
Issue-ID: AAI-2150
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoImprove JUnit tests for the application logger 96/78296/1
mark.j.leonard [Tue, 12 Feb 2019 13:36:16 +0000 (13:36 +0000)]
Improve JUnit tests for the application logger

Rework the logger tests to simplify the code and to improve error
messages in the case of failure.

Change-Id: Ic55077bb8ac7bc7d10559cb1ddd652a6a15f3dca
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoRemove UTF-8 character from License text 95/78295/1
mark.j.leonard [Tue, 12 Feb 2019 13:34:29 +0000 (13:34 +0000)]
Remove UTF-8 character from License text

Change the License back to plain text.
See https://wiki.onap.org/display/DW/Copyrights+and+License+Declarations

Change-Id: I3b091eb0c95f6d55465766ad9af860e954ce9219
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoEnable the info service 89/78289/1
mark.j.leonard [Tue, 12 Feb 2019 13:09:04 +0000 (13:09 +0000)]
Enable the info service

Explicitly configure a Spring bean for the InfoService.

Change-Id: I02b98750dfed416ab831e126aeca5b0ac5582356
Issue-ID: AAI-2115
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoAdd the Maven license plugin 88/78288/1
mark.j.leonard [Tue, 12 Feb 2019 12:41:54 +0000 (12:41 +0000)]
Add the Maven license plugin

Update some Java files with incorrect import ordering. Apply an updated
License text (referencing the year 2019).

Change-Id: Iaf0a7f8a4f2fd4dfb52eda87366e1f8d50e6e06c
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoMake password obfuscation with Jetty optional 17/76217/1
mark.j.leonard [Wed, 23 Jan 2019 17:26:32 +0000 (17:26 +0000)]
Make password obfuscation with Jetty optional

Only deobfuscate a password value that begins with the text OBF:

Issue-ID: AAI-2115

Change-Id: Ia9d733e7044b63bdba0add6b8df5d40b66decc63
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoUse Jetty deobfuscation method on password strings 24/76124/1
mark.j.leonard [Tue, 22 Jan 2019 12:42:30 +0000 (12:42 +0000)]
Use Jetty deobfuscation method on password strings

Change-Id: Ifc36d8358c54f2602ecab2fb965461a6436bfcae
Issue-ID: AAI-2110
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoRefactor - create a ValidationResult Builder class 23/75823/4
mark.j.leonard [Tue, 15 Jan 2019 14:35:55 +0000 (14:35 +0000)]
Refactor - create a ValidationResult Builder class

In anticipation of the Validation Result output adopting the common
event payload, add an interface to provide a greater level of
abstraction between the current implementation and the classes that
create validation results.

Change-Id: Ie81228dff19a124011e77097768b44be5a3844b6
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoUpdate to aai-schema-ingest version 1.4.1 07/75807/4
mark.j.leonard [Tue, 15 Jan 2019 10:34:53 +0000 (10:34 +0000)]
Update to aai-schema-ingest version 1.4.1

Using SNAPSHOT version (as 1.4.1 is not released)

Change-Id: I3b5959cb2d43840556a628db8fe17701d36aa6f9
Issue-ID: AAI-2077
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoFix Java code smells (Sonar and Checkstyle) 56/75756/1
mark.j.leonard [Mon, 14 Jan 2019 15:48:40 +0000 (15:48 +0000)]
Fix Java code smells (Sonar and Checkstyle)

Change-Id: I04cb9b4dee75560777bb3533f6a58268e10fc217
Issue-ID: AAI-2057
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoUpgrade REST client to version 1.4.0 46/75746/2
mark.j.leonard [Mon, 14 Jan 2019 13:53:23 +0000 (13:53 +0000)]
Upgrade REST client to version 1.4.0

Upgrade the dependency from version 1.2.1

Change-Id: I3333dbea4d3d8fd810c0235339110747417476d5
Issue-ID: AAI-2075
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years agoAdd logging for unprocessed events 81/75381/2
mark.j.leonard [Mon, 7 Jan 2019 15:50:30 +0000 (15:50 +0000)]
Add logging for unprocessed events

Change-Id: Iccc6815cf9c6b795d0aff7f0fb8d57cff9aba936
Issue-ID: AAI-2056
Signed-off-by: mark.j.leonard <mark.j.leonard@gmail.com>
6 years ago[LOG-404] revert spring-starter-tomcat exclusion 67/75067/1
Pierre Rioux [Fri, 21 Dec 2018 19:47:49 +0000 (14:47 -0500)]
[LOG-404] revert spring-starter-tomcat exclusion

Change-Id: Ic1a88101d279ff2a39f595b548253196606c9546
Signed-off-by: Pierre Rioux <pierre.rioux@amdocs.com>
Issue-ID: LOG-404

6 years agoMerge "[LOG-404] updating built-in rule for data-dict API"
Steven Blimkie [Fri, 21 Dec 2018 14:19:47 +0000 (14:19 +0000)]
Merge "[LOG-404] updating built-in rule for data-dict API"

6 years agoMerge "Exclude tomcat from springboot starter"
Steven Blimkie [Fri, 21 Dec 2018 14:16:55 +0000 (14:16 +0000)]
Merge "Exclude tomcat from springboot starter"

6 years ago[LOG-404] updating built-in rule for data-dict API 36/75036/1
Pierre Rioux [Thu, 20 Dec 2018 22:50:49 +0000 (17:50 -0500)]
[LOG-404] updating built-in rule for data-dict API

Change-Id: I8b6f79c015507facbd785fed9d9658218f7ae9ac
Signed-off-by: Pierre Rioux <pierre.rioux@amdocs.com>
Issue-ID: LOG-404

6 years agoExclude tomcat from springboot starter 08/75008/1
jimmy [Thu, 20 Dec 2018 16:39:54 +0000 (11:39 -0500)]
Exclude tomcat from springboot starter

Change-Id: I6f34556c8c9b45e03bb5661b01da4ab33ed313d2
Issue-ID: AAI-2031
Signed-off-by: jimmy <jf2512@att.com>
6 years agoMerge "[PIE-797] adding data-dictionary builtin rule"
Steven Blimkie [Tue, 18 Dec 2018 20:23:53 +0000 (20:23 +0000)]
Merge "[PIE-797] adding data-dictionary builtin rule"

6 years agoUpdate to spring-boot 1.5.18 76/74776/1
jimmy [Mon, 17 Dec 2018 21:43:17 +0000 (16:43 -0500)]
Update to spring-boot 1.5.18

Change-Id: I3a62f2f02a8a077b5cd1a4cd67ab56d828498bee
Issue-ID: AAI-2015
Signed-off-by: jimmy <jf2512@att.com>
6 years ago[PIE-797] adding data-dictionary builtin rule 92/74592/1
Pierre Rioux [Wed, 12 Dec 2018 19:29:14 +0000 (14:29 -0500)]
[PIE-797] adding data-dictionary builtin rule

Change-Id: I08565199e34a5c88790e6879cf1e89bc9c513e92
Signed-off-by: Pierre Rioux <pierre.rioux@amdocs.com>
Issue-ID: LOG-404

6 years agoMerge "uprev springboot to 1.5.17"
James Forsyth [Fri, 9 Nov 2018 18:07:51 +0000 (18:07 +0000)]
Merge "uprev springboot to 1.5.17"

6 years agouprev springboot to 1.5.17 10/72310/1
jmac [Fri, 9 Nov 2018 16:18:09 +0000 (16:18 +0000)]
uprev springboot to 1.5.17

Change-Id: Ieee9e5805e74e37f05caefc2bb41c08081d9718d
Signed-off-by: jmac <james.macnider@amdocs.com>
Issue-ID: AAI-1901

6 years agoUpversion to 1.4.0 61/71961/1
Lee, Tian (tl5884) [Tue, 6 Nov 2018 16:00:45 +0000 (16:00 +0000)]
Upversion to 1.4.0

Change-Id: I7e5a9af2e0bc65f9337c3f2018facc0a6085e99d
Issue-ID: AAI-1855
Signed-off-by: Lee, Tian (tl5884) <TianL@amdocs.com>
6 years agoupversion to 1.3.1 55/71555/1
sblimkie [Wed, 31 Oct 2018 15:24:53 +0000 (11:24 -0400)]
upversion to 1.3.1

Change-Id: I7990df11ed3682a2d37c9e18be5dcdf82d67729c
Issue-ID: AAI-1788
Signed-off-by: sblimkie <steven.blimkie@amdocs.com>
6 years agoFix critical CLM issue 03/70203/1 1.3.0
Prudence Au [Wed, 10 Oct 2018 20:31:14 +0000 (16:31 -0400)]
Fix critical CLM issue

Change-Id: Id803e4e7bb1b34ab789a3e06f725d69c86aed12f
Signed-off-by: Prudence Au <prudence.au@amdocs.com>
Issue-ID: AAI-1717

6 years agoFix CLM security issues 92/70192/1
Prudence Au [Wed, 10 Oct 2018 18:44:09 +0000 (14:44 -0400)]
Fix CLM security issues

Change-Id: Iccef61ae8921422ac840cfa0dd927a94010f7571
Signed-off-by: Prudence Au <prudence.au@amdocs.com>
Issue-ID: AAI-1728
Issue-ID: AAI-1727
Issue-ID: AAI-1729
Issue-ID: AAI-1731

6 years agoFix critical CLM issue 13/70113/1
Prudence Au [Tue, 9 Oct 2018 21:20:50 +0000 (17:20 -0400)]
Fix critical CLM issue

Change-Id: I86b5b3fecd7d7be12695f517bd061f88b2b3d48b
Signed-off-by: Prudence Au <prudence.au@amdocs.com>
Issue-ID: AAI-1717

6 years agoadding dynamic err message support for violations 23/69323/4
Pierre Rioux [Thu, 27 Sep 2018 13:38:31 +0000 (09:38 -0400)]
adding dynamic err message support for violations

Change-Id: I80c1a0cade46ef623fce91921449642d8eafb2f6
Issue-ID: LOG-683
Signed-off-by: Pierre Rioux <pierre.rioux@amdocs.com>
6 years agoClean Sonar Project name 65/65065/1
Gildas Lanilis [Thu, 6 Sep 2018 19:06:10 +0000 (12:06 -0700)]
Clean Sonar Project name

Name as it appears in Sonar has to be consistent with repo name.

Change-Id: I296cba04888e166b86322a3a08a2677773d5c22c
Issue-ID: CIMAN-202
Signed-off-by: Gildas Lanilis <gildas.lanilis@huawei.com>
6 years agoUse managed guava version 09/62509/2
Gary Wu [Fri, 24 Aug 2018 22:16:22 +0000 (15:16 -0700)]
Use managed guava version

Use centrally managed guava version specified in
oparent.  Includes upgrade to oparent 1.2.0.

This change was submitted by script and may include
additional whitespace or formatting changes.

Change-Id: I0c9e8dd764c3a5510134d4f0d1aca3834dea102c
Issue-ID: INT-619
Signed-off-by: Gary Wu <gary.i.wu@huawei.com>
6 years ago[LOG-427] adding docker location to pom 31/62331/1
Pierre Rioux [Fri, 24 Aug 2018 13:06:57 +0000 (09:06 -0400)]
[LOG-427] adding docker location to pom

Change-Id: Ie75cbbdfa26f3f09265918d75733efc8cbd251dc
Issue-ID: LOG-427
Signed-off-by: Pierre Rioux <pierre.rioux@amdocs.com>
6 years agoAdd docker-maven-plugin for building docker image 25/62225/2
Prudence Au [Fri, 24 Aug 2018 00:29:35 +0000 (20:29 -0400)]
Add docker-maven-plugin for building docker image

Change-Id: I09c4db0b9fbc2a6976b7521b2e5d45ca28a03d11
Issue-ID: LOG-427
Signed-off-by: Prudence Au <prudence.au@amdocs.com>
6 years agoFix the issue for pushing artifact to Nexus 61/62161/1
Prudence Au [Thu, 23 Aug 2018 16:41:38 +0000 (12:41 -0400)]
Fix the issue for pushing artifact to Nexus

Change-Id: Ifdda4b022d59002a4068e3056af87e9145b9b63e
Issue-ID: LOG-427
Signed-off-by: Prudence Au <prudence.au@amdocs.com>
6 years agoInitial submission for validation service 99/60399/6
Prudence Au [Mon, 13 Aug 2018 21:06:59 +0000 (17:06 -0400)]
Initial submission for validation service

Change-Id: I9372430f1ae347373d5a9a0c7a427d7bd393d61e
Issue-ID: LOG-427
Signed-off-by: Prudence Au (prudence.au@amdocs.com)
Signed-off-by: Geora Barsky <georab@amdocs.com>
Signed-off-by: Pierre Rioux <pierre.rioux@amdocs.com>
6 years agoInitial empty repository
Jessica Wagantall [Mon, 9 Jul 2018 21:49:18 +0000 (21:49 +0000)]
Initial empty repository