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>