Split out datastore implementation from aaa-shiro 33/96833/15
authortadei.bilan <tadei.bilan@pantheon.tech>
Thu, 8 Jul 2021 10:51:08 +0000 (13:51 +0300)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 9 Aug 2021 09:24:21 +0000 (11:24 +0200)
Split H2 database from aaa-shiro into separate module.
Also split opendaylight.aaa.shiro.tokenauthrealm.auth to
aaa-tokenauthrealm to avoid cyclic dependencies
between aaa-idm-store-h2 and aaa-shiro modules.

JIRA: AAA-208
Change-Id: Ie90e7d7379e598bbf1b62436a27dae8a8b8c7372
Signed-off-by: tadei.bilan <tadei.bilan@pantheon.tech>
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
44 files changed:
aaa-cli-jar/pom.xml
aaa-idm-store-h2/pom.xml [new file with mode: 0644]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/AbstractStore.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/AbstractStore.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/ConnectionProvider.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/ConnectionProvider.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/DomainStore.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/DomainStore.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/GrantStore.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/GrantStore.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/H2Store.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/H2Store.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/H2TokenStore.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/H2TokenStore.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/IdmLightConfig.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/IdmLightConfig.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/IdmLightSimpleConnectionProvider.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/IdmLightSimpleConnectionProvider.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/OSGiH2Store.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/OSGiH2Store.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/RoleStore.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/RoleStore.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/StoreException.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/StoreException.java with 100% similarity]
aaa-idm-store-h2/src/main/java/org/opendaylight/aaa/datastore/h2/UserStore.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/datastore/h2/UserStore.java with 100% similarity]
aaa-idm-store-h2/src/test/java/org/opendaylight/aaa/datastore/h2/DomainStoreTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/datastore/h2/DomainStoreTest.java with 100% similarity]
aaa-idm-store-h2/src/test/java/org/opendaylight/aaa/datastore/h2/GrantStoreTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/datastore/h2/GrantStoreTest.java with 100% similarity]
aaa-idm-store-h2/src/test/java/org/opendaylight/aaa/datastore/h2/H2StoreTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/datastore/h2/H2StoreTest.java with 100% similarity]
aaa-idm-store-h2/src/test/java/org/opendaylight/aaa/datastore/h2/H2TokenStoreTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/datastore/h2/H2TokenStoreTest.java with 89% similarity]
aaa-idm-store-h2/src/test/java/org/opendaylight/aaa/datastore/h2/IdmLightConfigTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/datastore/h2/IdmLightConfigTest.java with 100% similarity]
aaa-idm-store-h2/src/test/java/org/opendaylight/aaa/datastore/h2/RoleStoreTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/datastore/h2/RoleStoreTest.java with 100% similarity]
aaa-idm-store-h2/src/test/java/org/opendaylight/aaa/datastore/h2/UserStoreTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/datastore/h2/UserStoreTest.java with 100% similarity]
aaa-shiro/impl/pom.xml
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/AAAShiroProvider.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/idm/IdmLightProxy.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/realm/TokenAuthRealm.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/realm/util/http/header/HeaderUtils.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/web/env/AAAIniWebEnvironment.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/web/env/ShiroWebEnvironmentLoaderListener.java
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/web/env/ThreadLocals.java
aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/realm/TokenAuthRealmTest.java
aaa-tokenauthrealm/pom.xml [new file with mode: 0644]
aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/AuthenticationBuilder.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/AuthenticationBuilder.java with 98% similarity]
aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/AuthenticationManager.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/AuthenticationManager.java with 98% similarity]
aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/ClaimBuilder.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/ClaimBuilder.java with 98% similarity]
aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/HttpBasicAuth.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/HttpBasicAuth.java with 98% similarity]
aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/PasswordCredentialBuilder.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/PasswordCredentialBuilder.java with 97% similarity]
aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/TokenAuthenticators.java [moved from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/TokenAuthenticators.java with 93% similarity]
aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/AuthenticationBuilderTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/AuthenticationBuilderTest.java with 98% similarity]
aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/AuthenticationManagerTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/AuthenticationManagerTest.java with 98% similarity]
aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/ClaimBuilderTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/ClaimBuilderTest.java with 99% similarity]
aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/HttpBasicAuthTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/HttpBasicAuthTest.java with 98% similarity]
aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/PasswordCredentialTest.java [moved from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/PasswordCredentialTest.java with 95% similarity]
artifacts/pom.xml
pom.xml

