aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authoradheli.tavares <adheli.tavares@est.tech>2023-10-12 13:07:28 +0100
committeradheli.tavares <adheli.tavares@est.tech>2023-10-12 13:33:51 +0100
commitf0b1c5bf1662edf6a2a07b79c1ffe7e42e1bb054 (patch)
tree5456420b1c0e8f16455c65c248057e8fab4e9172 /main
parent08ec52b6ed5ef7159087d708bddfa40d9ac03717 (diff)
Remove AAF references from distribution.
Issue-ID: POLICY-4592 Change-Id: Ifa924a99a9429494052a1d36d4b7480b9ddce37d Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'main')
-rw-r--r--main/src/main/java/org/onap/policy/distribution/main/rest/aaf/AafDistributionFilter.java39
-rw-r--r--main/src/main/java/org/onap/policy/distribution/main/startstop/DistributionActivator.java8
2 files changed, 4 insertions, 43 deletions
diff --git a/main/src/main/java/org/onap/policy/distribution/main/rest/aaf/AafDistributionFilter.java b/main/src/main/java/org/onap/policy/distribution/main/rest/aaf/AafDistributionFilter.java
deleted file mode 100644
index d32c29d1..00000000
--- a/main/src/main/java/org/onap/policy/distribution/main/rest/aaf/AafDistributionFilter.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP Policy API
- * ================================================================================
- * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * SPDX-License-Identifier: Apache-2.0
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.policy.distribution.main.rest.aaf;
-
-import org.onap.policy.common.endpoints.http.server.aaf.AafGranularAuthFilter;
-
-/**
- * Distribution AAF authorization filter.
- */
-public class AafDistributionFilter extends AafGranularAuthFilter {
-
- public static final String AAF_NODETYPE = "policy-distribution";
- public static final String AAF_ROOT_PERMISSION = DEFAULT_NAMESPACE + "." + AAF_NODETYPE;
-
- @Override
- public String getPermissionTypeRoot() {
- return AAF_ROOT_PERMISSION;
- }
-}
diff --git a/main/src/main/java/org/onap/policy/distribution/main/startstop/DistributionActivator.java b/main/src/main/java/org/onap/policy/distribution/main/startstop/DistributionActivator.java
index 61210343..6ff225ec 100644
--- a/main/src/main/java/org/onap/policy/distribution/main/startstop/DistributionActivator.java
+++ b/main/src/main/java/org/onap/policy/distribution/main/startstop/DistributionActivator.java
@@ -1,7 +1,7 @@
/*-
* ============LICENSE_START=======================================================
* Copyright (C) 2018 Ericsson. All rights reserved.
- * Copyright (C) 2019 Nordix Foundation.
+ * Copyright (C) 2019, 2023 Nordix Foundation.
* Modifications Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
* Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
* ================================================================================
@@ -25,6 +25,7 @@ package org.onap.policy.distribution.main.startstop;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import lombok.Getter;
@@ -35,7 +36,6 @@ import org.onap.policy.distribution.main.PolicyDistributionException;
import org.onap.policy.distribution.main.parameters.DistributionParameterGroup;
import org.onap.policy.distribution.main.parameters.PolicyForwarderConfigurationParameterGroup;
import org.onap.policy.distribution.main.rest.DistributionRestController;
-import org.onap.policy.distribution.main.rest.aaf.AafDistributionFilter;
import org.onap.policy.distribution.reception.decoding.PluginInitializationException;
import org.onap.policy.distribution.reception.handling.AbstractReceptionHandler;
import org.onap.policy.distribution.reception.parameters.PolicyDecoderConfigurationParameterGroup;
@@ -110,8 +110,8 @@ public class DistributionActivator {
*/
private void startDistributionRestServer() throws PolicyDistributionException {
distributionParameterGroup.getRestServerParameters().setName(distributionParameterGroup.getName());
- restServer = new RestServer(distributionParameterGroup.getRestServerParameters(), AafDistributionFilter.class,
- DistributionRestController.class);
+ restServer = new RestServer(distributionParameterGroup.getRestServerParameters(), List.of(),
+ List.of(DistributionRestController.class));
if (!restServer.start()) {
throw new PolicyDistributionException(
"Failed to start distribution rest server. Check log for more details...");