Add support to RESTCONF to dynamically specify Filters 56/36456/1
authorRyan Goulding <ryandgoulding@gmail.com>
Tue, 15 Mar 2016 14:17:36 +0000 (10:17 -0400)
committerRyan Goulding <ryandgoulding@gmail.com>
Fri, 18 Mar 2016 19:27:51 +0000 (15:27 -0400)
commitc03cb6cac4d05d7119906ff7e9891aeefb53104a
treea4aeea6f70c3e8992e000b03a0c6cc395818f04d
parent8000ecb9976c38eb679c793adf37cefa4fc759c2
Add support to RESTCONF to dynamically specify Filters

This change builds of work that the AAA team took on to help add dynamicism to
RESTCONF.  The javax.servlet-api specifies a means to define chains of Filter(s)
in front of a web Servlet.  However, configuration of filters is not supported, and
there is no easy existing mechanism to add Filters to a prebuilt ODL
distribution.  The issue involves the fact that Jersey Servlets define Filter
chains within web.xml, which is static and included inside of the odl-restconf
bundle.  This makes it very hard (if not impossible due to lack of
DynamicImport-Package declarations in restconf's pom) to alter the web.xml file
after compilation.

AAA added a filter called CustomFilterAdapter, which recreates the javax
filter chain-of-responsibility pattern.  The dynamic filter chain functionality
has very little to no overhead if left unused, but could be used to add
Filter implementations that allow for enhanced logging of HTTP/S requests/
replies, as well as other various functions.  This aids in debugging real
world deployments, as well as enables enhanced Accounting and Auditing
of the controller.

This functionality has been raised as vital by members of the AG.

Change-Id: Ib81ebdd0ab7de72d75cbbc90124656a3666cacba
Signed-off-by: Ryan Goulding <ryandgoulding@gmail.com>
restconf/sal-rest-connector/pom.xml
restconf/sal-rest-connector/src/main/resources/WEB-INF/web.xml