--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright (c) 2015 Inocybe Technology 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 INTERNAL
+-->
+<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.controller</groupId>
+ <artifactId>config-parent</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-cli4</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>bundle</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-cert</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.karaf.shell</groupId>
+ <artifactId>org.apache.karaf.shell.console</artifactId>
+ <version>${karaf4.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>2.8.3</version>
+ </dependency>
+
+ <!-- Testing Dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-api-mockito</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.powermock</groupId>
+ <artifactId>powermock-module-junit4</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+package org.opendaylight.aaa.cli;
+
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.api.model.User;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+import org.opendaylight.aaa.cli.utils.DataStoreUtils;
+
+/**
+ * @author mserngawy
+ *
+ */
+public abstract class AaaCliAbstractCommand extends OsgiCommandSupport {
+
+ private volatile static String authUser = null;
+ protected final IIDMStore identityStore;
+
+ public AaaCliAbstractCommand(final IIDMStore identityStore) {
+ this.identityStore = identityStore;
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ final User currentUser = SessionsManager.getInstance().getCurrentUser(authUser);
+ if (currentUser == null) {
+ final String userName = CliUtils.readPassword(super.session, "Enter Username:");
+ final String passwd = CliUtils.readPassword(super.session, "Enter Password:");
+ final User usr = DataStoreUtils.isAdminUser(identityStore, userName, passwd);
+ if(usr != null) {
+ authUser = userName;
+ SessionsManager.getInstance().addUserSession(userName, usr);
+ }
+ return usr;
+ }
+ return currentUser;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli;
+
+import net.sf.ehcache.Cache;
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.config.CacheConfiguration;
+import net.sf.ehcache.Element;
+
+import org.opendaylight.aaa.api.model.User;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * The SessionsManager class will keep the admin user credential vaild at the cache
+ * for certain time instead of required the admin user to enter the username and pwd
+ * with each aaa-cli command.
+ *
+ * @author mserngawy
+ *
+ */
+public class SessionsManager implements AutoCloseable {
+
+ private static final Logger LOG = LoggerFactory.getLogger(SessionsManager.class);
+
+ private static SessionsManager sessionMgr = null;
+ private Cache authUsers;
+ private final int maxCachedUsersInMemory = 1;
+ private final int maxCachedUsersOnDisk = 1;
+ private final long secondsToLive = 120;
+ private final long secondsToIdle = 60;
+ private final String CLI_CACHE_MANAGER = "org.opendaylight.aaa.cli";
+ private final String CLI_CACHE = "users";
+
+ public static SessionsManager getInstance() {
+ if (sessionMgr == null) {
+ sessionMgr = new SessionsManager();
+ }
+ return sessionMgr;
+ }
+
+ private SessionsManager() {
+ CacheManager cm = CacheManager.newInstance();
+ authUsers = new Cache( new CacheConfiguration(CLI_CACHE, maxCachedUsersInMemory)
+ .maxEntriesLocalDisk(maxCachedUsersOnDisk)
+ .timeToLiveSeconds(secondsToLive)
+ .timeToIdleSeconds(secondsToIdle));
+ cm.addCache(authUsers);
+ cm.setName(CLI_CACHE_MANAGER);
+ LOG.info("Initialized cli authorized users cache manager");
+ }
+
+ @Override
+ public void close() throws Exception {
+ LOG.info("Shutting down cli authorized users cache manager");
+ CacheManager.getInstance().shutdown();
+ }
+
+ public void addUserSession(String userName, User usr) {
+ authUsers.put(new Element(userName, usr));
+ }
+
+ public User getCurrentUser(String userName) {
+ try {
+ Element elem = authUsers.get(userName);
+ if (elem != null) {
+ return (User) elem.getObjectValue();
+ }
+ } catch (Exception e) {
+ LOG.debug("Error while getting userName {} ", userName, e);
+ }
+ return null;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.cert;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.aaa.cert.api.ICertificateManager;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+
+@Command(name = "gen-cert-req", scope = "aaa", description = "generate a certificate request for the opendaylight controller.")
+
+/**
+ * GenerateCertReq from the ODL key store to be signed by the Certificate Authority 'CA'
+ *
+ * @author mserngawy
+ *
+ */
+public class GenerateCertReq extends OsgiCommandSupport{
+
+ protected ICertificateManager certProvider;
+
+ public GenerateCertReq(final ICertificateManager aaaCertProvider) {
+ this.certProvider = aaaCertProvider;
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ final String pwd = CliUtils.readPassword(this.session, "Enter Keystore Password:");
+ return certProvider.genODLKeyStoreCertificateReq(pwd, true);
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.cert;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.aaa.cert.api.ICertificateManager;
+
+@Command(name = "get-cipher-suites", scope = "aaa", description = "Get the allowed cipher suites for TLS communication.")
+
+/**
+ * GetCipherSuites get the allowed cipher suites for TLS communication.
+ *
+ * @author mserngawy
+ *
+ */
+public class GetCipherSuites extends OsgiCommandSupport {
+
+ protected volatile ICertificateManager certProvider;
+
+ public GetCipherSuites(final ICertificateManager aaaCertProvider) {
+ this.certProvider = aaaCertProvider;
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ return certProvider.getCipherSuites();
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.cert;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.aaa.cert.api.ICertificateManager;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+
+@Command(name = "get-odl-cert", scope = "aaa", description = "get self sign certificate for the opendaylight controller.")
+
+/**
+ * GetODLSelfSignCert get the ODL key store self sign certificate.
+ *
+ * @author mserngawy
+ *
+ */
+public class GetODLSelfSignCert extends OsgiCommandSupport{
+
+ protected ICertificateManager certProvider;
+
+ public GetODLSelfSignCert(final ICertificateManager aaaCertProvider) {
+ this.certProvider = aaaCertProvider;
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ final String pwd = CliUtils.readPassword(this.session, "Enter Keystore Password:");
+ return certProvider.getODLKeyStoreCertificate(pwd, true);
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.cert;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.aaa.cert.api.ICertificateManager;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+
+@Command(name = "get-node-cert", scope = "aaa", description = "get node certificate form the opendaylight trust keystore .")
+
+/**
+ * GetTrustStoreCert get a certain certificate stored in the trust key store using the its alias
+ *
+ * @author mserngawy
+ *
+ */
+public class GetTrustStoreCert extends OsgiCommandSupport{
+
+ protected ICertificateManager certProvider;
+
+ @Option(name = "-alias",
+ aliases = { "--alias" },
+ description = "The alias.\n-alias / --should be the node certificate alias",
+ required = true,
+ multiValued = false)
+ private String alias = "";
+
+ public GetTrustStoreCert(final ICertificateManager aaaCertProvider) {
+ this.certProvider = aaaCertProvider;
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ final String pwd = CliUtils.readPassword(this.session, "Enter Keystore Password:");
+ return certProvider.getCertificateTrustStore(pwd, alias, true);
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.api.model.Domain;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@Command(name = "add-domain", scope = "aaa", description = "Add domain.")
+
+/**
+ * @author mserngawy
+ *
+ */
+public class AddDomain extends AaaCliAbstractCommand {
+
+ private static final Logger LOG = LoggerFactory.getLogger(AddDomain.class);
+
+ @Option(name = "-name",
+ aliases = { "--domainName" },
+ description = "The domain name",
+ required = true,
+ multiValued = false)
+ private String domainName = "";
+
+ @Option(name = "-desc",
+ aliases = { "--domainDescription" },
+ description = "The domain Description",
+ required = true,
+ multiValued = false)
+ private String domainDesc = "";
+
+ public AddDomain(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ Domain domain = new Domain();
+ domain.setDescription(domainDesc);
+ domain.setEnabled(true);
+ domain.setName(domainName);
+ domain = identityStore.writeDomain(domain);
+ if (domain != null) {
+ return "Domain " + domainName + " has been created, Domain Id is " + domain.getDomainid();
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.api.model.Grant;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+import org.opendaylight.aaa.cli.utils.DataStoreUtils;
+
+@Command(name = "add-grant", scope = "aaa", description = "Add Grant.")
+
+/**
+ * @author mserngawy
+ *
+ */
+public class AddGrant extends AaaCliAbstractCommand {
+
+ @Option(name = "-uname",
+ aliases = { "--userName" },
+ description = "The user name",
+ required = true,
+ multiValued = false)
+ private String userName = "";
+
+ @Option(name = "-dname",
+ aliases = { "--domainName" },
+ description = "The domain name",
+ required = true,
+ multiValued = false)
+ private String domainName = "";
+
+ @Option(name = "-rname",
+ aliases = { "--roleName" },
+ description = "The role name",
+ required = false,
+ multiValued = false)
+ private String roleName = "";
+
+
+ public AddGrant(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ final String domainId = DataStoreUtils.getDomainId(identityStore, domainName);
+ if (domainId == null) {
+ return "Domain does not exist";
+ }
+ final String roleId = DataStoreUtils.getRoleId(identityStore, roleName);
+ if (roleId == null) {
+ return "Role does not exist";
+ }
+ final String usrId = DataStoreUtils.getUserId(identityStore, userName);
+ if (usrId == null) {
+ return "User does not exist";
+ }
+ Grant grant = new Grant();
+ grant.setDomainid(domainId);
+ grant.setRoleid(roleId);
+ grant.setUserid(usrId);
+ grant = identityStore.writeGrant(grant);
+ if (grant != null) {
+ return "Grant has been created, Grant id is " + grant.getGrantid();
+ }
+ return null;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.api.model.Role;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+import org.opendaylight.aaa.cli.utils.DataStoreUtils;
+
+@Command(name = "add-role", scope = "aaa", description = "Add role.")
+
+/**
+ * @author mserngawy
+ *
+ */
+public class AddRole extends AaaCliAbstractCommand {
+
+ @Option(name = "-name",
+ aliases = { "--roleName" },
+ description = "The role name",
+ required = true,
+ multiValued = false)
+ private String roleName = "";
+
+ @Option(name = "-dname",
+ aliases = { "--domainName" },
+ description = "The domain name",
+ required = true,
+ multiValued = false)
+ private String domainName = "";
+
+ @Option(name = "-desc",
+ aliases = { "--roleDescription" },
+ description = "The role Description",
+ required = true,
+ multiValued = false)
+ private String roleDesc = "";
+
+ public AddRole(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ Role role = new Role();
+ role.setDescription(roleDesc);
+ role.setName(roleName);
+ final String domainId = DataStoreUtils.getDomainId(identityStore, domainName);
+ if (domainId == null) {
+ return "Domain does not exist";
+ }
+ role.setDomainid(domainId);
+ role = identityStore.writeRole(role);
+ if (role != null) {
+ return "Role " + roleName + " has been created, Role Id is " + role.getRoleid();
+ }
+ return null;
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.api.model.Grant;
+import org.opendaylight.aaa.api.model.User;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+import org.opendaylight.aaa.cli.utils.DataStoreUtils;
+
+@Command(name = "add-user", scope = "aaa", description = "Add user.")
+
+/**
+ * @author mserngawy
+ *
+ */
+public class AddUser extends AaaCliAbstractCommand {
+
+ @Option(name = "-name",
+ aliases = { "--userName" },
+ description = "The user name",
+ required = true,
+ multiValued = false)
+ private String userName = "";
+
+ @Option(name = "-dname",
+ aliases = { "--domainName" },
+ description = "The domain name",
+ required = true,
+ multiValued = false)
+ private String domainName = "";
+
+ @Option(name = "-rname",
+ aliases = { "--roleName" },
+ description = "The role name",
+ required = false,
+ multiValued = false)
+ private String roleName = "";
+
+ @Option(name = "-desc",
+ aliases = { "--userDescription" },
+ description = "The user Description",
+ required = false,
+ multiValued = false)
+ private String userDesc = "";
+
+ @Option(name = "-email",
+ aliases = { "--userEmail" },
+ description = "The user Description",
+ required = false,
+ multiValued = false)
+ private String userEmail = "";
+
+ public AddUser(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ final String domainId = DataStoreUtils.getDomainId(identityStore, domainName);
+ if (domainId == null) {
+ return "Domain does not exist";
+ }
+ User usr = new User();
+ usr.setDescription(userDesc);
+ usr.setDomainid(domainId);
+ usr.setEnabled(true);
+ usr.setEmail(userEmail);
+ final String pwd = CliUtils.readPassword(this.session, "Enter new user password: ");
+ if (pwd == null || pwd.isEmpty() || pwd.length() < 6) {
+ return "Password should be at least 6 characters";
+ }
+ usr.setPassword(pwd);
+ usr.setName(userName);
+ usr = identityStore.writeUser(usr);
+ if (usr != null) {
+ if (roleName != null && !roleName.isEmpty()) {
+ final String roleId = DataStoreUtils.getRoleId(identityStore, roleName);
+ if (roleId == null) {
+ return "User " + userName + " has been created, User Id is " + usr.getUserid() + ", Role does not exist";
+ }
+ Grant grant = new Grant();
+ grant.setDomainid(domainId);
+ grant.setRoleid(roleId);
+ grant.setUserid(usr.getUserid());
+ grant = identityStore.writeGrant(grant);
+ if (grant == null) {
+ return "User " + usr.getName() + " has been created, User Id is " + usr.getUserid()
+ + " but not granted to role " + roleName;
+ }
+ return "User " + usr.getName() + " has been created, User Id is " + usr.getUserid()
+ + " and granted to role " + roleName;
+ }
+ return "User " + userName + " has been created, User Id is " + usr.getUserid();
+ }
+ return null;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.apache.karaf.shell.console.OsgiCommandSupport;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.api.SHA256Calculator;
+import org.opendaylight.aaa.api.model.User;
+import org.opendaylight.aaa.api.model.Users;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+
+@Command(name = "change-user-pwd", scope = "aaa", description = "Change the user password.")
+
+/**
+ * ChangeUserPassword change the user password.
+ *
+ * @author mserngawy
+ *
+ */
+public class ChangeUserPassword extends OsgiCommandSupport {
+
+ protected IIDMStore identityStore;
+
+ @Option(name = "-user",
+ aliases = { "--userName" },
+ description = "The user name",
+ required = true,
+ multiValued = false)
+ private String userName = "";
+
+ public ChangeUserPassword(final IIDMStore identityStore) {
+ this.identityStore = identityStore;
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (identityStore == null) {
+ return "Failed to access the users data store";
+ }
+ final String currentPwd = CliUtils.readPassword(this.session, "Enter current password:");
+ final String newPwd = CliUtils.readPassword(this.session, "Enter new password:");
+ final Users users = identityStore.getUsers();
+ for (User usr : users.getUsers()) {
+ final String realPwd = SHA256Calculator.getSHA256(currentPwd, usr.getSalt());
+ if (usr.getName().equals(userName) && usr.getPassword().equals(realPwd)) {
+ usr.setPassword(newPwd);
+ identityStore.updateUser(usr);
+ return userName + "'s password has been changed";
+ }
+ }
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+
+@Command(name = "get-domains", scope = "aaa", description = "get list of ODL domains.")
+
+/**
+ * ListODLDomains list the available domains at ODL aaa data store.
+ *
+ * @author mserngawy
+ *
+ */
+public class ListODLDomains extends AaaCliAbstractCommand {
+
+ public ListODLDomains(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ return identityStore.getDomains().getDomains();
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+
+@Command(name = "get-roles", scope = "aaa", description = "get list of ODL roles.")
+
+/**
+ * ListODLDomains list the available roles at ODL aaa data store.
+ *
+ * @author mserngawy
+ *
+ */
+public class ListODLRoles extends AaaCliAbstractCommand {
+
+ public ListODLRoles(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ return identityStore.getRoles().getRoles();
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+
+@Command(name = "get-users", scope = "aaa", description = "get list of ODL users.")
+
+/**
+ * ListODLDomains list the available users at ODL aaa data store.
+ *
+ * @author mserngawy
+ *
+ */
+public class ListODLUsers extends AaaCliAbstractCommand {
+
+ public ListODLUsers(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ return identityStore.getUsers().getUsers();
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+import org.opendaylight.aaa.cli.utils.DataStoreUtils;
+
+@Command(name = "remove-domain", scope = "aaa", description = "Remove domain.")
+
+/**
+ * @author mserngawy
+ *
+ */
+public class RemoveDomain extends AaaCliAbstractCommand {
+
+ @Option(name = "-name",
+ aliases = { "--domainName" },
+ description = "The domain name",
+ required = true,
+ multiValued = false)
+ private String domainName = "";
+
+ public RemoveDomain(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ final String domainId = DataStoreUtils.getDomainId(identityStore, domainName);
+ if (domainId == null) {
+ return "User does not exist";
+ }
+ if (identityStore.deleteDomain(domainId) == null) {
+ return "Failed to delete domain " + domainName;
+ }
+ return "Domain " + domainName + "has been deleted.";
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+import org.opendaylight.aaa.cli.utils.DataStoreUtils;
+
+@Command(name = "remove-grant", scope = "aaa", description = "Remove grant.")
+
+/**
+ * @author mserngawy
+ *
+ */
+public class RemoveGrant extends AaaCliAbstractCommand {
+
+ @Option(name = "-uname",
+ aliases = { "--userName" },
+ description = "The user name",
+ required = true,
+ multiValued = false)
+ private String userName = "";
+
+ @Option(name = "-dname",
+ aliases = { "--domainName" },
+ description = "The domain name",
+ required = true,
+ multiValued = false)
+ private String domainName = "";
+
+ @Option(name = "-rname",
+ aliases = { "--roleName" },
+ description = "The role name",
+ required = false,
+ multiValued = false)
+ private String roleName = "";
+
+ public RemoveGrant(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ final String grantid = DataStoreUtils.getGrantId(identityStore, domainName, roleName, userName);
+ if (grantid == null) {
+ return "Grant does not exist";
+ }
+ if (identityStore.deleteGrant(grantid) == null) {
+ return "Failed to delete grant " + userName + " " + roleName + " " + domainName;
+ }
+ return "Grant has been deleted.";
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+import org.opendaylight.aaa.cli.utils.DataStoreUtils;
+
+@Command(name = "remove-role", scope = "aaa", description = "Remove role.")
+
+/**
+ * @author mserngawy
+ *
+ */
+public class RemoveRole extends AaaCliAbstractCommand {
+
+ @Option(name = "-name",
+ aliases = { "--roleName" },
+ description = "The role name",
+ required = true,
+ multiValued = false)
+ private String roleName = "";
+
+ public RemoveRole(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ final String roleId = DataStoreUtils.getRoleId(identityStore, roleName);
+ if (roleId == null) {
+ return "Role does not exist";
+ }
+ if (identityStore.deleteUser(roleId) == null) {
+ return "Failed to delete role " + roleName;
+ }
+ return "Role " + roleName + "has been deleted.";
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.dmstore;
+
+import org.apache.karaf.shell.commands.Command;
+import org.apache.karaf.shell.commands.Option;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.utils.CliUtils;
+import org.opendaylight.aaa.cli.utils.DataStoreUtils;
+
+@Command(name = "remove-user", scope = "aaa", description = "Remove user.")
+
+/**
+ * @author mserngawy
+ *
+ */
+public class RemoveUser extends AaaCliAbstractCommand {
+
+ @Option(name = "-name",
+ aliases = { "--userName" },
+ description = "The user name",
+ required = true,
+ multiValued = false)
+ private String userName = "";
+
+ public RemoveUser(final IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ if (super.doExecute() == null) {
+ return CliUtils.LOGIN_FAILED_MESS;
+ }
+ final String usrId = DataStoreUtils.getUserId(identityStore, userName);
+ if (usrId == null) {
+ return "User does not exist";
+ }
+ if (identityStore.deleteUser(usrId) == null) {
+ return "Failed to delete user " + userName;
+ }
+ return "User " + userName + "has been deleted.";
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+package org.opendaylight.aaa.cli.utils;
+
+import org.apache.felix.service.command.CommandSession;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+
+/**
+ * CliUtils has helper methods for CLI bundle.
+ *
+ * @author mserngawy
+ *
+ */
+public class CliUtils {
+
+ public static final String LOGIN_FAILED_MESS = "User does not exist OR user name and passsword are not correct";
+
+ /**
+ * Retrieve the password from the user
+ *
+ * @param session command line session
+ * @param pwdPrintStr label for enter password
+ * @return the new written password
+ * @throws Exception
+ */
+ public static String readPassword(final CommandSession session, final String pwdPrintStr) throws Exception {
+ session.getConsole().println(pwdPrintStr);
+ final InputStreamReader iStreamReader = new InputStreamReader(session.getKeyboard());
+ final BufferedReader bReader = new BufferedReader(iStreamReader);
+ final String pwd = bReader.readLine();
+ return pwd;
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.utils;
+
+import java.util.List;
+
+import org.opendaylight.aaa.api.IDMStoreException;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.api.SHA256Calculator;
+import org.opendaylight.aaa.api.model.Domain;
+import org.opendaylight.aaa.api.model.Domains;
+import org.opendaylight.aaa.api.model.Grant;
+import org.opendaylight.aaa.api.model.Role;
+import org.opendaylight.aaa.api.model.User;
+import org.opendaylight.aaa.api.model.Users;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class DataStoreUtils {
+
+ private static final Logger LOG = LoggerFactory.getLogger(DataStoreUtils.class);
+ private static final String ADMIN_ROLE = "admin";
+
+ public static final String getDomainId(IIDMStore identityStore, String domainName) throws IDMStoreException {
+ Domains domains = identityStore.getDomains();
+ if (domains != null) {
+ for (Domain domain : domains.getDomains()) {
+ if (domain.getName().equalsIgnoreCase(domainName)) {
+ return domain.getDomainid();
+ }
+ }
+ }
+ return null;
+ }
+
+ public static final String getRoleId(IIDMStore identityStore, String roleName) throws IDMStoreException {
+ List<Role> roles = identityStore.getRoles().getRoles();
+ for (Role role : roles) {
+ if (role.getName().equalsIgnoreCase(roleName)) {
+ return role.getRoleid();
+ }
+ }
+ return null;
+ }
+
+ public static final String getUserId(IIDMStore identityStore, String userName) throws IDMStoreException {
+ List<User> users = identityStore.getUsers().getUsers();
+ for (User usr : users) {
+ if (usr.getName().equalsIgnoreCase(userName)) {
+ return usr.getUserid();
+ }
+ }
+ return null;
+ }
+
+ public static final String getGrantId(IIDMStore identityStore, String domainName, String roleName,
+ String userName) throws IDMStoreException {
+ final String domainId = getDomainId(identityStore, domainName);
+ if (domainId == null) {
+ return null;
+ }
+ final String usrId = getUserId(identityStore, userName);
+ if (usrId == null) {
+ return null;
+ }
+ List<Grant> grants = identityStore.getGrants(usrId).getGrants();
+ if (grants == null || grants.isEmpty()) {
+ return null;
+ }
+ final String roleId = getRoleId(identityStore, roleName);
+ if (roleId == null) {
+ return null;
+ }
+ for (Grant grant : grants) {
+ if (grant.getRoleid().equals(roleId)) {
+ return grant.getGrantid();
+ }
+ }
+ return null;
+ }
+
+ public static User isAdminUser(IIDMStore identityStore, String userName, String password) throws IDMStoreException {
+ final Users users = identityStore.getUsers();
+ for (User usr : users.getUsers()) {
+ final String realPwd = SHA256Calculator.getSHA256(password, usr.getSalt());
+ if (usr.getName().equals(userName) && usr.getPassword().equals(realPwd)) {
+ List<Grant> grants = identityStore.getGrants(usr.getUserid()).getGrants();
+ if (grants != null && !grants.isEmpty()) {
+ final String adminRoleId = getRoleId(identityStore, ADMIN_ROLE);
+ for (Grant grant : grants) {
+ if (grant.getRoleid().equals(adminRoleId)) {
+ return usr;
+ }
+ }
+ LOG.debug("user is not authorized for admin grant");
+ }
+ }
+ }
+ return null;
+ }
+
+}
--- /dev/null
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0">
+
+ <reference id="KeyStoreConsoleProvider" availability="mandatory"
+ activation="eager" interface="org.opendaylight.aaa.cert.api.ICertificateManager">
+ </reference>
+
+ <reference id="iIDMStore" interface="org.opendaylight.aaa.api.IIDMStore"
+ availability="optional" timeout="30000">
+ </reference>
+
+ <command-bundle xmlns="http://karaf.apache.org/xmlns/shell/v1.1.0">
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.ListODLUsers">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.ListODLDomains">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.ListODLRoles">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.ChangeUserPassword">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.cert.GetODLSelfSignCert">
+ <argument ref="KeyStoreConsoleProvider" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.cert.GenerateCertReq">
+ <argument ref="KeyStoreConsoleProvider" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.cert.GetTrustStoreCert">
+ <argument ref="KeyStoreConsoleProvider" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.cert.GetCipherSuites">
+ <argument ref="KeyStoreConsoleProvider" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.AddRole">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.AddDomain">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.AddUser">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.AddGrant">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.RemoveGrant">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.RemoveUser">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.RemoveRole">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ <command>
+ <action class="org.opendaylight.aaa.cli.dmstore.RemoveDomain">
+ <argument ref="iIDMStore" />
+ </action>
+ </command>
+ </command-bundle>
+
+</blueprint>
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+package org.opendaylight.aaa.cli.test;
+
+import static org.junit.Assert.*;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.api.model.User;
+import org.opendaylight.aaa.cli.AaaCliAbstractCommand;
+import org.opendaylight.aaa.cli.SessionsManager;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.api.support.membermodification.MemberModifier;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+/**
+ * @author mserngawy
+ *
+ */
+@RunWith(PowerMockRunner.class)
+public class AaaCliAbstractCommandTest {
+
+ class TestAaaCliAbstractCommand extends AaaCliAbstractCommand {
+
+ public TestAaaCliAbstractCommand(IIDMStore identityStore) {
+ super(identityStore);
+ }
+
+ @Override
+ protected Object doExecute() throws Exception {
+ return super.doExecute();
+ }
+ }
+
+ private static final String authUserName = "foo";
+ final User usr = new User();
+ @Mock private TestAaaCliAbstractCommand testCmd;
+
+ @Before
+ public void setUp() throws Exception {
+ testCmd = PowerMockito.mock(TestAaaCliAbstractCommand.class, Mockito.CALLS_REAL_METHODS);
+ MemberModifier.field(TestAaaCliAbstractCommand.class, "authUser").set(testCmd, authUserName);
+ SessionsManager sessionMngr = SessionsManager.getInstance();
+ final String usrName = "foo";
+ usr.setName(usrName);
+ usr.setDomainid("fooDomain");
+ usr.setPassword("fooPwd");
+ sessionMngr.addUserSession(usrName, usr);
+ }
+
+ @Test
+ public void testDoExecute() throws Exception {
+ User authUsr = (User) testCmd.doExecute();
+ assertNotNull(authUsr);
+ assertEquals(authUsr, usr);
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+package org.opendaylight.aaa.cli.test;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.when;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.Mockito;
+import org.opendaylight.aaa.api.IDMStoreException;
+import org.opendaylight.aaa.api.IIDMStore;
+import org.opendaylight.aaa.api.model.*;
+import org.opendaylight.aaa.cli.utils.DataStoreUtils;
+import org.powermock.api.mockito.PowerMockito;
+import org.powermock.modules.junit4.PowerMockRunner;
+
+/**
+ * @author mserngawy
+ *
+ */
+@RunWith(PowerMockRunner.class)
+public class DataStoreUtilsTest {
+
+ @Mock private IIDMStore identityStore;
+ private final String domainName = "Dfoo";
+ private final String usrName = "Ufoo";
+ private final String roleName = "Rfoo";
+ private final String grantId = "Gfoo";
+ private final String dummyId = "foo";
+
+ @Before
+ public void setUp() throws Exception {
+ identityStore = PowerMockito.mock(IIDMStore.class, Mockito.CALLS_REAL_METHODS);
+ Domains domains = new Domains();
+ Domain domain = new Domain();
+ domain.setName(domainName);
+ domain.setDomainid(domainName);
+ List<Domain> dList = new ArrayList<>();
+ dList.add(domain);
+ domains.setDomains(dList);
+ when(identityStore.getDomains()).thenReturn(domains);
+
+ Users users = new Users();
+ User usr = new User();
+ usr.setName(usrName);
+ usr.setDomainid(domainName);
+ usr.setUserid(usrName);
+ List<User> uList = new ArrayList<>();
+ uList.add(usr);
+ users.setUsers(uList);
+ when(identityStore.getUsers()).thenReturn(users);
+
+ Roles roles = new Roles();
+ Role role = new Role();
+ role.setName(roleName);
+ role.setDomainid(domainName);
+ role.setRoleid(roleName);
+ List<Role> rList = new ArrayList<>();
+ rList.add(role);
+ roles.setRoles(rList);
+ when(identityStore.getRoles()).thenReturn(roles);
+
+ Grants grants = new Grants();
+ Grant grant = new Grant();
+ grant.setDomainid(domainName);
+ grant.setGrantid(grantId);
+ grant.setRoleid(roleName);
+ grant.setUserid(usrName);
+ List<Grant> gList = new ArrayList<>();
+ gList.add(grant);
+ grants.setGrants(gList);
+ when(identityStore.getGrants(usrName)).thenReturn(grants);
+ }
+
+ @Test
+ public void testGetDomainId() throws IDMStoreException {
+ final String domID = DataStoreUtils.getDomainId(identityStore, domainName);
+ assertNotNull(domID);
+ assertEquals(domID, domainName);
+ assertNull(DataStoreUtils.getDomainId(identityStore, dummyId));
+ }
+
+ @Test
+ public void testGetRoleId() throws IDMStoreException {
+ final String roleID = DataStoreUtils.getRoleId(identityStore, roleName);
+ assertNotNull(roleID);
+ assertEquals(roleID, roleName);
+ assertNull(DataStoreUtils.getRoleId(identityStore, dummyId));
+ }
+
+ @Test
+ public void testGetUserId() throws IDMStoreException {
+ final String usrID = DataStoreUtils.getUserId(identityStore, usrName);
+ assertNotNull(usrID);
+ assertEquals(usrID, usrName);
+ assertNull(DataStoreUtils.getUserId(identityStore, dummyId));
+ }
+
+ @Test
+ public void testGetGrantId() throws IDMStoreException {
+ final String grantID = DataStoreUtils.getGrantId(identityStore, domainName, roleName, usrName);
+ assertNotNull(grantID);
+ assertEquals(grantID, grantId);
+ assertNull(DataStoreUtils.getGrantId(identityStore, dummyId, dummyId, dummyId));
+ }
+
+}
--- /dev/null
+/*
+ * Copyright (c) 2016 Inocybe Technologies. 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
+ */
+
+package org.opendaylight.aaa.cli.test;
+
+import static org.junit.Assert.*;
+
+import org.junit.Test;
+import org.opendaylight.aaa.api.model.User;
+import org.opendaylight.aaa.cli.SessionsManager;
+
+/**
+ * @author mserngawy
+ *
+ */
+public class SessionsManagerTest {
+
+ @Test
+ public void testSessionManager() {
+ SessionsManager sessionMngr = SessionsManager.getInstance();
+ assertNotNull(sessionMngr);
+ final String usrName = "foo";
+ final User usr = new User();
+ usr.setName(usrName);
+ usr.setDomainid("fooDomain");
+ usr.setPassword("fooPwd");
+ sessionMngr.addUserSession(usrName, usr);
+ final User authUsr = sessionMngr.getCurrentUser(usrName);
+ assertNotNull(authUsr);
+ assertEquals(usr, authUsr);
+ }
+
+}
<artifactId>commons-beanutils</artifactId>
<version>1.8.3</version>
</dependency>
+ <!-- commons-beanutils' dependency on commons-collections is supposed to be optional... -->
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2.2</version>
+ </dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2014-2015 Hewlett-Packard Development Company, L.P. 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>features-parent</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>features-aaa</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <properties>
+ <config.version>0.6.0-SNAPSHOT</config.version>
+ <mdsal.version>2.2.0-SNAPSHOT</mdsal.version>
+ <controller.mdsal.version>1.5.0-SNAPSHOT</controller.mdsal.version>
+ <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
+ <ehcache.version>2.8.3</ehcache.version>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <!-- This project -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-parent</artifactId>
+ <version>${project.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <!-- odl-aaa-authn -->
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-json</artifactId>
+ </dependency>
+ <!-- jersey client for moon APIs calls -->
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.dependencymanager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.metatype</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>${ehcache.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.authzserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.resourceserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish</groupId>
+ <artifactId>javax.json</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-json-org</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-base</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-jaxb-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-credential-store-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-act</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-sts</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-basic</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-idmlight</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-idmlight</artifactId>
+ <version>${project.version}</version>
+ <type>py</type>
+ <classifier>config</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn</artifactId>
+ <type>cfg</type>
+ <classifier>config</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-h2-store</artifactId>
+ <type>cfg</type>
+ <classifier>config</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-h2-store</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.enterprise</artifactId>
+ <version>4.2.0</version>
+ </dependency>
+
+ <!-- AuthN MD-SAL Cache dependencies -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-mdsal-store-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-mdsal-store-impl</artifactId>
+ <version>${project.version}</version>
+ <classifier>config</classifier>
+ <type>xml</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
+ <type>cfg</type>
+ <classifier>config</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-mdsal-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>features-yangtools</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>features-mdsal</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>features-config</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>sal-common-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-encrypt-service</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-encrypt-service</artifactId>
+ <type>xml</type>
+ <classifier>config</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-cert</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-cert</artifactId>
+ <classifier>config</classifier>
+ <type>xml</type>
+ </dependency>
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-aether-provider</artifactId>
+ <version>3.0.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-cli</artifactId>
+ </dependency>
+ </dependencies>
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/aaa.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/aaa.git</developerConnection>
+ <tag>HEAD</tag>
+ <url>https://git.opendaylight.org/gerrit/gitweb?p=aaa.git;a=summary</url>
+ </scm>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>feature-repo-parent</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>features4-aaa</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-api</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-authn</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-authn-mdsal-cluster</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-cert</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-cli</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-encryption-service</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-sssd-plugin</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-api</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <name>OpenDaylight :: AAA :: APIs</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-authn-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-common</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>odl-mdsal-binding-base</artifactId>
+ <version>2.2.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-authn-mdsal-cluster</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <name>OpenDaylight :: AAA :: Authentication :: MD-SAL</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-parent</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-artifacts</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <!-- MD-SAL -->
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-common</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>odl-mdsal-binding-base</artifactId>
+ <version>2.2.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>odl-mdsal-broker</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>odl-config-core</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+
+ <!-- OSGi -->
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.dependencymanager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.metatype</artifactId>
+ </dependency>
+
+ <!-- OAuth -->
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.authzserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.resourceserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.8</version>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ </dependency>
+
+ <!-- AuthN -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-sts</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-mdsal-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-mdsal-store-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-basic</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-encryption-service</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+
+ <!-- IDMLight -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-idmlight</artifactId>
+ </dependency>
+ <dependency>
+ <!-- finalname="etc/idmtool" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-idmlight</artifactId>
+ <version>${project.version}</version>
+ <type>py</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-json-org</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-base</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-jaxb-annotations</artifactId>
+ </dependency>
+
+ <!-- Federation -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-idpmapping</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish</groupId>
+ <artifactId>javax.json</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+
+ <!-- REST -->
+ <!-- TODO
+ <feature>war</feature>
+ -->
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ </dependency>
+
+ <dependency>
+ <!-- finalname="/etc/opendaylight/datastore/initial/config/aaa-mdsal-config.xml" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-mdsal-store-impl</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <!-- finalname="/etc/org.opendaylight.aaa.authn.cfg" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn</artifactId>
+ <type>cfg</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <!-- finalname="/etc/org.opendaylight.aaa.filterchain.cfg" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
+ <type>cfg</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2014, 2017 Hewlett-Packard Development Company, L.P. 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-aaa-authn-mdsal-cluster" version="${project.version}">
+ <feature version="8.1.14.v20131031">jetty</feature>
+ <configfile finalname="etc/idmtool">mvn:org.opendaylight.aaa/aaa-idmlight/${project.version}/py/config</configfile>
+ <configfile finalname="/etc/opendaylight/datastore/initial/config/aaa-mdsal-config.xml">mvn:org.opendaylight.aaa/aaa-authn-mdsal-store-impl/${project.version}/xml/config</configfile>
+ <configfile finalname="/etc/org.opendaylight.aaa.authn.cfg">mvn:org.opendaylight.aaa/aaa-authn/${project.version}/cfg/config</configfile>
+ <configfile finalname="/etc/org.opendaylight.aaa.filterchain.cfg">mvn:org.opendaylight.aaa/aaa-filterchain/${project.version}/cfg/config</configfile>
+ </feature>
+</features>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-authn</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <name>OpenDaylight :: AAA :: Authentication - NO CLUSTER</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-parent</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <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.aaa</groupId>
+ <artifactId>odl-aaa-api</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+
+ <!-- MD-SAL -->
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-common</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>odl-mdsal-binding-base</artifactId>
+ <version>2.2.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>odl-mdsal-broker</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>odl-config-core</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+
+ <!-- REST -->
+ <!-- TODO
+ <feature>war</feature>
+ -->
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-client</artifactId>
+ </dependency>
+
+ <!-- OSGi -->
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.dependencymanager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.metatype</artifactId>
+ </dependency>
+
+ <!-- EhCache -->
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ </dependency>
+
+ <!-- OAuth -->
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.authzserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.resourceserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ </dependency>
+
+ <!-- commons-lang -->
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-lang3</artifactId>
+ </dependency>
+
+ <!-- AuthN -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shiro</groupId>
+ <artifactId>shiro-web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-sts</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-basic</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
+ </dependency>
+
+ <!--H2 Store -->
+ <dependency>
+ <groupId>org.osgi</groupId>
+ <artifactId>org.osgi.enterprise</artifactId>
+ <version>4.2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-h2-store</artifactId>
+ </dependency>
+
+ <!-- IDMLight -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-idmlight</artifactId>
+ </dependency>
+ <dependency>
+ <!-- finalname="etc/idmtool" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-idmlight</artifactId>
+ <version>${project.version}</version>
+ <type>py</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-json-org</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-base</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.jaxrs</groupId>
+ <artifactId>jackson-jaxrs-json-provider</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.fasterxml.jackson.module</groupId>
+ <artifactId>jackson-module-jaxb-annotations</artifactId>
+ </dependency>
+
+ <!-- Federation -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-idpmapping</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish</groupId>
+ <artifactId>javax.json</artifactId>
+ </dependency>
+
+ <dependency>
+ <!-- finalname="/etc/org.opendaylight.aaa.authn.cfg" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn</artifactId>
+ <type>cfg</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <!-- finalname="/etc/org.opendaylight.aaa.tokens.cfg" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-h2-store</artifactId>
+ <type>cfg</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <!-- finalname="/etc/org.opendaylight.aaa.filterchain.cfg" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
+ <type>cfg</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2014, 2017 Hewlett-Packard Development Company, L.P. 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-aaa-authn" version="${project.version}">
+ <feature>war</feature>
+ <feature version="8.1.14.v20131031">jetty</feature>
+ <configfile finalname="etc/idmtool">mvn:org.opendaylight.aaa/aaa-idmlight/${project.version}/py/config
+ </configfile>
+ <configfile finalname="/etc/org.opendaylight.aaa.authn.cfg">
+ mvn:org.opendaylight.aaa/aaa-authn/${project.version}/cfg/config
+ </configfile>
+ <configfile finalname="/etc/org.opendaylight.aaa.tokens.cfg">
+ mvn:org.opendaylight.aaa/aaa-h2-store/${project.version}/cfg/config
+ </configfile>
+ <configfile finalname="/etc/org.opendaylight.aaa.filterchain.cfg">
+ mvn:org.opendaylight.aaa/aaa-filterchain/${project.version}/cfg/config
+ </configfile>
+ </feature>
+</features>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-cert</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <name>OpenDaylight :: AAA :: aaa opendaylight certificate Plugin</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>odl-mdsal-broker</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-encryption-service</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.bouncycastle</groupId>
+ <artifactId>bcprov-jdk15on</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </dependency>
+ <dependency>
+ <!-- finalname="etc/opendaylight/datastore/initial/config/aaa-cert-config.xml" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-cert</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-cert</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2014, 2017 Hewlett-Packard Development Company, L.P. 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-aaa-cert" version="${project.version}">
+ <configfile finalname="etc/opendaylight/datastore/initial/config/aaa-cert-config.xml">
+ mvn:org.opendaylight.aaa/aaa-cert/${project.version}/xml/config
+ </configfile>
+ </feature>
+</features>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-cli</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <name>OpenDaylight :: AAA :: aaa opendaylight command line</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-parent</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <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>${project.groupId}</groupId>
+ <artifactId>odl-aaa-cert</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-api</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ </dependency>
+ <dependency>
+ <!-- This is necessary for a full javax.transaction.xa for ehcache -->
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jta_1.1_spec</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-cli4</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-encryption-service</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <name>OpenDaylight :: AAA :: Encryption Service</name>
+
+ <dependencies>
+ <!-- MD-SAL -->
+ <dependency>
+ <groupId>org.opendaylight.yangtools</groupId>
+ <artifactId>odl-yangtools-common</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.mdsal</groupId>
+ <artifactId>odl-mdsal-binding-base</artifactId>
+ <version>2.2.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>odl-mdsal-broker</artifactId>
+ <version>1.5.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.controller</groupId>
+ <artifactId>odl-config-core</artifactId>
+ <version>0.6.0-SNAPSHOT</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-encrypt-service</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <!-- finalname="etc/opendaylight/datastore/initial/config/aaa-encrypt-service-config.xml" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-encrypt-service</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>config</classifier>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2014, 2017 Hewlett-Packard Development Company, L.P. 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-aaa-encryption-service" version="${project.version}">
+ <configfile finalname="etc/opendaylight/datastore/initial/config/aaa-encrypt-service-config.xml">
+ mvn:org.opendaylight.aaa/aaa-encrypt-service/${project.version}/xml/config
+ </configfile>
+ </feature>
+</features>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<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>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-sssd-plugin</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-authn</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-authn-sssd</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (c) 2014-2015 Hewlett-Packard Development Company, L.P. 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 -->
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>features-parent</artifactId>
+ <artifactId>odlparent-lite</artifactId>
<version>1.8.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.opendaylight.aaa</groupId>
- <artifactId>features-aaa</artifactId>
+ <artifactId>features-aaa-aggregator</artifactId>
<version>0.5.0-SNAPSHOT</version>
- <packaging>jar</packaging>
-
- <properties>
- <config.version>0.6.0-SNAPSHOT</config.version>
- <mdsal.version>2.2.0-SNAPSHOT</mdsal.version>
- <controller.mdsal.version>1.5.0-SNAPSHOT</controller.mdsal.version>
- <yangtools.version>1.1.0-SNAPSHOT</yangtools.version>
- <ehcache.version>2.8.3</ehcache.version>
- </properties>
+ <packaging>pom</packaging>
- <dependencyManagement>
- <dependencies>
- <!-- This project -->
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-parent</artifactId>
- <version>${project.version}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <modules>
+ <module>features-aaa</module>
+ <module>features4-aaa</module>
+ <module>odl-aaa-api</module>
+ <module>odl-aaa-authn</module>
+ <module>odl-aaa-authn-mdsal-cluster</module>
+ <module>odl-aaa-cert</module>
+ <module>odl-aaa-cli</module>
+ <module>odl-aaa-encryption-service</module>
+ <module>odl-aaa-sssd-plugin</module>
+ </modules>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- odl-aaa-authn -->
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-json</artifactId>
- </dependency>
- <!-- jersey client for moon APIs calls -->
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-client</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.dependencymanager</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.metatype</artifactId>
- </dependency>
- <dependency>
- <groupId>net.sf.ehcache</groupId>
- <artifactId>ehcache</artifactId>
- <version>${ehcache.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.authzserver</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.resourceserver</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- <dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- </dependency>
- <dependency>
- <groupId>org.glassfish</groupId>
- <artifactId>javax.json</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-annotations</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-json-org</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-base</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.jaxrs</groupId>
- <artifactId>jackson-jaxrs-json-provider</artifactId>
- </dependency>
- <dependency>
- <groupId>com.fasterxml.jackson.module</groupId>
- <artifactId>jackson-module-jaxb-annotations</artifactId>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-credential-store-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro-act</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-web</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn-sts</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn-basic</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-idmlight</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-idmlight</artifactId>
- <version>${project.version}</version>
- <type>py</type>
- <classifier>config</classifier>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn</artifactId>
- <type>cfg</type>
- <classifier>config</classifier>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-h2-store</artifactId>
- <type>cfg</type>
- <classifier>config</classifier>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-h2-store</artifactId>
- </dependency>
- <dependency>
- <groupId>org.osgi</groupId>
- <artifactId>org.osgi.enterprise</artifactId>
- <version>4.2.0</version>
- </dependency>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
- <!-- AuthN MD-SAL Cache dependencies -->
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn-mdsal-store-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn-mdsal-store-impl</artifactId>
- <version>${project.version}</version>
- <classifier>config</classifier>
- <type>xml</type>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-filterchain</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-filterchain</artifactId>
- <type>cfg</type>
- <classifier>config</classifier>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn-mdsal-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.yangtools</groupId>
- <artifactId>features-yangtools</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>features-mdsal</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>features-config</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.controller</groupId>
- <artifactId>sal-common-impl</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-encrypt-service</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-encrypt-service</artifactId>
- <type>xml</type>
- <classifier>config</classifier>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-cert</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-cert</artifactId>
- <classifier>config</classifier>
- <type>xml</type>
- </dependency>
- <dependency>
- <groupId>org.bouncycastle</groupId>
- <artifactId>bcprov-jdk15on</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-aether-provider</artifactId>
- <version>3.0.5</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-cli</artifactId>
- </dependency>
- </dependencies>
<scm>
<connection>scm:git:ssh://git.opendaylight.org:29418/aaa.git</connection>
<developerConnection>scm:git:ssh://git.opendaylight.org:29418/aaa.git</developerConnection>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2015 Brocade Communications Systems 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>features-parent</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>features-aaa-shiro</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>jar</packaging>
+
+ <properties>
+ <servicemix.version>1.8.3_2</servicemix.version>
+ </properties>
+ <dependencyManagement>
+ <dependencies>
+ <!-- This project -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-parent</artifactId>
+ <version>${project.version}</version>
+ <scope>import</scope>
+ <type>pom</type>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>features-aaa</artifactId>
+ <classifier>features</classifier>
+ <type>xml</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-act</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro</artifactId>
+ <version>${project.version}</version>
+ <type>cfg</type>
+ <classifier>configuration</classifier>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-sts</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
+ <classifier>config</classifier>
+ <type>cfg</type>
+ </dependency>
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-authn</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.jersey</groupId>
+ <artifactId>jersey-server</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.dependencymanager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.metatype</artifactId>
+ </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>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.commons-beanutils</artifactId>
+ <version>${servicemix.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.resourceserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.authzserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>javax.ws.rs-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </dependency>
+ </dependencies>
+
+ <scm>
+ <connection>scm:git:ssh://git.opendaylight.org:29418/aaa.git</connection>
+ <developerConnection>scm:git:ssh://git.opendaylight.org:29418/aaa.git</developerConnection>
+ <tag>HEAD</tag>
+ <url>https://git.opendaylight.org/gerrit/gitweb?p=aaa.git;a=summary</url>
+ </scm>
+</project>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>feature-repo-parent</artifactId>
+ <version>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>features4-aaa-shiro</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-shiro</artifactId>
+ <version>${project.version}</version>
+ <type>xml</type>
+ <classifier>features</classifier>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>1.8.0-SNAPSHOT</version>
+ <relativePath/>
+ </parent>
+
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>odl-aaa-shiro</artifactId>
+ <version>0.5.0-SNAPSHOT</version>
+ <packaging>feature</packaging>
+
+ <!-- odl-aaa-shiro feature which combines all aspects of AAA into one feature -->
+ <name>OpenDaylight :: AAA :: Shiro</name>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-parent</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>aaa-artifacts</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <!-- OSGI -->
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.dependencymanager</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>org.apache.felix.metatype</artifactId>
+ </dependency>
+
+ <!-- Existing AAA infrastructure -->
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-filterchain</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>odl-aaa-authn</artifactId>
+ <version>${project.version}</version>
+ <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.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.resourceserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.authzserver</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.oltu.oauth2</groupId>
+ <artifactId>org.apache.oltu.oauth2.common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.servicemix.bundles</groupId>
+ <artifactId>org.apache.servicemix.bundles.commons-beanutils</artifactId>
+ <version>1.8.3_2</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro</artifactId>
+ </dependency>
+
+ <!-- AAA configuration file -->
+ <dependency>
+ <!-- finalname="/etc/shiro.ini" -->
+ <groupId>org.opendaylight.aaa</groupId>
+ <artifactId>aaa-shiro</artifactId>
+ <version>${project.version}</version>
+ <type>cfg</type>
+ <classifier>configuration</classifier>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright © 2015, 2017 Brocade Communications Systems 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-aaa-shiro" version="${project.version}">
+ <!-- AAA configuration file -->
+ <configfile finalname="/etc/shiro.ini">mvn:org.opendaylight.aaa/aaa-shiro/${project.version}/cfg/configuration
+ </configfile>
+ </feature>
+</features>
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright (c) 2015 Brocade Communications Systems 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 -->
+<!--
+ Copyright © 2017 Red Hat, Inc. and others.
+
+ 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>features-parent</artifactId>
+ <artifactId>odlparent-lite</artifactId>
<version>1.8.0-SNAPSHOT</version>
<relativePath/>
</parent>
<groupId>org.opendaylight.aaa</groupId>
- <artifactId>features-aaa-shiro</artifactId>
+ <artifactId>features-aaa-shiro-aggregator</artifactId>
<version>0.5.0-SNAPSHOT</version>
- <packaging>jar</packaging>
+ <packaging>pom</packaging>
- <properties>
- <servicemix.version>1.8.3_2</servicemix.version>
- </properties>
- <dependencyManagement>
- <dependencies>
- <!-- This project -->
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-parent</artifactId>
- <version>${project.version}</version>
- <scope>import</scope>
- <type>pom</type>
- </dependency>
- </dependencies>
- </dependencyManagement>
+ <modules>
+ <module>features-aaa-shiro</module>
+ <module>features4-aaa-shiro</module>
+ <module>odl-aaa-shiro</module>
+ </modules>
- <dependencies>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>features-aaa</artifactId>
- <classifier>features</classifier>
- <type>xml</type>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro-act</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro</artifactId>
- <version>${project.version}</version>
- <type>cfg</type>
- <classifier>configuration</classifier>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro</artifactId>
- <version>0.5.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-shiro-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn-sts</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-filterchain</artifactId>
- <classifier>config</classifier>
- <type>cfg</type>
- </dependency>
- <dependency>
- <groupId>org.opendaylight.aaa</groupId>
- <artifactId>aaa-authn</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-servlet</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-core</artifactId>
- </dependency>
- <dependency>
- <groupId>com.sun.jersey</groupId>
- <artifactId>jersey-server</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.dependencymanager</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.felix</groupId>
- <artifactId>org.apache.felix.metatype</artifactId>
- </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>org.apache.servicemix.bundles</groupId>
- <artifactId>org.apache.servicemix.bundles.commons-beanutils</artifactId>
- <version>${servicemix.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.resourceserver</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.authzserver</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.oltu.oauth2</groupId>
- <artifactId>org.apache.oltu.oauth2.common</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.ws.rs</groupId>
- <artifactId>javax.ws.rs-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-codec</groupId>
- <artifactId>commons-codec</artifactId>
- </dependency>
- </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
<scm>
<connection>scm:git:ssh://git.opendaylight.org:29418/aaa.git</connection>
<module>aaa-h2-store</module>
<module>aaa-cert</module>
<module>aaa-cli</module>
+ <module>aaa-cli4</module>
<module>aaa-cli-jar</module>
<module>aaa-filterchain</module>
<module>artifacts</module>