<servlet>
<servlet-name>JAXRSRestconf</servlet-name>
- <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+ <servlet-class>org.glassfish.jersey.core.spi.container.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>org.opendaylight.controller.sal.rest.impl.RestconfApplication</param-value>
<!-- Token Auth Filter -->
<init-param>
- <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
+ <param-name>org.glassfish.jersey.core.spi.container.ContainerRequestFilters</param-name>
<param-value>
org.opendaylight.aaa.sts.TokenAuthFilter
</param-value>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
+ <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-common</artifactId>
+ </dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
import java.util.List;
import java.util.Map;
+import org.glassfish.jersey.internal.util.Base64;
import org.opendaylight.aaa.AuthenticationBuilder;
import org.opendaylight.aaa.PasswordCredentialBuilder;
import org.opendaylight.aaa.api.Authentication;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.sun.jersey.core.util.Base64;
-
/**
* An HTTP Basic authenticator. Note that this is provided as a Hydrogen
* backward compatible authenticator, but usage of this authenticator or
}
private static String [] extractCredentialArray(final String authHeader) {
- return new String(Base64.base64Decode(authHeader
- .substring(BASIC_PREFIX.length()))).split(AUTH_SEP);
+ return new String(Base64.decode(authHeader
+ .substring(BASIC_PREFIX.length()).getBytes())).split(AUTH_SEP);
}
private static boolean verifyCredentialArray(final String [] creds) {
import java.util.List;
import java.util.Map;
+import org.glassfish.jersey.internal.util.Base64;
import org.junit.Before;
import org.junit.Test;
import org.opendaylight.aaa.ClaimBuilder;
import org.opendaylight.aaa.api.Claim;
import org.opendaylight.aaa.api.CredentialAuth;
-import com.sun.jersey.core.util.Base64;
-
public class HttpBasicAuthTest {
private static final String USERNAME = "admin";
private static final String PASSWORD = "admin";
</parent>
<artifactId>aaa-authn-federation</artifactId>
- <version>0.3.0-SNAPSHOT</version>
<packaging>bundle</packaging>
<dependencies>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
+ <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
</dependency>
<!-- Testing Dependencies -->
<dependency>
- <groupId>com.sun.jersey.jersey-test-framework</groupId>
- <artifactId>jersey-test-framework-grizzly2</artifactId>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<extensions>true</extensions>
<configuration>
<instructions>
- <Import-Package>*,com.sun.jersey.spi.container.servlet</Import-Package>
<Web-ContextPath>/oauth2/federation</Web-ContextPath>
<Web-Connectors>federationConn</Web-Connectors>
<Bundle-Activator>org.opendaylight.aaa.federation.Activator</Bundle-Activator>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
+ <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
</dependency>
<!-- Testing Dependencies -->
<dependency>
- <groupId>com.sun.jersey.jersey-test-framework</groupId>
- <artifactId>jersey-test-framework-grizzly2</artifactId>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
+ <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
</dependency>
<!-- Testing Dependencies -->
<dependency>
- <groupId>com.sun.jersey.jersey-test-framework</groupId>
- <artifactId>jersey-test-framework-grizzly2</artifactId>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
+ <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
</dependency>
<!-- Testing Dependencies -->
<dependency>
- <groupId>com.sun.jersey.jersey-test-framework</groupId>
- <artifactId>jersey-test-framework-grizzly2</artifactId>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<extensions>true</extensions>
<configuration>
<instructions>
- <Import-Package>*,com.sun.jersey.spi.container.servlet</Import-Package>
<Web-ContextPath>/oauth2</Web-ContextPath>
<Bundle-Activator>org.opendaylight.aaa.sts.Activator</Bundle-Activator>
<manifestLocation>${project.basedir}/META-INF</manifestLocation>
package org.opendaylight.aaa.sts;
+import java.io.IOException;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.WebApplicationException;
+import javax.ws.rs.container.ContainerRequestContext;
+import javax.ws.rs.container.ContainerRequestFilter;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import org.opendaylight.aaa.api.AuthenticationException;
import org.opendaylight.aaa.api.TokenAuth;
-import com.sun.jersey.spi.container.ContainerRequest;
-import com.sun.jersey.spi.container.ContainerRequestFilter;
-
/**
* A token-based authentication filter for resource providers.
*
* @author liemmn
- *
+ * @see javax.ws.rs.ContainerRequestFilter
*/
public class TokenAuthFilter implements ContainerRequestFilter {
@Context
private HttpServletRequest httpRequest;
- @Override
- public ContainerRequest filter(ContainerRequest request) {
-
- // Do the CORS check first
- if(checkCORSOptionRequest(request)) {
- return request;
- }
-
- // Are we up yet?
- if (ServiceLocator.getInstance().getAuthenticationService() == null) {
- throw new WebApplicationException(
- Response.status(Status.SERVICE_UNAVAILABLE)
- .type(MediaType.APPLICATION_JSON)
- .entity("{\"error\":\"Authentication service unavailable\"}")
- .build());
- }
-
- // Are we doing authentication or not?
- if (ServiceLocator.getInstance().getAuthenticationService().isAuthEnabled()) {
- Map<String, List<String>> headers = request.getRequestHeaders();
-
- // Go through and invoke other TokenAuth first...
- List<TokenAuth> tokenAuthCollection =
- ServiceLocator.getInstance().getTokenAuthCollection();
- for (TokenAuth ta : tokenAuthCollection) {
- try {
- Authentication auth = ta.validate(headers);
- if (auth != null) {
- ServiceLocator.getInstance().getAuthenticationService().set(auth);
- return request;
- }
- } catch (AuthenticationException ae) {
- throw unauthorized();
- }
- }
-
- // OK, last chance to validate token...
- try {
- OAuthAccessResourceRequest or = new OAuthAccessResourceRequest(
- httpRequest, ParameterStyle.HEADER);
- validate(or.getAccessToken());
- } catch (OAuthSystemException | OAuthProblemException e) {
- throw unauthorized();
- }
- }
-
- return request;
- }
-
/**
* CORS access control : when browser sends cross-origin request, it first sends the OPTIONS method
* with a list of access control request headers, which has a list of custom headers and access control method
* We should not do any authorization against such request.
* for more details : https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS
*/
-
- private boolean checkCORSOptionRequest(ContainerRequest request) {
+ private boolean checkCORSOptionRequest(ContainerRequestContext request) {
if(OPTIONS.equals(request.getMethod())) {
- List<String> headerList = request.getRequestHeader(ACCESS_CONTROL_REQUEST_HEADERS);
- if(headerList != null && !headerList.isEmpty()) {
- String header = headerList.get(0);
- if (header != null && header.toLowerCase().contains(AUTHORIZATION)) {
- return true;
- }
- }
+ String headerString = request.getHeaderString(ACCESS_CONTROL_REQUEST_HEADERS);
+ return headerString.toLowerCase().contains(AUTHORIZATION);
}
return false;
}
super(response);
}
}
+
+ @Override
+ public void filter(ContainerRequestContext request) throws IOException {
+ // Do the CORS check first
+ if(checkCORSOptionRequest(request)) {
+ return;
+ }
+ // Are we up yet?
+ if (ServiceLocator.getInstance().getAuthenticationService() == null) {
+ throw new WebApplicationException(
+ Response.status(Status.SERVICE_UNAVAILABLE)
+ .type(MediaType.APPLICATION_JSON)
+ .entity("{\"error\":\"Authentication service unavailable\"}")
+ .build());
+ }
+
+ // Are we doing authentication or not?
+ if (ServiceLocator.getInstance().getAuthenticationService().isAuthEnabled()) {
+ Map<String, List<String>> headers = request.getHeaders();
+ // Go through and invoke other TokenAuth first...
+ for (TokenAuth ta : ServiceLocator.getInstance().getTokenAuthCollection()) {
+ try {
+ Authentication auth = ta.validate(headers);
+ if (auth != null) {
+ ServiceLocator.getInstance().getAuthenticationService().set(auth);
+ return;
+ }
+ } catch (AuthenticationException ae) {
+ request.abortWith(Response.status(Response.Status.UNAUTHORIZED).entity("User cannot access the resource.").build());
+ }
+ }
+
+ // OK, last chance to validate token...
+ try {
+ OAuthAccessResourceRequest or = new OAuthAccessResourceRequest(
+ httpRequest, ParameterStyle.HEADER);
+ validate(or.getAccessToken());
+ return;
+ } catch (OAuthSystemException | OAuthProblemException e) {
+ request.abortWith(Response.status(Response.Status.UNAUTHORIZED).entity("User cannot access the resource.").build());
+ }
+ request.abortWith(Response.status(Response.Status.UNAUTHORIZED).entity("User cannot access the resource.").build());
+ }
+ }
}
package org.opendaylight.aaa.sts;
import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.assertNotNull;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Matchers.anyMap;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Response;
+
+import org.glassfish.jersey.server.ResourceConfig;
+import org.glassfish.jersey.servlet.ServletContainer;
+import org.glassfish.jersey.test.DeploymentContext;
+import org.glassfish.jersey.test.JerseyTest;
+import org.glassfish.jersey.test.ServletDeploymentContext;
+import org.glassfish.jersey.test.grizzly.GrizzlyWebTestContainerFactory;
+import org.glassfish.jersey.test.spi.TestContainerFactory;
import org.junit.BeforeClass;
import org.junit.Test;
import org.opendaylight.aaa.AuthenticationBuilder;
import org.opendaylight.aaa.api.AuthenticationService;
import org.opendaylight.aaa.api.TokenAuth;
import org.opendaylight.aaa.api.TokenStore;
-import org.opendaylight.aaa.sts.TokenAuthFilter.UnauthorizedException;
-
-import com.sun.jersey.api.client.ClientResponse;
-import com.sun.jersey.api.client.UniformInterfaceException;
-import com.sun.jersey.test.framework.JerseyTest;
-import com.sun.jersey.test.framework.WebAppDescriptor;
public class TokenAuthTest extends JerseyTest {
- private static final String RS_PACKAGES = "org.opendaylight.aaa.sts";
- private static final String JERSEY_FILTERS = "com.sun.jersey.spi.container.ContainerRequestFilters";
- private static final String AUTH_FILTERS = TokenAuthFilter.class.getName();
-
private static Authentication auth = new AuthenticationBuilder(new ClaimBuilder()
.setUserId("1234").setUser("Bob").addRole("admin").addRole("user")
.setDomain("tenantX").build())
private static final String GOOD_TOKEN = "9b01b7cf-8a49-346d-8c47-6a61193e2b60";
private static final String BAD_TOKEN = "9b01b7cf-8a49-346d-8c47-6a611badbeef";
- public TokenAuthTest() throws Exception {
- super(new WebAppDescriptor.Builder(RS_PACKAGES).initParam(
- JERSEY_FILTERS, AUTH_FILTERS).build());
+ public TokenAuthTest() {
+ }
+
+ @Path("/test")
+ public static class JerseySpringResource {
+ @GET
+ @Path("/ok")
+ public Response getOk()
+ {
+ return Response.ok().build();
+ }
+ }
+
+ @Override
+ protected DeploymentContext configureDeployment() {
+ ResourceConfig resourceConfig = new ResourceConfig();
+ resourceConfig.register(JerseySpringResource.class);
+ resourceConfig.register(TokenAuthFilter.class);
+ return ServletDeploymentContext.forServlet(
+ new ServletContainer(resourceConfig)).build();
+ }
+
+ @Override
+ protected TestContainerFactory getTestContainerFactory() {
+ return new GrizzlyWebTestContainerFactory();
}
@BeforeClass
Boolean.TRUE);
}
- @Test()
- public void testGetUnauthorized() {
- try {
- resource().path("test").get(String.class);
- fail("Shoulda failed with 401!");
- } catch (UniformInterfaceException e) {
- ClientResponse resp = e.getResponse();
- assertEquals(401, resp.getStatus());
- assertTrue(resp.getHeaders()
- .get(UnauthorizedException.WWW_AUTHENTICATE)
- .contains(UnauthorizedException.OPENDAYLIGHT));
- }
- }
-
@Test
- public void testGet() {
- String resp = resource().path("test")
- .header("Authorization", "Bearer " + GOOD_TOKEN)
- .get(String.class);
- assertEquals("ok", resp);
+ public void testGetUnauthorized() {
+ Response resp = target("test/ok")
+ .request()
+ .get();
+ assertNotNull(resp);
+ assertEquals(401, resp.getStatus());
}
@SuppressWarnings("unchecked")
TokenAuth ta = mock(TokenAuth.class);
when(ta.validate(anyMap())).thenReturn(auth);
ServiceLocator.getInstance().getTokenAuthCollection().add(ta);
- testGet();
+ Response resp = target("test/ok")
+ .request()
+ .header("Authorization", "Bearer " + GOOD_TOKEN)
+ .get();
+ assertEquals(Response.Status.Family.SUCCESSFUL, resp.getStatusInfo().getFamily());
} finally {
ServiceLocator.getInstance().getTokenAuthCollection().clear();
}
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
+ <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>provided</scope>
</dependency>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
+ <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <artifactId>javax.servlet-api</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.eclipse.persistence</groupId>
+ <artifactId>org.eclipse.persistence.moxy</artifactId>
+ </dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.dependencymanager</artifactId>
</dependency>
<!-- Testing Dependencies -->
<dependency>
- <groupId>com.sun.jersey.jersey-test-framework</groupId>
- <artifactId>jersey-test-framework-grizzly2</artifactId>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<extensions>true</extensions>
<configuration>
<instructions>
- <Import-Package>javax.servlet.http,javax.ws.rs,javax.ws.rs.core,javax.xml.bind.annotation,org.apache.felix.dm,org.opendaylight.aaa,org.opendaylight.aaa.api,org.osgi.framework,org.slf4j,org.eclipse.jetty.servlets,com.sun.jersey.spi.container.servlet,com.google.*</Import-Package>
+ <Import-Package>
+ javax.servlet.http,
+ javax.ws.rs,
+ javax.ws.rs.core,
+ javax.xml.bind.annotation,
+ org.apache.felix.dm,
+ org.opendaylight.aaa,
+ org.opendaylight.aaa.api,
+ org.osgi.framework,
+ org.slf4j,
+ org.eclipse.jetty.servlets
+ </Import-Package>
<Private-Package>org.h2.*</Private-Package>
<Embed-Dependency>h2</Embed-Dependency>
<Web-ContextPath>/auth</Web-ContextPath>
import javax.ws.rs.core.Application;
+import org.eclipse.persistence.jaxb.rs.MOXyJsonProvider;
import org.opendaylight.aaa.idm.rest.DomainHandler;
import org.opendaylight.aaa.idm.rest.RoleHandler;
import org.opendaylight.aaa.idm.rest.UserHandler;
@Override
public Set<Class<?>> getClasses() {
- return new HashSet<Class<?>>(Arrays.asList(VersionHandler.class,
+ return new HashSet<Class<?>>(Arrays.asList(MOXyJsonProvider.class,
+ VersionHandler.class,
DomainHandler.class,
RoleHandler.class,
UserHandler.class));
<servlet>
<servlet-name>IdmLight</servlet-name>
- <servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
+ <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>javax.ws.rs.Application</param-name>
<param-value>org.opendaylight.aaa.idm.IdmLightApplication</param-value>
</init-param>
<init-param>
- <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name><param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>com.sun.jersey.spi.container.ContainerRequestFilters</param-name>
- <param-value> org.opendaylight.aaa.sts.TokenAuthFilter</param-value>
+ <param-name>javax.ws.rs.container.ContainerRequestFilter</param-name>
+ <param-value>org.opendaylight.aaa.sts.TokenAuthFilter</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
+ <artifactId>javax.servlet-api</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<dependencies>
<!-- odl-aaa-authn -->
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-common</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
+ <groupId>com.eclipsesource.jaxrs</groupId>
+ <artifactId>jersey-all</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jersey.containers</groupId>
+ <artifactId>jersey-container-servlet</artifactId>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-json</artifactId>
+ <groupId>org.glassfish</groupId>
+ <artifactId>javax.json</artifactId>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
</dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ </dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<!-- REST -->
<feature>war</feature>
- <bundle>mvn:com.sun.jersey/jersey-servlet/{{VERSION}}</bundle>
- <bundle>mvn:com.sun.jersey/jersey-core/{{VERSION}}</bundle>
- <bundle>mvn:com.sun.jersey/jersey-server/{{VERSION}}</bundle>
+ <bundle>mvn:org.glassfish.jersey.bundles.repackaged/jersey-guava/{{VERSION}}</bundle>
+ <bundle>mvn:javax.ws.rs/javax.ws.rs-api/{{VERSION}}</bundle>
+ <bundle>mvn:com.eclipsesource.jaxrs/jersey-all/{{VERSION}}</bundle>
+ <bundle>mvn:javax.servlet/javax.servlet-api/{{VERSION}}</bundle>
+ <bundle>mvn:org.glassfish.jersey.containers/jersey-container-servlet/{{VERSION}}</bundle>
<!-- OSGi -->
<bundle>mvn:org.apache.felix/org.apache.felix.dependencymanager/{{VERSION}}</bundle>
<feature version='${controller.mdsal.version}'>odl-mdsal-broker</feature>
<feature version='${config.version}'>odl-config-core</feature>
-
<!-- OSGi -->
<bundle>mvn:org.apache.felix/org.apache.felix.dependencymanager/{{VERSION}}</bundle>
<bundle>mvn:org.apache.felix/org.apache.felix.metatype/{{VERSION}}</bundle>
+ <!-- REST -->
+ <feature>war</feature>
+ <bundle>mvn:org.glassfish.jersey.bundles.repackaged/jersey-guava/{{VERSION}}</bundle>
+ <bundle>mvn:javax.ws.rs/javax.ws.rs-api/{{VERSION}}</bundle>
+ <bundle>mvn:com.eclipsesource.jaxrs/jersey-all/{{VERSION}}</bundle>
+ <bundle>mvn:javax.servlet/javax.servlet-api/{{VERSION}}</bundle>
+ <bundle>mvn:org.glassfish.jersey.containers/jersey-container-servlet/{{VERSION}}</bundle>
+
<!-- OAuth -->
<bundle>mvn:org.apache.oltu.oauth2/org.apache.oltu.oauth2.common/{{VERSION}}</bundle>
<bundle>mvn:org.apache.oltu.oauth2/org.apache.oltu.oauth2.authzserver/{{VERSION}}</bundle>
<!-- Federation -->
<bundle>mvn:org.opendaylight.aaa/aaa-authn-federation/{{VERSION}}</bundle>
- <bundle>mvn:org.opendaylight.aaa/aaa-authn-idpmapping/{{VERSION}}</bundle>
- <bundle>mvn:org.glassfish/javax.json/1.0.4</bundle>
-
- <!-- REST -->
- <feature>war</feature>
- <bundle>mvn:com.sun.jersey/jersey-servlet/{{VERSION}}</bundle>
- <bundle>mvn:com.sun.jersey/jersey-core/{{VERSION}}</bundle>
- <bundle>mvn:com.sun.jersey/jersey-server/{{VERSION}}</bundle>
+ <bundle>mvn:org.opendaylight.aaa/aaa-authn-idpmapping/{{VERSION}}</bundle>
+ <bundle>mvn:org.glassfish/javax.json/{{VERSION}}</bundle>
<configfile finalname="etc/opendaylight/karaf/08-authn-config.xml">mvn:org.opendaylight.aaa/aaa-authn-mdsal-config/{{VERSION}}/xml/config</configfile>
<configfile finalname="/etc/org.opendaylight.aaa.authn.cfg">mvn:org.opendaylight.aaa/aaa-authn/{{VERSION}}/cfg/config</configfile>
<!-- Apache Shiro & Dependencies -->
<bundle>mvn:org.apache.shiro/shiro-core/1.2.3</bundle>
<bundle>mvn:org.apache.shiro/shiro-web/1.2.3</bundle>
- <bundle>wrap:mvn:javax.servlet/servlet-api/2.5</bundle>
+ <bundle>wrap:mvn:javax.servlet/javax.servlet-api/${javax.servlet.api.version}</bundle>
<!-- AAA bundles relating to stand-alone shiro feature -->
<configfile finalname="/etc/shiro.ini">mvn:org.opendaylight.aaa/aaa-shiro/{{VERSION}}/cfg/configuration</configfile>
<!-- AuthN -->
<glassfish.json.version>1.0.4</glassfish.json.version>
- <servlet.api.version>2.5</servlet.api.version>
<ehcache.version>2.8.3</ehcache.version>
<jta.version>1.1.1</jta.version>
<oltu.version>1.0.0</oltu.version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>${servlet.api.version}</version>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>${javax.servlet.api.version}</version>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
- <version>${jersey.version}</version>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- <version>${jersey.version}</version>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-server</artifactId>
+ <version>${jersey2.version}</version>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- <version>${jersey.version}</version>
+ <groupId>org.glassfish.jersey.core</groupId>
+ <artifactId>jersey-common</artifactId>
+ <version>${jersey2.version}</version>
</dependency>
<dependency>
- <groupId>com.sun.jersey</groupId>
+ <groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-json</artifactId>
- <version>${jersey.version}</version>
+ <version>${jersey2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>com.sun.jersey.jersey-test-framework</groupId>
- <artifactId>jersey-test-framework-grizzly2</artifactId>
- <version>${jersey.version}</version>
+ <groupId>org.glassfish.jersey.test-framework.providers</groupId>
+ <artifactId>jersey-test-framework-provider-grizzly2</artifactId>
+ <version>${jersey2.version}</version>
<scope>test</scope>
</dependency>
<dependency>