aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/webapp
diff options
context:
space:
mode:
authorKartik Hegde <kh00735564@techmahindra.com>2022-11-12 14:29:11 +0530
committerKartik Hegde <kh00735564@techmahindra.com>2022-12-21 12:04:30 +0000
commitcf04a1a714ef4a1df973929dc750232b4d67d7b4 (patch)
treeedd2e6e5074ba58efb98663a1ea1851208895fff /catalog-be/src/main/webapp
parentf995db01ee95606b6cded82822a73435ebc190c8 (diff)
Multitenancy in SDC
Issue-ID: SDC-4215 Change-Id: Ie24ba38acc9f1998d4a7e722e8f98456dab9201d Signed-off-by: Kartik Hegde <kh00735564@techmahindra.com>
Diffstat (limited to 'catalog-be/src/main/webapp')
-rw-r--r--catalog-be/src/main/webapp/WEB-INF/keycloak.json11
-rw-r--r--catalog-be/src/main/webapp/WEB-INF/web.xml12
2 files changed, 23 insertions, 0 deletions
diff --git a/catalog-be/src/main/webapp/WEB-INF/keycloak.json b/catalog-be/src/main/webapp/WEB-INF/keycloak.json
new file mode 100644
index 0000000000..d037661aec
--- /dev/null
+++ b/catalog-be/src/main/webapp/WEB-INF/keycloak.json
@@ -0,0 +1,11 @@
+{
+"realm": "sdc",
+"auth-server-url": "http://10.32.243.37:31613/",
+"ssl-required": "external",
+"resource": "sdc-app",
+"public-client":true,
+"bearer-only":true,
+"use-resource-role-mappings": true,
+"principal-attribute":"preferred_username",
+"confidential-port": 0
+}
diff --git a/catalog-be/src/main/webapp/WEB-INF/web.xml b/catalog-be/src/main/webapp/WEB-INF/web.xml
index 9761b38043..8bd981164c 100644
--- a/catalog-be/src/main/webapp/WEB-INF/web.xml
+++ b/catalog-be/src/main/webapp/WEB-INF/web.xml
@@ -163,6 +163,18 @@
<url-pattern>/sdc/*</url-pattern>
</filter-mapping>
+ <filter>
+ <filter-name>MultitenancyFilter</filter-name>
+ <filter-class>org.openecomp.sdc.be.filters.MultitenancyFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>MultitenancyFilter</filter-name>
+ <url-pattern>/keycloak/*</url-pattern>
+ <url-pattern>/sdc2/rest/v1/catalog/resources/*</url-pattern>
+ <url-pattern>/sdc2/rest/v1/catalog/services/*</url-pattern>
+ <url-pattern> /sdc2/rest/v1/followed</url-pattern>
+ </filter-mapping>
+
<error-page>
<exception-type>java.lang.RuntimeException</exception-type>
<location>/sdc2/rest/v1/catalog/handleException/</location>