<artifactId>aaa-password-service-api</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-core</artifactId>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>repackaged-shiro</artifactId>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>aaa-cert</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-web</artifactId>
- </dependency>
- <!-- Enforce newer commons-collections versions -->
- <dependency>
- <groupId>commons-collections</groupId>
- <artifactId>commons-collections</artifactId>
- <version>3.2.2</version>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>repackaged-shiro</artifactId>
</dependency>
<dependency>
package org.opendaylight.aaa.shiro.web.env;
import javax.servlet.ServletContext;
-import org.apache.shiro.util.LifecycleUtils;
import org.apache.shiro.web.env.EnvironmentLoaderListener;
-import org.apache.shiro.web.env.MutableWebEnvironment;
import org.apache.shiro.web.env.WebEnvironment;
import org.opendaylight.aaa.api.AuthenticationService;
import org.opendaylight.aaa.api.TokenStore;
}
@Override
- protected WebEnvironment createEnvironment(final ServletContext sc) {
- MutableWebEnvironment environment = new AAAIniWebEnvironment(shiroConfiguration, dataBroker,
- certificateManager, authenticationService, tokenAuthenticators, tokenStore, passwordHashService);
-
- // in newer Shiro version, there is a determineWebEnvironment() which should be
- // used instead of createEnvironment() but for 1.3.x we just copy/paste from parent and do:
- environment.setServletContext(sc);
- customizeEnvironment(environment);
- LifecycleUtils.init(environment);
- return environment;
+ protected WebEnvironment determineWebEnvironment(final ServletContext servletContext) {
+ return new AAAIniWebEnvironment(shiroConfiguration, dataBroker, certificateManager, authenticationService,
+ tokenAuthenticators, tokenStore, passwordHashService);
}
}
<modules>
<module>api</module>
<module>impl</module>
+ <module>repackaged-shiro</module>
+ <module>repackaged-shiro-jar</module>
</modules>
<scm>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>odlparent</artifactId>
+ <version>8.0.0</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>repackaged-shiro-jar</artifactId>
+ <packaging>jar</packaging>
+ <version>0.14.0-SNAPSHOT</version>
+ <name>${project.artifactId}</name>
+
+ <properties>
+ <!-- We do not want to leak this artifact -->
+ <maven.deploy.skip>true</maven.deploy.skip>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-core</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-web</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-license</id>
+ <configuration>
+ <!-- Shiro is Apache-2.0 licensed -->
+ <skip>true</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-shade-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>shade</goal>
+ </goals>
+ <configuration>
+ <createDependencyReducedPom>false</createDependencyReducedPom>
+ <shadeSourcesContent>true</shadeSourcesContent>
+ <createSourcesJar>true</createSourcesJar>
+ <promoteTransitiveDependencies>true</promoteTransitiveDependencies>
+ <artifactSet>
+ <includes>
+ <include>org.apache.shiro:shiro-core</include>
+ <include>org.apache.shiro:shiro-web</include>
+ </includes>
+ </artifactSet>
+ <filters>
+ <filter>
+ <artifact>org.apache.shiro:shiro-core</artifact>
+ <excludes>
+ <exclude>META-INF/DEPENDENCIES</exclude>
+ <exclude>META-INF/MANIFEST.MF</exclude>
+ <exclude>META-INF/LICENSE</exclude>
+ <exclude>META-INF/NOTICE</exclude>
+ </excludes>
+ </filter>
+ <filter>
+ <artifact>org.apache.shiro:shiro-web</artifact>
+ <excludes>
+ <exclude>META-INF/MANIFEST.MF</exclude>
+ </excludes>
+ </filter>
+ </filters>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- vi: set et smarttab sw=4 tabstop=4: -->
+<!--
+ Copyright (c) 2020 PANTHEON.tech, s.r.o. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-parent</artifactId>
+ <version>0.14.0-SNAPSHOT</version>
+ <relativePath>../../parent</relativePath>
+ </parent>
+
+ <artifactId>repackaged-shiro</artifactId>
+ <packaging>bundle</packaging>
+ <name>${project.artifactId}</name>
+
+ <properties>
+ <!-- We are just juggling classes here -->
+ <odlparent.modernizer.skip>true</odlparent.modernizer.skip>
+ <odlparent.spotbugs.skip>true</odlparent.spotbugs.skip>
+
+ <!-- We do not want to generate javadoc -->
+ <maven.javadoc.skip>true</maven.javadoc.skip>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>repackaged-shiro-jar</artifactId>
+ <version>${project.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.owasp.encoder</groupId>
+ <artifactId>encoder</artifactId>
+ <version>1.2.3</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>unpack-license</id>
+ <configuration>
+ <!-- Shiro is Apache-2.0 licensed -->
+ <skip>true</skip>
+ </configuration>
+ </execution>
+ <execution>
+ <id>unpack</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>repackaged-shiro-jar</artifactId>
+ <version>${project.version}</version>
+ </artifactItem>
+ </artifactItems>
+ <overWriteReleases>false</overWriteReleases>
+ <overWriteSnapshots>true</overWriteSnapshots>
+ <outputDirectory>${project.build.directory}/classes</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>unpack-sources</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>unpack-dependencies</goal>
+ </goals>
+ <configuration>
+ <classifier>sources</classifier>
+ <includeArtifactIds>shiro-jar</includeArtifactIds>
+ <outputDirectory>${project.build.directory}/shaded-sources</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>shaded-sources</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>${project.build.directory}/shaded-sources</sources>
+ </configuration>
+ </execution>
+ <execution>
+ <id>shared-resources</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>add-resource</goal>
+ </goals>
+ <configuration>
+ <resources>
+ <resource>
+ <directory>${project.build.directory}/classes/META-INF</directory>
+ <targetPath>META-INF</targetPath>
+ <includes>
+ <include>DEPENDENCIES</include>
+ <include>LICENSE</include>
+ <include>NOTICE</include>
+ <include>shiro.tld</include>
+ </includes>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Include-Resource>
+ {maven-resources},
+ META-INF/git.properties=-${project.build.directory}/classes/META-INF/git.properties,
+ META-INF/services=-${project.build.directory}/classes/META-INF/services
+ </Include-Resource>
+ <Import-Package>
+ javax.servlet.jsp;resolution:=optional,
+ javax.servlet.jsp.tagext;resolution:=optional,
+ org.apache.commons.configuration2.interpol;resolution:=optional,
+ *
+ </Import-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
<artifactId>aaa-shiro</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>repackaged-shiro</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>${project.groupId}.web</groupId>
<classifier>features</classifier>
<type>xml</type>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-apache-shiro</artifactId>
+ <version>${project.version}</version>
+ <classifier>features</classifier>
+ <type>xml</type>
+ </dependency>
</dependencies>
</dependencyManagement>
<classifier>features</classifier>
<type>xml</type>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>repackaged-shiro</artifactId>
+ </dependency>
<dependency>
<groupId>${project.groupId}.web</groupId>
<artifactId>servlet-api</artifactId>
<type>xml</type>
<classifier>features</classifier>
</dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-apache-shiro</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
</dependencies>
</project>
<classifier>aaa-password-service-config</classifier>
<type>xml</type>
</dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-apache-shiro</artifactId>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
<dependency>
<groupId>org.opendaylight.mdsal</groupId>
<artifactId>odl-mdsal-binding-base</artifactId>
<type>xml</type>
<classifier>features</classifier>
</dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- </dependency>
</dependencies>
</project>
<type>xml</type>
<classifier>features</classifier>
</dependency>
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-core</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
<dependency>
<groupId>org.opendaylight.aaa</groupId>
<artifactId>aaa-shiro</artifactId>
<type>xml</type>
<classifier>features</classifier>
</dependency>
- <dependency>
- <groupId>org.opendaylight.odlparent</groupId>
- <artifactId>odl-apache-commons-codec</artifactId>
- <type>xml</type>
- <classifier>features</classifier>
- </dependency>
<!--H2 Store -->
<dependency>
</configfile>
<feature version="[8.1,9)">odl-karaf-feat-jdbc</feature>
<feature version="[8.1,9)">odl-karaf-feat-jetty</feature>
- <feature version="[8.1,9)">odl-apache-commons-codec</feature>
<feature version="[3,4)">odl-jolokia</feature>
</feature>
</features>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>single-feature-parent</artifactId>
+ <version>8.1.2</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-apache-shiro</artifactId>
+ <version>0.14.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <name>OpenDaylight :: Apache Shiro</name>
+ <description>Apache Shiro (repackaged)</description>
+
+ <properties>
+ <checkDependencyChange>true</checkDependencyChange>
+ <failOnDependencyChange>true</failOnDependencyChange>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-artifacts</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.odlparent</groupId>
+ <artifactId>odl-servlet-api</artifactId>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>repackaged-shiro</artifactId>
+ </dependency>
+ </dependencies>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2021 PANTHEON.tech, s.r.o. and others. All rights reserved.
+
+ This program and the accompanying materials are made available under the
+ terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ and is available at http://www.eclipse.org/legal/epl-v10.html
+ -->
+<features name="odl-aaa-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0">
+ <feature name="odl-apache-shiro" version="${project.version}">
+ <feature version="[8,9)">odl-servlet-api</feature>
+ </feature>
+</features>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<features xmlns="http://karaf.apache.org/xmlns/features/v1.6.0" name="odl-aaa-0.14.0-SNAPSHOT">
+ <feature version="0.0.0">
+ <feature>odl-servlet-api</feature>
+ <bundle>mvn:commons-beanutils/commons-beanutils/1.9.4</bundle>
+ <bundle>mvn:commons-collections/commons-collections/3.2.2</bundle>
+ <bundle>mvn:commons-logging/commons-logging/1.2</bundle>
+ <bundle>mvn:org.opendaylight.aaa/repackaged-shiro/${project.version}</bundle>
+ <bundle>mvn:org.owasp.encoder/encoder/1.2.3</bundle>
+ </feature>
+</features>
<module>odl-aaa-password-service</module>
<module>odl-aaa-shiro</module>
<module>odl-aaa-web</module>
+ <module>odl-apache-shiro</module>
</modules>
<scm>
<artifactId>javax.json</artifactId>
<version>1.0.4</version>
</dependency>
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-web</artifactId>
- <version>1.3.2</version>
- </dependency>
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-core</artifactId>
- <version>1.3.2</version>
- </dependency>
</dependencies>
</dependencyManagement>