Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/Activator.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/Activator.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/Activator.java (original) +++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/Activator.java Tue Feb 23 14:39:54 2016 @@ -18,14 +18,17 @@ */ package org.apache.ace.log.server.servlet; +import static org.apache.ace.http.HttpConstants.ACE_WHITEBOARD_CONTEXT_SELECT_FILTER; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN; + import java.util.Dictionary; -import java.util.HashMap; -import java.util.Map; import java.util.Properties; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; import javax.servlet.Servlet; -import org.apache.ace.authentication.api.AuthenticationService; import org.apache.ace.log.server.store.LogStore; import org.apache.felix.dm.Component; import org.apache.felix.dm.DependencyActivatorBase; @@ -37,30 +40,16 @@ import org.osgi.service.cm.ManagedServic import org.osgi.service.log.LogService; public class Activator extends DependencyActivatorBase implements ManagedServiceFactory { + private static final String PID = "org.apache.ace.log.server.servlet.factory"; private static final String KEY_LOG_NAME = "name"; + private static final String KEY_ENDPOINT = "endpoint"; - /** A boolean denoting whether or not authentication is enabled. */ - private static final String KEY_USE_AUTHENTICATION = "authentication.enabled"; - - private final Map<String, Component> m_instances = new HashMap<>(); // String -> Service - private DependencyManager m_manager; + private final ConcurrentMap<String, Component> m_instances = new ConcurrentHashMap<>(); + // Managed by Felix DM... + private volatile DependencyManager m_manager; private volatile LogService m_log; - @Override - public void init(BundleContext context, DependencyManager manager) throws Exception { - m_manager = manager; - Properties props = new Properties(); - props.put(Constants.SERVICE_PID, "org.apache.ace.log.server.servlet.factory"); - manager.add(createComponent() - .setInterface(ManagedServiceFactory.class.getName(), props) - .setImplementation(this) - .add(createServiceDependency().setService(LogService.class).setRequired(false))); } - - @Override - public void destroy(BundleContext context, DependencyManager manager) throws Exception { - } - public void deleted(String pid) { Component log = m_instances.remove(pid); if (log != null) { @@ -72,32 +61,58 @@ public class Activator extends Dependenc return "Log Servlet Factory"; } + @Override + public void init(BundleContext context, DependencyManager manager) throws Exception { + Properties props = new Properties(); + props.put(Constants.SERVICE_PID, PID); + + manager.add(createComponent() + .setInterface(ManagedServiceFactory.class.getName(), props) + .setImplementation(this) + .add(createServiceDependency().setService(LogService.class).setRequired(false))); + } + public void updated(String pid, Dictionary<String, ?> dict) throws ConfigurationException { String name = (String) dict.get(KEY_LOG_NAME); - if ((name == null) || "".equals(name)) { - throw new ConfigurationException(KEY_LOG_NAME, "Log name has to be specified: " + name); + if (name == null || "".equals(name.trim())) { + throw new ConfigurationException(KEY_LOG_NAME, "Log name has to be specified!"); } - - String useAuthString = (String) dict.get(KEY_USE_AUTHENTICATION); - if (useAuthString == null - || !("true".equalsIgnoreCase(useAuthString) || "false".equalsIgnoreCase(useAuthString))) { - throw new ConfigurationException(KEY_USE_AUTHENTICATION, "Missing or invalid value: " + useAuthString); + + String endpoint = (String) dict.get(KEY_ENDPOINT); + if (endpoint == null || "".equals(endpoint.trim())) { + throw new ConfigurationException(KEY_ENDPOINT, "Endpoint name must be specified!"); } - boolean useAuth = Boolean.parseBoolean(useAuthString); + + Properties servletProps = new Properties(); + servletProps.put(HTTP_WHITEBOARD_SERVLET_PATTERN, toPattern(endpoint)); + servletProps.put(HTTP_WHITEBOARD_CONTEXT_SELECT, ACE_WHITEBOARD_CONTEXT_SELECT_FILTER); + servletProps.put(KEY_LOG_NAME, name); Component service = m_instances.get(pid); if (service == null) { service = m_manager.createComponent() - .setInterface(Servlet.class.getName(), dict) - .setImplementation(new LogServlet(name, useAuth)) - .add(createServiceDependency().setService(AuthenticationService.class).setRequired(useAuth)) + .setInterface(Servlet.class.getName(), servletProps) + .setImplementation(new LogServlet(name)) .add(createServiceDependency().setService(LogService.class).setRequired(false)) - .add(createServiceDependency().setService(LogStore.class, "(&("+Constants.OBJECTCLASS+"="+LogStore.class.getName()+")(name=" + name + "))").setRequired(true)); + .add(createServiceDependency().setService(LogStore.class, "(name=" + name + ")").setRequired(true)); - m_instances.put(pid, service); - m_manager.add(service); - } else { - m_log.log(LogService.LOG_INFO, "Ignoring configuration update because factory instance was already configured: " + name); + if (m_instances.putIfAbsent(pid, service) == null) { + m_manager.add(service); + } + } + else { + m_log.log(LogService.LOG_WARNING, "Ignoring configuration update because factory instance was already configured: " + name); + } + } + + private Object toPattern(String endpoint) { + final String suffix = "/*"; + if ("/".equals(endpoint)) { + return suffix; + } + if (!endpoint.endsWith(suffix)) { + return endpoint.concat(suffix); } + return endpoint; } -} \ No newline at end of file +}
Modified: ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/LogServlet.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/LogServlet.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/LogServlet.java (original) +++ ace/trunk/org.apache.ace.log/src/org/apache/ace/log/server/servlet/LogServlet.java Tue Feb 23 14:39:54 2016 @@ -18,29 +18,24 @@ */ package org.apache.ace.log.server.servlet; -import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED; - import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; -import javax.servlet.ServletException; import javax.servlet.ServletInputStream; import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.ace.authentication.api.AuthenticationService; import org.apache.ace.feedback.Descriptor; import org.apache.ace.feedback.Event; import org.apache.ace.feedback.LowestID; import org.apache.ace.log.server.store.LogStore; import org.apache.ace.range.SortedRangeSet; import org.osgi.service.log.LogService; -import org.osgi.service.useradmin.User; /** * This class acts as a servlet and handles the log protocol. This means a number of requests will be handled: @@ -88,14 +83,11 @@ public class LogServlet extends HttpServ // injected by Dependency Manager private volatile LogService m_log; private volatile LogStore m_store; - private volatile AuthenticationService m_authService; private final String m_name; - private final boolean m_useAuth; - public LogServlet(String name, boolean useAuth) { + public LogServlet(String name) { m_name = name; - m_useAuth = useAuth; } @Override @@ -155,34 +147,6 @@ public class LogServlet extends HttpServ } } - @Override - protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - if (!authenticate(req)) { - // Authentication failed; don't proceed with the original request... - resp.sendError(SC_UNAUTHORIZED); - } else { - // Authentication successful, proceed with original request... - super.service(req, resp); - } - } - - /** - * Authenticates, if needed the user with the information from the given request. - * - * @param request the request to obtain the credentials from, cannot be <code>null</code>. - * @return <code>true</code> if the authentication was successful, <code>false</code> otherwise. - */ - private boolean authenticate(HttpServletRequest request) { - if (m_useAuth) { - User user = m_authService.authenticate(request); - if (user == null) { - m_log.log(LogService.LOG_INFO, "Authentication failure!"); - } - return (user != null); - } - return true; - } - // Handle a call to the query 'command' protected boolean handleQuery(String targetID, String logID, String filter, ServletOutputStream output) throws IOException { if ((targetID != null) && (logID != null)) { Modified: ace/trunk/org.apache.ace.log/test/org/apache/ace/log/server/servlet/LogServletTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.log/test/org/apache/ace/log/server/servlet/LogServletTest.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.log/test/org/apache/ace/log/server/servlet/LogServletTest.java (original) +++ ace/trunk/org.apache.ace.log/test/org/apache/ace/log/server/servlet/LogServletTest.java Tue Feb 23 14:39:54 2016 @@ -53,7 +53,7 @@ public class LogServletTest { @BeforeMethod(alwaysRun = true) protected void setUp() throws Exception { - m_logServlet = new LogServlet("test", false /* useAuth */); + m_logServlet = new LogServlet("test"); TestUtils.configureObject(m_logServlet, LogService.class); m_mockStore = new MockLogStore(); TestUtils.configureObject(m_logServlet, LogStore.class, m_mockStore); Modified: ace/trunk/org.apache.ace.obr/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.obr/bnd.bnd?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.obr/bnd.bnd (original) +++ ace/trunk/org.apache.ace.obr/bnd.bnd Tue Feb 23 14:39:54 2016 @@ -14,6 +14,7 @@ org.apache.ace.deployment.provider.api;version=latest,\ org.apache.ace.deployment.provider.base;version=latest,\ org.apache.ace.deployment.util.test;version=latest,\ + org.apache.ace.http.api;version=latest,\ org.osgi.impl.bundle.repoindex.lib;packages="org.osgi.service.indexer,org.osgi.service.indexer.impl" Modified: ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/servlet/Activator.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/servlet/Activator.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/servlet/Activator.java (original) +++ ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/servlet/Activator.java Tue Feb 23 14:39:54 2016 @@ -18,6 +18,12 @@ */ package org.apache.ace.obr.servlet; +import static org.apache.ace.http.HttpConstants.ACE_WHITEBOARD_CONTEXT_SELECT_FILTER; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN; + +import java.util.Properties; + import javax.servlet.Servlet; import org.apache.ace.obr.storage.BundleStore; @@ -27,16 +33,16 @@ import org.osgi.framework.BundleContext; import org.osgi.service.log.LogService; public class Activator extends DependencyActivatorBase { - public static final String PID = "org.apache.ace.obr.servlet"; @Override public void init(BundleContext context, DependencyManager manager) throws Exception { + Properties servletProps = new Properties(); + servletProps.put(HTTP_WHITEBOARD_SERVLET_PATTERN, BundleServlet.SERVLET_ENDPOINT.concat("*")); + servletProps.put(HTTP_WHITEBOARD_CONTEXT_SELECT, ACE_WHITEBOARD_CONTEXT_SELECT_FILTER); + manager.add(createComponent() - .setInterface(Servlet.class.getName(), null) + .setInterface(Servlet.class.getName(), servletProps) .setImplementation(BundleServlet.class) - .add(createConfigurationDependency() - .setPropagate(true) - .setPid(PID)) .add(createServiceDependency() .setService(BundleStore.class) .setRequired(true)) @@ -44,9 +50,4 @@ public class Activator extends Dependenc .setService(LogService.class) .setRequired(false))); } - - @Override - public void destroy(BundleContext context, DependencyManager manager) throws Exception { - // do nothing - } -} \ No newline at end of file +} Modified: ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/servlet/BundleServlet.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/servlet/BundleServlet.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/servlet/BundleServlet.java (original) +++ ace/trunk/org.apache.ace.obr/src/org/apache/ace/obr/servlet/BundleServlet.java Tue Feb 23 14:39:54 2016 @@ -24,14 +24,11 @@ import static javax.servlet.http.HttpSer import static javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR; import static javax.servlet.http.HttpServletResponse.SC_NOT_FOUND; import static javax.servlet.http.HttpServletResponse.SC_OK; -import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED; -import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN; import java.io.Closeable; import java.io.EOFException; import java.io.IOException; import java.io.InputStream; -import java.util.Dictionary; import javax.servlet.ServletException; import javax.servlet.ServletOutputStream; @@ -39,82 +36,28 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.ace.authentication.api.AuthenticationService; import org.apache.ace.obr.storage.BundleStore; -import org.apache.felix.dm.Component; -import org.apache.felix.dm.DependencyManager; -import org.osgi.service.cm.ConfigurationException; -import org.osgi.service.cm.ManagedService; import org.osgi.service.log.LogService; -import org.osgi.service.useradmin.User; /** * Provides access to the OBR through a REST-ish API. */ -public class BundleServlet extends HttpServlet implements ManagedService { +public class BundleServlet extends HttpServlet { private static final long serialVersionUID = 1L; - /** A boolean denoting whether or not authentication is enabled. */ - private static final String KEY_USE_AUTHENTICATION = "authentication.enabled"; - private static final int COPY_BUFFER_SIZE = 4096; public static final String TEXT_MIMETYPE = "text/plain"; + public static final String SERVLET_ENDPOINT = "/obr/"; - private volatile DependencyManager m_dm; // injected by Dependency Manager private volatile LogService m_log; /* will be injected by dependencymanager */ private volatile BundleStore m_store; /* will be injected by dependencymanager */ - private volatile AuthenticationService m_authService; - - private volatile String m_servletEndpoint = "/"; - private volatile boolean m_useAuth = false; @Override public String getServletInfo() { return "Apache ACE OBR Servlet"; } - public void updated(Dictionary<String, ?> settings) throws ConfigurationException { - if (settings != null) { - String useAuthString = (String) settings.get(KEY_USE_AUTHENTICATION); - if (useAuthString == null - || !("true".equalsIgnoreCase(useAuthString) || "false".equalsIgnoreCase(useAuthString))) { - throw new ConfigurationException(KEY_USE_AUTHENTICATION, "Missing or invalid value!"); - } - boolean useAuth = Boolean.parseBoolean(useAuthString); - m_useAuth = useAuth; - - m_servletEndpoint = (String) settings.get(HTTP_WHITEBOARD_SERVLET_PATTERN); - if(m_servletEndpoint == null){ - m_servletEndpoint = "/"; - } - if(!m_servletEndpoint.startsWith("/")){ - m_servletEndpoint = "/" + m_servletEndpoint; - } - if(m_servletEndpoint.endsWith("/*")){ - m_servletEndpoint = m_servletEndpoint.substring(0, m_servletEndpoint.length() -1); - } - if (!m_servletEndpoint.endsWith("/")) { - m_servletEndpoint = m_servletEndpoint + "/"; - } - } - else { - m_useAuth = false; - } - } - - /** - * Called by Dependency Manager upon initialization of this component. - * - * @param comp the component to initialize, cannot be <code>null</code>. - */ - protected void init(Component comp) { - comp.add(m_dm.createServiceDependency() - .setService(AuthenticationService.class) - .setRequired(m_useAuth) - ); - } - /** * Responds to POST requests sent to http://host:port/obr by writing the received data to the bundle store and * returning the persistent location. Will send out a response that contains one of the following status codes: @@ -279,37 +222,6 @@ public class BundleServlet extends HttpS } } - /** - * {@inheritDoc} - */ - @Override - protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - if (!authenticate(req)) { - // Authentication failed; don't proceed with the original request... - resp.sendError(SC_UNAUTHORIZED); - } else { - // Authentication successful, proceed with original request... - super.service(req, resp); - } - } - - /** - * Authenticates, if needed the user with the information from the given request. - * - * @param request the request to obtain the credentials from, cannot be <code>null</code>. - * @return <code>true</code> if the authentication was successful, <code>false</code> otherwise. - */ - private boolean authenticate(HttpServletRequest request) { - if (m_useAuth) { - User user = m_authService.authenticate(request); - if (user == null) { - m_log.log(LogService.LOG_INFO, "Authentication failure!"); - } - return (user != null); - } - return true; - } - private void closeSafely(Closeable resource, HttpServletRequest request) { if (resource != null) { try { @@ -334,7 +246,7 @@ public class BundleServlet extends HttpS if(!ignorePort){ locationBuilder.append(":" + request.getServerPort()); } - locationBuilder.append(m_servletEndpoint).append(relativePath); + locationBuilder.append(SERVLET_ENDPOINT).append(relativePath); response.setHeader("Location", locationBuilder.toString()); response.setStatus(SC_CREATED); } Modified: ace/trunk/org.apache.ace.repository.itest/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository.itest/bnd.bnd?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.repository.itest/bnd.bnd (original) +++ ace/trunk/org.apache.ace.repository.itest/bnd.bnd Tue Feb 23 14:39:54 2016 @@ -25,7 +25,9 @@ Test-Cases: ${classes;CONCRETE;EXTENDS;o org.apache.ace.range.api;version=latest,\ org.apache.ace.repository.api;version=latest,\ org.apache.ace.repository.impl;version=latest,\ - org.apache.ace.repository.servlets;version=latest + org.apache.ace.repository.servlets;version=latest,\ + org.apache.ace.http.context;version=latest + Private-Package: org.apache.ace.it.repository Bundle-Version: 1.0.0 Bundle-Name: Apache ACE Repository itest Modified: ace/trunk/org.apache.ace.repository.itest/src/org/apache/ace/it/repository/RepositoryTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository.itest/src/org/apache/ace/it/repository/RepositoryTest.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.repository.itest/src/org/apache/ace/it/repository/RepositoryTest.java (original) +++ ace/trunk/org.apache.ace.repository.itest/src/org/apache/ace/it/repository/RepositoryTest.java Tue Feb 23 14:39:54 2016 @@ -21,7 +21,6 @@ package org.apache.ace.it.repository; import static org.apache.ace.it.repository.Utils.get; import static org.apache.ace.it.repository.Utils.put; import static org.apache.ace.it.repository.Utils.query; -import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -298,12 +297,7 @@ public class RepositoryTest extends Inte protected void configureProvisionedServices() throws IOException { m_host = new URL("http://localhost:" + TestConstants.PORT); - configure("org.apache.ace.repository.servlet.RepositoryReplicationServlet", - HTTP_WHITEBOARD_SERVLET_PATTERN, "/replication/*", - "authentication.enabled", "false"); - configure("org.apache.ace.repository.servlet.RepositoryServlet", - HTTP_WHITEBOARD_SERVLET_PATTERN, "/repository/*", - "authentication.enabled", "false"); + configure("org.apache.ace.http.context", "authentication.enabled", "false"); Utils.waitForWebserver(m_host); } Modified: ace/trunk/org.apache.ace.repository/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/bnd.bnd?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.repository/bnd.bnd (original) +++ ace/trunk/org.apache.ace.repository/bnd.bnd Tue Feb 23 14:39:54 2016 @@ -6,11 +6,14 @@ osgi.core;version=6.0.0,\ osgi.cmpn,\ org.apache.felix.dependencymanager,\ + org.apache.felix.http.api,\ org.apache.felix.http.servlet-api,\ org.apache.ace.range.api;version=latest,\ org.apache.ace.test;version=latest,\ org.apache.ace.authentication.api;version=latest,\ org.apache.ace.scheduler.api;version=latest,\ org.apache.ace.discovery.api;version=latest,\ - org.apache.ace.connectionfactory;version=latest + org.apache.ace.connectionfactory;version=latest,\ + org.apache.ace.http.api;version=latest + -sub: *.bnd Modified: ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/Activator.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/Activator.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/Activator.java (original) +++ ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/Activator.java Tue Feb 23 14:39:54 2016 @@ -18,6 +18,12 @@ */ package org.apache.ace.repository.servlet; +import static org.apache.ace.http.HttpConstants.ACE_WHITEBOARD_CONTEXT_SELECT_FILTER; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN; + +import java.util.Properties; + import javax.servlet.Servlet; import org.apache.felix.dm.DependencyActivatorBase; @@ -26,27 +32,25 @@ import org.osgi.framework.BundleContext; import org.osgi.service.log.LogService; public class Activator extends DependencyActivatorBase { - public static final String REPOSITORY_PID = "org.apache.ace.repository.servlet.RepositoryServlet"; - public static final String REPOSITORY_REPLICATION_PID = "org.apache.ace.repository.servlet.RepositoryReplicationServlet"; - + @Override public void init(BundleContext context, DependencyManager manager) throws Exception { + Properties repositoryServletProps = new Properties(); + repositoryServletProps.put(HTTP_WHITEBOARD_SERVLET_PATTERN, "/repository/*"); + repositoryServletProps.put(HTTP_WHITEBOARD_CONTEXT_SELECT, ACE_WHITEBOARD_CONTEXT_SELECT_FILTER); manager.add(createComponent() - .setInterface(Servlet.class.getName(), null) + .setInterface(Servlet.class.getName(), repositoryServletProps) .setImplementation(RepositoryServlet.class) - .add(createConfigurationDependency() - .setPropagate(true) - .setPid(REPOSITORY_PID)) .add(createServiceDependency() .setService(LogService.class) .setRequired(false))); + Properties replicationServletProps = new Properties(); + replicationServletProps.put(HTTP_WHITEBOARD_SERVLET_PATTERN, "/replication/*"); + replicationServletProps.put(HTTP_WHITEBOARD_CONTEXT_SELECT, ACE_WHITEBOARD_CONTEXT_SELECT_FILTER); manager.add(createComponent() - .setInterface(Servlet.class.getName(), null) + .setInterface(Servlet.class.getName(), replicationServletProps) .setImplementation(RepositoryReplicationServlet.class) - .add(createConfigurationDependency() - .setPropagate(true) - .setPid(REPOSITORY_REPLICATION_PID)) .add(createServiceDependency() .setService(LogService.class) .setRequired(false))); Modified: ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/RepositoryServletBase.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/RepositoryServletBase.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/RepositoryServletBase.java (original) +++ ace/trunk/org.apache.ace.repository/src/org/apache/ace/repository/servlet/RepositoryServletBase.java Tue Feb 23 14:39:54 2016 @@ -18,13 +18,10 @@ */ package org.apache.ace.repository.servlet; -import static javax.servlet.http.HttpServletResponse.SC_UNAUTHORIZED; - import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; -import java.util.Dictionary; import java.util.List; import javax.servlet.ServletException; @@ -32,25 +29,20 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.ace.authentication.api.AuthenticationService; import org.apache.ace.range.SortedRangeSet; -import org.apache.felix.dm.Component; -import org.apache.felix.dm.DependencyManager; import org.osgi.framework.BundleContext; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference; -import org.osgi.service.cm.ConfigurationException; -import org.osgi.service.cm.ManagedService; import org.osgi.service.log.LogService; -import org.osgi.service.useradmin.User; /** * Base class for the repository servlets. Both the repository and the repository replication servlets work in a similar * way, so the specifics were factored out of this base class and put in two subclasses. */ -public abstract class RepositoryServletBase<REPO_TYPE> extends HttpServlet implements ManagedService { - /** A boolean denoting whether or not authentication is enabled. */ - private static final String KEY_USE_AUTHENTICATION = "authentication.enabled"; +public abstract class RepositoryServletBase<REPO_TYPE> extends HttpServlet { + + private static final long serialVersionUID = 1L; + private static final int COPY_BUFFER_SIZE = 1024; private static final String QUERY = "/query"; protected static final String TEXT_MIMETYPE = "text/plain"; @@ -58,9 +50,6 @@ public abstract class RepositoryServletB private final Class<REPO_TYPE> m_repoType; // injected by Dependency Manager - private volatile DependencyManager m_dm; - private volatile AuthenticationService m_authService; - private volatile boolean m_useAuth = false; protected volatile BundleContext m_context; protected volatile LogService m_log; @@ -68,21 +57,6 @@ public abstract class RepositoryServletB m_repoType = repoType; } - public void updated(Dictionary<String, ?> settings) throws ConfigurationException { - if (settings != null) { - String useAuthString = (String) settings.get(KEY_USE_AUTHENTICATION); - if ((useAuthString == null) || - !("true".equalsIgnoreCase(useAuthString) || "false".equalsIgnoreCase(useAuthString))) { - throw new ConfigurationException(KEY_USE_AUTHENTICATION, "Missing or invalid value!"); - } - boolean useAuth = Boolean.parseBoolean(useAuthString); - m_useAuth = useAuth; - } - else { - m_useAuth = false; - } - } - /** * Checkout or get data from the repository. * @@ -200,51 +174,6 @@ public abstract class RepositoryServletB protected abstract SortedRangeSet getRange(REPO_TYPE repo) throws IOException; /** - * Called by Dependency Manager upon initialization of this component. - * - * @param comp - * the component to initialize, cannot be <code>null</code>. - */ - protected void init(Component comp) { - comp.add(m_dm.createServiceDependency() - .setService(AuthenticationService.class) - .setRequired(m_useAuth)); - } - - @Override - protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { - if (!authenticate(req)) { - // Authentication failed; don't proceed with the original request... - resp.sendError(SC_UNAUTHORIZED); - } - else { - // Authentication successful, proceed with original request... - super.service(req, resp); - } - } - - /** - * Authenticates, if needed the user with the information from the given request. - * - * @param request - * The request to obtain the credentials from, cannot be <code>null</code>. - * @return <code>true</code> if the authentication was successful, <code>false</code> otherwise. - */ - private boolean authenticate(HttpServletRequest request) { - if (m_useAuth) { - User user = m_authService.authenticate(request); - - if (user == null) { - m_log.log(LogService.LOG_INFO, "Authentication failure!"); - } - - return (user != null); - } - - return true; - } - - /** * Copies data from an input stream to an output stream. * * @param in Modified: ace/trunk/org.apache.ace.useradmin.itest/bnd.bnd URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.useradmin.itest/bnd.bnd?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.useradmin.itest/bnd.bnd (original) +++ ace/trunk/org.apache.ace.useradmin.itest/bnd.bnd Tue Feb 23 14:39:54 2016 @@ -29,7 +29,8 @@ Test-Cases: ${classes;CONCRETE;EXTENDS;o org.apache.ace.repository.api;version=latest,\ org.apache.ace.repository.impl;version=latest,\ org.apache.ace.repository.servlets;version=latest,\ - org.apache.ace.useradmin.repository + org.apache.ace.useradmin.repository,\ + org.apache.ace.http.context;version=latest Private-Package: org.apache.ace.it.useradmin Bundle-Version: 1.0.0 Modified: ace/trunk/org.apache.ace.useradmin.itest/src/org/apache/ace/it/useradmin/UserAdminRepositoryTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.useradmin.itest/src/org/apache/ace/it/useradmin/UserAdminRepositoryTest.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.useradmin.itest/src/org/apache/ace/it/useradmin/UserAdminRepositoryTest.java (original) +++ ace/trunk/org.apache.ace.useradmin.itest/src/org/apache/ace/it/useradmin/UserAdminRepositoryTest.java Tue Feb 23 14:39:54 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.it.useradmin; -import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN; - import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; @@ -161,10 +159,6 @@ public class UserAdminRepositoryTest ext protected void configureProvisionedServices() throws Exception { m_host = new URL("http://localhost:" + TestConstants.PORT); - configure("org.apache.ace.repository.servlet.RepositoryServlet", - HTTP_WHITEBOARD_SERVLET_PATTERN, "/repository/*", - "authentication.enabled", "false"); - configureFactory("org.apache.ace.server.repository.factory", "customer", "apache", "name", "user", @@ -176,6 +170,8 @@ public class UserAdminRepositoryTest ext "repositoryCustomer", "apache", "repositoryName", "user"); + configure("org.apache.ace.http.context", "authentication.enabled", "false"); + Utils.waitForWebserver(m_host); } Modified: ace/trunk/org.apache.ace.useradmin/test/aceDefault.xml URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.useradmin/test/aceDefault.xml?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.useradmin/test/aceDefault.xml (original) +++ ace/trunk/org.apache.ace.useradmin/test/aceDefault.xml Tue Feb 23 14:39:54 2016 @@ -1,3 +1,4 @@ +<!-- Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). --> <roles> <group name="createArtifact"> <properties> Modified: ace/trunk/org.apache.ace.useradmin/test/current.xml URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.useradmin/test/current.xml?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.useradmin/test/current.xml (original) +++ ace/trunk/org.apache.ace.useradmin/test/current.xml Tue Feb 23 14:39:54 2016 @@ -1 +1,2 @@ +<!-- Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). --> <roles> <group name="createArtifact"> <properties> <type>permissionGroup</type> </properties> </group> <group name="updateArtifact"> <properties> <type>permissionGroup</type> </properties> </group> <group name="removeArtifact"> <properties> <type>permissionGroup</type> </properties> </group> <group name="viewArtifact"> <properties> <type>permissionGroup</type> </properties> </group> <group name="editArtifact"> <properties> <type>permissionGroup</type> </properties> </group> <group name="createFeature"> <properties> <type>permissionGroup</type> </properties> </group> <group name="removeFeature"> <properties> <type>permissionGroup</type> </properties> </group> <group name="associateArtifactToFeature"> <properties> <type>permissionGroup</type> </properties> </group> <group name="associateFeatureToDistribution"> <properties> <type>permissionGroup</type> </properties> </group> <group name="removeArtifactToFeatureAssociation"> <properties> <type>permissionGroup</type> </properties> </grou p> <group name="removeFeatureToDistributionAssociation"> <properties> <type>permissionGroup</type> </properties> </group> <group name="viewFeature"> <properties> <type>permissionGroup</type> </properties> </group> <group name="editFeature"> <properties> <type>permissionGroup</type> </properties> </group> <group name="viewDistribution"> <properties> <type>permissionGroup</type> </properties> </group> <group name="editDistribution"> <properties> <type>permissionGroup</type> </properties> </group> <group name="createDistribution"> <properties> <type>permissionGroup</type> </properties> </group> <group name="removeDistribution"> <properties> <type>permissionGroup</type> </properties> </group> <group name="associateDistributionToTarget"> <properties> <type>permissionGroup</type> </properties> </group> <group name="viewTarget"> <properties> <type>permissionGroup</type> </properties> </group> <group name="editTarget"> <properties> <type>permissionGroup</type> </properties> </group> <group name="createTarget"> <properties> <type>permissionGroup</type> </properties> </group> <group name="removeTarget"> <properties> <type>permissionGroup</type> </properties> </group> <group name="approveTarget"> <properties> <type>permissionGroup</type> </properties> </group> <group name="registerTarget"> <properties> <type>permissionGroup</type> </properties> </group> <group name="removeDistributionToTargetAssociation"> <properties> <type>permissionGroup</type> </properties> </group> <group name="mock"> <properties> <type>permissionGroup</type> </properties> </group> <group name="editUsers"> <properties> <type>permissionGroup</type> </properties> </group> <group name="TestGroup"> <properties> <type>userGroup</type> </properties> <memberof>createArtifact</memberof> <memberof>updateArtifact</memberof> <memberof>removeArtifact</memberof> <memberof>viewArtifact</memberof> <memberof>editArtifact</memberof> <memberof>createFeature</memberof> <memberof>removeFeature</memberof> <memberof>assoc iateArtifactToFeature</memberof> <memberof>associateFeatureToDistribution</memberof> <memberof>removeArtifactToFeatureAssociation</memberof> <memberof>removeFeatureToDistributionAssociation</memberof> <memberof>viewFeature</memberof> <memberof>editFeature</memberof> <memberof>viewDistribution</memberof> <memberof>editDistribution</memberof> <memberof>createDistribution</memberof> <memberof>removeDistribution</memberof> <memberof>associateDistributionToTarget</memberof> <memberof>viewTarget</memberof> <memberof>editTarget</memberof> <memberof>createTarget</memberof> <memberof>removeTarget</memberof> <memberof>approveTarget</memberof> <memberof>registerTarget</memberof> <memberof>removeDistributionToTargetAssociation</memberof> <memberof>mock</memberof> <memberof>editUsers</memberof> </group> <group name="Target Operator"> <properties> <type>userGroup</type> </properties> <memberof>viewArtifact</memberof> <memberof>viewFeature</memberof> <memberof>viewDistribution</memberof> <memberof >viewTarget</memberof> <memberof>approveTarget</memberof> </group> <group >name="Distribution Manager"> <properties> <type>userGroup</type> ></properties> <memberof>viewArtifact</memberof> ><memberof>viewFeature</memberof> <memberof>viewDistribution</memberof> ><memberof>editDistribution</memberof> <memberof>createDistribution</memberof> ><memberof>removeDistribution</memberof> ><memberof>associateDistributionToTarget</memberof> ><memberof>viewTarget</memberof> ><memberof>removeDistributionToTargetAssociation</memberof> </group> <group >name="Release Manager"> <properties> <type>userGroup</type> </properties> ><memberof>createArtifact</memberof> <memberof>updateArtifact</memberof> ><memberof>removeArtifact</memberof> <memberof>viewArtifact</memberof> ><memberof>editArtifact</memberof> <memberof>createFeature</memberof> ><memberof>removeFeature</memberof> ><memberof>associateArtifactToFeature</memberof> ><memberof>associateFeatureToDistribution</memberof> ><memberof>removeArtifactToFeatureAssociatio n</memberof> <memberof>removeFeatureToDistributionAssociation</memberof> <memberof>viewFeature</memberof> <memberof>editFeature</memberof> <memberof>viewDistribution</memberof> <memberof>viewTarget</memberof> </group> <group name="Target Manager"> <properties> <type>userGroup</type> </properties> <memberof>viewArtifact</memberof> <memberof>viewFeature</memberof> <memberof>viewDistribution</memberof> <memberof>viewTarget</memberof> <memberof>editTarget</memberof> <memberof>createTarget</memberof> <memberof>removeTarget</memberof> <memberof>registerTarget</memberof> </group> <group name="External Distribution Manager"> <properties> <type>userGroup</type> </properties> <memberof>createArtifact</memberof> <memberof>updateArtifact</memberof> <memberof>removeArtifact</memberof> <memberof>viewArtifact</memberof> <memberof>editArtifact</memberof> <memberof>createFeature</memberof> <memberof>removeFeature</memberof> <memberof>associateArtifactToFeature</memberof> <memberof>associateFeatureTo Distribution</memberof> <memberof>removeArtifactToFeatureAssociation</memberof> <memberof>removeFeatureToDistributionAssociation</memberof> <memberof>viewFeature</memberof> <memberof>editFeature</memberof> <memberof>viewDistribution</memberof> <memberof>editDistribution</memberof> <memberof>createDistribution</memberof> <memberof>removeDistribution</memberof> <memberof>associateDistributionToTarget</memberof> <memberof>viewTarget</memberof> <memberof>editTarget</memberof> <memberof>createTarget</memberof> <memberof>removeTarget</memberof> <memberof>approveTarget</memberof> <memberof>registerTarget</memberof> <memberof>removeDistributionToTargetAssociation</memberof> <memberof>mock</memberof> </group> <user name="d"> <properties> <username>d</username> </properties> <credentials> <password>f</password> </credentials> <memberof>TestGroup</memberof> </user> <user name="lm"> <properties> <username>lm</username> </properties> <credentials> <password>lm</password> </credentials> <memberof >Distribution Manager</memberof> </user> <user name="go"> <properties> ><username>go</username> </properties> <credentials> <password>go</password> ></credentials> <memberof>Target Operator</memberof> </user> <user name="rm"> ><properties> <username>rm</username> </properties> <credentials> ><password>rm</password> </credentials> <memberof>Release Manager</memberof> ></user> <user name="gm"> <properties> <username>gm</username> </properties> ><credentials> <password>gm</password> </credentials> <memberof>Target >Manager</memberof> </user> <user name="elm"> <properties> ><username>elm</username> </properties> <credentials> <password>elm</password> ></credentials> <memberof>External Distribution Manager</memberof> </user> ></roles> \ No newline at end of file Modified: ace/trunk/org.apache.ace.useradmin/test/org/apache/ace/useradmin/repository/xstream/XStreamTest.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.useradmin/test/org/apache/ace/useradmin/repository/xstream/XStreamTest.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.useradmin/test/org/apache/ace/useradmin/repository/xstream/XStreamTest.java (original) +++ ace/trunk/org.apache.ace.useradmin/test/org/apache/ace/useradmin/repository/xstream/XStreamTest.java Tue Feb 23 14:39:54 2016 @@ -80,6 +80,8 @@ public class XStreamTest { String outputString = sw.toString(); String validXmlFileString = new String(Files.readAllBytes(Paths.get("test/valid.xml"))); + // Remove the comment... + validXmlFileString = validXmlFileString.replaceAll("<!--[^\r\n]+-->[\r\n]+", ""); assertEquals(outputString, validXmlFileString); } Modified: ace/trunk/org.apache.ace.useradmin/test/valid.xml URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.useradmin/test/valid.xml?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.useradmin/test/valid.xml (original) +++ ace/trunk/org.apache.ace.useradmin/test/valid.xml Tue Feb 23 14:39:54 2016 @@ -1,3 +1,5 @@ +<!-- Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). --> + <roles> <group name="testgroup"> <properties> Added: ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/AceWebuiServletContextHelper.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/AceWebuiServletContextHelper.java?rev=1731866&view=auto ============================================================================== --- ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/AceWebuiServletContextHelper.java (added) +++ ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/AceWebuiServletContextHelper.java Tue Feb 23 14:39:54 2016 @@ -0,0 +1,95 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you 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. + */ +package org.apache.ace.webui.vaadin; + +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH; + +import java.net.URL; +import java.util.Dictionary; + +import org.apache.felix.dm.Component; +import org.osgi.framework.BundleContext; +import org.osgi.service.cm.ConfigurationException; +import org.osgi.service.cm.ManagedService; +import org.osgi.service.http.context.ServletContextHelper; + +public class AceWebuiServletContextHelper extends ServletContextHelper implements ManagedService { + private static final String RESOURCE_PATH = "/VAADIN"; + + private static final String KEY_CONTEXT_PATH = "context.path"; + private static final String DEFAULT_CONTEXT_PATH = "/"; + + // Managed by Felix DM... + private volatile BundleContext m_context; + private volatile Component m_component; + + public AceWebuiServletContextHelper() { + super(); + } + + @Override + public URL getResource(String name) { + URL resource = null; + // fix for ACE-156 + if (!name.startsWith("/")) { + name = "/".concat(name); + } + + String prefix = RESOURCE_PATH.concat("/"); + if (name.startsWith(prefix)) { + String originalName = name.replace("/ace/", "/reindeer/"); + + resource = m_context.getBundle().getEntry(originalName); + if (resource == null) { + // try to find the resource in the Vaadin bundle instead + resource = com.vaadin.Application.class.getResource(originalName); + } + } + return resource; + } + + public void updated(Dictionary<String, ?> settings) throws ConfigurationException { + String contextPath = DEFAULT_CONTEXT_PATH; + + if (settings != null) { + Object value = settings.get(KEY_CONTEXT_PATH); + if (value != null) { + if ("".equals(value)) { + throw new ConfigurationException(KEY_CONTEXT_PATH, "Invalid value!"); + } + contextPath = value.toString(); + } + + if (!"/".equals(contextPath) && (!contextPath.startsWith("/") || contextPath.endsWith("/"))) { + throw new ConfigurationException(KEY_CONTEXT_PATH, "Invalid value context path, context path should start with a '/' and NOT end with a '/'!"); + } + } + + updateContextPath(contextPath); + } + + private void updateContextPath(String pattern) { + Dictionary<Object, Object> serviceProperties = m_component.getServiceProperties(); + String currentPath = (String) serviceProperties.get(HTTP_WHITEBOARD_CONTEXT_PATH); + if (!pattern.equals(currentPath)) { + serviceProperties.put(HTTP_WHITEBOARD_CONTEXT_PATH, pattern); + m_component.setServiceProperties(serviceProperties); + } + } +} Modified: ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/Activator.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/Activator.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/Activator.java (original) +++ ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/Activator.java Tue Feb 23 14:39:54 2016 @@ -18,6 +18,13 @@ */ package org.apache.ace.webui.vaadin; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_NAME; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_PATH; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_CONTEXT_SELECT; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PATTERN; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_RESOURCE_PREFIX; +import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN; + import java.util.Map; import java.util.Properties; @@ -29,7 +36,8 @@ import org.apache.felix.dm.DependencyAct import org.apache.felix.dm.DependencyManager; import org.osgi.framework.BundleContext; import org.osgi.framework.Constants; -import org.osgi.service.http.HttpService; +import org.osgi.service.http.context.ServletContextHelper; +import org.osgi.service.log.LogService; import com.vaadin.ui.Component; import com.vaadin.ui.Label; @@ -38,31 +46,39 @@ import com.vaadin.ui.VerticalLayout; public class Activator extends DependencyActivatorBase { private static final String PID = "org.apache.ace.webui.vaadin"; - @Override - public void destroy(BundleContext context, DependencyManager manager) throws Exception { - } + private static final String ACE_WEBUI_WHITEBOARD_CONTEXT_NAME = "org.apache.ace.webui"; + private static final String ACE_WEBUI_WHITEBOARD_CONTEXT_SELECT_FILTER = "(" + HTTP_WHITEBOARD_CONTEXT_NAME + "=" + ACE_WEBUI_WHITEBOARD_CONTEXT_NAME + ")"; @Override public void init(BundleContext context, DependencyManager manager) throws Exception { + Properties contextProps = new Properties(); + contextProps.put(HTTP_WHITEBOARD_CONTEXT_NAME, ACE_WEBUI_WHITEBOARD_CONTEXT_NAME); + contextProps.put(HTTP_WHITEBOARD_CONTEXT_PATH, "/"); manager.add(createComponent() - .setImplementation(VaadinResourceHandler.class) - .add(createServiceDependency() - .setService(HttpService.class) - .setRequired(true) - ) - ); - + .setInterface(ServletContextHelper.class.getName(), contextProps) + .setImplementation(AceWebuiServletContextHelper.class) + .add(createConfigurationDependency().setPid(PID)) + .add(createServiceDependency().setService(LogService.class).setRequired(false))); + + Properties resourceRegistrationProps = new Properties(); + resourceRegistrationProps.put(HTTP_WHITEBOARD_RESOURCE_PREFIX, "/VAADIN"); + resourceRegistrationProps.put(HTTP_WHITEBOARD_RESOURCE_PATTERN, "/VAADIN/*"); + resourceRegistrationProps.put(HTTP_WHITEBOARD_CONTEXT_SELECT, ACE_WEBUI_WHITEBOARD_CONTEXT_SELECT_FILTER); + manager.add(createComponent() + .setInterface(Object.class.getName(), resourceRegistrationProps) + .setImplementation(new Object())); + Properties props = new Properties(); // ACE-472 - put Vaadin in production mode... props.put("init.productionMode", "true"); - + props.put(HTTP_WHITEBOARD_SERVLET_PATTERN, VaadinServlet.DEFAULT_SERVLET_ENDPOINT.concat("/*")); + props.put(HTTP_WHITEBOARD_CONTEXT_SELECT, ACE_WEBUI_WHITEBOARD_CONTEXT_SELECT_FILTER); + // register the main application for the ACE UI client manager.add(createComponent() .setInterface(Servlet.class.getName(), props) .setImplementation(VaadinServlet.class) - .add(createConfigurationDependency() - .setPid(PID).setPropagate(true)) - ); + .add(createConfigurationDependency().setPid(PID))); props = new Properties(); props.put(UIExtensionFactory.EXTENSION_POINT_KEY, UIExtensionFactory.EXTENSION_POINT_VALUE_TARGET); @@ -87,7 +103,6 @@ public class Activator extends Dependenc vl.addComponent(info); return vl; } - }) - ); + })); } } Modified: ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinServlet.java URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinServlet.java?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinServlet.java (original) +++ ace/trunk/org.apache.ace.webui.vaadin/src/org/apache/ace/webui/vaadin/VaadinServlet.java Tue Feb 23 14:39:54 2016 @@ -18,8 +18,6 @@ */ package org.apache.ace.webui.vaadin; -import static org.osgi.service.http.whiteboard.HttpWhiteboardConstants.HTTP_WHITEBOARD_SERVLET_PATTERN; - import java.net.MalformedURLException; import java.net.URL; import java.util.Dictionary; @@ -39,10 +37,10 @@ import com.vaadin.terminal.gwt.server.Ab import com.vaadin.terminal.gwt.server.WebApplicationContext; public class VaadinServlet extends AbstractApplicationServlet implements ManagedService { + public static final String DEFAULT_SERVLET_ENDPOINT = "/ace"; + private static final long serialVersionUID = 1L; - /** denotes what endpoint we're serving this servlet. */ - private static final String KEY_SERVLET_ENDPOINT = HTTP_WHITEBOARD_SERVLET_PATTERN; /** A boolean denoting whether or not authentication is enabled. */ private static final String KEY_USE_AUTHENTICATION = "ui.authentication.enabled"; /** Name of the user to log in as. */ @@ -66,7 +64,6 @@ public class VaadinServlet extends Abstr private static final URL DEFAULT_ACE_HOST; private static final URL DEFAULT_OBR_URL; private static final String DEFAULT_OBR_XML = "index.xml"; - private static final String DEFAULT_SERVLET_ENDPOINT = "/ace/*"; private static final int DEFAULT_SESSION_TIMEOUT = 300; // in seconds. private static final double DEFAULT_CACHE_RATE = 1; private static final int DEFAULT_PAGE_LENGTH = 100; @@ -88,7 +85,6 @@ public class VaadinServlet extends Abstr private volatile URL m_aceHost; private volatile URL m_obrUrl; private volatile String m_repositoryXML; - private volatile String m_servletEndpoint; private volatile int m_sessionTimeout; private volatile double m_cacheRate; private volatile int m_pageLength; @@ -103,7 +99,6 @@ public class VaadinServlet extends Abstr m_aceHost = DEFAULT_ACE_HOST; m_obrUrl = DEFAULT_OBR_URL; m_repositoryXML = DEFAULT_OBR_XML; - m_servletEndpoint = DEFAULT_SERVLET_ENDPOINT; m_sessionTimeout = DEFAULT_SESSION_TIMEOUT; m_cacheRate = DEFAULT_CACHE_RATE; m_pageLength = DEFAULT_PAGE_LENGTH; @@ -117,7 +112,6 @@ public class VaadinServlet extends Abstr URL aceHost = DEFAULT_ACE_HOST; URL obrUrl = DEFAULT_OBR_URL; String repositoryXML = DEFAULT_OBR_XML; - String servletEndpoint = DEFAULT_SERVLET_ENDPOINT; int sessionTimeout = DEFAULT_SESSION_TIMEOUT; double cacheRate = DEFAULT_CACHE_RATE; int pageLength = DEFAULT_PAGE_LENGTH; @@ -129,7 +123,6 @@ public class VaadinServlet extends Abstr aceHost = getURL(dictionary, KEY_ACE_HOST); obrUrl = getURL(dictionary, KEY_OBR_URL); repositoryXML = getOptionalString(dictionary, KEY_OBR_XML); - servletEndpoint = getOptionalString(dictionary, KEY_SERVLET_ENDPOINT); sessionTimeout = getInteger(dictionary, KEY_SESSION_TIMEOUT); Double doubleValue = getOptionalDouble(dictionary, KEY_CACHE_RATE); @@ -157,7 +150,6 @@ public class VaadinServlet extends Abstr m_aceHost = aceHost; m_obrUrl = obrUrl; m_repositoryXML = repositoryXML; - m_servletEndpoint = servletEndpoint; m_sessionTimeout = sessionTimeout; m_cacheRate = cacheRate; m_pageLength = pageLength; @@ -184,16 +176,16 @@ public class VaadinServlet extends Abstr protected SystemMessages getSystemMessages() { CustomizedSystemMessages msgs = new CustomizedSystemMessages(); msgs.setAuthenticationErrorNotificationEnabled(false); - msgs.setAuthenticationErrorURL(m_servletEndpoint.concat("/?authenticationError")); + msgs.setAuthenticationErrorURL(DEFAULT_SERVLET_ENDPOINT.concat("/?authenticationError")); msgs.setCommunicationErrorNotificationEnabled(false); - msgs.setCommunicationErrorURL(m_servletEndpoint.concat("/?communicationError")); + msgs.setCommunicationErrorURL(DEFAULT_SERVLET_ENDPOINT.concat("/?communicationError")); msgs.setCookiesDisabledNotificationEnabled(false); - msgs.setCookiesDisabledURL(m_servletEndpoint.concat("/?cookiesDisabled")); + msgs.setCookiesDisabledURL(DEFAULT_SERVLET_ENDPOINT.concat("/?cookiesDisabled")); msgs.setInternalErrorNotificationEnabled(false); - msgs.setInternalErrorURL(m_servletEndpoint.concat("/?internalError")); + msgs.setInternalErrorURL(DEFAULT_SERVLET_ENDPOINT.concat("/?internalError")); msgs.setOutOfSyncNotificationEnabled(false); msgs.setSessionExpiredNotificationEnabled(false); - msgs.setSessionExpiredURL(m_servletEndpoint.concat("/?sessionTimedOut")); + msgs.setSessionExpiredURL(DEFAULT_SERVLET_ENDPOINT.concat("/?sessionTimedOut")); return msgs; } Modified: ace/trunk/run-client/client.bndrun URL: http://svn.apache.org/viewvc/ace/trunk/run-client/client.bndrun?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-client/client.bndrun (original) +++ ace/trunk/run-client/client.bndrun Tue Feb 23 14:39:54 2016 @@ -50,7 +50,8 @@ org.apache.ace.useradmin.ui;version=latest,\ org.apache.ace.webui.vaadin;version=latest,\ org.apache.ace.gogo;version=latest,\ - org.apache.ace.feedback.common;version=latest + org.apache.ace.feedback.common;version=latest,\ + org.apache.ace.http.context;version=latest -runrepos: Workspace,\ Release -runproperties: org.apache.felix.log.storeDebug=true,\ Modified: ace/trunk/run-client/conf/org.apache.ace.client.rest.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-client/conf/org.apache.ace.client.rest.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-client/conf/org.apache.ace.client.rest.cfg (original) +++ ace/trunk/run-client/conf/org.apache.ace.client.rest.cfg Tue Feb 23 14:39:54 2016 @@ -1,4 +1,3 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -osgi.http.whiteboard.servlet.pattern=/client/* session.timeout=300 Added: ace/trunk/run-client/conf/org.apache.ace.http.context.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-client/conf/org.apache.ace.http.context.cfg?rev=1731866&view=auto ============================================================================== --- ace/trunk/run-client/conf/org.apache.ace.http.context.cfg (added) +++ ace/trunk/run-client/conf/org.apache.ace.http.context.cfg Tue Feb 23 14:39:54 2016 @@ -0,0 +1,4 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + +context.path=/ +authentication.enabled=false \ No newline at end of file Modified: ace/trunk/run-client/conf/org.apache.ace.useradmin.repository.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-client/conf/org.apache.ace.useradmin.repository.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-client/conf/org.apache.ace.useradmin.repository.cfg (original) +++ ace/trunk/run-client/conf/org.apache.ace.useradmin.repository.cfg Tue Feb 23 14:39:54 2016 @@ -1,3 +1,5 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + repositoryname=user repositoryCustomer=apache repositoryLocation=http://${org.apache.ace.server}/repository \ No newline at end of file Modified: ace/trunk/run-client/conf/org.apache.ace.webui.vaadin.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-client/conf/org.apache.ace.webui.vaadin.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-client/conf/org.apache.ace.webui.vaadin.cfg (original) +++ ace/trunk/run-client/conf/org.apache.ace.webui.vaadin.cfg Tue Feb 23 14:39:54 2016 @@ -1,7 +1,8 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). # The endpoint of the Vaadin UI -osgi.http.whiteboard.servlet.pattern = /ace/* +context.path = / + # Vaadin UI settings ui.authentication.enabled = true ui.authentication.user.name = dd Added: ace/trunk/run-obr/conf/org.apache.ace.http.context.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-obr/conf/org.apache.ace.http.context.cfg?rev=1731866&view=auto ============================================================================== --- ace/trunk/run-obr/conf/org.apache.ace.http.context.cfg (added) +++ ace/trunk/run-obr/conf/org.apache.ace.http.context.cfg Tue Feb 23 14:39:54 2016 @@ -0,0 +1,4 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + +context.path=/ +authentication.enabled=false \ No newline at end of file Modified: ace/trunk/run-obr/conf/org.apache.ace.useradmin.repository.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-obr/conf/org.apache.ace.useradmin.repository.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-obr/conf/org.apache.ace.useradmin.repository.cfg (original) +++ ace/trunk/run-obr/conf/org.apache.ace.useradmin.repository.cfg Tue Feb 23 14:39:54 2016 @@ -1,3 +1,5 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + repositoryname=user repositoryCustomer=apache repositoryLocation=http://${org.apache.ace.server}/repository \ No newline at end of file Modified: ace/trunk/run-obr/obr.bndrun URL: http://svn.apache.org/viewvc/ace/trunk/run-obr/obr.bndrun?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-obr/obr.bndrun (original) +++ ace/trunk/run-obr/obr.bndrun Tue Feb 23 14:39:54 2016 @@ -24,6 +24,7 @@ org.apache.ace.connectionfactory;version=latest,\ org.apache.ace.range.api;version=latest,\ org.apache.ace.repository.api;version=latest,\ + org.apache.ace.http.context;version=latest,\ osgi.cmpn -runrepos: Workspace,\ Modified: ace/trunk/run-relay/conf/org.apache.ace.deployment.servlet.agent.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-relay/conf/org.apache.ace.deployment.servlet.agent.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-relay/conf/org.apache.ace.deployment.servlet.agent.cfg (original) +++ ace/trunk/run-relay/conf/org.apache.ace.deployment.servlet.agent.cfg Tue Feb 23 14:39:54 2016 @@ -1,7 +1,4 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -osgi.http.whiteboard.servlet.pattern=/agent/* -# no authentication is used... -authentication.enabled = false # OBR settings obr.url = http://${org.apache.ace.obr}/obr/ Added: ace/trunk/run-relay/conf/org.apache.ace.http.context.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-relay/conf/org.apache.ace.http.context.cfg?rev=1731866&view=auto ============================================================================== --- ace/trunk/run-relay/conf/org.apache.ace.http.context.cfg (added) +++ ace/trunk/run-relay/conf/org.apache.ace.http.context.cfg Tue Feb 23 14:39:54 2016 @@ -0,0 +1,4 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + +context.path=/ +authentication.enabled=false \ No newline at end of file Modified: ace/trunk/run-relay/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-relay/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-relay/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg (original) +++ ace/trunk/run-relay/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg Tue Feb 23 14:39:54 2016 @@ -1,5 +1,4 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -osgi.http.whiteboard.servlet.pattern=/auditlog/* name = auditlog -authentication.enabled = false +endpoint=/auditlog Modified: ace/trunk/run-relay/conf/org.apache.ace.useradmin.repository.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-relay/conf/org.apache.ace.useradmin.repository.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-relay/conf/org.apache.ace.useradmin.repository.cfg (original) +++ ace/trunk/run-relay/conf/org.apache.ace.useradmin.repository.cfg Tue Feb 23 14:39:54 2016 @@ -1,3 +1,5 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + repositoryname=user repositoryCustomer=apache repositoryLocation=http://${org.apache.ace.server}/repository \ No newline at end of file Modified: ace/trunk/run-relay/relay.bndrun URL: http://svn.apache.org/viewvc/ace/trunk/run-relay/relay.bndrun?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-relay/relay.bndrun (original) +++ ace/trunk/run-relay/relay.bndrun Tue Feb 23 14:39:54 2016 @@ -39,7 +39,8 @@ org.apache.ace.repository.servlets;version=latest,\ org.apache.ace.repository.task;version=latest,\ org.apache.ace.scheduler.impl;version=latest,\ - org.apache.ace.useradmin.repository;version=latest + org.apache.ace.useradmin.repository;version=latest,\ + org.apache.ace.http.context;version=latest -runrepos: Workspace,\ Release -runproperties: org.apache.felix.log.storeDebug=true,\ Modified: ace/trunk/run-server-allinone/conf/org.apache.ace.client.rest.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server-allinone/conf/org.apache.ace.client.rest.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server-allinone/conf/org.apache.ace.client.rest.cfg (original) +++ ace/trunk/run-server-allinone/conf/org.apache.ace.client.rest.cfg Tue Feb 23 14:39:54 2016 @@ -1,5 +1,3 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -osgi.http.whiteboard.servlet.pattern=/client/* -osgi.http.whiteboard.listener=true session.timeout=300 Added: ace/trunk/run-server-allinone/conf/org.apache.ace.connectionfactory/server.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server-allinone/conf/org.apache.ace.connectionfactory/server.cfg?rev=1731866&view=auto ============================================================================== --- ace/trunk/run-server-allinone/conf/org.apache.ace.connectionfactory/server.cfg (added) +++ ace/trunk/run-server-allinone/conf/org.apache.ace.connectionfactory/server.cfg Tue Feb 23 14:39:54 2016 @@ -0,0 +1,7 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + +authentication.baseURL = http://${org.apache.ace.server}/ +authentication.type = none +#authentication.user.name = d +#authentication.user.password = f + Modified: ace/trunk/run-server-allinone/conf/org.apache.ace.deployment.servlet.agent.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server-allinone/conf/org.apache.ace.deployment.servlet.agent.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server-allinone/conf/org.apache.ace.deployment.servlet.agent.cfg (original) +++ ace/trunk/run-server-allinone/conf/org.apache.ace.deployment.servlet.agent.cfg Tue Feb 23 14:39:54 2016 @@ -1,6 +1,4 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -osgi.http.whiteboard.servlet.pattern=/agent/* # OBR settings obr.url = http://${org.apache.ace.obr}/obr/ -authentication.enabled = false Added: ace/trunk/run-server-allinone/conf/org.apache.ace.http.context.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server-allinone/conf/org.apache.ace.http.context.cfg?rev=1731866&view=auto ============================================================================== --- ace/trunk/run-server-allinone/conf/org.apache.ace.http.context.cfg (added) +++ ace/trunk/run-server-allinone/conf/org.apache.ace.http.context.cfg Tue Feb 23 14:39:54 2016 @@ -0,0 +1,4 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + +context.path=/ +authentication.enabled=false \ No newline at end of file Modified: ace/trunk/run-server-allinone/conf/org.apache.ace.http.redirector.factory/root-to-ace.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server-allinone/conf/org.apache.ace.http.redirector.factory/root-to-ace.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server-allinone/conf/org.apache.ace.http.redirector.factory/root-to-ace.cfg (original) +++ ace/trunk/run-server-allinone/conf/org.apache.ace.http.redirector.factory/root-to-ace.cfg Tue Feb 23 14:39:54 2016 @@ -1,4 +1,5 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). osgi.http.whiteboard.servlet.pattern=/ +osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=org.apache.ace.webui) org.apache.ace.webui.vaadin.redirect=/ace/ Modified: ace/trunk/run-server-allinone/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server-allinone/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server-allinone/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg (original) +++ ace/trunk/run-server-allinone/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg Tue Feb 23 14:39:54 2016 @@ -1,5 +1,4 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -osgi.http.whiteboard.servlet.pattern=/auditlog/* name = auditlog -authentication.enabled = false +endpoint=/auditlog Modified: ace/trunk/run-server-allinone/conf/org.apache.ace.useradmin.repository.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server-allinone/conf/org.apache.ace.useradmin.repository.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server-allinone/conf/org.apache.ace.useradmin.repository.cfg (original) +++ ace/trunk/run-server-allinone/conf/org.apache.ace.useradmin.repository.cfg Tue Feb 23 14:39:54 2016 @@ -1,3 +1,5 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + repositoryname=user repositoryCustomer=apache repositoryLocation=http://${org.apache.ace.server}/repository \ No newline at end of file Modified: ace/trunk/run-server-allinone/conf/org.apache.ace.webui.vaadin.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server-allinone/conf/org.apache.ace.webui.vaadin.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server-allinone/conf/org.apache.ace.webui.vaadin.cfg (original) +++ ace/trunk/run-server-allinone/conf/org.apache.ace.webui.vaadin.cfg Tue Feb 23 14:39:54 2016 @@ -2,7 +2,8 @@ # The endpoint of the Vaadin UI org.apache.ace.server.servlet.init.productionMode = true -osgi.http.whiteboard.servlet.pattern = /ace/* +context.path = / + # Vaadin UI settings ui.authentication.enabled = true ui.authentication.user.name = dd Modified: ace/trunk/run-server-allinone/server-allinone.bndrun URL: http://svn.apache.org/viewvc/ace/trunk/run-server-allinone/server-allinone.bndrun?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server-allinone/server-allinone.bndrun (original) +++ ace/trunk/run-server-allinone/server-allinone.bndrun Tue Feb 23 14:39:54 2016 @@ -36,6 +36,7 @@ org.apache.ace.deployment.servlet;version=latest,\ org.apache.ace.deployment.streamgenerator;version=latest,\ org.apache.ace.discovery.api;version=latest,\ + org.apache.ace.http.context;version=latest,\ org.apache.ace.http.redirector;version=latest,\ org.apache.ace.log.api;version=latest,\ org.apache.ace.log.server.servlet;version=latest,\ Modified: ace/trunk/run-server/conf/org.apache.ace.deployment.servlet.agent.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server/conf/org.apache.ace.deployment.servlet.agent.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server/conf/org.apache.ace.deployment.servlet.agent.cfg (original) +++ ace/trunk/run-server/conf/org.apache.ace.deployment.servlet.agent.cfg Tue Feb 23 14:39:54 2016 @@ -1,6 +1,4 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -osgi.http.whiteboard.servlet.pattern=/agent/* # OBR settings obr.url = http://${org.apache.ace.obr}/obr/ -authentication.enabled = false Added: ace/trunk/run-server/conf/org.apache.ace.http.context.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server/conf/org.apache.ace.http.context.cfg?rev=1731866&view=auto ============================================================================== --- ace/trunk/run-server/conf/org.apache.ace.http.context.cfg (added) +++ ace/trunk/run-server/conf/org.apache.ace.http.context.cfg Tue Feb 23 14:39:54 2016 @@ -0,0 +1,4 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + +context.path=/ +authentication.enabled=false \ No newline at end of file Modified: ace/trunk/run-server/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg (original) +++ ace/trunk/run-server/conf/org.apache.ace.log.server.servlet.factory/auditlog.cfg Tue Feb 23 14:39:54 2016 @@ -1,5 +1,4 @@ # Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). -osgi.http.whiteboard.servlet.pattern=/auditlog/* name = auditlog -authentication.enabled = false +endpoint=/auditlog Modified: ace/trunk/run-server/conf/org.apache.ace.useradmin.repository.cfg URL: http://svn.apache.org/viewvc/ace/trunk/run-server/conf/org.apache.ace.useradmin.repository.cfg?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server/conf/org.apache.ace.useradmin.repository.cfg (original) +++ ace/trunk/run-server/conf/org.apache.ace.useradmin.repository.cfg Tue Feb 23 14:39:54 2016 @@ -1,3 +1,5 @@ +# Licensed to the Apache Software Foundation (ASF) under the terms of ASLv2 (http://www.apache.org/licenses/LICENSE-2.0). + repositoryname=user repositoryCustomer=apache repositoryLocation=http://${org.apache.ace.server}/repository \ No newline at end of file Modified: ace/trunk/run-server/server.bndrun URL: http://svn.apache.org/viewvc/ace/trunk/run-server/server.bndrun?rev=1731866&r1=1731865&r2=1731866&view=diff ============================================================================== --- ace/trunk/run-server/server.bndrun (original) +++ ace/trunk/run-server/server.bndrun Tue Feb 23 14:39:54 2016 @@ -37,7 +37,8 @@ org.apache.ace.scheduler.impl;version=latest,\ org.apache.ace.log.server.store.api;version=latest,\ org.apache.ace.log.server.store.file;version=latest,\ - org.apache.ace.feedback.common;version=latest + org.apache.ace.feedback.common;version=latest,\ + org.apache.ace.http.context;version=latest -runrepos: Workspace,\ Release -runproperties: org.apache.felix.log.storeDebug=true,\
