This is an automated email from the ASF dual-hosted git repository. heneveld pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/brooklyn-ui.git
commit 0c81ef8ced4f6310c8422540a0d60fad56811659 Author: Alex Heneveld <[email protected]> AuthorDate: Wed Jan 9 10:35:12 2019 +0000 add the security provider filter to ui projects replacing the attempt at using the login module. also add the needed import package. --- ui-modules/app-inspector/pom.xml | 1 + .../app-inspector/src/main/webapp/WEB-INF/web.xml | 26 +++++++--------------- ui-modules/blueprint-composer/pom.xml | 1 + .../src/main/webapp/WEB-INF/web.xml | 26 +++++++--------------- ui-modules/blueprint-importer/pom.xml | 1 + .../src/main/webapp/WEB-INF/web.xml | 26 +++++++--------------- ui-modules/catalog/pom.xml | 1 + ui-modules/catalog/src/main/webapp/WEB-INF/web.xml | 26 +++++++--------------- ui-modules/groovy-console/pom.xml | 1 + .../groovy-console/src/main/webapp/WEB-INF/web.xml | 26 +++++++--------------- ui-modules/location-manager/pom.xml | 1 + .../src/main/webapp/WEB-INF/web.xml | 26 +++++++--------------- ui-modules/logout/pom.xml | 1 + ui-modules/logout/src/main/webapp/WEB-INF/web.xml | 13 +---------- ui-modules/rest-api-docs/pom.xml | 1 + .../rest-api-docs/src/main/webapp/WEB-INF/web.xml | 26 +++++++--------------- 16 files changed, 65 insertions(+), 138 deletions(-) diff --git a/ui-modules/app-inspector/pom.xml b/ui-modules/app-inspector/pom.xml index 251b79e..30c7809 100644 --- a/ui-modules/app-inspector/pom.xml +++ b/ui-modules/app-inspector/pom.xml @@ -112,6 +112,7 @@ <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> diff --git a/ui-modules/app-inspector/src/main/webapp/WEB-INF/web.xml b/ui-modules/app-inspector/src/main/webapp/WEB-INF/web.xml index fc87588..e039863 100644 --- a/ui-modules/app-inspector/src/main/webapp/WEB-INF/web.xml +++ b/ui-modules/app-inspector/src/main/webapp/WEB-INF/web.xml @@ -42,6 +42,10 @@ </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> @@ -55,27 +59,13 @@ <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> diff --git a/ui-modules/blueprint-composer/pom.xml b/ui-modules/blueprint-composer/pom.xml index edc8505..65816d2 100644 --- a/ui-modules/blueprint-composer/pom.xml +++ b/ui-modules/blueprint-composer/pom.xml @@ -112,6 +112,7 @@ <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> diff --git a/ui-modules/blueprint-composer/src/main/webapp/WEB-INF/web.xml b/ui-modules/blueprint-composer/src/main/webapp/WEB-INF/web.xml index 8bfecc7..beb78ad 100644 --- a/ui-modules/blueprint-composer/src/main/webapp/WEB-INF/web.xml +++ b/ui-modules/blueprint-composer/src/main/webapp/WEB-INF/web.xml @@ -42,6 +42,10 @@ </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> @@ -55,27 +59,13 @@ <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> diff --git a/ui-modules/blueprint-importer/pom.xml b/ui-modules/blueprint-importer/pom.xml index fa0ed73..860886d 100644 --- a/ui-modules/blueprint-importer/pom.xml +++ b/ui-modules/blueprint-importer/pom.xml @@ -112,6 +112,7 @@ <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> diff --git a/ui-modules/blueprint-importer/src/main/webapp/WEB-INF/web.xml b/ui-modules/blueprint-importer/src/main/webapp/WEB-INF/web.xml index 2e8b2ea..24bb005 100644 --- a/ui-modules/blueprint-importer/src/main/webapp/WEB-INF/web.xml +++ b/ui-modules/blueprint-importer/src/main/webapp/WEB-INF/web.xml @@ -42,6 +42,10 @@ </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> @@ -55,27 +59,13 @@ <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> diff --git a/ui-modules/catalog/pom.xml b/ui-modules/catalog/pom.xml index 015240a..963394b 100644 --- a/ui-modules/catalog/pom.xml +++ b/ui-modules/catalog/pom.xml @@ -112,6 +112,7 @@ <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> diff --git a/ui-modules/catalog/src/main/webapp/WEB-INF/web.xml b/ui-modules/catalog/src/main/webapp/WEB-INF/web.xml index efee85b..71b1d35 100644 --- a/ui-modules/catalog/src/main/webapp/WEB-INF/web.xml +++ b/ui-modules/catalog/src/main/webapp/WEB-INF/web.xml @@ -42,6 +42,10 @@ </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> @@ -55,27 +59,13 @@ <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> diff --git a/ui-modules/groovy-console/pom.xml b/ui-modules/groovy-console/pom.xml index 3cc69db..8fced82 100644 --- a/ui-modules/groovy-console/pom.xml +++ b/ui-modules/groovy-console/pom.xml @@ -112,6 +112,7 @@ <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> diff --git a/ui-modules/groovy-console/src/main/webapp/WEB-INF/web.xml b/ui-modules/groovy-console/src/main/webapp/WEB-INF/web.xml index addd7a8..a01976d 100644 --- a/ui-modules/groovy-console/src/main/webapp/WEB-INF/web.xml +++ b/ui-modules/groovy-console/src/main/webapp/WEB-INF/web.xml @@ -42,6 +42,10 @@ </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> @@ -55,27 +59,13 @@ <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> diff --git a/ui-modules/location-manager/pom.xml b/ui-modules/location-manager/pom.xml index dd54a20..d2075c9 100644 --- a/ui-modules/location-manager/pom.xml +++ b/ui-modules/location-manager/pom.xml @@ -112,6 +112,7 @@ <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> diff --git a/ui-modules/location-manager/src/main/webapp/WEB-INF/web.xml b/ui-modules/location-manager/src/main/webapp/WEB-INF/web.xml index 2bb7445..8cff1cb 100644 --- a/ui-modules/location-manager/src/main/webapp/WEB-INF/web.xml +++ b/ui-modules/location-manager/src/main/webapp/WEB-INF/web.xml @@ -42,6 +42,10 @@ </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> @@ -55,27 +59,13 @@ <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> diff --git a/ui-modules/logout/pom.xml b/ui-modules/logout/pom.xml index 98d50af..0fbbd84 100644 --- a/ui-modules/logout/pom.xml +++ b/ui-modules/logout/pom.xml @@ -112,6 +112,7 @@ <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> diff --git a/ui-modules/logout/src/main/webapp/WEB-INF/web.xml b/ui-modules/logout/src/main/webapp/WEB-INF/web.xml index 81d8082..0355330 100644 --- a/ui-modules/logout/src/main/webapp/WEB-INF/web.xml +++ b/ui-modules/logout/src/main/webapp/WEB-INF/web.xml @@ -28,17 +28,6 @@ <welcome-file>index.html</welcome-file> </welcome-file-list> - <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> + <!--no security for this module so we can confirm that the user has logged out--> </web-app> diff --git a/ui-modules/rest-api-docs/pom.xml b/ui-modules/rest-api-docs/pom.xml index cf5bbc6..3a61021 100644 --- a/ui-modules/rest-api-docs/pom.xml +++ b/ui-modules/rest-api-docs/pom.xml @@ -112,6 +112,7 @@ <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> diff --git a/ui-modules/rest-api-docs/src/main/webapp/WEB-INF/web.xml b/ui-modules/rest-api-docs/src/main/webapp/WEB-INF/web.xml index c6f9bd5..00e0f4c 100644 --- a/ui-modules/rest-api-docs/src/main/webapp/WEB-INF/web.xml +++ b/ui-modules/rest-api-docs/src/main/webapp/WEB-INF/web.xml @@ -42,6 +42,10 @@ </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> @@ -55,27 +59,13 @@ <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>
