aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/main/java/org/onap/so/security/SecurityFilters.java
diff options
context:
space:
mode:
authorBenjamin, Max <max.benjamin@att.com>2020-01-06 11:53:58 -0500
committerBenjamin, Max (mb388a) <mb388a@att.com>2020-01-07 20:28:47 -0500
commit175318ab0194dfe1f75979d1d56d8e8c750a32c5 (patch)
tree1fcac9540784e0559b20dc1087b4d26e6afdc967 /common/src/main/java/org/onap/so/security/SecurityFilters.java
parent8e308b27a0e2e5d728599aee289ed8098f8923fa (diff)
consolidated security configuration
consolidated security configuration into common package Issue-ID: SO-2584 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I1e78259ffbf88e792f1f7a5a10cd1fdad8eaea36
Diffstat (limited to 'common/src/main/java/org/onap/so/security/SecurityFilters.java')
-rw-r--r--common/src/main/java/org/onap/so/security/SecurityFilters.java41
1 files changed, 41 insertions, 0 deletions
diff --git a/common/src/main/java/org/onap/so/security/SecurityFilters.java b/common/src/main/java/org/onap/so/security/SecurityFilters.java
new file mode 100644
index 0000000000..7ad0fd05df
--- /dev/null
+++ b/common/src/main/java/org/onap/so/security/SecurityFilters.java
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP - SO
+ * ================================================================================
+ * Copyright (C) 2017 - 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.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.onap.so.security;
+
+import org.springframework.boot.web.servlet.FilterRegistrationBean;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.Profile;
+import org.springframework.core.Ordered;
+
+@Configuration
+@Profile("!test & aaf")
+public class SecurityFilters {
+
+ @Bean
+ public FilterRegistrationBean<SoCadiFilter> loginRegistrationBean() {
+ FilterRegistrationBean<SoCadiFilter> filterRegistrationBean = new FilterRegistrationBean<>();
+ filterRegistrationBean.setFilter(new SoCadiFilter());
+ filterRegistrationBean.setName("cadiFilter");
+ filterRegistrationBean.setOrder(Ordered.HIGHEST_PRECEDENCE);
+ return filterRegistrationBean;
+ }
+}