index 54335d82c47bc7232110033cadf1609e7b08b231..f97bf79f7c2e18533ec7f39136d2646963df5914 100644 (file)
@@ -32,10 +32,10 @@ and is available at http://www.eclipse.org/legal/epl-v10.html INTERNAL
     </dependency>
     <dependency>
       <groupId>org.opendaylight.aaa</groupId>
-      <artifactId>aaa-shiro</artifactId>
+      <artifactId>aaa-idm-store-h2</artifactId>
       <exclusions>
         <exclusion>
-    <!-- Completely disable transitive dependencies -->
+          <!-- Completely disable transitive dependencies -->
           <groupId>*</groupId>
           <artifactId>*</artifactId>
         </exclusion>
diff --git a/aaa-idm-store-h2/pom.xml b/aaa-idm-store-h2/pom.xml
new file mode 100644 (file)
index 0000000..7220e87
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 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.aaa</groupId>
+        <artifactId>aaa-parent</artifactId>
+        <version>0.14.2-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+
+    <artifactId>aaa-idm-store-h2</artifactId>
+    <name>ODL :: aaa :: ${project.artifactId}</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <!-- Internal aaa dependencies -->
+        <dependency>
+            <groupId>org.opendaylight.aaa</groupId>
+            <artifactId>aaa-authn-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.aaa</groupId>
+            <artifactId>aaa-tokenauthrealm</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.aaa</groupId>
+            <artifactId>aaa-password-service-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.aaa</groupId>
+            <artifactId>aaa-password-service-impl</artifactId>
+        </dependency>
+
+        <!-- OSGI dependencies -->
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+        </dependency>
+
+        <!-- External dependencies -->
+        <dependency>
+            <groupId>org.apache.commons</groupId>
+            <artifactId>commons-text</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>net.sf.ehcache</groupId>
+            <artifactId>ehcache</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.immutables</groupId>
+            <artifactId>value</artifactId>
+            <classifier>annotations</classifier>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+        </dependency>
+
+        <!-- Test dependencies -->
+        <dependency>
+            <groupId>com.google.truth</groupId>
+            <artifactId>truth</artifactId>
+        </dependency>
+    </dependencies>
+</project>
similarity index 89%
rename from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/datastore/h2/H2TokenStoreTest.java
rename to aaa-idm-store-h2/src/test/java/org/opendaylight/aaa/datastore/h2/H2TokenStoreTest.java
index 1858526e3dfc866ce4d78a6237bdf9830398ec60..25ee707f273a3e5feffe8df56e12c06f59057072 100644 (file)
@@ -14,8 +14,8 @@ import static org.junit.Assert.assertNull;
 import org.junit.After;
 import org.junit.Test;
 import org.opendaylight.aaa.api.Authentication;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.AuthenticationBuilder;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.ClaimBuilder;
