different approach, using a filter, set up for home module
authorAlex Heneveld <alex.heneveld@cloudsoftcorp.com>
Mon, 7 Jan 2019 17:17:27 +0000 (17:17 +0000)
committerAlex Heneveld <alex.heneveld@cloudsoftcorp.com>
Mon, 7 Jan 2019 17:17:27 +0000 (17:17 +0000)
other modules to follow

ui-modules/home/pom.xml
ui-modules/home/src/main/webapp/WEB-INF/web.xml

index 5831ee3..49d23ee 100644 (file)
                         <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <Import-Package>
                             org.apache.brooklyn.ui.modularity.module.api,
+                            org.apache.brooklyn.rest.filter,
                             org.eclipse.jetty.servlets,
                             *
                         </Import-Package>
index 9be0439..6242d44 100644 (file)
         </init-param>
     </filter>
     <filter>
+        <filter-name>brooklyn-security-filter</filter-name>
+        <filter-class>org.apache.brooklyn.rest.filter.BrooklynSecurityProviderFilterJavax</filter-class>
+    </filter>
+    <filter>
         <filter-name>GzipFilter</filter-name>
         <filter-class>org.eclipse.jetty.servlets.GzipFilter</filter-class>
         <init-param>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
     <filter-mapping>
+        <filter-name>brooklyn-security-filter</filter-name>
+        <url-pattern>/*</url-pattern>
+    </filter-mapping>
+    <filter-mapping>
         <filter-name>GzipFilter</filter-name>
         <url-pattern>/*</url-pattern>
     </filter-mapping>
     <!--FILTERS :: END-->
-    
-    <login-config>
-        <auth-method>BASIC</auth-method>
-        <realm-name>webconsole</realm-name>
-    </login-config>
-    
-    <security-constraint>
-      <web-resource-collection>
-        <web-resource-name>webconsole-static-assets</web-resource-name>
-        <url-pattern>/*</url-pattern>
-      </web-resource-collection>
-      <auth-constraint>
-        <role-name>**</role-name>
-      </auth-constraint>
-    </security-constraint>
-    <security-role>
-      <role-name>**</role-name>
-    </security-role>
   
 </web-app>