aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/server
AgeCommit message (Collapse)AuthorFilesLines
2019-12-09base changes to support offline pdpdjhh1-1/+5
Issue-ID: POLICY-2191 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I6f8029c1c771905357971331988a9b8408a93f10 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-10-24Allow encrypted property valuesjhh2-16/+21
Issue-ID: POLICY-1945 Signed-off-by: jhh <jorge.hernandez-herrero@att.com> Change-Id: I0317a6de838d99b579638252859e42fc49cedfa8 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-09-16Add YAML support to drools-pdp rest servletsJim Hahn1-1/+1
Drools-pdp depends on some of the GsonJackson annotations that cannot be easily worked around via standard gson. Consequently, this continues to use the JacksonHandler for json-encoding, thus it uses the YamlJacksonHandler for yaml-encoding. Added YAML to swagger "consumes" list. Change-Id: Ic70c68bb274222db571b3515cbf1ab22d9ff2366 Issue-ID: POLICY-2081 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-08-29Remove AlertSeverity from logback in drools-pdpJim Hahn1-3/+3
Merged severity and AlertSeverity in the MDC, and updated the logback xml files accordingly. The logback patterns for the metrics log had a place for both Severity and AlertSeverity; the latter was replaced with an empty place-holder so-as to maintain the same position for the other fields. Change-Id: Ic0977e1133cc4219394f2d71ca8ebae080620e0b Issue-ID: POLICY-1989 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-07-31Expand AAF_NS in properties to onap.org.osaaf.aafjhh1-4/+4
Change-Id: I2e8f887093f9ba3e1fd9c5038dd4ad41d2a5c4c7 Issue-ID: POLICY-1959 Signed-off-by: jhh <jorge.hernandez-herrero@att.com>
2019-03-25Merge "Add MDC Topic Filtering"Jorge Hernandez1-121/+125
2019-03-25Add MDC Topic FilteringDaniel Cruz1-121/+125
A feature to provide configurable properties for network topics to extrac fields from JSON strings and place them in a mapped diagnostic context. Issue-ID: POLICY-1499 Change-Id: Icfca0be3b263ccf1612b79ed617e2b1ffb0317e6 Signed-off-by: Daniel Cruz <dc443y@att.com>
2019-03-21Support topic properties files.Jorge Hernandez1-27/+1
They will be loaded automatically at startup. Remove POLICY-PAP-PDP topic as is moved to a feature. Remove PDPD-CONFIGURATION topic as it is not used. Change-Id: I55629f885d61ce1cc4e3f24bcae5279e65a96f22 Issue-ID: POLICY-1610 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2019-03-04Merge "Add Controller Logging Feature"Jorge Hernandez1-2/+2
2019-03-01Add Controller Logging FeatureDaniel Cruz1-2/+2
This features provides a mechanism to extend the logback.xml properties to add controller specific loggers. The controller's logger will log messages from topics that the controller listens to in a controller specific network log. The original network log is preserved and still logs every message from every controller. Note that the way a logger is associated with a controller is by having the logger name match the controller's name. Any configuration file that has "logback-include-" prepended and a ".xml" extension will be added to the logback.xml and logback-eelf.xml files as extensions to the base configuration. Issue-ID: POLICY-1427 Change-Id: Iaeb823421eadb7ee413b6b03ae3dfe862f230612 Signed-off-by: Daniel Cruz <dc443y@att.com>
2019-03-01move all hard install config to environment varsJorge Hernandez7-67/+109
+ support multiple system properties files with variable interpolation loaded at initialization + support of configurable JVM options (-X, etc ..). + rearrange aaf configuration to avoid {{}} installation variables and use dynamic enviroment variables. + miscellaneous clean up in areas touched and checkstyle. Change-Id: I71ad839778e17eb57c098a2c5cc2bf96e468669a Issue-ID: POLICY-1524 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2019-02-27Base POLICY-PDP-PAP channel configurationJorge Hernandez1-3/+19
With these changes the PDP should come up listening in the new PAP-PDP topic for messages, and configured to send. Change-Id: I395f87a7401aeb6385d640e51f75d71c0def36b0 Issue-ID: POLICY-1548 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2019-02-21Moving hard install config to environment varsJorge Hernandez1-17/+17
Change-Id: I01e0cf2e2399ec81337961e0a2b3a349c34f55c4 Issue-ID: POLICY-1517 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2019-02-15Change properties to use gsonJim Hahn1-1/+2
Modified property files to use gson instead of jackson for REST calls, for both clients and servers. Change-Id: Ib836886df33cd585b4c2d227e9cc496cc165fc2c Issue-ID: POLICY-1431 Signed-off-by: Jim Hahn <jrh3@att.com>
2019-01-04Add tooling for drools policy developersJorge Hernandez1-3/+3
This commit adds tooling to better support development activities for drools developers. 1. deploy artifacts to nexus or to local file repository on demand. It also allows to test on a single drools instance without the dependency on a nexus repo. 2. make installation configuration files conform to same convention (all upper case). Change-Id: Ia0a2fc25db2ef21b774a9eee4ed51d4b876a1993 Issue-ID: POLICY-1367 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2018-10-26Enable Authorization AAF Filter programmatically3.0.0-ONAPJorge Hernandez1-0/+1
The intent is to reduce configuration options and automatically set up the authorization filter (that will complement the authentication filter that the policy-endpoints common framework automatically provides). Previously to enable the AAF authorization filter, it will need the configuration had to kept track of AAF flag, and the "filterClasses" property configuration, make a bit more difficult to keep them sync, and easily turn on/off AAF. Change-Id: I3d59de6fa83986c5dcb6b3d38077278b8e75689a Issue-ID: POLICY-1216 Signed-off-by: Jorge Hernandez <jorge.hernandez-herrero@att.com>
2018-09-19AAF Configuration in PDP-DJorge Hernandez6-0/+56
AAF is disabled by default until pairwise testing is completed. Change-Id: Ica83873a2605742689ed0c2e06dfade20bef8bf0 Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1043 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-09-10disabling http for configuration servicesJorge Hernandez1-28/+19
per security recommendations. Change-Id: Ic195f8270c2270239408e33e27f87436878e28b4 Signed-off-by: Jorge Hernandez <jh1730@att.com> Issue-ID: POLICY-1104
2018-08-20https certs with aaf+pdpd containers compatibilityJorge Hernandez2-6/+22
Updated license date (jrh3). Change-Id: I1bc244da64f4a1e683f8c6a1be53157474f46ee9 Issue-ID: POLICY-1026 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-25cook policy-keystore into drools imageJorge Hernandez1-1/+1
OOM team reported issues with ONAP installation in terms of config map sizes. After discussion with OOM team, one solution is to cook it in the docker image itself. This will solve the size issue on the OOM side. Change-Id: I6848370f119cabdae450a1153a88ebd8c0f6b392 Issue-ID: POLICY-747 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-18support for AAF provided trustoreJorge Hernandez1-4/+2
Change-Id: I20c5136636f922ee31a773b462e5c2318b2f222f Issue-ID: POLICY-747 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-04-03disable problematic private keystoreJorge Hernandez1-4/+4
it causes bad interactions fetching dependencies with nexus libraries, it has been disabled (at least for the short term) and rely on the JVM one instead. Change-Id: Ie9d1ae7fe304c06807e457c5bfcf34d07e8d83b8 Issue-ID: POLICY-720 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2018-03-26l2 management maturity pdp-dJorge Hernandez1-26/+63
configurable log location metric/audit log for transaction metrics conforming to new field definition. support metrics/audits records with custom logback filters so they are not intrusive with developer log testing. Change-Id: I7a4dcc6790b85539e613ad8705e731e7298ce106 Issue-ID: POLICY-533 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-31Support Utils Libraries for CL Lab IntegrationJorge Hernandez1-6/+6
There is a companion review in the drools-applications repo. This also includes workarounds to the recent oparent dependency introduction that breaks runtime (with the version-check-maven-plugin). It manifested by loading control loops and failing to load some classes due to different versions (in a lab environment). The issue was that underlying drools libraries use 3.2.5 and oparent has included a had dependency with transitive dependencies for some maven libraries in 3.2.3 and lower version xml parsers. Bottomoline, the classpath at runtime was formed by the union of both, with some libraries being resolved to the oparent one, and others to the drools one. These errors are very obscured to debug. Additional clean up of dependencies versions and order of build was introduced to avoid issues loading dependencies at runtime in a lab environment (non-junit).. Change-Id: If4f4201e08f7e6e1f3619f557434c1b2e23e47a5 Issue-ID: POLICY-162 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-08-23Add access.log to jetty serverjrh31-1/+5
Added a single line to the code that creates the jetty server so that it will log messages in access.log format. Also added lines to various logback.xml files to actually write the output from the jetty server to the access.log. Made some revisions per comments: - removed spaces around parameters - added "Out" suffix - changed suffix of archived files - changed size to 1MB Modified logback*.xml files to include jetty "access log" content in the already-existing network.log. Issue-Id: POLICY-161 Change-Id: I3e3769c06a22aaffea0e09abbec3387cc62f246f Signed-off-by: jrh3 <jrh3@att.com>
2017-07-28[POLICY-72] replace openecomp for drools-pdpGuo Ruijing1-1/+1
Change-Id: I8aa8e32d3ba10f7c655b50e97aaf6865514d4777 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
2017-07-18[POLICY-66] self-contained features supportJorge Hernandez2-50/+1
installation/enable/disable of self contained package features: Feature 3rd party dependencies, configuration files, and custom installation scripts do not need to be packaged within the policy core base to be used. Change-Id: I35a472e63bd0f9f7aa6cd0c112d41d2b4604a892 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-30[POLICY-66] rename of policy-healthcheckJorge Hernandez1-0/+0
using "feature-" naming convention. Change-Id: I13d6b75750d369ed9e61f3c9c9408b31eac6bb2d Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-26[POLICY-30] optional loadable eelf featureJorge Hernandez1-56/+2
for backwards compatibility purposes or if desired to use EELF and common-framework (from policy-common) for logging purposes in miscellaneous environments. It supports EELF/Common Framework style logging at the same time than traditional logging. This functionality is an optional loadable module. policy-docker changes need to be made to optionally unpack to make it active (in a different submission). started marking feature projects with feature prefix in project name to give a clear picture to the community which modules are features vs. code base. Change-Id: I5076c462409f03415ce54f0c9b5f50b78abb18f9 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-22[POLICY-30] remove problematic layersJorge Hernandez6-464/+144
add configurability through telemetry API Change-Id: I77ebde12a417d421b98646c32dc74824f4494c2e Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-06-05[POLICY-8] cleaned up unused codeJorge Hernandez3-188/+0
Change-Id: Ifebf67db574e1c4eadf9d50ca0f178ab7ddba033 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-05-31[POLICY-6] add missing license informationJorge Hernandez2-0/+39
Change-Id: I984ec36d3022cb498f99aa3b1a23e8729b0624d8 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-05-25[POLICY-16] generic introduction of swaggerJorge Hernandez3-0/+3
On a per-server basis append /swagger.json or /swagger.yaml ie: HTTP GET :6969/swagger.json HTTP GET :9696/swagger.json Resulting specification can be used by swagger clients. Change-Id: I4b1a8b53d50b1528664150934b04e92447e4d4d7 Signed-off-by: Jorge Hernandez <jh1730@att.com>
2017-05-09Batch submitRalph Straubs2-1/+9
[US866186 1710] Add the state_audit_interval_ms to the IntegrityMonitor.properties [US866186 1710] Added comments to the state audit property (state_audit_interval_ms) which clarify how to turn it off. [ECOMPD2TD-000] Update version.properties and pom.xml for iter 41 [ECOMPD2TD-000] Update version.properties and pom.xml for iter 41 Revert "[ECOMPD2TD-000] Update version.properties and pom.xml for iter 41" This reverts commit 61367d4c87fa6b153f707361537d9f802fb95a6e. [US250837 1710] Completed first cut of logic changes to PMStandbyStateChangeNotifier so that each segment of logic is only executed if a state change actually occurred. [US250837 1710] First cut on the JUnit for PMStandbyStateChangeNotifier. At this point I am simply checking the operation by inspecting the logs. [US250837 1710] Fixed the JUnit so it is not failing and added a note on how to run the JUnit. [US250837 1710] Added a method to get previousStandbyStatus from PMStandbyStateChangeHandler and began using it in JUnit tests. [US250837 1710] Finished the StandbyStateManagementTest. This uses the previousStandbyStatus value to test the function. [US250837 1710] Clean up of PMStandbyStateChangeNotifier and JUnit test to make static string values that are used throughout. [US250837 1710] Found a couple strings that I missed when converting to static variables. [US250837 1710] Updated PMStandbyStateChangeNotifier and StandbyStateManagementTest [US250837 1710] Added a dedicated db audit persistence unit auditDroolsPU to taylor the classes which will be audited. [ECOMPD2TD-1309] Clean up old persistence data This is an addition to 'policy-persistence' that cleans up 'sessioninfo' records with a 'lastmodificationdate' that is older than a specified time (default = 900 seconds = 15 minutes). [ECOMPD2TD-000] Correction to pom.xml versions Conflicts: version.properties Change-Id: I810d358c07e05fd36fa435a6fbb9e538e78b5011 Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-04-21Batch submit -- force rebuildRalph Straubs2-8/+12
[ECOMPD2TD-1126 1707] Delay the start of the election handler by one more update interval to allow updatedDate to be set and recoginized by other nodes. [ECOMPD2TD-1073 1707] Remove pessimistic locks from DB access to prevent DB deadlock [US867397-policy-management-feature-api] Split original FeatureAPI into three service interfaces. These are: - the original FeatureAPI for core - PolicyControllerFeatureAPI (additional interface methods yet to come ..) - PolicyEngineFeatureAPI (additional interface methods yet to come ..) Additional extensions will be done in the future. This is to have equivalent functionality with what it is already there. [US867397-policy-management-feature-api] Split original FeatureAPI into three service interfaces. These are: - the original FeatureAPI for core - PolicyControllerFeatureAPI (additional interface methods yet to come ..) - PolicyEngineFeatureAPI (additional interface methods yet to come ..) Additional extensions will be done in the future. This is to have equivalent functionality with what it is already there. [ECOMPD2TD-1167] Avoid redundant dependencies and remove obsolete sql scripts [ECOMPD2TD-848] Fix copied from ATT droolspdp repo -- add timestamp to metric and audit logs [ECOMPD2TD-1167] update jetty version to 9.3.14 [ECOMPD2TD-1167] pull in policy-core jar as a dependency of policy-management, instead of zip file [ECOMPD2TD-1159] Add property to ignore repository audit errors The property is called 'repository.audit.ignore.errors' -- it resides in 'IntegrityMonitor.properties', and it defaults to 'true'. When true, any errors that occur in the repository audit are logged, but not reported to integrity monitor. [US867397] additional hooks for policy engine, and support operation take over by feature bypassing further feature processing [US867397] additional hooks for policy engine, and support operation take over by feature bypassing further feature processing [US867397] fix reverse return javadoc comment [ECOMPD2TD-1192] Select correct persistent session information This is a modification to 'DroolsPdpsElectionHandler.DesignatedWaiter'. When going active, the list of persistent sessions needs to come from the most recent active DroolsPDP. The most recent active DroolsPDP is tracked in a local variable 'mostRecentPrimary', and the associated list of sessions needs to be extracted just prior to going active. The problem was that the list of sessions was extracted after the current DroolsPDP was set to 'mostRecentPrimary'. [ECOMPD2TD-1073 1707] Remove pessimistic locks from DB access to prevent DB deadlock [US860546] Add workaround for missing logger in message router [US860546] add DME2 properties to PolicyProperties [US860546] add DME2 support, pending unit testing [US860546] updated unit tests for dmaap/DME2 [US860546] removed System.out.println lines from BusConsumer and BusPublisher [US860546] modifications and additions to TopicEndpoint tests [US860546] remove block to append /events to serviceName in BusConsumer, BusPublisher [US860546] removing dmaap unit tests with ATT references [ECOMPD2TD-1167] Audit release repository by default [ECOMPD2TD-000] Cherry-pick versioning fixes from 1707.39.1 release branch [ECOMPD2TD-000] Fix policy-endpoints cambriaClient version [US865296] ECOMP Policy Logging Compliance, remove redundant timestamp from metric and audit log for logging compliance [US865296] ECOMP Policy Logging Compliance, remove TargetVirtualEntity from audit log, provide name to un-used column [US865296] ECOMP Policy Logging Compliance, remove Unused from AuditLogPattern, leave the column blank means un-used. [US000000] Cleanup and performance improvements 1) Changed 'OrderedServiceImpl' to ensure that the same service instance is used in every queue. This gets around the 'ServiceLoader' behavior that generates a new instance for each interface the service implements. 2) In 'PolicySession': add adaptive poll times within Drools sessions. Instead of always polling every 5 seconds, poll frequency increases when rules fire, and decreases when they don't. At present, the poll delay ranges from 100 milliseconds to 5 seconds, but at some point, it would be nice to make this configurable. 3) In 'PolicySession': add tests for 'logger.isDebugEnabled()' in session listener methods -- this results in a significant amount of real-time savings under load. [ECOMPD2TD-1126 1707] Changes to the election handler to deal with situations (race conditions) which can affect the site choice [ECOMPD2TD-1126 1707] Clean up of site afinity logic. Minor changes and a fix of the case where all pdpd are designated or all are hot standby. [ECOMPD2TD-1126 1707] Fixed issue with election handler and got all StandbyStateManagmentTest JUnits working. [ECOMPD2TD-1126 1707] Hopefully final changes to DroolsPdpsElectionHandler and StateManagementTest. Also removed the ResiliencyTestCases since they were redundant. [ECOMPD2TD-1126 1707] Found a minor bug in the computeMostRecentPrimary algorithm which I corrected and added a JUnit to confirm. [ECOMPD2TD-1126 1707] Removed code that was commented out of election handler to improve reability. Added an explanatory note to StandbyStateManagementTest. [US869183] Convert integrity monitor test endpoint to use HttpServletServer [US869183] add swagger-maven-plugin, update swagger annotation for IM test interface [US860371] Modified existing Dmaap and Ueb code to allow for https connectivity. HTTP/HTTPS is configurable via controller.properties file [US860520] Removed extra useHttps() method call from BusConsumer class where the consumer should be using http. Also, restored pom.xml to version at time feature branch was created. [US860520] Removed TopicEndpointTest.java. Added the ability to configure use of self-signed certificates for consumer topics. Functionality cannot be added for publisher at this time. Removed useHttps parameter field from multiple .builder methods to allow for greater ability to build source/sink objects without specifying http vs https connectivity. Other code cleanup and comments [US860520] -Deleted sys.out statements used in testing from BusConsumer/BusPublisher -Moved setProps method outside of if/else stub in BusConsumer -Could not add useHttps or selfSignedCerts to toString methods in BusConsumer -Move setProperty(contenttype, app/json) call outside of if/else branch in BusPublisher -Renamed doesAllowSelfSignedCerts method to is isAllowSelfSignedCerts and moved to BusTopicBase -Moved allowSelfSignedCerts member variable to BusTopicBase class. BusTopicBase is ancestor of SingleThreadedDmapp*/SingleThreadedUeb*/SingleThreadedBus* classes therefore, it will be inherited. -This changed resulted in cascading changes to the subclasses of BusTopicbase -Default is now set to disallow self-signed certs -Added several javadoc param annotations [US869183 1707] Changes to satisfy dependencies and correct pom syntax [ECOMPD2TD-1280] move DroolsPDPIntegrityMonitor.RestManager to its own class [ECOMPD2TD-1278] Resolve duplicate dependency issues (cherry-pick from 1707.40.1) [ECOMPD2TD-1278] revert cambriaClient back to 0.0.1 [ECOMPD2TD-1278] put dmaap version back to 0.2.12 [ECOMPD2TD-1280 1707] Fix Commons-lang3 version and common-modules version Conflicts: policy-endpoints/pom.xml policy-healthcheck/pom.xml policy-persistence/pom.xml pom.xml Change-Id: I803554bc64c55d2e82a3d6ad9120757f287144fb Signed-off-by: Ralph Straubs <rs8887@att.com>
2017-02-14Initial OpenECOMP policy/drools-pdp commitPamela Dragosh11-0/+745
Change-Id: I0072ccab6f40ed32da39667f9f8523b6d6dad2e2 Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>