+import org.opendaylight.aaa.tokenauthrealm.auth.AuthenticationBuilder;
+import org.opendaylight.aaa.tokenauthrealm.auth.ClaimBuilder;
 
 /**
  * Unit Test for H2TokenStore.
index cb9177498f4f26268e3cb3fa5e5bc3dbf3310deb..e6ebc3fae12010679d1443931a0e101f84ff0c72 100644 (file)
@@ -32,6 +32,14 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             <groupId>org.opendaylight.aaa</groupId>
             <artifactId>aaa-shiro-api</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.opendaylight.aaa</groupId>
+            <artifactId>aaa-tokenauthrealm</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.opendaylight.aaa</groupId>
+            <artifactId>aaa-idm-store-h2</artifactId>
+        </dependency>
 
         <!-- jersey client for moon authN -->
         <dependency>
@@ -87,10 +95,6 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
             <groupId>net.sf.ehcache</groupId>
             <artifactId>ehcache</artifactId>
         </dependency>
-        <dependency>
-            <groupId>com.h2database</groupId>
-            <artifactId>h2</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.immutables</groupId>
             <artifactId>value</artifactId>
@@ -177,15 +181,12 @@ and is available at http://www.eclipse.org/legal/epl-v10.html
                             org.opendaylight.aaa,
                             org.opendaylight.aaa.shiro,
                             org.opendaylight.aaa.shiro.idm,
-                            org.opendaylight.aaa.shiro.tokenauthrealm,
-                            org.opendaylight.aaa.shiro.tokenauthrealm.auth,
                             org.opendaylight.aaa.shiro,
                             org.opendaylight.aaa.shiro.filters,
                             org.opendaylight.aaa.shiro.realm,
                             <!-- TODO: This is temporary until we can find a better spot for GsonProvider. -->
                             org.opendaylight.aaa.provider,
-                            org.opendaylight.aaa.shiro.web.env,
-                            org.opendaylight.aaa.datastore.h2.*,
+                            org.opendaylight.aaa.shiro.web.env
                         </Export-Package>
                         <Import-Package>
                            !javax.annotation,
index 6728c57b43b3582f588be2be1a06b1aba1070b0d..ce34fa827157eed7b4a104f0fc50372dcff67313 100644 (file)
@@ -20,8 +20,8 @@ import org.opendaylight.aaa.api.TokenStore;
 import org.opendaylight.aaa.api.password.service.PasswordHashService;
 import org.opendaylight.aaa.cert.api.ICertificateManager;
 import org.opendaylight.aaa.datastore.h2.H2TokenStore;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.HttpBasicAuth;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.TokenAuthenticators;
+import org.opendaylight.aaa.tokenauthrealm.auth.HttpBasicAuth;
+import org.opendaylight.aaa.tokenauthrealm.auth.TokenAuthenticators;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.aaa.app.config.rev170619.DatastoreConfig;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.aaa.app.config.rev170619.ShiroConfiguration;
index a997893be96d2199edf5f331ee0168a70e1f8167..f77fc6a3812567d0cd400ff262c31829e8b47aff 100644 (file)
@@ -31,7 +31,7 @@ import org.opendaylight.aaa.api.model.Role;
 import org.opendaylight.aaa.api.model.User;
 import org.opendaylight.aaa.api.model.Users;
 import org.opendaylight.aaa.api.password.service.PasswordHashService;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.ClaimBuilder;
+import org.opendaylight.aaa.tokenauthrealm.auth.ClaimBuilder;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 05fe37440469883165bbacd9048663df69adc0ab..f0025379090d232633da2aff116094d633494e24 100644 (file)
@@ -28,8 +28,8 @@ import org.opendaylight.aaa.api.shiro.principal.ODLPrincipal;
 import org.opendaylight.aaa.shiro.principal.ODLPrincipalImpl;
 import org.opendaylight.aaa.shiro.realm.util.TokenUtils;
 import org.opendaylight.aaa.shiro.realm.util.http.header.HeaderUtils;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.TokenAuthenticators;
 import org.opendaylight.aaa.shiro.web.env.ThreadLocals;
+import org.opendaylight.aaa.tokenauthrealm.auth.TokenAuthenticators;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
index 6b8619c87bf960b17c99b245cec4bcb03c1fd3a5..cbb2a8946af33e0b3ebb1682b71e1b817289405c 100644 (file)
@@ -14,7 +14,7 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import org.apache.shiro.codec.Base64;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.HttpBasicAuth;
+import org.opendaylight.aaa.tokenauthrealm.auth.HttpBasicAuth;
 
 /**
  * Utilities for HTTP header manipulation.
index 66cc1ebcc171c7f160c4b84d1129fe81b2fbdab8..07c58401192b92a912a9fe477668a8f573cf319e 100644 (file)
@@ -19,7 +19,7 @@ import org.opendaylight.aaa.api.AuthenticationService;
 import org.opendaylight.aaa.api.TokenStore;
 import org.opendaylight.aaa.api.password.service.PasswordHashService;
 import org.opendaylight.aaa.cert.api.ICertificateManager;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.TokenAuthenticators;
+import org.opendaylight.aaa.tokenauthrealm.auth.TokenAuthenticators;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.aaa.app.config.rev170619.ShiroConfiguration;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.aaa.app.config.rev170619.shiro.configuration.Main;
index 7d9b12d8381eb585740f4d2ab7cca77553dcecec..4c1fcb616cc2aa445756e24f22283fb7e95d67a1 100644 (file)
@@ -14,7 +14,7 @@ import org.opendaylight.aaa.api.AuthenticationService;
 import org.opendaylight.aaa.api.TokenStore;
 import org.opendaylight.aaa.api.password.service.PasswordHashService;
 import org.opendaylight.aaa.cert.api.ICertificateManager;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.TokenAuthenticators;
+import org.opendaylight.aaa.tokenauthrealm.auth.TokenAuthenticators;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.aaa.app.config.rev170619.ShiroConfiguration;
 import org.slf4j.Logger;
index 8763dc5ca4ed34005a0f6c42c6662528e20b49c4..5cd3f7ea9f10a521e657461c89de5d80a8a8f4ff 100644 (file)
@@ -11,7 +11,7 @@ import org.opendaylight.aaa.api.AuthenticationService;
 import org.opendaylight.aaa.api.TokenStore;
 import org.opendaylight.aaa.api.password.service.PasswordHashService;
 import org.opendaylight.aaa.cert.api.ICertificateManager;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.TokenAuthenticators;
+import org.opendaylight.aaa.tokenauthrealm.auth.TokenAuthenticators;
 import org.opendaylight.mdsal.binding.api.DataBroker;
 
 /**
index 3c7d0a0a2ae044fdbe3d0f81b955ddcd532cff06..6070618f3c8d5ed7210818cc7068bc2ee9de13b9 100644 (file)
@@ -23,9 +23,9 @@ import org.junit.Before;
 import org.junit.Test;
 import org.opendaylight.aaa.shiro.realm.util.TokenUtils;
 import org.opendaylight.aaa.shiro.realm.util.http.header.HeaderUtils;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.AuthenticationManager;
-import org.opendaylight.aaa.shiro.tokenauthrealm.auth.TokenAuthenticators;
 import org.opendaylight.aaa.shiro.web.env.ThreadLocals;
+import org.opendaylight.aaa.tokenauthrealm.auth.AuthenticationManager;
+import org.opendaylight.aaa.tokenauthrealm.auth.TokenAuthenticators;
 
 public class TokenAuthRealmTest {
 
diff --git a/aaa-tokenauthrealm/pom.xml b/aaa-tokenauthrealm/pom.xml
new file mode 100644 (file)
index 0000000..b79bba3
--- /dev/null
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 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">
+    <parent>
+        <groupId>org.opendaylight.aaa</groupId>
+        <artifactId>aaa-parent</artifactId>
+        <version>0.14.2-SNAPSHOT</version>
+        <relativePath>../parent</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>aaa-tokenauthrealm</artifactId>
+    <name>ODL :: aaa :: ${project.artifactId}</name>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+        <!-- Internal aaa dependencies -->
+        <dependency>
+            <groupId>org.opendaylight.aaa</groupId>
+            <artifactId>aaa-authn-api</artifactId>
+        </dependency>
+
+        <!-- External dependencies -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>osgi.cmpn</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.guicedee.services</groupId>
+            <artifactId>javax.inject</artifactId>
+            <optional>true</optional>
+        </dependency>
+    </dependencies>
+</project>
similarity index 98%
rename from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/AuthenticationBuilder.java
rename to aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/AuthenticationBuilder.java
index 649484e9e3be519804fd0f0fa520cc3a5026fbc9..dee4f1b05eaa66ddf89154ca2b12f9f332ea3d52 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import java.io.Serializable;
 import java.util.Objects;
similarity index 98%
rename from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/AuthenticationManager.java
rename to aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/AuthenticationManager.java
index d46dafc4e0ab6217260245fecb3d9961e1e28893..2f31d3c64d9ab3cd6eae6720029d124cb7b9e949 100644 (file)
@@ -6,7 +6,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import javax.inject.Singleton;
 import org.opendaylight.aaa.api.Authentication;
similarity index 98%
rename from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/ClaimBuilder.java
rename to aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/ClaimBuilder.java
index 10083cc269a168d1f7f023453b1402b9a1ce6fdc..37edb47c6218c9d53d2fa0002c870e5601acc5a8 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import com.google.common.base.Strings;
 import com.google.common.collect.ImmutableSet;
similarity index 98%
rename from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/HttpBasicAuth.java
rename to aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/HttpBasicAuth.java
index 370b885d4cc43ac5aaf9a20165d8731ed35a5a1d..05d49b16de63b9ab6e7fc7a0ffb6b56ce562af03 100644 (file)
@@ -6,7 +6,7 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import java.nio.charset.StandardCharsets;
 import java.util.Base64;
similarity index 97%
rename from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/PasswordCredentialBuilder.java
rename to aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/PasswordCredentialBuilder.java
index d35b4a10b61a90a8350095edfdb187d8e3aa629c..0d2996dc8295199b76f4bc3a34adaf6339f5e805 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import java.util.Objects;
 import org.opendaylight.aaa.api.PasswordCredentials;
similarity index 93%
rename from aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/TokenAuthenticators.java
rename to aaa-tokenauthrealm/src/main/java/org/opendaylight/aaa/tokenauthrealm/auth/TokenAuthenticators.java
index af3868ff44ce9af8bb3e0301176e3d2becbc1a79..6cf409ebee61bb5221e142c0645841fb91edf284 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import com.google.common.collect.ImmutableList;
 import java.util.Collection;
similarity index 98%
rename from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/AuthenticationBuilderTest.java
rename to aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/AuthenticationBuilderTest.java
index 39e3d08b27480e1f7c19b0ccfcc64eac6a15ccc8..49dc030d7d38fbd05d36c4c924e40ac68de06f57 100644 (file)
@@ -6,7 +6,7 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
similarity index 98%
rename from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/AuthenticationManagerTest.java
rename to aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/AuthenticationManagerTest.java
index 109f2ec3feea32713bf777fcc8ff8e2fe0d199d7..0496dbac924bba44b994e15d2394bc93c098c25e 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
similarity index 99%
rename from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/ClaimBuilderTest.java
rename to aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/ClaimBuilderTest.java
index d000cc5c63142794f4da9cbc8e0e7ea08f38761d..73635e8df6a242a79c80377f70b5ec6be3e4c8ad 100644 (file)
@@ -6,7 +6,7 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
similarity index 98%
rename from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/HttpBasicAuthTest.java
rename to aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/HttpBasicAuthTest.java
index a8838480aea55605b5761f49e29d02a08487c9a6..e330a074fe4ed5743ed108ab031c39872c630868 100644 (file)
@@ -5,7 +5,7 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
similarity index 95%
rename from aaa-shiro/impl/src/test/java/org/opendaylight/aaa/shiro/tokenauthrealm/auth/PasswordCredentialTest.java
rename to aaa-tokenauthrealm/src/test/java/org/opendaylight/aaa/tokenauthrealm/auth/PasswordCredentialTest.java
index 782d9cf4b76eff59005a803d1c867cfef3d2ee6a..8842ea462aa61f71fc4880be61edfb81a837efae 100644 (file)
@@ -6,7 +6,7 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.aaa.shiro.tokenauthrealm.auth;
+package org.opendaylight.aaa.tokenauthrealm.auth;
 
 import static org.junit.Assert.assertEquals;
 
index 672e772a6461f9ecb93284556ba24b7a3871b7db..aec8e317b40c8573f1e945f87e1a756bbae9d7aa 100644 (file)
                 <classifier>config</classifier>
             </dependency>
 
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>aaa-idm-store-h2</artifactId>
+                <version>${project.version}</version>
+            </dependency>
+
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>aaa-shiro</artifactId>
                 <artifactId>aaa-shiro</artifactId>
                 <version>${project.version}</version>
             </dependency>
+            <dependency>
+                <groupId>${project.groupId}</groupId>
+                <artifactId>aaa-tokenauthrealm</artifactId>
+                <version>${project.version}</version>
+            </dependency>
             <dependency>
                 <groupId>${project.groupId}</groupId>
                 <artifactId>repackaged-shiro</artifactId>
diff --git a/pom.xml b/pom.xml
index 4553b721b3946efac31d6fe96aa74f2951f1b8c3..5dd4fc45793bbeb0287af0a6bbac7efa367d683e 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <module>aaa-cli</module>
     <module>aaa-cli-jar</module>
     <module>aaa-filterchain</module>
+    <module>aaa-idm-store-h2</module>
     <module>aaa-password-service</module>
     <module>artifacts</module>
     <module>features</module>
     <module>parent</module>
     <module>aaa-shiro</module>
+    <module>aaa-tokenauthrealm</module>
     <module>dependency-check</module>
     <module>web</module>
     <module>docs</module>