Add filter to control xacml-pdp rest api 22/123422/3
authorJim Hahn <jrh3@att.com>
Mon, 23 Aug 2021 19:53:55 +0000 (15:53 -0400)
committerJim Hahn <jrh3@att.com>
Mon, 23 Aug 2021 19:55:29 +0000 (15:55 -0400)
commit4212017188b2bf7ec741647cf23c536b0c97f15b
tree935cb86299826ed50eef7d9fa3cfa27ba1e4bfd2
parent6ad3dbfeb528f052b9c3c0ad712fac719157e9f0
Add filter to control xacml-pdp rest api

Added a filter class for the REST server that only allows "API" services
(i.e., decision API services) through when the API is enabled,
disallowing them otherwise.  The filter always allows PDP-wide services
(e.g., "healthcheck").
Per review comments:
- modified the new class to "implement Filter" rather than "extends
  AafFilter"

Issue-ID: POLICY-3531
Change-Id: I7055e21045eea270e454a47a443b29476d9a85ee
Signed-off-by: Jim Hahn <jrh3@att.com>
main/src/main/java/org/onap/policy/pdpx/main/XacmlState.java
main/src/main/java/org/onap/policy/pdpx/main/rest/XacmlPdpServiceFilter.java [new file with mode: 0644]
main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpActivator.java
main/src/main/java/org/onap/policy/pdpx/main/startstop/XacmlPdpRestServer.java
main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java
main/src/test/java/org/onap/policy/pdpx/main/XacmlStateTest.java
main/src/test/java/org/onap/policy/pdpx/main/rest/TestAbbreviateDecisionResults.java
main/src/test/java/org/onap/policy/pdpx/main/rest/TestDecision.java
main/src/test/java/org/onap/policy/pdpx/main/rest/TestXacmlPdpServiceFilter.java [new file with mode: 0644]
main/src/test/java/org/onap/policy/pdpx/main/startstop/TestXacmlPdpActivator.java