diff --git a/java/com.sap.sailing.gwt.ui/WEB-INF/web.xml b/java/com.sap.sailing.gwt.ui/WEB-INF/web.xml index 7f9c9641021..5f5eba39b22 100755 --- a/java/com.sap.sailing.gwt.ui/WEB-INF/web.xml +++ b/java/com.sap.sailing.gwt.ui/WEB-INF/web.xml @@ -95,7 +95,7 @@ - Media Service + Media Service MediaService com.sap.sailing.gwt.ui.server.MediaServiceImpl @@ -105,7 +105,7 @@ - Simulator Service + Simulator Service SimulatorService com.sap.sailing.gwt.ui.server.SimulatorServiceImpl @@ -115,7 +115,7 @@ - Data Mining Service + Data Mining Service DataMiningService com.sap.sailing.gwt.ui.server.DataMiningServiceImpl diff --git a/java/com.sap.sailing.selenium.test/ci-test-environment.xml b/java/com.sap.sailing.selenium.test/ci-test-environment.xml index 6830888dae7..6e250724ff4 100644 --- a/java/com.sap.sailing.selenium.test/ci-test-environment.xml +++ b/java/com.sap.sailing.selenium.test/ci-test-environment.xml @@ -41,7 +41,7 @@ --> - webdriver.enable.native.events + webdriver.enable.native.events true + - --> + + shiroEnvironmentClass + org.apache.shiro.web.env.IniWebEnvironment + + + org.apache.shiro.web.env.EnvironmentLoaderListener + + + ShiroFilter + org.apache.shiro.web.servlet.ShiroFilter + + + + ShiroFilter + /* + REQUEST + FORWARD + INCLUDE + ERROR + + + + ClearSateServlet + com.sap.sailing.server.gateway.test.support.ClearStateServlet + + + ClearSateServlet + /clearState + + + CreateSessionServlet + com.sap.sailing.server.gateway.test.support.CreateSessionServlet + + + CreateSessionServlet + /createSession + + diff --git a/java/com.sap.sailing.server.gateway.test.support/build.properties b/java/com.sap.sailing.server.gateway.test.support/build.properties index bae4bd52009..a4af5b4a1ef 100644 --- a/java/com.sap.sailing.server.gateway.test.support/build.properties +++ b/java/com.sap.sailing.server.gateway.test.support/build.properties @@ -1,4 +1,5 @@ -source.. = src/ +source.. = src/,\ + resources/ output.. = bin/ bin.includes = META-INF/,\ .,\ diff --git a/java/com.sap.sailing.server.gateway.test.support/resources/shiro.ini b/java/com.sap.sailing.server.gateway.test.support/resources/shiro.ini new file mode 100755 index 00000000000..bf4c8eca852 --- /dev/null +++ b/java/com.sap.sailing.server.gateway.test.support/resources/shiro.ini @@ -0,0 +1,70 @@ + +[main] +credentialsMatcher = org.apache.shiro.authc.credential.Sha256CredentialsMatcher +credentialsMatcher.storedCredentialsHexEncoded = false +credentialsMatcher.hashIterations = 1024 + +# Realm configuration: +# -------------------- + +# Uncomment the following line to specify a bundle-specific permissions-for-role provider +# permissionsForRoleProvider = com.sap.myapp....MyAppPermissionsForRoleProvider +upRealm = com.sap.sse.security.UsernamePasswordRealm +upRealm.credentialsMatcher = $credentialsMatcher +# Uncomment the following line make the upRealm aware of the permissionsForRoleProvider +# upRealm.permissionsForRoleProvider = $permissionsForRoleProvider +oauthRealm = com.sap.sse.security.OAuthRealm +# Uncomment the following line make the oauthRealm aware of the permissionsForRoleProvider +# oauthRealm.permissionsForRoleProvider = $permissionsForRoleProvider +bearerTokenRealm = com.sap.sse.security.BearerTokenRealm +# Uncomment the following line make the bearerTokenRealm aware of the permissionsForRoleProvider +# bearerTokenRealm.permissionsForRoleProvider = $permissionsForRoleProvider + +# Putting it all together: +sessionManager = com.sap.sse.security.SecurityWebSessionManager +securityManager.sessionManager = $sessionManager +sessionDAO = org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO +securityManager.sessionManager.sessionDAO = $sessionDAO +# 1y timeout +securityManager.sessionManager.globalSessionTimeout = 31536000000 +cacheManager = com.sap.sse.security.SessionCacheManager +securityManager.cacheManager = $cacheManager + +# Authentication Filter Configurations +# ------------------------------------ + +# A filter that requires the user to have at least one of the roles specified as +# filter parameter. This makes it different from the default roles[...] filter +# which requires the user to have ALL of the roles specified as parameters. +anyofroles = com.sap.sse.security.AnyOfRolesFilter + +# A custom filter for GWT pages that require an authenticated user. +# Forwards unauthenticated users to the default login page. When +# addressed directly (and not based on a redirect), users who logged +# on successfully will be redirected to the UserManagement.html page +# where they can adjust their profile. +customGwt = com.sap.sse.security.CustomFilter +customGwt.loginUrl = /security/ui/Login.html +customGwt.successUrl = /UserManagement.html + +# Configuration for the default shiro HTTP form authentication filter. +# It assumes that form-based login parameters are sent to the +# /api/restsecurity/login RESTlet and forwards successful login attempts +# to the /api/restsecurity/hello service which is expected to respond +# with a JSON document containing the authenticated subject's properties. +authc.loginUrl = /api/restsecurity/login +authc.successUrl = /api/restsecurity/hello + +# This authentication filter accepts a bearer access token in the HTTP +# Authorization header field, as in +# Authorization: Bearer 1029741026501365024376093245 +# If no such bearer token is provided, the filter falls back to basic HTTP +# authentication ("Authentication: Basic ...") and then regular form-based +# authentication with POST parameters "username" and "password". +bearerToken = com.sap.sse.security.BearerTokenOrBasicOrFormAuthenticationFilter + +# Specifying filter chains for URL patterns + +[urls] +# Note: the following login URL does nothing but trigger the authc filter; required for Selenium testing +/createSession = bearerToken diff --git a/java/com.sap.sailing.server.gateway.test.support/src/com/sap/sailing/server/gateway/test/support/CreateSessionServlet.java b/java/com.sap.sailing.server.gateway.test.support/src/com/sap/sailing/server/gateway/test/support/CreateSessionServlet.java new file mode 100755 index 00000000000..c61015e018c --- /dev/null +++ b/java/com.sap.sailing.server.gateway.test.support/src/com/sap/sailing/server/gateway/test/support/CreateSessionServlet.java @@ -0,0 +1,14 @@ +package com.sap.sailing.server.gateway.test.support; + +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class CreateSessionServlet extends HttpServlet { + private static final long serialVersionUID = -880795218153271730L; + + @Override + protected void doGet(HttpServletRequest request, HttpServletResponse response) { + response.setStatus(HttpServletResponse.SC_OK); + } +} diff --git a/java/com.sap.sailing.server/SailingServer (No Proxy, winddbTest).launch b/java/com.sap.sailing.server/SailingServer (No Proxy, winddbTest).launch index 07dcca858cf..be392fc2cda 100644 --- a/java/com.sap.sailing.server/SailingServer (No Proxy, winddbTest).launch +++ b/java/com.sap.sailing.server/SailingServer (No Proxy, winddbTest).launch @@ -29,9 +29,9 @@ - + - + diff --git a/java/com.sap.sailing.server/SailingServer (Proxy, winddbTest).launch b/java/com.sap.sailing.server/SailingServer (Proxy, winddbTest).launch index 8b4559b26fe..c5692f2223c 100644 --- a/java/com.sap.sailing.server/SailingServer (Proxy, winddbTest).launch +++ b/java/com.sap.sailing.server/SailingServer (Proxy, winddbTest).launch @@ -24,10 +24,10 @@ - + - +