You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sm...@apache.org on 2019/09/03 13:42:58 UTC

[airavata-custos] 03/45: 1. modified the project structure 2. corrected the thrift files 3. modified the UserProfileHandler, IamAdminServerHandler and TenantProfileHandler

This is an automated email from the ASF dual-hosted git repository.

smarru pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git

commit 7d1e71242cb62304bebdadd274a68cc238382068
Author: Aarushi <aa...@gmail.com>
AuthorDate: Tue Jun 25 08:23:07 2019 -0400

    1. modified the project structure 2. corrected the thrift files 3. modified the UserProfileHandler, IamAdminServerHandler and TenantProfileHandler
---
 {custos-commons => custos-client}/pom.xml          |    25 +-
 .../service}/ProfileServiceClientFactory.java      |    48 +-
 custos-commons/custos-server.properties            |     0
 custos-commons/pom.xml                             |    10 +-
 .../custos/commons/model/security}/AuthzToken.java |     2 +-
 .../apache/custos/commons/utils/DBInitializer.java |    71 +
 .../org/apache/custos/commons/utils/DBUtil.java    |   307 +
 .../custos/commons/utils/DatabaseCreator.java      |   378 +
 .../org/apache/custos/commons/utils/IServer.java   |    51 +-
 .../custos/commons/utils/ServerSettings.java       |    13 +
 .../apache/custos/commons/utils/ThriftUtils.java   |    22 +-
 custos-connectors/pom.xml                          |    47 +
 .../authzcache/AuthzCache.java                     |     0
 .../authzcache/AuthzCacheEntry.java                |     0
 .../authzcache/AuthzCacheIndex.java                |     0
 .../authzcache/AuthzCacheManager.java              |     0
 .../authzcache/AuthzCacheManagerFactory.java       |     0
 .../authzcache/AuthzCachedStatus.java              |     0
 .../authzcache/DefaultAuthzCacheManager.java       |     0
 .../interceptor/SecurityCheck.java                 |    24 +-
 .../interceptor/SecurityInterceptor.java           |    82 +
 .../interceptor/SecurityModule.java                |    31 +-
 .../manager/CustosSecurityManager.java             |     6 +-
 .../manager/IdentityContext.java                   |     3 +-
 .../manager/KeyCloakSecurityManager.java           |   192 +-
 .../manager/SecurityManagerFactory.java            |     0
 .../manager/UserInfo.java                          |     0
 .../utils/TrustStoreManager.java                   |     0
 .../iam-admin-services-core/pom.xml                |     2 +-
 .../core/impl/TenantManagementKeycloakImpl.java    |    38 +-
 .../core/interfaces/TenantManagementInterface.java |    12 +-
 .../admin/services/core/tests/SetupNewGateway.java |    12 +-
 .../pom.xml                                        |     5 +-
 .../profile-service-commons/pom.xml                |     0
 .../commons/repositories/AbstractRepository.java   |     6 +-
 .../commons/tenant/entities/GatewayEntity.java     |     2 +-
 .../user/entities/CustomizedDashboardEntity.java   |     6 +-
 .../user/entities/NSFDemographicsEntity.java       |    10 +-
 .../commons/user/entities/UserProfileEntity.java   |    12 +-
 .../custos}/profile/commons/utils/Committer.java   |     2 +-
 .../profile/commons/utils/JPAConstants.java        |     2 +-
 .../custos}/profile/commons/utils/JPAUtils.java    |     2 +-
 .../commons/utils/ObjectMapperSingleton.java       |     2 +-
 .../commons/utils/ProfileServiceJDBCConfig.java    |     2 +-
 .../profile/commons/utils/QueryConstants.java      |    11 +-
 .../custos}/profile/commons/utils/Utils.java       |     2 +-
 .../src/main/resources/META-INF/persistence.xml    |     8 +-
 .../profile-service-model}/pom.xml                 |     0
 .../profile/model}/tenant/PasswordCredential.java  |     2 +-
 .../custos/profile/model}/tenant/Tenant.java       |     6 +-
 .../model}/tenant/TenantApprovalStatus.java        |     2 +-
 .../custos/profile/model}/tenant/TenantConfig.java |     2 +-
 .../profile/model}/tenant/TenantPreferences.java   |     2 +-
 .../profile/model}/user/CustomDashboard.java       |     2 +-
 .../profile/model}/user/NSFDemographics.java       |   128 +-
 .../apache/custos/profile/model}/user/Status.java  |     2 +-
 .../custos/profile/model}/user/USCitizenship.java  |     2 +-
 .../custos/profile/model}/user/UserProfile.java    |   118 +-
 .../custos/profile/model}/user/disability.java     |     2 +-
 .../custos/profile/model}/user/ethnicity.java      |     2 +-
 .../apache/custos/profile/model}/user/race.java    |     2 +-
 .../model}/user/user_profile_modelConstants.java   |     2 +-
 .../custos/profile/model}/workspace/Gateway.java   |   116 +-
 .../model}/workspace/GatewayApprovalStatus.java    |     2 +-
 .../profile-service-server/pom.xml                 |    13 +-
 .../profile/handlers/IamAdminServicesHandler.java  |    51 +-
 .../handlers/TenantProfileServiceHandler.java      |    56 +-
 .../handlers/UserProfileServiceHandler.java        |    52 +-
 .../profile/server/ProfileServiceServer.java       |    39 +-
 .../profile-service-stubs}/pom.xml                 |    27 +-
 .../iam.admin.services.cpi}/IamAdminServices.java  |  3847 ++--
 .../exception/IamAdminServicesException.java       |    46 +-
 .../iam_admin_services_cpiConstants.java           |    16 +
 .../profile/tenant.cpi}/TenantProfileService.java  |  3312 ++--
 .../exception/TenantProfileServiceException.java   |    69 +-
 .../tenant.cpi/profile_tenant_cpiConstants.java    |    16 +
 .../profile/user.cpi}/UserProfileService.java      |  1951 +-
 .../exception/UserProfileServiceException.java     |    69 +-
 .../user.cpi/profile_user_cpiConstants.java        |    16 +
 .../profile-tenant-core/pom.xml                    |     0
 .../core/repositories/TenantProfileRepository.java |    32 +-
 .../profile-user-core/pom.xml                      |     0
 .../exceptions/UserProfileRegistryException.java   |     2 +-
 .../core/repositories/UserProfileRepository.java   |    16 +-
 .../core/utils/UserProfileCatalogDBInitConfig.java |     2 +-
 .../core/utils/UserProfileCatalogJDBCConfig.java   |     4 +-
 .../user-profile-catalog-derby.sql                 |     0
 .../user-profile-catalog-mysql.sql                 |     0
 .../core/repositories/WorkspaceRepositoryTest.java |     0
 custos-services/custos-security-service/pom.xml    |    71 -
 .../custos/security/oauth/DefaultOAuthClient.java  |    91 -
 .../security/service/SecurityServiceHandler.java   |    30 -
 .../custos/security/xacml/DefaultPAPClient.java    |   124 -
 .../custos/security/xacml/DefaultXACMLPEP.java     |   133 -
 custos-services/pom.xml                            |    34 -
 .../java-client-samples/pom.xml                    |    35 -
 .../profile/client/samples/GroupManagerSample.java |    41 -
 .../client/samples/TenantProfileSample.java        |    61 -
 .../profile/client/samples/UserProfileSample.java  |   121 -
 .../client/util/ProfileServiceClientUtil.java      |    47 -
 .../resources/profile-client-sample.properties     |    29 -
 .../profile-service-client-sdks/pom.xml            |    31 -
 .../handlers/GroupManagerServiceHandler.java       |   385 -
 .../profile-service/profile-service-stubs/pom.xml  |    35 -
 .../groupmanager/cpi/GroupManagerService.java      | 17625 -------------------
 .../exception/GroupManagerServiceException.java    |   381 -
 .../cpi/group_manager_cpiConstants.java            |    32 -
 .../cpi/iam_admin_services_cpiConstants.java       |    32 -
 .../tenant/cpi/profile_tenant_cpiConstants.java    |    32 -
 .../user/cpi/profile_user_cpiConstants.java        |    32 -
 .../profile-service/profile-services.iml           |    20 -
 pom.xml                                            |     6 +-
 ...airavata_errors.thrift => custos_errors.thrift} |     0
 .../custos-apis/security_model.thrift              |     8 +-
 .../group_manager_model.thrift                     |    55 -
 .../tenant_profile_model.thrift                    |     2 -
 .../user_profile_model.thrift                      |    15 +-
 .../workspace_model.thrift                         |     4 +-
 thrift-interfaces/generate-thrift-stubs.sh         |   347 -
 .../group-manager/group-manager-cpi.thrift         |    98 -
 .../group-manager/group_manager_cpi_errors.thrift  |    33 -
 .../iam-admin-services-cpi.thrift                  |    66 +-
 .../iam_admin_services_cpi_errors.thrift           |     8 +-
 .../profile-service/profile-service-cpi.thrift     |    14 +-
 .../profile-tenant/profile-tenant-cpi.thrift       |    39 +-
 .../profile_tenant_cpi_errors.thrift               |     6 +-
 .../profile-user/profile-user-cpi.thrift           |    36 +-
 .../profile-user/profile_user_cpi_errors.thrift    |     6 +-
 128 files changed, 7336 insertions(+), 24305 deletions(-)

diff --git a/custos-commons/pom.xml b/custos-client/pom.xml
similarity index 50%
copy from custos-commons/pom.xml
copy to custos-client/pom.xml
index a1a9e93..cc6d67b 100644
--- a/custos-commons/pom.xml
+++ b/custos-client/pom.xml
@@ -2,28 +2,25 @@
 <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>
         <artifactId>custos</artifactId>
         <groupId>org.apache.custos</groupId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
-    
-    <groupId>org.apache.custos</groupId>
-    <artifactId>custos-commons</artifactId>
-    <version>${parent.version}</version>
+    <modelVersion>4.0.0</modelVersion>
     <dependencies>
         <dependency>
-            <groupId>org.apache.thrift</groupId>
-            <artifactId>libthrift</artifactId>
-            <version>${thrift.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.openjpa</groupId>
-            <artifactId>openjpa</artifactId>
-            <version>${openjpa.version}</version>
+            <groupId>org.apache.custos</groupId>
+            <artifactId>profile-service-stubs</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
         </dependency>
     </dependencies>
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
+    <artifactId>custos-client</artifactId>
+
 
 </project>
\ No newline at end of file
diff --git a/custos-services/profile-service/profile-service-stubs/src/main/java/org/apache/custos/service/profile/client/ProfileServiceClientFactory.java b/custos-client/src/main/java/org/apache/custos/client/profile/service/ProfileServiceClientFactory.java
similarity index 64%
rename from custos-services/profile-service/profile-service-stubs/src/main/java/org/apache/custos/service/profile/client/ProfileServiceClientFactory.java
rename to custos-client/src/main/java/org/apache/custos/client/profile/service/ProfileServiceClientFactory.java
index 7a9b37a..aa8f476 100644
--- a/custos-services/profile-service/profile-service-stubs/src/main/java/org/apache/custos/service/profile/client/ProfileServiceClientFactory.java
+++ b/custos-client/src/main/java/org/apache/custos/client/profile/service/ProfileServiceClientFactory.java
@@ -1,4 +1,4 @@
-/*
+/**
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,22 +16,18 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
-package org.apache.custos.service.profile.client;
+package org.apache.custos.client.profile.service;
 
-import org.apache.custos.service.profile.iam.admin.services.cpi.IamAdminServices;
-import org.apache.custos.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
-import org.apache.custos.service.profile.iam.admin.services.cpi.iam_admin_services_cpiConstants;
-import org.apache.custos.service.profile.groupmanager.cpi.GroupManagerService;
-import org.apache.custos.service.profile.groupmanager.cpi.exception.GroupManagerServiceException;
-import org.apache.custos.service.profile.groupmanager.cpi.group_manager_cpiConstants;
-import org.apache.custos.service.profile.tenant.cpi.TenantProfileService;
-import org.apache.custos.service.profile.tenant.cpi.exception.TenantProfileServiceException;
-import org.apache.custos.service.profile.tenant.cpi.profile_tenant_cpiConstants;
-import org.apache.custos.service.profile.user.cpi.UserProfileService;
-import org.apache.custos.service.profile.user.cpi.exception.UserProfileServiceException;
-import org.apache.custos.service.profile.user.cpi.profile_user_cpiConstants;
+import org.apache.custos.profile.iam.admin.services.cpi.IamAdminServices;
+import org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
+import org.apache.custos.profile.iam.admin.services.cpi.iam_admin_services_cpiConstants;
+import org.apache.custos.profile.tenant.cpi.TenantProfileService;
+import org.apache.custos.profile.tenant.cpi.exception.TenantProfileServiceException;
+import org.apache.custos.profile.tenant.cpi.profile_tenant_cpiConstants;
+import org.apache.custos.profile.user.cpi.UserProfileService;
+import org.apache.custos.profile.user.cpi.exception.UserProfileServiceException;
+import org.apache.custos.profile.user.cpi.profile_user_cpiConstants;
 import org.apache.thrift.protocol.TBinaryProtocol;
 import org.apache.thrift.protocol.TMultiplexedProtocol;
 import org.apache.thrift.protocol.TProtocol;
@@ -79,15 +75,15 @@ public class ProfileServiceClientFactory {
         }
     }
 
-    public static GroupManagerService.Client createGroupManagerServiceClient(String serverHost, int serverPort)  throws GroupManagerServiceException {
-        try {
-            TTransport transport = new TSocket(serverHost, serverPort);
-            transport.open();
-            TProtocol protocol = new TBinaryProtocol(transport);
-            TMultiplexedProtocol multiplexedProtocol = new TMultiplexedProtocol(protocol, group_manager_cpiConstants.GROUP_MANAGER_CPI_NAME);
-            return new GroupManagerService.Client(multiplexedProtocol);
-        } catch (TTransportException e) {
-            throw new GroupManagerServiceException(e.getMessage());
-        }
-    }
+//    public static GroupManagerService.Client createGroupManagerServiceClient(String serverHost, int serverPort)  throws GroupManagerServiceException {
+//        try {
+//            TTransport transport = new TSocket(serverHost, serverPort);
+//            transport.open();
+//            TProtocol protocol = new TBinaryProtocol(transport);
+//            TMultiplexedProtocol multiplexedProtocol = new TMultiplexedProtocol(protocol, group_manager_cpiConstants.GROUP_MANAGER_CPI_NAME);
+//            return new GroupManagerService.Client(multiplexedProtocol);
+//        } catch (TTransportException e) {
+//            throw new GroupManagerServiceException(e.getMessage());
+//        }
+//    }
 }
\ No newline at end of file
diff --git a/custos-commons/custos-server.properties b/custos-commons/custos-server.properties
new file mode 100644
index 0000000..e69de29
diff --git a/custos-commons/pom.xml b/custos-commons/pom.xml
index a1a9e93..85b8584 100644
--- a/custos-commons/pom.xml
+++ b/custos-commons/pom.xml
@@ -9,7 +9,10 @@
         <version>1.0-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
-    
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
     <groupId>org.apache.custos</groupId>
     <artifactId>custos-commons</artifactId>
     <version>${parent.version}</version>
@@ -24,6 +27,11 @@
             <artifactId>openjpa</artifactId>
             <version>${openjpa.version}</version>
         </dependency>
+        <dependency>
+            <groupId>commons-dbcp</groupId>
+            <artifactId>commons-dbcp</artifactId>
+            <version>1.4</version>
+        </dependency>
     </dependencies>
 
 </project>
\ No newline at end of file
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/model/AuthzToken.java b/custos-commons/src/main/java/org/apache/custos/commons/model/security/AuthzToken.java
similarity index 99%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/model/AuthzToken.java
rename to custos-commons/src/main/java/org/apache/custos/commons/model/security/AuthzToken.java
index 448df68..f4d7178 100644
--- a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/model/AuthzToken.java
+++ b/custos-commons/src/main/java/org/apache/custos/commons/model/security/AuthzToken.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.security.model;
+package org.apache.custos.commons.model.security;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
diff --git a/custos-commons/src/main/java/org/apache/custos/commons/utils/DBInitializer.java b/custos-commons/src/main/java/org/apache/custos/commons/utils/DBInitializer.java
new file mode 100644
index 0000000..6e2038c
--- /dev/null
+++ b/custos-commons/src/main/java/org/apache/custos/commons/utils/DBInitializer.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.custos.commons.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Connection;
+
+public class DBInitializer {
+    private static final Logger logger = LoggerFactory.getLogger(DBInitializer.class);
+
+    private JDBCConfig jdbcConfig;
+    private String initScriptPrefix;
+    private String checkTableName;
+
+    public DBInitializer(JDBCConfig jdbcConfig, String initScriptPrefix, String checkTableName) {
+        this.jdbcConfig = jdbcConfig;
+        this.initScriptPrefix = initScriptPrefix;
+        this.checkTableName = checkTableName;
+    }
+
+    public static void initializeDB(DBInitConfig dbInitConfig) {
+
+        JDBCConfig jdbcConfig = dbInitConfig.getJDBCConfig();
+        DBInitializer dbInitializer = new DBInitializer(jdbcConfig, dbInitConfig.getDBInitScriptPrefix(), dbInitConfig.getCheckTableName());
+        dbInitializer.initializeDB();
+        dbInitConfig.postInit();
+    }
+
+    public void initializeDB() {
+        // Create connection
+        Connection conn = null;
+        try {
+            DBUtil dbUtil = new DBUtil(jdbcConfig);
+            conn = dbUtil.getConnection();
+            if (!DatabaseCreator.isDatabaseStructureCreated(checkTableName, conn)) {
+                DatabaseCreator.createRegistryDatabase(initScriptPrefix, conn);
+                logger.info("New Database created from " + initScriptPrefix + " !!!");
+            } else {
+                logger.info("Table " + checkTableName + " already exists. Skipping database init script " + initScriptPrefix);
+            }
+
+        } catch (Exception e) {
+            throw new RuntimeException("Failed to initialize database for " + initScriptPrefix, e);
+        } finally {
+            if (conn != null) {
+                DBUtil.cleanup(conn);
+            }
+        }
+
+    }
+}
diff --git a/custos-commons/src/main/java/org/apache/custos/commons/utils/DBUtil.java b/custos-commons/src/main/java/org/apache/custos/commons/utils/DBUtil.java
new file mode 100644
index 0000000..bfac5d7
--- /dev/null
+++ b/custos-commons/src/main/java/org/apache/custos/commons/utils/DBUtil.java
@@ -0,0 +1,307 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.custos.commons.utils;
+
+import org.apache.commons.dbcp.BasicDataSource;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.sql.DataSource;
+import java.sql.*;
+import java.util.Properties;
+
+/**
+ * Database lookup. Abstracts out JDBC operations.
+ */
+public class DBUtil {
+
+    private String jdbcUrl;
+    private String databaseUserName;
+    private String databasePassword;
+    private String driverName;
+
+    protected static Logger log = LoggerFactory.getLogger(DBUtil.class);
+
+    private Properties properties;
+
+    public DBUtil(String jdbcUrl, String userName, String password, String driver) throws InstantiationException,
+            IllegalAccessException, ClassNotFoundException {
+
+        this.jdbcUrl = jdbcUrl;
+        this.databaseUserName = userName;
+        this.databasePassword = password;
+        this.driverName = driver;
+
+        init();
+    }
+
+    public DBUtil(JDBCConfig jdbcConfig) throws InstantiationException, IllegalAccessException, ClassNotFoundException {
+        this(jdbcConfig.getURL(), jdbcConfig.getUser(), jdbcConfig.getPassword(), jdbcConfig.getDriver());
+    }
+
+    /**
+     * Initializes and load driver. Must be called this before calling anyother method.
+     * 
+     * @throws ClassNotFoundException
+     *             If DB driver is not found.
+     * @throws InstantiationException
+     *             If unable to create driver class.
+     * @throws IllegalAccessException
+     *             If security does not allow users to instantiate driver object.
+     */
+    private void init() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
+        properties = new Properties();
+
+        properties.put("user", databaseUserName);
+        properties.put("password", databasePassword);
+        properties.put("characterEncoding", "ISO-8859-1");
+        properties.put("useUnicode", "true");
+
+        loadDriver();
+    }
+
+    /**
+     * Generic method to query values in the database.
+     * 
+     * @param tableName
+     *            Table name to query
+     * @param selectColumn
+     *            The column selecting
+     * @param whereValue
+     *            The condition query
+     * @return The value appropriate to the query.
+     * @throws SQLException
+     *             If an error occurred while querying
+     */
+    public String getMatchingColumnValue(String tableName, String selectColumn, String whereValue) throws SQLException {
+        return getMatchingColumnValue(tableName, selectColumn, selectColumn, whereValue);
+    }
+
+    /**
+     * Generic method to query values in the database.
+     * 
+     * @param tableName
+     *            Table name to query
+     * @param selectColumn
+     *            The column selecting
+     * @param whereColumn
+     *            The column which condition should apply
+     * @param whereValue
+     *            The condition query
+     * @return The value appropriate to the query.
+     * @throws SQLException
+     *             If an error occurred while querying
+     */
+    public String getMatchingColumnValue(String tableName, String selectColumn, String whereColumn, String whereValue)
+            throws SQLException {
+
+        StringBuilder stringBuilder = new StringBuilder();
+
+        stringBuilder.append("SELECT ").append(selectColumn).append(" FROM ").append(tableName).append(" WHERE ")
+                .append(whereColumn).append(" = ?");
+
+        String sql = stringBuilder.toString();
+
+        Connection connection = getConnection();
+
+        PreparedStatement ps = connection.prepareStatement(sql);
+        ResultSet rs = null;
+
+        try {
+            ps.setString(1, whereValue);
+            rs = ps.executeQuery();
+
+            if (rs.next()) {
+                return rs.getString(1);
+            }
+
+        } finally {
+            try {
+                if (rs != null) {
+                    rs.close();
+                }
+
+                ps.close();
+                connection.close();
+
+            } catch (Exception ignore) {
+                log.error("An error occurred while closing database connections ", ignore);
+            }
+        }
+
+        return null;
+    }
+
+    /**
+     * Create table utility method.
+     * 
+     * @param sql
+     *            SQL to be executed.
+     * @throws SQLException
+     *             If an error occurred while creating the table.
+     */
+    public void executeSQL(String sql) throws SQLException {
+
+        Connection connection = getConnection();
+
+        PreparedStatement ps = connection.prepareStatement(sql);
+
+        try {
+            ps.executeUpdate();
+            connection.commit();
+        } finally {
+            try {
+                if (ps != null) {
+                    ps.close();
+                }
+
+                connection.close();
+
+            } catch (Exception ignore) {
+                log.error("An error occurred while closing database connections ", ignore);
+            }
+        }
+
+    }
+
+    private void loadDriver() throws ClassNotFoundException, IllegalAccessException, InstantiationException {
+        Class.forName(driverName).newInstance();
+    }
+
+    /**
+     * Gets a new DBCP data source.
+     * 
+     * @return A new data source.
+     */
+    public DataSource getDataSource() {
+        BasicDataSource ds = new BasicDataSource();
+        ds.setDriverClassName(this.driverName);
+        ds.setUsername(this.databaseUserName);
+        ds.setPassword(this.databasePassword);
+        ds.setUrl(this.jdbcUrl);
+
+        return ds;
+    }
+
+    /**
+     * Creates a new JDBC connections based on provided DBCP properties.
+     * 
+     * @return A new DB connection.
+     * @throws SQLException
+     *             If an error occurred while creating the connection.
+     */
+    public Connection getConnection() throws SQLException {
+        Connection connection = DriverManager.getConnection(jdbcUrl, properties);
+        connection.setAutoCommit(false);
+        return connection;
+    }
+
+    /**
+     * Utility method to close statements and connections.
+     * 
+     * @param preparedStatement
+     *            The prepared statement to close.
+     * @param connection
+     *            The connection to close.
+     */
+    public static void cleanup(PreparedStatement preparedStatement, Connection connection) {
+        if (preparedStatement != null) {
+            try {
+                preparedStatement.close();
+            } catch (SQLException e) {
+                log.error("Error closing prepared statement.", e);
+            }
+        }
+        cleanup(connection);
+    }
+
+    /**
+     * Utility method to close statements and connections.
+     *
+     * @param preparedStatement
+     *            The prepared statement to close.
+     */
+    public static void cleanup(PreparedStatement preparedStatement) {
+        if (preparedStatement != null) {
+            try {
+                preparedStatement.close();
+            } catch (SQLException e) {
+                log.error("Error closing prepared statement.", e);
+            }
+        }
+    }
+
+    /**
+     * Utility method to close statements and connections.
+     *
+     * @param preparedStatement
+     *            The prepared statement to close.
+     */
+    public static void cleanup(PreparedStatement preparedStatement, ResultSet resultSet) {
+        if (resultSet != null) {
+            try {
+                resultSet.close();
+            } catch (SQLException e) {
+                log.error("Error closing prepared statement.", e);
+            }
+        }
+
+        cleanup(preparedStatement);
+    }
+
+    /**
+     * Cleanup the connection.
+     * @param connection The connection to close.
+     */
+    public static void cleanup(Connection connection) {
+        if (connection != null) {
+            try {
+                if (connection.isClosed()) {
+                    return;
+                }
+                if (!connection.getAutoCommit()) {
+                    connection.rollback();
+                }
+                connection.close();
+            } catch (SQLException e) {
+                throw new RuntimeException("Error closing connection", e);
+            }
+        }
+    }
+
+    /**
+     * Mainly useful for tests.
+     * 
+     * @param tableName
+     *            The table name.
+     * @param connection
+     *            The connection to be used.
+     */
+    public static void truncate(String tableName, Connection connection) throws SQLException {
+
+        String sql = "delete from " + tableName;
+
+        PreparedStatement preparedStatement = connection.prepareStatement(sql);
+        preparedStatement.executeUpdate();
+
+        connection.commit();
+
+    }
+}
diff --git a/custos-commons/src/main/java/org/apache/custos/commons/utils/DatabaseCreator.java b/custos-commons/src/main/java/org/apache/custos/commons/utils/DatabaseCreator.java
new file mode 100644
index 0000000..539ccf4
--- /dev/null
+++ b/custos-commons/src/main/java/org/apache/custos/commons/utils/DatabaseCreator.java
@@ -0,0 +1,378 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.custos.commons.utils;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.sql.*;
+import java.util.StringTokenizer;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * This class creates the database tables required for custos with default configuration this
+ * class creates derby database in server mode. User can specify required database in appropriate
+ * properties files.
+ */
+public class DatabaseCreator {
+    private final static Logger logger = LoggerFactory.getLogger(DatabaseCreator.class);
+
+    public enum DatabaseType {
+        derby("(?i).*derby.*"), mysql("(?i).*(mysql|mariadb).*"), other("");
+
+        private String pattern;
+
+        private DatabaseType(String matchingPattern) {
+            this.pattern = matchingPattern;
+        }
+
+        public String getMatchingPattern() {
+            return this.pattern;
+        }
+    }
+
+    private static DatabaseType[] supportedDatabase = new DatabaseType[] { DatabaseType.derby, DatabaseType.mysql };
+
+    private static Logger log = LoggerFactory.getLogger(DatabaseCreator.class);
+    private static final String delimiter = ";";
+
+    /**
+     * Creates database
+     *
+     * @throws Exception
+     */
+    public static void createRegistryDatabase(String prefix, Connection conn) throws Exception {
+        createDatabase(prefix, conn);
+    }
+
+
+
+    /**
+     * Checks whether database tables are created by using select * on given table name
+     *
+     * @param tableName
+     *            Table which should be existed
+     * @return <code>true</core> if checkSQL is success, else <code>false</code> .
+     */
+    public static boolean isDatabaseStructureCreated(String tableName, Connection conn) {
+        try {
+
+            log.debug("Running a query to test the database tables existence.");
+
+            // check whether the tables are already created with a query
+            Statement statement = null;
+            try {
+                statement = conn.createStatement();
+                ResultSet rs = statement.executeQuery("select * from " + tableName);
+                if (rs != null) {
+                    rs.close();
+                }
+            } finally {
+                try {
+                    if (statement != null) {
+                        statement.close();
+                    }
+                } catch (SQLException e) {
+                    return false;
+                }
+            }
+        } catch (SQLException e) {
+            return false;
+        }
+
+        return true;
+    }
+
+    /**
+     * executes given sql
+     *
+     * @param sql
+     * @throws Exception
+     */
+    private static void executeSQL(String sql, Connection conn) throws Exception {
+        // Check and ignore empty statements
+        if ("".equals(sql.trim())) {
+            return;
+        }
+
+        Statement statement = null;
+        try {
+            log.debug("SQL : " + sql);
+
+            boolean ret;
+            int updateCount = 0, updateCountTotal = 0;
+            statement = conn.createStatement();
+            ret = statement.execute(sql);
+            updateCount = statement.getUpdateCount();
+            do {
+                if (!ret) {
+                    if (updateCount != -1) {
+                        updateCountTotal += updateCount;
+                    }
+                }
+                ret = statement.getMoreResults();
+                if (ret) {
+                    updateCount = statement.getUpdateCount();
+                }
+            } while (ret);
+
+            log.debug(sql + " : " + updateCountTotal + " rows affected");
+
+            SQLWarning warning = conn.getWarnings();
+            while (warning != null) {
+                log.info(warning + " sql warning");
+                warning = warning.getNextWarning();
+            }
+            conn.clearWarnings();
+        } catch (SQLException e) {
+            if (e.getSQLState().equals("X0Y32")) {
+                // eliminating the table already exception for the derby
+                // database
+                log.info("Table Already Exists", e);
+            } else {
+                throw new Exception("Error occurred while executing : " + sql, e);
+            }
+        } finally {
+            if (statement != null) {
+                try {
+                    statement.close();
+                } catch (SQLException e) {
+                    log.error("Error occurred while closing result set.", e);
+                }
+            }
+        }
+    }
+
+    /**
+     * computes relatational database type using database name
+     *
+     * @return DatabaseType
+     * @throws Exception
+     *
+     */
+    public static DatabaseType getDatabaseType(Connection conn) throws Exception {
+        try {
+            if (conn != null && (!conn.isClosed())) {
+                DatabaseMetaData metaData = conn.getMetaData();
+                String databaseProductName = metaData.getDatabaseProductName();
+                return checkType(databaseProductName);
+            }
+        } catch (SQLException e) {
+            String msg = "Failed to create Airavata database." + e.getMessage();
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+        return DatabaseType.other;
+    }
+
+    /**
+     * Overloaded method with String input
+     *
+     * @return DatabaseType
+     * @throws Exception
+     *
+     */
+    public static DatabaseType getDatabaseType(String dbUrl) throws Exception {
+        return checkType(dbUrl);
+    }
+
+    private static DatabaseType checkType(String text) throws Exception {
+        try {
+            if (text != null) {
+                for (DatabaseType type : supportedDatabase) {
+                    if (text.matches(type.getMatchingPattern()))
+                        return type;
+                }
+            }
+            String msg = "Unsupported database: " + text
+                    + ". Database will not be created automatically by the custos. "
+                    + "Please create the database using appropriate database scripts for " + "the database.";
+            throw new Exception(msg);
+
+        } catch (SQLException e) {
+            String msg = "Failed to create custosdatabase." + e.getMessage();
+            log.error(msg, e);
+            throw new Exception(msg, e);
+        }
+    }
+
+    /**
+     * Get scripts location which is prefix + "-" + databaseType + ".sql"
+     *
+     * @param prefix
+     * @param databaseType
+     * @return script location
+     */
+    private static String getScriptLocation(String prefix, DatabaseType databaseType) {
+        String scriptName = prefix + "-" + databaseType + ".sql";
+        log.debug("Loading database script from :" + scriptName);
+        return  scriptName;
+    }
+
+    private static void createDatabase(String prefix, Connection conn) throws Exception {
+        Statement statement = null;
+        try {
+            conn.setAutoCommit(false);
+            statement = conn.createStatement();
+            executeSQLScript(getScriptLocation(prefix, DatabaseCreator.getDatabaseType(conn)), conn);
+            conn.commit();
+            log.debug("Tables are created successfully.");
+        } catch (SQLException e) {
+            String msg = "Failed to create database tables for custos resource store. " + e.getMessage();
+            log.error(msg, e);
+            conn.rollback();
+            throw new Exception(msg, e);
+        } finally {
+            conn.setAutoCommit(true);
+            try {
+                if (statement != null) {
+                    statement.close();
+                }
+            } catch (SQLException e) {
+                log.error("Failed to close statement.", e);
+            }
+        }
+    }
+
+    private static void executeSQLScript(String dbscriptName, Connection conn) throws Exception {
+        StringBuffer sql = new StringBuffer();
+        BufferedReader reader = null;
+
+        try {
+            InputStream is = DatabaseCreator.class.getClassLoader().getResourceAsStream(dbscriptName);
+            if(is == null) {
+                logger.info("Script file not found at " + dbscriptName + ". Uses default database script file");
+                DatabaseType databaseType = DatabaseCreator.getDatabaseType(conn);
+                is = DatabaseCreator.class.getClassLoader().getResourceAsStream(
+                        getDBScriptFileName(databaseType, dbscriptName)
+                );
+            }
+            reader = new BufferedReader(new InputStreamReader(is));
+            String line;
+            while ((line = reader.readLine()) != null) {
+                line = line.trim();
+                if (line.startsWith("//")) {
+                    continue;
+                }
+                if (line.startsWith("--")) {
+                    continue;
+                }
+                StringTokenizer st = new StringTokenizer(line);
+                if (st.hasMoreTokens()) {
+                    String token = st.nextToken();
+                    if ("REM".equalsIgnoreCase(token)) {
+                        continue;
+                    }
+                }
+                sql.append(" ").append(line);
+
+                // SQL defines "--" as a comment to EOL
+                // and in Oracle it may contain a hint
+                // so we cannot just remove it, instead we must end it
+                if (line.indexOf("--") >= 0) {
+                    sql.append("\n");
+                }
+                if ((checkStringBufferEndsWith(sql, delimiter))) {
+                    executeSQL(sql.substring(0, sql.length() - delimiter.length()), conn);
+                    sql.replace(0, sql.length(), "");
+                }
+            }
+            // Catch any statements not followed by ;
+            if (sql.length() > 0) {
+                executeSQL(sql.toString(), conn);
+            }
+        } catch (IOException e) {
+            log.error("Error occurred while executing SQL script for creating custos database", e);
+            throw new Exception("Error occurred while executing SQL script for creating custos database", e);
+
+        } finally {
+            if (reader != null) {
+                reader.close();
+            }
+        }
+    }
+
+    /**
+     * Checks that a string buffer ends up with a given string. It may sound trivial with the existing JDK API but the
+     * various implementation among JDKs can make those methods extremely resource intensive and perform poorly due to
+     * massive memory allocation and copying. See
+     *
+     * @param buffer
+     *            the buffer to perform the check on
+     * @param suffix
+     *            the suffix
+     * @return <code>true</code> if the character sequence represented by the argument is a suffix of the character
+     *         sequence represented by the StringBuffer object; <code>false</code> otherwise. Note that the result will
+     *         be <code>true</code> if the argument is the empty string.
+     */
+    public static boolean checkStringBufferEndsWith(StringBuffer buffer, String suffix) {
+        if (suffix.length() > buffer.length()) {
+            return false;
+        }
+        // this loop is done on purpose to avoid memory allocation performance
+        // problems on various JDKs
+        // StringBuffer.lastIndexOf() was introduced in jdk 1.4 and
+        // implementation is ok though does allocation/copying
+        // StringBuffer.toString().endsWith() does massive memory
+        // allocation/copying on JDK 1.5
+        // See http://issues.apache.org/bugzilla/show_bug.cgi?id=37169
+        int endIndex = suffix.length() - 1;
+        int bufferIndex = buffer.length() - 1;
+        while (endIndex >= 0) {
+            if (buffer.charAt(bufferIndex) != suffix.charAt(endIndex)) {
+                return false;
+            }
+            bufferIndex--;
+            endIndex--;
+        }
+        return true;
+    }
+
+    /**
+     * Method will accept a filepath containing a database script (eg: /user/database_scripts/expcatalog.sql)
+     *  and return only the filename of the database script (eg: expcatalog.sql).
+     * @param databaseType
+     * @param scriptFilePath
+     * @return
+     */
+    private static String getDBScriptFileName(DatabaseType databaseType, String scriptFilePath) {
+        // pattern: {dir_name}/{scriptfile_name}-{dbtype}.sql".
+        // Eg: database_scripts/expcatalog-derby.sql
+        final String scriptFilePattern = "(\\w*)(-" + databaseType.toString() + ".sql)";
+        final Pattern pattern = Pattern.compile(scriptFilePattern);
+        final Matcher matcher = pattern.matcher(scriptFilePath);
+        String dbScriptFileName = null;
+        // find a match
+        if (matcher.find()) {
+            dbScriptFileName = matcher.group();
+        }
+        return dbScriptFileName;
+    }
+
+//    public static void main(String[] args) throws Exception {
+//        System.out.println(DatabaseCreator.getDBScriptFileName(DatabaseType.derby, "db/db/expcatalog-derby.sql"));
+//        System.out.println(DatabaseCreator.getDBScriptFileName(DatabaseType.mysql, "/expcatalog-mysql.sql"));
+//    }
+}
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/IdentityContext.java b/custos-commons/src/main/java/org/apache/custos/commons/utils/IServer.java
similarity index 53%
copy from custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/IdentityContext.java
copy to custos-commons/src/main/java/org/apache/custos/commons/utils/IServer.java
index f5648ba..c5c2ed9 100644
--- a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/IdentityContext.java
+++ b/custos-commons/src/main/java/org/apache/custos/commons/utils/IServer.java
@@ -1,4 +1,4 @@
-/*
+/**
  *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,29 +16,34 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
  */
+package org.apache.custos.commons.utils;
 
-package org.apache.custos.security.manager;
-
-import org.apache.custos.security.model.AuthzToken;
-
-/**
- * This provides a thread local container for AuthzToken through out the execution of a particular thread.
- */
-public class IdentityContext {
-    private static ThreadLocal authzTokenContainer = new ThreadLocal();
-
-    public static void set(AuthzToken authzToken){
-        authzTokenContainer.set(authzToken);
-    }
-
-    public static void unset(){
-        authzTokenContainer.remove();
-    }
-
-    public static AuthzToken get(){
-        return (AuthzToken) authzTokenContainer.get();
-    }
+import java.util.Calendar;
+import java.util.Date;
 
+public interface IServer {
+	public enum ServerStatus{
+		STOPING,
+		STOPPED,
+		STARTING,
+		STARTED,
+		FAILED;
+		public void updateTime(){
+			now=Calendar.getInstance().getTime();
+		}
+		private Date now;
+		public Date getTime(){
+			return now;
+		}
+	}
+	public String getName();
+	public String getVersion();
+	public void start() throws Exception;
+	public void stop() throws Exception;
+	public void restart() throws Exception;
+	public void configure() throws Exception;
+	public ServerStatus getStatus() throws Exception;
+//	public void waitForServerToStart() throws Exception;
+//	public void waitForServerToStop() throws Exception;
 }
diff --git a/custos-commons/src/main/java/org/apache/custos/commons/utils/ServerSettings.java b/custos-commons/src/main/java/org/apache/custos/commons/utils/ServerSettings.java
index 2ead9e3..9417313 100644
--- a/custos-commons/src/main/java/org/apache/custos/commons/utils/ServerSettings.java
+++ b/custos-commons/src/main/java/org/apache/custos/commons/utils/ServerSettings.java
@@ -26,6 +26,11 @@ import org.slf4j.LoggerFactory;
 public class ServerSettings extends ApplicationSettings {
 
     private static final Logger log = LoggerFactory.getLogger(ServerSettings.class);
+    //User Profile constant
+
+    public static final String USER_PROFILE_SERVER_HOST = "user.profile.server.host";
+    public static final String USER_PROFILE_SERVER_PORT = "user.profile.server.port";
+
     public static int getCacheSize() throws ApplicationSettingsException {
         return Integer.valueOf(getSetting(Constants.IN_MEMORY_CACHE_SIZE));
     }
@@ -53,4 +58,12 @@ public class ServerSettings extends ApplicationSettings {
     public static String getIamServerSuperAdminPassword() throws ApplicationSettingsException {
         return getSetting(ServerSettings.IAM_SERVER_SUPER_ADMIN_PASSWORD);
     }
+    public static String  getProfileServiceServerHost() throws ApplicationSettingsException {
+        return getSetting(ServerSettings.PROFILE_SERVICE_SERVER_HOST);
+    }
+
+    public static String getProfileServiceServerPort() throws ApplicationSettingsException {
+        return getSetting(ServerSettings.PROFILE_SERVICE_SERVER_PORT);
+    }
+
 }
diff --git a/custos-services/profile-service/profile-user-core/src/main/java/org/apache/custos/service/profile/user/core/exceptions/UserProfileRegistryException.java b/custos-commons/src/main/java/org/apache/custos/commons/utils/ThriftUtils.java
similarity index 67%
copy from custos-services/profile-service/profile-user-core/src/main/java/org/apache/custos/service/profile/user/core/exceptions/UserProfileRegistryException.java
copy to custos-commons/src/main/java/org/apache/custos/commons/utils/ThriftUtils.java
index fb0a5e6..ea0e895 100644
--- a/custos-services/profile-service/profile-user-core/src/main/java/org/apache/custos/service/profile/user/core/exceptions/UserProfileRegistryException.java
+++ b/custos-commons/src/main/java/org/apache/custos/commons/utils/ThriftUtils.java
@@ -16,13 +16,19 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
-*/
-package org.apache.custos.service.profile.user.core.exceptions;
+ */
+package org.apache.custos.commons.utils;
+
+import org.apache.thrift.*;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+public class ThriftUtils {
 
-public class UserProfileRegistryException extends Exception {
-    private final static Logger logger = LoggerFactory.getLogger(UserProfileRegistryException.class);
-}
\ No newline at end of file
+	public static void close(TServiceClient client) {
+		if (client.getOutputProtocol().getTransport().isOpen()) {
+			client.getOutputProtocol().getTransport().close();
+		}
+		if (client.getInputProtocol().getTransport().isOpen()) {
+			client.getInputProtocol().getTransport().close();
+		}
+	}
+}
diff --git a/custos-connectors/pom.xml b/custos-connectors/pom.xml
new file mode 100644
index 0000000..309e806
--- /dev/null
+++ b/custos-connectors/pom.xml
@@ -0,0 +1,47 @@
+<?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">
+    <parent>
+        <artifactId>custos</artifactId>
+        <groupId>org.apache.custos</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>custos-connectors</artifactId>
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.custos</groupId>
+            <artifactId>custos-commons</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>com.google.inject</groupId>
+            <artifactId>guice</artifactId>
+            <version>4.0</version>
+        </dependency>
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>20131018</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.custos</groupId>
+            <artifactId>profile-service-stubs</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.custos</groupId>
+            <artifactId>custos-client</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+</project>
\ No newline at end of file
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCache.java b/custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCache.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCache.java
rename to custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCache.java
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCacheEntry.java b/custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCacheEntry.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCacheEntry.java
rename to custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCacheEntry.java
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCacheIndex.java b/custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCacheIndex.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCacheIndex.java
rename to custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCacheIndex.java
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCacheManager.java b/custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCacheManager.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCacheManager.java
rename to custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCacheManager.java
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCacheManagerFactory.java b/custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCacheManagerFactory.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCacheManagerFactory.java
rename to custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCacheManagerFactory.java
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCachedStatus.java b/custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCachedStatus.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/AuthzCachedStatus.java
rename to custos-connectors/src/main/java/org.apache.custos.security/authzcache/AuthzCachedStatus.java
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/DefaultAuthzCacheManager.java b/custos-connectors/src/main/java/org.apache.custos.security/authzcache/DefaultAuthzCacheManager.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/authzcache/DefaultAuthzCacheManager.java
rename to custos-connectors/src/main/java/org.apache.custos.security/authzcache/DefaultAuthzCacheManager.java
diff --git a/custos-services/profile-service/profile-user-core/src/main/java/org/apache/custos/service/profile/user/core/exceptions/UserProfileRegistryException.java b/custos-connectors/src/main/java/org.apache.custos.security/interceptor/SecurityCheck.java
similarity index 62%
copy from custos-services/profile-service/profile-user-core/src/main/java/org/apache/custos/service/profile/user/core/exceptions/UserProfileRegistryException.java
copy to custos-connectors/src/main/java/org.apache.custos.security/interceptor/SecurityCheck.java
index fb0a5e6..362fb1f 100644
--- a/custos-services/profile-service/profile-user-core/src/main/java/org/apache/custos/service/profile/user/core/exceptions/UserProfileRegistryException.java
+++ b/custos-connectors/src/main/java/org.apache.custos.security/interceptor/SecurityCheck.java
@@ -16,13 +16,21 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
-*/
-package org.apache.custos.service.profile.user.core.exceptions;
+ */
+package org.apache.custos.security.interceptor;
+
+import com.google.inject.BindingAnnotation;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
 
-public class UserProfileRegistryException extends Exception {
-    private final static Logger logger = LoggerFactory.getLogger(UserProfileRegistryException.class);
-}
\ No newline at end of file
+/**
+ * This is just the definition of the annotation used to mark the API methods to be intercepted.
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target({ElementType.METHOD})
+@BindingAnnotation
+public @interface SecurityCheck {
+}
diff --git a/custos-connectors/src/main/java/org.apache.custos.security/interceptor/SecurityInterceptor.java b/custos-connectors/src/main/java/org.apache.custos.security/interceptor/SecurityInterceptor.java
new file mode 100644
index 0000000..f075dd9
--- /dev/null
+++ b/custos-connectors/src/main/java/org.apache.custos.security/interceptor/SecurityInterceptor.java
@@ -0,0 +1,82 @@
+/**
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.custos.security.interceptor;
+
+import org.aopalliance.intercept.MethodInterceptor;
+import org.aopalliance.intercept.MethodInvocation;
+import org.apache.custos.commons.exceptions.ApplicationSettingsException;
+import org.apache.custos.commons.exceptions.CustosSecurityException;
+import org.apache.custos.commons.model.error.AuthorizationException;
+import org.apache.custos.commons.model.security.AuthzToken;
+import org.apache.custos.commons.utils.Constants;
+import org.apache.custos.commons.utils.ServerSettings;
+import org.apache.custos.security.manager.CustosSecurityManager;
+import org.apache.custos.security.manager.IdentityContext;
+import org.apache.custos.security.manager.SecurityManagerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Interceptor of Custos API calls for the purpose of applying security.
+ */
+public class SecurityInterceptor implements MethodInterceptor {
+    private final static Logger logger = LoggerFactory.getLogger(SecurityInterceptor.class);
+
+    @Override
+    public Object invoke(MethodInvocation invocation) throws Throwable {
+        //obtain the authz token from the input parameters
+        AuthzToken authzToken = (AuthzToken) invocation.getArguments()[0];
+        //authorize the API call
+        HashMap<String, String> metaDataMap = new HashMap();
+        metaDataMap.put(Constants.API_METHOD_NAME, invocation.getMethod().getName());
+        authorize(authzToken, metaDataMap);
+        //set the user identity info in a thread local to be used in downstream execution.
+        IdentityContext.set(authzToken);
+        //let the method call procees upon successful authorization
+        Object returnObj = invocation.proceed();
+        //clean the identity context before the method call returns
+        IdentityContext.unset();
+        return returnObj;
+    }
+
+    private void authorize(AuthzToken authzToken, Map<String, String> metaData) throws AuthorizationException {
+        try {
+            boolean isAPISecured = ServerSettings.isAPISecured();
+            if (isAPISecured) {
+                CustosSecurityManager securityManager = SecurityManagerFactory.getSecurityManager();
+                boolean isAuthz = securityManager.isUserAuthorized(authzToken, metaData);
+                if (!isAuthz) {
+                    throw new AuthorizationException("User is not authenticated or authorized.");
+                }
+            }
+        } catch (CustosSecurityException e) {
+            logger.error(e.getMessage(), e);
+            throw new AuthorizationException("Error in authenticating or authorizing user.");
+        } catch (ApplicationSettingsException e) {
+            logger.error(e.getMessage(), e);
+            throw new AuthorizationException("Internal error in authenticating or authorizing user.");
+        }
+    }
+}
+
+
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/ObjectMapperSingleton.java b/custos-connectors/src/main/java/org.apache.custos.security/interceptor/SecurityModule.java
similarity index 58%
copy from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/ObjectMapperSingleton.java
copy to custos-connectors/src/main/java/org.apache.custos.security/interceptor/SecurityModule.java
index e5cd0f1..c9475cc 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/ObjectMapperSingleton.java
+++ b/custos-connectors/src/main/java/org.apache.custos.security/interceptor/SecurityModule.java
@@ -16,24 +16,27 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- *
-*/
-package org.apache.custos.service.profile.commons.utils;
+ */
+package org.apache.custos.security.interceptor;
 
-import org.dozer.DozerBeanMapper;
+import com.google.inject.AbstractModule;
+import com.google.inject.matcher.Matchers;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-public class ObjectMapperSingleton extends DozerBeanMapper{
-    private final static Logger logger = LoggerFactory.getLogger(ObjectMapperSingleton.class);
-
-    private static ObjectMapperSingleton instance;
+/**
+ * This does the plumbing work of integrating the interceptor with Guice framework for the methods to be
+ * intercepted upon their invocation.
+ */
+public class SecurityModule extends AbstractModule {
+    private final static Logger logger = LoggerFactory.getLogger(SecurityModule.class);
 
-    private ObjectMapperSingleton(){}
+    public void configure(){
+        logger.info("Security module reached...");
+        SecurityInterceptor interceptor = new SecurityInterceptor();
+        //requestInjection(interceptor);
 
-    public static ObjectMapperSingleton getInstance(){
-        if(instance == null)
-            instance = new ObjectMapperSingleton();
-        return instance;
+        bindInterceptor(Matchers.any(), Matchers.annotatedWith(SecurityCheck.class), interceptor);
     }
-}
\ No newline at end of file
+
+}
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/CustosSecurityManager.java b/custos-connectors/src/main/java/org.apache.custos.security/manager/CustosSecurityManager.java
similarity index 91%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/CustosSecurityManager.java
rename to custos-connectors/src/main/java/org.apache.custos.security/manager/CustosSecurityManager.java
index afeb1d2..8051e77 100644
--- a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/CustosSecurityManager.java
+++ b/custos-connectors/src/main/java/org.apache.custos.security/manager/CustosSecurityManager.java
@@ -21,7 +21,7 @@
 package org.apache.custos.security.manager;
 
 import org.apache.custos.commons.exceptions.CustosSecurityException;
-import org.apache.custos.security.model.AuthzToken;
+import org.apache.custos.commons.model.security.AuthzToken;
 
 import java.util.Map;
 
@@ -48,7 +48,7 @@ public interface CustosSecurityManager {
      * @return
      * @throws CustosSecurityException
      */
-    public AuthzToken getUserManagementServiceAccountAuthzToken(String gatewayId, String clientId, String clientSecret) throws CustosSecurityException;
+    public AuthzToken getUserManagementServiceAccountAuthzToken(String gatewayId) throws CustosSecurityException;
 
     /**
      * Get OpenID Connect user profile information from the given AuthzToken.
@@ -56,5 +56,5 @@ public interface CustosSecurityManager {
      * @return
      * @throws CustosSecurityException
      */
-    public UserInfo getUserInfoFromAuthzToken(AuthzToken authzToken, String identityServerRealm) throws CustosSecurityException;
+    public UserInfo getUserInfoFromAuthzToken(AuthzToken authzToken) throws CustosSecurityException;
 }
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/IdentityContext.java b/custos-connectors/src/main/java/org.apache.custos.security/manager/IdentityContext.java
similarity index 95%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/IdentityContext.java
rename to custos-connectors/src/main/java/org.apache.custos.security/manager/IdentityContext.java
index f5648ba..04c689b 100644
--- a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/IdentityContext.java
+++ b/custos-connectors/src/main/java/org.apache.custos.security/manager/IdentityContext.java
@@ -21,7 +21,8 @@
 
 package org.apache.custos.security.manager;
 
-import org.apache.custos.security.model.AuthzToken;
+
+import org.apache.custos.commons.model.security.AuthzToken;
 
 /**
  * This provides a thread local container for AuthzToken through out the execution of a particular thread.
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/KeyCloakSecurityManager.java b/custos-connectors/src/main/java/org.apache.custos.security/manager/KeyCloakSecurityManager.java
similarity index 61%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/KeyCloakSecurityManager.java
rename to custos-connectors/src/main/java/org.apache.custos.security/manager/KeyCloakSecurityManager.java
index ea1cbb2..b85ec1e 100644
--- a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/KeyCloakSecurityManager.java
+++ b/custos-connectors/src/main/java/org.apache.custos.security/manager/KeyCloakSecurityManager.java
@@ -21,12 +21,17 @@
 package org.apache.custos.security.manager;
 
 
+import org.apache.custos.client.profile.service.ProfileServiceClientFactory;
 import org.apache.custos.commons.exceptions.ApplicationSettingsException;
 import org.apache.custos.commons.exceptions.CustosSecurityException;
+import org.apache.custos.commons.model.security.AuthzToken;
 import org.apache.custos.commons.utils.Constants;
 import org.apache.custos.commons.utils.ServerSettings;
+import org.apache.custos.commons.utils.ThriftUtils;
+import org.apache.custos.profile.model.workspace.Gateway;
+import org.apache.custos.profile.tenant.cpi.TenantProfileService;
+import org.apache.custos.profile.tenant.cpi.exception.TenantProfileServiceException;
 import org.apache.custos.security.authzcache.*;
-import org.apache.custos.security.model.AuthzToken;
 import org.apache.custos.security.utils.TrustStoreManager;
 import org.apache.http.Consts;
 import org.apache.http.HttpHeaders;
@@ -38,6 +43,7 @@ import org.apache.http.impl.client.CloseableHttpClient;
 import org.apache.http.impl.client.HttpClients;
 import org.apache.http.message.BasicNameValuePair;
 import org.apache.http.util.EntityUtils;
+import org.apache.thrift.TException;
 import org.json.JSONObject;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -55,120 +61,8 @@ import java.util.Map;
 
 public class KeyCloakSecurityManager implements CustosSecurityManager {
     private final static Logger logger = LoggerFactory.getLogger(KeyCloakSecurityManager.class);
-
-//    private HashMap<String, String> rolePermissionConfig = new HashMap<>();
-//
-//    // Methods that users user to manage their user resource profile
-//    private final static String USER_RESOURCE_PROFILE_USER_METHODS = "/airavata/registerUserResourceProfile|/airavata/getUserResourceProfile" +
-//            "|/airavata/updateUserResourceProfile|/airavata/deleteUserResourceProfile|/airavata/addUserComputeResourcePreference" +
-//            "|/airavata/addUserStoragePreference|/airavata/getUserComputeResourcePreference|/airavata/getUserStoragePreference" +
-//            "|/airavata/getAllUserComputeResourcePreferences|/airavata/getAllUserStoragePreferences" +
-//            "|/airavata/updateUserComputeResourcePreference|/airavata/updateUserStoragePreference" +
-//            "|/airavata/deleteUserComputeResourcePreference|/airavata/deleteUserStoragePreference" +
-//            "|/airavata/generateAndRegisterSSHKeys|/airavata/getAllCredentialSummaryForUsersInGateway" +
-//            "|/airavata/deleteSSHPubKey|/airavata/isUserResourceProfileExists";
-//    private final static String SHARING_RESOURCE_METHODS = "/airavata/shareResourceWithUsers|/airavata/revokeSharingOfResourceFromUsers" +
-//            "|/airavata/shareResourceWithGroups|/airavata/revokeSharingOfResourceFromGroups|/airavata/getAllAccessibleUsers" +
-//            "|/airavata/getAllAccessibleGroups|/airavata/userHasAccess|/airavata/getAllDirectlyAccessibleUsers" +
-//            "|/airavata/getAllDirectlyAccessibleGroups";
-//    private final static String SSH_ACCOUNT_PROVISIONER_METHODS =
-//            "/airavata/getSSHAccountProvisioners|/airavata/doesUserHaveSSHAccount|/airavata" +
-//                    "/setupUserComputeResourcePreferencesForSSH|" +
-//                    // getGatewayResourceProfile is needed to look up whether ssh account provisioning is
-//                    // configured for a gateway's compute resource preference
-//                    "/airavata/getGatewayResourceProfile";
-//    // These methods are protected by sharing registry authorization
-//    private final static String GROUP_RESOURCE_PROFILE_METHODS =
-//            "/airavata/createGroupResourceProfile|/airavata/updateGroupResourceProfile|/airavata/getGroupResourceProfile" +
-//                    "|/airavata/removeGroupResourceProfile|/airavata/getGroupResourceList|/airavata/removeGroupComputePrefs" +
-//                    "|/airavata/removeGroupComputeResourcePolicy|/airavata/removeGroupBatchQueueResourcePolicy" +
-//                    "|/airavata/getGroupComputeResourcePreference|/airavata/getGroupComputeResourcePolicy" +
-//                    "|/airavata/getBatchQueueResourcePolicy|/airavata/getGroupComputeResourcePrefList" +
-//                    "|/airavata/getGroupBatchQueueResourcePolicyList|/airavata/getGroupComputeResourcePolicyList";
-//    // These methods are protected by sharing registry authorization
-//    private final static String APPLICATION_DEPLOYMENT_METHODS =
-//            "/airavata/registerApplicationDeployment|/airavata/getApplicationDeployment|/airavata/updateApplicationDeployment" +
-//                    "|/airavata/deleteApplicationDeployment|/airavata/getAllApplicationDeployments|/airavata/getAccessibleApplicationDeployments" +
-//                    "|/airavata/getApplicationDeploymentsForAppModuleAndGroupResourceProfile";
-//    private final static String APPLICATION_MODULE_METHODS = "/airavata/getAccessibleAppModules";
-//    private final static String CREDENTIAL_TOKEN_METHODS = "/airavata/getCredentialSummary|/airavata/getAllCredentialSummaries|/airavata/generateAndRegisterSSHKeys|/airavata/registerPwdCredential|/airavata/deleteSSHPubKey|/airavata/deletePWDCredential";
-//    // Misc. other methods needed for group based authorization
-//    private final static String GROUP_BASED_AUTH_METHODS = "/airavata/getGatewayGroups";
-//
-//    private RegistryService.Client registryServiceClient = null;
-//    private SharingRegistryService.Client sharingRegistryServiceClient = null;
-//
-//    private static class GatewayGroupMembership {
-//        private boolean inAdminsGroup = false;
-//        private boolean inReadOnlyAdminsGroup = false;
-//
-//        public boolean isInAdminsGroup() {
-//            return inAdminsGroup;
-//        }
-//
-//        public void setInAdminsGroup(boolean inAdminsGroup) {
-//            this.inAdminsGroup = inAdminsGroup;
-//        }
-//
-//        public boolean isInReadOnlyAdminsGroup() {
-//            return inReadOnlyAdminsGroup;
-//        }
-//
-//        public void setInReadOnlyAdminsGroup(boolean inReadOnlyAdminsGroup) {
-//            this.inReadOnlyAdminsGroup = inReadOnlyAdminsGroup;
-//        }
-//    }
-
+    private TenantProfileService.Client tenantProfileClient = null;
     public KeyCloakSecurityManager() throws CustosSecurityException {
-//        rolePermissionConfig.put("admin", "/airavata/.*");
-//        rolePermissionConfig.put("gateway-provider", "/airavata/.*");
-//        rolePermissionConfig.put("admin-read-only", "/airavata/getSSHPubKey|/airavata/getAllGatewaySSHPubKeys" +
-//                "|/airavata/getAllGatewayPWDCredentials|/airavata/getApplicationModule|/airavata/getAllAppModules" +
-//                "|/airavata/getApplicationDeployment|/airavata/getAllApplicationDeployments|/airavata/getAppModuleDeployedResources" +
-//                "|/airavata/getStorageResource|/airavata/getAllStorageResourceNames|/airavata/getSCPDataMovement" +
-//                "|/airavata/getUnicoreDataMovement|/airavata/getGridFTPDataMovement|/airavata/getResourceJobManager" +
-//                "|/airavata/deleteResourceJobManager|/airavata/getGatewayResourceProfile|/airavata/getGatewayComputeResourcePreference" +
-//                "|/airavata/getGatewayStoragePreference|/airavata/getAllGatewayComputeResourcePreferences" +
-//                "|/airavata/getAllGatewayStoragePreferences|/airavata/getAllGatewayResourceProfiles|/airavata/getAPIVersion" +
-//                "|/airavata/getNotification|/airavata/getAllNotifications|/airavata/createProject|/airavata/updateProject" +
-//                "|/airavata/getProject|/airavata/deleteProject|/airavata/getUserProjects|/airavata/searchProjectsByProjectName" +
-//                "|/airavata/searchProjectsByProjectDesc|/airavata/searchExperimentsByName|/airavata/searchExperimentsByDesc" +
-//                "|/airavata/searchExperimentsByApplication|/airavata/searchExperimentsByStatus|/airavata/searchExperimentsByCreationTime" +
-//                "|/airavata/searchExperiments|/airavata/getExperimentStatistics|/airavata/getExperimentsInProject" +
-//                "|/airavata/getUserExperiments|/airavata/createExperiment|/airavata/deleteExperiment|/airavata/getExperiment" +
-//                "|/airavata/getDetailedExperimentTree|/airavata/updateExperiment|/airavata/updateExperimentConfiguration" +
-//                "|/airavata/updateResourceScheduleing|/airavata/validateExperiment|/airavata/launchExperiment" +
-//                "|/airavata/getExperimentStatus|/airavata/getExperimentOutputs|/airavata/getIntermediateOutputs" +
-//                "|/airavata/getJobStatuses|/airavata/getJobDetails|/airavata/cloneExperiment|/airavata/terminateExperiment" +
-//                "|/airavata/getApplicationInterface|/airavata/getAllApplicationInterfaceNames|/airavata/getAllApplicationInterfaces" +
-//                "|/airavata/getApplicationInputs|/airavata/getApplicationOutputs|/airavata/getAvailableAppInterfaceComputeResources" +
-//                "|/airavata/getComputeResource|/airavata/getAllComputeResourceNames|/airavata/getWorkflow|/airavata/getWorkflowTemplateId" +
-//                "|/airavata/isWorkflowExistWithName|/airavata/registerDataProduct|/airavata/getDataProduct|/airavata/registerReplicaLocation" +
-//                "|/airavata/getParentDataProduct|/airavata/getChildDataProducts|/airavata/getAllAccessibleUsers" +
-//                "|/airavata/getExperimentByAdmin|/airavata/cloneExperimentByAdmin|/airavata/getAllCredentialSummaryForGateway" +
-//                "|" + USER_RESOURCE_PROFILE_USER_METHODS + "|/airavata/getAllUserResourceProfiles" +
-//                "|" + SHARING_RESOURCE_METHODS + "|/airavata/getGateway|" + SSH_ACCOUNT_PROVISIONER_METHODS + "|" + GROUP_RESOURCE_PROFILE_METHODS +
-//                "|" + APPLICATION_DEPLOYMENT_METHODS + "|" + GROUP_BASED_AUTH_METHODS + "|" + APPLICATION_MODULE_METHODS +
-//                "|" + CREDENTIAL_TOKEN_METHODS);
-//        rolePermissionConfig.put("gateway-user", "/airavata/getAPIVersion|/airavata/getNotification|/airavata/getAllNotifications|" +
-//                "/airavata/createProject|/airavata/updateProject|/airavata/getProject|/airavata/deleteProject|/airavata/getUserProjects|" +
-//                "/airavata/searchProjectsByProjectName|/airavata/searchProjectsByProjectDesc|/airavata/searchExperimentsByName|" +
-//                "/airavata/searchExperimentsByDesc|/airavata/searchExperimentsByApplication|/airavata/searchExperimentsByStatus|" +
-//                "/airavata/searchExperimentsByCreationTime|/airavata/searchExperiments|/airavata/getExperimentStatistics|" +
-//                "/airavata/getExperimentsInProject|/airavata/getUserExperiments|/airavata/createExperiment|/airavata/deleteExperiment|" +
-//                "/airavata/getExperiment|/airavata/getDetailedExperimentTree|/airavata/updateExperiment|/airavata/updateExperimentConfiguration|" +
-//                "/airavata/updateResourceScheduleing|/airavata/validateExperiment|/airavata/launchExperiment|/airavata/getExperimentStatus|" +
-//                "/airavata/getExperimentOutputs|/airavata/getIntermediateOutputs|/airavata/getJobStatuses|/airavata/getJobDetails|" +
-//                "/airavata/cloneExperiment|/airavata/terminateExperiment|/airavata/getApplicationInterface|/airavata/getAllApplicationInterfaceNames|" +
-//                "/airavata/getAllApplicationInterfaces|/airavata/getApplicationInputs|/airavata/getApplicationOutputs|" +
-//                "/airavata/getAvailableAppInterfaceComputeResources|/airavata/getComputeResource|/airavata/getAllComputeResourceNames|" +
-//                "/airavata/getWorkflow|/airavata/getWorkflowTemplateId|/airavata/isWorkflowExistWithName|/airavata/registerDataProduct|" +
-//                "/airavata/getDataProduct|/airavata/registerReplicaLocation|/airavata/getParentDataProduct|/airavata/getChildDataProducts|" +
-//                "/airavata/getAllAccessibleUsers|/airavata/getAllApplicationDeployments|/airavata/getAllAppModules|/airavata/getApplicationModule|" + USER_RESOURCE_PROFILE_USER_METHODS + "|" +
-//                SHARING_RESOURCE_METHODS + "|" + SSH_ACCOUNT_PROVISIONER_METHODS + "|" + GROUP_RESOURCE_PROFILE_METHODS +
-//                "|" + APPLICATION_DEPLOYMENT_METHODS + "|" + GROUP_BASED_AUTH_METHODS + "|" + APPLICATION_MODULE_METHODS +
-//                "|" + CREDENTIAL_TOKEN_METHODS);
-
         initializeSecurityInfra();
     }
 
@@ -203,13 +97,12 @@ public class KeyCloakSecurityManager implements CustosSecurityManager {
         String subject = authzToken.getClaimsMap().get(Constants.USER_NAME);
         String accessToken = authzToken.getAccessToken();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
-        String identityServerRealm = metaData.get(Constants.IDENTITY_SERVER_TENANT);
         //String action = "/airavata/" + metaData.get(Constants.API_METHOD_NAME);
         try {
-//            if (!ServerSettings.isAPISecured()) {
-//                return true;
-//            }
-//            initServiceClients();
+            if (!ServerSettings.isAPISecured()) {
+                return true;
+            }
+            initServiceClients();
 
             if (ServerSettings.isAuthzCacheEnabled()) {
                 //obtain an instance of AuthzCacheManager implementation.
@@ -230,7 +123,7 @@ public class KeyCloakSecurityManager implements CustosSecurityManager {
                             "Generating decision based on group membership.");
 //                    GatewayGroupMembership gatewayGroupMembership = getGatewayGroupMembership(subject, accessToken, gatewayId);
 //                    boolean authorizationDecision = hasPermission(gatewayGroupMembership, action);
-                    boolean authorizationDecision = validateToken(subject, accessToken, gatewayId, identityServerRealm);
+                    boolean authorizationDecision = validateToken(subject, accessToken, gatewayId);
                     //cache the authorization decision
                     long currentTime = System.currentTimeMillis();
                     //TODO get the actual token expiration time
@@ -244,7 +137,7 @@ public class KeyCloakSecurityManager implements CustosSecurityManager {
             } else {
 //                GatewayGroupMembership gatewayGroupMembership = getGatewayGroupMembership(subject, accessToken, gatewayId);
 //                return hasPermission(gatewayGroupMembership, action);
-                return validateToken(subject, accessToken, gatewayId, identityServerRealm);
+                return validateToken(subject, accessToken, gatewayId);
             }
 
         } catch (ApplicationSettingsException e) {
@@ -260,33 +153,31 @@ public class KeyCloakSecurityManager implements CustosSecurityManager {
     }
 
     @Override
-    public AuthzToken getUserManagementServiceAccountAuthzToken(String gatewayId, String clientId, String clientSecret) throws CustosSecurityException {
+    public AuthzToken getUserManagementServiceAccountAuthzToken(String gatewayId) throws CustosSecurityException {
         try {
-//            initServiceClients();
-//            Gateway gateway = registryServiceClient.getGateway(gatewayId);
+            initServiceClients();
+            Gateway gateway = tenantProfileClient.getGatewayUsingGatewayId(gatewayId);
             String tokenURL = getTokenEndpoint(gatewayId);
-//            JSONObject clientCredentials = getClientCredentials(tokenURL, gateway.getOauthClientId(), gateway.getOauthClientSecret());
-            JSONObject clientCredentials = getClientCredentials(tokenURL, clientId, clientSecret);
+            JSONObject clientCredentials = getClientCredentials(tokenURL, gateway.getOauthClientId(), gateway.getOauthClientSecret());
             String accessToken = clientCredentials.getString("access_token");
             AuthzToken authzToken = new AuthzToken(accessToken);
             authzToken.putToClaimsMap(Constants.GATEWAY_ID, gatewayId);
-            authzToken.putToClaimsMap(Constants.USER_NAME, clientId);
+            authzToken.putToClaimsMap(Constants.USER_NAME, gateway.getOauthClientId());
             return authzToken;
         } catch (Exception e) {
             throw new CustosSecurityException(e);
+        } finally {
+            closeServiceClients();
         }
-//        } finally {
-//            closeServiceClients();
-//        }
     }
 
     @Override
-    public UserInfo getUserInfoFromAuthzToken(AuthzToken authzToken, String identityServerRealm) throws CustosSecurityException {
+    public UserInfo getUserInfoFromAuthzToken(AuthzToken authzToken) throws CustosSecurityException {
         try {
 //            initServiceClients();
             final String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
             final String token = authzToken.getAccessToken();
-            return getUserInfo(gatewayId, token, identityServerRealm);
+            return getUserInfo(gatewayId, token);
         } catch (Exception e) {
             throw new CustosSecurityException(e);
         }
@@ -295,10 +186,11 @@ public class KeyCloakSecurityManager implements CustosSecurityManager {
 //        }
     }
 
-    private UserInfo getUserInfo(String gatewayId, String token, String identityServerRealm) throws Exception {
+    private UserInfo getUserInfo(String gatewayId, String token) throws Exception {
 //        GatewayResourceProfile gwrp = registryServiceClient.getGatewayResourceProfile(gatewayId);
 //        String identityServerRealm = gwrp.getIdentityServerTenant();
-        String openIdConnectUrl = getOpenIDConfigurationUrl(identityServerRealm);
+        //TODO: Confirm the difference between gatewayId and IdentityServerTenant, using gatewayId as of now
+        String openIdConnectUrl = getOpenIDConfigurationUrl(gatewayId);
         JSONObject openIdConnectConfig = new JSONObject(getFromUrl(openIdConnectUrl, null));
         String userInfoEndPoint = openIdConnectConfig.getString("userinfo_endpoint");
         JSONObject userInfo = new JSONObject(getFromUrl(userInfoEndPoint, token));
@@ -330,8 +222,8 @@ public class KeyCloakSecurityManager implements CustosSecurityManager {
 //        }
 //    }
 
-    private boolean validateToken(String username, String token, String gatewayId, String identityServerRealm) throws Exception {
-        UserInfo userInfo = getUserInfo(gatewayId, token, identityServerRealm);
+    private boolean validateToken(String username, String token, String gatewayId) throws Exception {
+        UserInfo userInfo = getUserInfo(gatewayId, token);
         if (!username.equals(userInfo.getUsername())) {
             throw new CustosSecurityException("Subject name and username for the token doesn't match");
         }
@@ -480,19 +372,15 @@ public class KeyCloakSecurityManager implements CustosSecurityManager {
 //        return false;
 //    }
 //
-//    private void initServiceClients() throws TException, ApplicationSettingsException {
-//        registryServiceClient = getRegistryServiceClient();
-//        sharingRegistryServiceClient = getSharingRegistryServiceClient();
-//    }
+    private void initServiceClients() throws TException, ApplicationSettingsException {
+        tenantProfileClient = getTenantProfileServiceClient();
+    }
 
-//    private void closeServiceClients() {
-//        if (registryServiceClient != null) {
-//            ThriftUtils.close(registryServiceClient);
-//        }
-//        if (sharingRegistryServiceClient != null) {
-//            ThriftUtils.close(sharingRegistryServiceClient);
-//        }
-//    }
+    private void closeServiceClients() {
+        if (tenantProfileClient != null) {
+            ThriftUtils.close(tenantProfileClient);
+        }
+    }
 
 //    private RegistryService.Client getRegistryServiceClient() throws TException, ApplicationSettingsException {
 //        final int serverPort = Integer.parseInt(ServerSettings.getRegistryServerPort());
@@ -534,4 +422,12 @@ public class KeyCloakSecurityManager implements CustosSecurityManager {
 //        JSONObject jsonObject = keyCloakSecurityManager.getClientCredentials(tokenURL, clientId, clientSecret);
 //        System.out.println("access_token=" + jsonObject.getString("access_token"));
 //    }
+    private TenantProfileService.Client getTenantProfileServiceClient() throws ApplicationSettingsException , TenantProfileServiceException, TException {
+        try {
+            TenantProfileService.Client tenantProfileClient = ProfileServiceClientFactory.createTenantProfileServiceClient(ServerSettings.getProfileServiceServerHost(), Integer.parseInt(ServerSettings.getProfileServiceServerPort()));
+            return tenantProfileClient;
+        } catch (TenantProfileServiceException e) {
+            throw new TenantProfileServiceException("Unable to create tenant profile client...");
+        }
+    }
 }
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/SecurityManagerFactory.java b/custos-connectors/src/main/java/org.apache.custos.security/manager/SecurityManagerFactory.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/SecurityManagerFactory.java
rename to custos-connectors/src/main/java/org.apache.custos.security/manager/SecurityManagerFactory.java
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/UserInfo.java b/custos-connectors/src/main/java/org.apache.custos.security/manager/UserInfo.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/manager/UserInfo.java
rename to custos-connectors/src/main/java/org.apache.custos.security/manager/UserInfo.java
diff --git a/custos-services/custos-security-service/src/main/java/org/apache/custos/security/utils/TrustStoreManager.java b/custos-connectors/src/main/java/org.apache.custos.security/utils/TrustStoreManager.java
similarity index 100%
rename from custos-services/custos-security-service/src/main/java/org/apache/custos/security/utils/TrustStoreManager.java
rename to custos-connectors/src/main/java/org.apache.custos.security/utils/TrustStoreManager.java
diff --git a/custos-services/profile-service/iam-admin-services-core/pom.xml b/custos-profile-service/iam-admin-services-core/pom.xml
similarity index 98%
rename from custos-services/profile-service/iam-admin-services-core/pom.xml
rename to custos-profile-service/iam-admin-services-core/pom.xml
index bc2a6d0..7b2e09d 100644
--- a/custos-services/profile-service/iam-admin-services-core/pom.xml
+++ b/custos-profile-service/iam-admin-services-core/pom.xml
@@ -70,7 +70,7 @@
         <dependency>
             <groupId>org.apache.custos</groupId>
             <artifactId>profile-service-stubs</artifactId>
-            <version>${project.version}</version>
+            <version>1.0-SNAPSHOT</version>
         </dependency>
         <dependency>
             <groupId>org.apache.custos</groupId>
diff --git a/custos-services/profile-service/iam-admin-services-core/src/main/java/org/apache/custos/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java b/custos-profile-service/iam-admin-services-core/src/main/java/org/apache/custos/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
similarity index 96%
rename from custos-services/profile-service/iam-admin-services-core/src/main/java/org/apache/custos/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
rename to custos-profile-service/iam-admin-services-core/src/main/java/org/apache/custos/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
index bab92a2..f3309bd 100644
--- a/custos-services/profile-service/iam-admin-services-core/src/main/java/org/apache/custos/service/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
+++ b/custos-profile-service/iam-admin-services-core/src/main/java/org/apache/custos/profile/iam/admin/services/core/impl/TenantManagementKeycloakImpl.java
@@ -19,17 +19,17 @@
  *
  */
 
-package org.apache.custos.service.profile.iam.admin.services.core.impl;
+package org.apache.custos.profile.iam.admin.services.core.impl;
 
 import org.apache.custos.commons.exceptions.ApplicationSettingsException;
 import org.apache.custos.commons.utils.SecurityUtil;
 import org.apache.custos.commons.utils.ServerSettings;
-import org.apache.custos.profile.models.tenant.PasswordCredential;
-import org.apache.custos.profile.models.user.Status;
-import org.apache.custos.profile.models.user.UserProfile;
-import org.apache.custos.profile.models.workspace.Gateway;
-import org.apache.custos.service.profile.iam.admin.services.core.interfaces.TenantManagementInterface;
-import org.apache.custos.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
+import org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
+import org.apache.custos.profile.model.tenant.PasswordCredential;
+import org.apache.custos.profile.model.user.Status;
+import org.apache.custos.profile.model.user.UserProfile;
+import org.apache.custos.profile.model.workspace.Gateway;
+import org.apache.custos.profile.iam.admin.services.core.interfaces.TenantManagementInterface;
 import org.jboss.resteasy.client.jaxrs.ResteasyClient;
 import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder;
 import org.keycloak.admin.client.Keycloak;
@@ -771,7 +771,7 @@ public class TenantManagementKeycloakImpl implements TenantManagementInterface {
     private UserProfile convertUserRepresentationToUserProfile(UserRepresentation userRepresentation, String tenantId) {
 
         UserProfile profile = new UserProfile();
-        profile.setAiravataInternalUserId(userRepresentation.getUsername() + "@" + tenantId);
+        profile.setCustosInternalUserId(userRepresentation.getUsername() + "@" + tenantId);
         profile.setGatewayId(tenantId);
         profile.setUserId(userRepresentation.getUsername());
         profile.setFirstName(userRepresentation.getFirstName());
@@ -807,15 +807,15 @@ public class TenantManagementKeycloakImpl implements TenantManagementInterface {
         return null;
     }
 
-    public static void main(String[] args) throws IamAdminServicesException, ApplicationSettingsException {
-        TenantManagementKeycloakImpl tenantManagementKeycloak = new TenantManagementKeycloakImpl();
-        ServerSettings.setSetting("trust.store", "./modules/configuration/server/src/main/resources/client_truststore.jks");
-        ServerSettings.setSetting("trust.store.password", "airavata");
-        ServerSettings.setSetting("iam.server.url", "");
-        String accessToken = "";
-        String tenantId = "";
-        String username = "";
-        boolean isUsernameAvailable = tenantManagementKeycloak.isUsernameAvailable(accessToken, tenantId, username);
-        System.out.println("Username " + username + " is " + (isUsernameAvailable ? "": "NOT ") + "available");
-    }
+//    public static void main(String[] args) throws IamAdminServicesException, ApplicationSettingsException {
+//        TenantManagementKeycloakImpl tenantManagementKeycloak = new TenantManagementKeycloakImpl();
+//        ServerSettings.setSetting("trust.store", "./modules/configuration/server/src/main/resources/client_truststore.jks");
+//        ServerSettings.setSetting("trust.store.password", "airavata");
+//        ServerSettings.setSetting("iam.server.url", "");
+//        String accessToken = "";
+//        String tenantId = "";
+//        String username = "";
+//        boolean isUsernameAvailable = tenantManagementKeycloak.isUsernameAvailable(accessToken, tenantId, username);
+//        System.out.println("Username " + username + " is " + (isUsernameAvailable ? "": "NOT ") + "available");
+//    }
 }
diff --git a/custos-services/profile-service/iam-admin-services-core/src/main/java/org/apache/custos/service/profile/iam/admin/services/core/interfaces/TenantManagementInterface.java b/custos-profile-service/iam-admin-services-core/src/main/java/org/apache/custos/profile/iam/admin/services/core/interfaces/TenantManagementInterface.java
similarity index 93%
rename from custos-services/profile-service/iam-admin-services-core/src/main/java/org/apache/custos/service/profile/iam/admin/services/core/interfaces/TenantManagementInterface.java
rename to custos-profile-service/iam-admin-services-core/src/main/java/org/apache/custos/profile/iam/admin/services/core/interfaces/TenantManagementInterface.java
index d809ad2..1d4a141 100644
--- a/custos-services/profile-service/iam-admin-services-core/src/main/java/org/apache/custos/service/profile/iam/admin/services/core/interfaces/TenantManagementInterface.java
+++ b/custos-profile-service/iam-admin-services-core/src/main/java/org/apache/custos/profile/iam/admin/services/core/interfaces/TenantManagementInterface.java
@@ -19,19 +19,19 @@
  *
  */
 
-package org.apache.custos.service.profile.iam.admin.services.core.interfaces;
+package org.apache.custos.profile.iam.admin.services.core.interfaces;
 
-import org.apache.custos.profile.models.tenant.PasswordCredential;
-import org.apache.custos.profile.models.user.UserProfile;
-import org.apache.custos.profile.models.workspace.Gateway;
-import org.apache.custos.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
+import org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
+import org.apache.custos.profile.model.tenant.PasswordCredential;
+import org.apache.custos.profile.model.user.UserProfile;
+import org.apache.custos.profile.model.workspace.Gateway;
 
 import java.util.List;
 
 public interface TenantManagementInterface {
 
     /**
-     * Method to add Identity server tenant for Airavata gateway creation.
+     * Method to add Identity server tenant for Custos gateway creation.
      *
      * @param isSuperAdminPasswordCreds identity server super admin credentials
      * @param gatewayDetails gateway details from workspace catalog
diff --git a/custos-services/profile-service/iam-admin-services-core/src/test/java/org/apache/custos/service/profile/iam/admin/services/core/tests/SetupNewGateway.java b/custos-profile-service/iam-admin-services-core/src/test/java/org/apache/custos/profile/iam/admin/services/core/tests/SetupNewGateway.java
similarity index 93%
rename from custos-services/profile-service/iam-admin-services-core/src/test/java/org/apache/custos/service/profile/iam/admin/services/core/tests/SetupNewGateway.java
rename to custos-profile-service/iam-admin-services-core/src/test/java/org/apache/custos/profile/iam/admin/services/core/tests/SetupNewGateway.java
index 387ed1c..c96d0f0 100644
--- a/custos-services/profile-service/iam-admin-services-core/src/test/java/org/apache/custos/service/profile/iam/admin/services/core/tests/SetupNewGateway.java
+++ b/custos-profile-service/iam-admin-services-core/src/test/java/org/apache/custos/profile/iam/admin/services/core/tests/SetupNewGateway.java
@@ -1,10 +1,10 @@
-package org.apache.custos.service.profile.iam.admin.services.core.tests;
+package org.apache.custos.profile.iam.admin.services.core.tests;
 
-import org.apache.custos.profile.models.tenant.PasswordCredential;
-import org.apache.custos.profile.models.user.UserProfile;
-import org.apache.custos.profile.models.workspace.Gateway;
-import org.apache.custos.service.profile.iam.admin.services.core.impl.TenantManagementKeycloakImpl;
-import org.apache.custos.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
+import org.apache.custos.profile.model.tenant.PasswordCredential;
+import org.apache.custos.profile.model.user.UserProfile;
+import org.apache.custos.profile.model.workspace.Gateway;
+import org.apache.custos.profile.iam.admin.services.core.impl.TenantManagementKeycloakImpl;
+import org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git a/custos-services/profile-service/pom.xml b/custos-profile-service/pom.xml
similarity index 83%
rename from custos-services/profile-service/pom.xml
rename to custos-profile-service/pom.xml
index 64056a6..1857392 100644
--- a/custos-services/profile-service/pom.xml
+++ b/custos-profile-service/pom.xml
@@ -3,7 +3,7 @@
          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>
-        <artifactId>custos-services</artifactId>
+        <artifactId>custos</artifactId>
         <groupId>org.apache.custos</groupId>
         <version>1.0-SNAPSHOT</version>
     </parent>
@@ -18,8 +18,7 @@
         <module>profile-user-core</module>
         <module>profile-service-server</module>
         <module>profile-service-commons</module>
-        <module>profile-service-client-sdks</module>
+        <module>profile-service-model</module>
         <module>profile-service-stubs</module>
-        <module>profile-service-models</module>
     </modules>
 </project>
\ No newline at end of file
diff --git a/custos-services/profile-service/profile-service-commons/pom.xml b/custos-profile-service/profile-service-commons/pom.xml
similarity index 100%
rename from custos-services/profile-service/profile-service-commons/pom.xml
rename to custos-profile-service/profile-service-commons/pom.xml
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/repositories/AbstractRepository.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/repositories/AbstractRepository.java
similarity index 95%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/repositories/AbstractRepository.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/repositories/AbstractRepository.java
index 1a778a3..376b4fb 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/repositories/AbstractRepository.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/repositories/AbstractRepository.java
@@ -18,10 +18,10 @@
  * under the License.
  *
 */
-package org.apache.custos.service.profile.commons.repositories;
+package org.apache.custos.profile.commons.repositories;
 
-import org.apache.custos.service.profile.commons.utils.JPAUtils;
-import org.apache.custos.service.profile.commons.utils.ObjectMapperSingleton;
+import org.apache.custos.profile.commons.utils.JPAUtils;
+import org.apache.custos.profile.commons.utils.ObjectMapperSingleton;
 import org.dozer.Mapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/tenant/entities/GatewayEntity.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/tenant/entities/GatewayEntity.java
similarity index 99%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/tenant/entities/GatewayEntity.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/tenant/entities/GatewayEntity.java
index c3506e3..8f68815 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/tenant/entities/GatewayEntity.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/tenant/entities/GatewayEntity.java
@@ -18,7 +18,7 @@
  * under the License.
  *
 */
-package org.apache.custos.service.profile.commons.tenant.entities;
+package org.apache.custos.profile.commons.tenant.entities;
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/user/entities/CustomizedDashboardEntity.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/user/entities/CustomizedDashboardEntity.java
similarity index 97%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/user/entities/CustomizedDashboardEntity.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/user/entities/CustomizedDashboardEntity.java
index 1ee3845..d92cc25 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/user/entities/CustomizedDashboardEntity.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/user/entities/CustomizedDashboardEntity.java
@@ -20,7 +20,7 @@
 */
 
 
-package org.apache.custos.service.profile.commons.user.entities;
+package org.apache.custos.profile.commons.user.entities;
 
 import javax.persistence.*;
 
@@ -57,7 +57,7 @@ public class CustomizedDashboardEntity {
     private UserProfileEntity userProfileEntity;
 
     @Id
-    @Column(name = "AIRAVATA_INTERNAL_USER_ID")
+    @Column(name = "CUSTOS_INTERNAL_USER_ID")
     public String getCustosInternalUserId() {
         return custosInternalUserId;
     }
@@ -283,7 +283,7 @@ public class CustomizedDashboardEntity {
     }
 
     @OneToOne(targetEntity = UserProfileEntity.class, cascade = CascadeType.ALL)
-    @PrimaryKeyJoinColumn(name = "AIRAVATA_INTERNAL_USER_ID", referencedColumnName = "AIRAVATA_INTERNAL_USER_ID")
+    @PrimaryKeyJoinColumn(name = "CUSTOS_INTERNAL_USER_ID", referencedColumnName = "CUSTOS_INTERNAL_USER_ID")
     public UserProfileEntity getUserProfileEntity() {
         return userProfileEntity;
     }
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/user/entities/NSFDemographicsEntity.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/user/entities/NSFDemographicsEntity.java
similarity index 90%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/user/entities/NSFDemographicsEntity.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/user/entities/NSFDemographicsEntity.java
index f336444..fdf2b90 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/user/entities/NSFDemographicsEntity.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/user/entities/NSFDemographicsEntity.java
@@ -18,7 +18,7 @@
  * under the License.
  *
 */
-package org.apache.custos.service.profile.commons.user.entities;
+package org.apache.custos.profile.commons.user.entities;
 
 import javax.persistence.*;
 import java.util.List;
@@ -53,7 +53,7 @@ public class NSFDemographicsEntity {
     }
 
     @ElementCollection
-    @CollectionTable(name="NSF_DEMOGRAPHIC_ETHNICITY", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID"))
+    @CollectionTable(name="NSF_DEMOGRAPHIC_ETHNICITY", joinColumns = @JoinColumn(name="CUSTOS_INTERNAL_USER_ID"))
     @Column(name = "ETHNICITY")
     public List<String> getEthnicities() {
         return ethnicities;
@@ -64,7 +64,7 @@ public class NSFDemographicsEntity {
     }
 
     @ElementCollection
-    @CollectionTable(name="NSF_DEMOGRAPHIC_RACE", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID"))
+    @CollectionTable(name="NSF_DEMOGRAPHIC_RACE", joinColumns = @JoinColumn(name="CUSTOS_INTERNAL_USER_ID"))
     @Column(name = "RACE")
     public List<String> getRaces() {
         return races;
@@ -75,7 +75,7 @@ public class NSFDemographicsEntity {
     }
 
     @ElementCollection
-    @CollectionTable(name="NSF_DEMOGRAPHIC_DISABILITY", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID"))
+    @CollectionTable(name="NSF_DEMOGRAPHIC_DISABILITY", joinColumns = @JoinColumn(name="CUSTOS_INTERNAL_USER_ID"))
     @Column(name = "DISABILITY")
     public List<String> getDisabilities() {
         return disabilities;
@@ -86,7 +86,7 @@ public class NSFDemographicsEntity {
     }
 
     @OneToOne(targetEntity = UserProfileEntity.class, cascade = CascadeType.ALL)
-    @PrimaryKeyJoinColumn(name = "AIRAVATA_INTERNAL_USER_ID", referencedColumnName = "AIRAVATA_INTERNAL_USER_ID")
+    @PrimaryKeyJoinColumn(name = "CUSTOS_INTERNAL_USER_ID", referencedColumnName = "CUSTOS_INTERNAL_USER_ID")
     public UserProfileEntity getUserProfile() {
         return userProfile;
     }
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/user/entities/UserProfileEntity.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/user/entities/UserProfileEntity.java
similarity index 96%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/user/entities/UserProfileEntity.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/user/entities/UserProfileEntity.java
index c95f2c0..04f3265 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/user/entities/UserProfileEntity.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/user/entities/UserProfileEntity.java
@@ -18,7 +18,7 @@
  * under the License.
  *
 */
-package org.apache.custos.service.profile.commons.user.entities;
+package org.apache.custos.profile.commons.user.entities;
 
 import javax.persistence.*;
 import java.util.Date;
@@ -56,7 +56,7 @@ public class UserProfileEntity {
     private CustomizedDashboardEntity customizedDashboardEntity;
 
     @Id
-    @Column(name = "AIRAVATA_INTERNAL_USER_ID")
+    @Column(name = "CUSTOS_INTERNAL_USER_ID")
     public String getCustosInternalUserId() {
         return custosInternalUserId;
     }
@@ -93,7 +93,7 @@ public class UserProfileEntity {
     }
 
     @ElementCollection(fetch = FetchType.EAGER)
-    @CollectionTable(name="USER_PROFILE_EMAIL", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID"))
+    @CollectionTable(name="USER_PROFILE_EMAIL", joinColumns = @JoinColumn(name="CUSTOS_INTERNAL_USER_ID"))
     @Column(name = "EMAIL")
     public List<String> getEmails() {
         return emails;
@@ -158,7 +158,7 @@ public class UserProfileEntity {
     }
 
     @ElementCollection(fetch = FetchType.EAGER)
-    @CollectionTable(name="USER_PROFILE_PHONE", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID"))
+    @CollectionTable(name="USER_PROFILE_PHONE", joinColumns = @JoinColumn(name="CUSTOS_INTERNAL_USER_ID"))
     @Column(name = "PHONE")
     public List<String> getPhones() {
         return phones;
@@ -178,7 +178,7 @@ public class UserProfileEntity {
     }
 
     @ElementCollection(fetch = FetchType.EAGER)
-    @CollectionTable(name="USER_PROFILE_NATIONALITY", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID"))
+    @CollectionTable(name="USER_PROFILE_NATIONALITY", joinColumns = @JoinColumn(name="CUSTOS_INTERNAL_USER_ID"))
     @Column(name = "NATIONALITY")
     public List<String> getNationality() {
         return nationality;
@@ -253,7 +253,7 @@ public class UserProfileEntity {
     }
 
     @ElementCollection(fetch = FetchType.EAGER)
-    @CollectionTable(name="USER_PROFILE_LABELED_URI", joinColumns = @JoinColumn(name="AIRAVATA_INTERNAL_USER_ID"))
+    @CollectionTable(name="USER_PROFILE_LABELED_URI", joinColumns = @JoinColumn(name="CUSTOS_INTERNAL_USER_ID"))
     @Column(name = "LABELED_URI")
     public List<String> getLabeledURI() {
         return labeledURI;
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/Committer.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/Committer.java
similarity index 93%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/Committer.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/Committer.java
index aa2dc58..5cf4ea3 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/Committer.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/Committer.java
@@ -18,7 +18,7 @@
  * under the License.
  *
 */
-package org.apache.custos.service.profile.commons.utils;
+package org.apache.custos.profile.commons.utils;
 
 @FunctionalInterface
 public interface Committer<T, R>  {
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/JPAConstants.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/JPAConstants.java
similarity index 96%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/JPAConstants.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/JPAConstants.java
index f029df0..7d35b13 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/JPAConstants.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/JPAConstants.java
@@ -18,7 +18,7 @@
  * under the License.
  *
  */
-package org.apache.custos.service.profile.commons.utils;
+package org.apache.custos.profile.commons.utils;
 
 public class JPAConstants {
 	public static final String KEY_JDBC_URL = "profile.service.jdbc.url";
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/JPAUtils.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/JPAUtils.java
similarity index 97%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/JPAUtils.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/JPAUtils.java
index 2cae126..2b881eb 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/JPAUtils.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/JPAUtils.java
@@ -18,7 +18,7 @@
  * under the License.
  *
 */
-package org.apache.custos.service.profile.commons.utils;
+package org.apache.custos.profile.commons.utils;
 
 import org.apache.custos.commons.utils.JDBCConfig;
 
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/ObjectMapperSingleton.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/ObjectMapperSingleton.java
similarity index 95%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/ObjectMapperSingleton.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/ObjectMapperSingleton.java
index e5cd0f1..b012b17 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/ObjectMapperSingleton.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/ObjectMapperSingleton.java
@@ -18,7 +18,7 @@
  * under the License.
  *
 */
-package org.apache.custos.service.profile.commons.utils;
+package org.apache.custos.profile.commons.utils;
 
 import org.dozer.DozerBeanMapper;
 import org.slf4j.Logger;
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/ProfileServiceJDBCConfig.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/ProfileServiceJDBCConfig.java
similarity index 96%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/ProfileServiceJDBCConfig.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/ProfileServiceJDBCConfig.java
index fe2db70..84a1f66 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/ProfileServiceJDBCConfig.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/ProfileServiceJDBCConfig.java
@@ -18,7 +18,7 @@
  * under the License.
  *
  */
-package org.apache.custos.service.profile.commons.utils;
+package org.apache.custos.profile.commons.utils;
 
 import org.apache.custos.commons.utils.JDBCConfig;
 
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/QueryConstants.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/QueryConstants.java
similarity index 75%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/QueryConstants.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/QueryConstants.java
index 6b3da31..15cc267 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/QueryConstants.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/QueryConstants.java
@@ -1,7 +1,7 @@
-package org.apache.custos.service.profile.commons.utils;
+package org.apache.custos.profile.commons.utils;
 
-import org.apache.custos.profile.models.user.UserProfile;
-import org.apache.custos.profile.models.workspace.Gateway;
+import org.apache.custos.profile.model.user.UserProfile;
+import org.apache.custos.profile.model.workspace.Gateway;
 
 /**
  * Created by goshenoy on 03/08/2017.
@@ -17,7 +17,10 @@ public class QueryConstants {
             "where u.gatewayId LIKE :" + UserProfile._Fields.GATEWAY_ID.getFieldName() + "";
 
     public static final String FIND_GATEWAY_BY_INTERNAL_ID = "SELECT g FROM GatewayEntity g " +
-            "where g.airavataInternalGatewayId LIKE :" + Gateway._Fields.AIRAVATA_INTERNAL_GATEWAY_ID.getFieldName();
+            "where g.custosInternalGatewayId LIKE :" + Gateway._Fields.CUSTOS_INTERNAL_GATEWAY_ID.getFieldName();
+
+    public static final String FIND_GATEWAY_BY_GATEWAY_ID = "SELECT g FROM GatewayEntity g " +
+            "where g.gatewayId LIKE :" + Gateway._Fields.GATEWAY_ID.getFieldName();
 
     public static final String FIND_DUPLICATE_GATEWAY = "SELECT g FROM GatewayEntity g " +
             "where g.gatewayApprovalStatus IN :" + Gateway._Fields.GATEWAY_APPROVAL_STATUS.getFieldName() + " " +
diff --git a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/Utils.java b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/Utils.java
similarity index 98%
rename from custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/Utils.java
rename to custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/Utils.java
index 78033cc..b3ddd31 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/java/org/apache/custos/service/profile/commons/utils/Utils.java
+++ b/custos-profile-service/profile-service-commons/src/main/java/org/apache/custos/profile/commons/utils/Utils.java
@@ -18,7 +18,7 @@
  * under the License.
  *
  */
-package org.apache.custos.service.profile.commons.utils;
+package org.apache.custos.profile.commons.utils;
 
 import org.apache.custos.commons.exceptions.ApplicationSettingsException;
 import org.apache.custos.commons.utils.ServerSettings;
diff --git a/custos-services/profile-service/profile-service-commons/src/main/resources/META-INF/persistence.xml b/custos-profile-service/profile-service-commons/src/main/resources/META-INF/persistence.xml
similarity index 77%
rename from custos-services/profile-service/profile-service-commons/src/main/resources/META-INF/persistence.xml
rename to custos-profile-service/profile-service-commons/src/main/resources/META-INF/persistence.xml
index 9f20353..f0a162e 100644
--- a/custos-services/profile-service/profile-service-commons/src/main/resources/META-INF/persistence.xml
+++ b/custos-profile-service/profile-service-commons/src/main/resources/META-INF/persistence.xml
@@ -22,10 +22,10 @@
 <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
     <persistence-unit name="profile_service">
         <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
-        <class>org.apache.custos.service.profile.commons.user.entities.UserProfileEntity</class>
-        <class>org.apache.custos.service.profile.commons.user.entities.NSFDemographicsEntity</class>
-        <class>org.apache.custos.service.profile.commons.user.entities.CustomizedDashboardEntity</class>
-        <class>org.apache.custos.service.profile.commons.tenant.entities.GatewayEntity</class>
+        <class>org.apache.custos.profile.commons.user.entities.UserProfileEntity</class>
+        <class>org.apache.custos.profile.commons.user.entities.NSFDemographicsEntity</class>
+        <class>org.apache.custos.profile.commons.user.entities.CustomizedDashboardEntity</class>
+        <class>org.apache.custos.profile.commons.tenant.entities.GatewayEntity</class>
         <exclude-unlisted-classes>true</exclude-unlisted-classes>
 
         <properties>
diff --git a/custos-services/profile-service/profile-service-models/pom.xml b/custos-profile-service/profile-service-model/pom.xml
similarity index 100%
rename from custos-services/profile-service/profile-service-models/pom.xml
rename to custos-profile-service/profile-service-model/pom.xml
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/PasswordCredential.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/PasswordCredential.java
similarity index 99%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/PasswordCredential.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/PasswordCredential.java
index 7a225c7..9bbe78e 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/PasswordCredential.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/PasswordCredential.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.tenant;
+package org.apache.custos.profile.model.tenant;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/Tenant.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/Tenant.java
similarity index 99%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/Tenant.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/Tenant.java
index 68b6bfd..014ec62 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/Tenant.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/Tenant.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.tenant;
+package org.apache.custos.profile.model.tenant;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
@@ -1225,7 +1225,7 @@ public class Tenant implements org.apache.thrift.TBase<Tenant, Tenant._Fields>,
             break;
           case 2: // TENANT_APPROVAL_STATUS
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.tenantApprovalStatus = org.apache.airavata.model.tenant.TenantApprovalStatus.findByValue(iprot.readI32());
+              struct.tenantApprovalStatus = org.apache.custos.profile.model.tenant.TenantApprovalStatus.findByValue(iprot.readI32());
               struct.setTenantApprovalStatusIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -1490,7 +1490,7 @@ public class Tenant implements org.apache.thrift.TBase<Tenant, Tenant._Fields>,
       org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
       struct.tenantId = iprot.readString();
       struct.setTenantIdIsSet(true);
-      struct.tenantApprovalStatus = org.apache.airavata.model.tenant.TenantApprovalStatus.findByValue(iprot.readI32());
+      struct.tenantApprovalStatus = org.apache.custos.profile.model.tenant.TenantApprovalStatus.findByValue(iprot.readI32());
       struct.setTenantApprovalStatusIsSet(true);
       java.util.BitSet incoming = iprot.readBitSet(10);
       if (incoming.get(0)) {
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/TenantApprovalStatus.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/TenantApprovalStatus.java
similarity index 97%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/TenantApprovalStatus.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/TenantApprovalStatus.java
index ecd9ce1..6fa3587 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/TenantApprovalStatus.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/TenantApprovalStatus.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.tenant;
+package org.apache.custos.profile.model.tenant;
 
 
 import org.apache.thrift.TEnum;
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/TenantConfig.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/TenantConfig.java
similarity index 99%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/TenantConfig.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/TenantConfig.java
index 796e93d..056adce 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/TenantConfig.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/TenantConfig.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.tenant;
+package org.apache.custos.profile.model.tenant;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/TenantPreferences.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/TenantPreferences.java
similarity index 99%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/TenantPreferences.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/TenantPreferences.java
index d895150..945304a 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/tenant/TenantPreferences.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/tenant/TenantPreferences.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.tenant;
+package org.apache.custos.profile.model.tenant;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/CustomDashboard.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/CustomDashboard.java
similarity index 99%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/CustomDashboard.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/CustomDashboard.java
index 69cd1fe..0799843 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/CustomDashboard.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/CustomDashboard.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.user;
+package org.apache.custos.profile.model.user;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 /**
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/NSFDemographics.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/NSFDemographics.java
similarity index 88%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/NSFDemographics.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/NSFDemographics.java
index ef1e4f6..d2e54b7 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/NSFDemographics.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/NSFDemographics.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.user;
+package org.apache.custos.profile.model.user;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 /**
@@ -33,7 +33,7 @@ package org.apache.custos.profile.models.user;
 public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics, NSFDemographics._Fields>, java.io.Serializable, Cloneable, Comparable<NSFDemographics> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("NSFDemographics");
 
-  private static final org.apache.thrift.protocol.TField AIRAVATA_INTERNAL_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataInternalUserId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField CUSTOS_INTERNAL_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("custosInternalUserId", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField GENDER_FIELD_DESC = new org.apache.thrift.protocol.TField("gender", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField US_CITIZENSHIP_FIELD_DESC = new org.apache.thrift.protocol.TField("usCitizenship", org.apache.thrift.protocol.TType.I32, (short)3);
   private static final org.apache.thrift.protocol.TField ETHNICITIES_FIELD_DESC = new org.apache.thrift.protocol.TField("ethnicities", org.apache.thrift.protocol.TType.LIST, (short)4);
@@ -43,7 +43,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
   private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new NSFDemographicsStandardSchemeFactory();
   private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new NSFDemographicsTupleSchemeFactory();
 
-  private String airavataInternalUserId; // required
+  private String custosInternalUserId; // required
   private String gender; // optional
   private USCitizenship usCitizenship; // optional
   private java.util.List<ethnicity> ethnicities; // optional
@@ -52,7 +52,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    AIRAVATA_INTERNAL_USER_ID((short)1, "airavataInternalUserId"),
+    CUSTOS_INTERNAL_USER_ID((short)1, "custosInternalUserId"),
     GENDER((short)2, "gender"),
     /**
      *
@@ -76,8 +76,8 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
      */
     public static _Fields findByThriftId(int fieldId) {
       switch(fieldId) {
-        case 1: // AIRAVATA_INTERNAL_USER_ID
-          return AIRAVATA_INTERNAL_USER_ID;
+        case 1: // CUSTOS_INTERNAL_USER_ID
+          return CUSTOS_INTERNAL_USER_ID;
         case 2: // GENDER
           return GENDER;
         case 3: // US_CITIZENSHIP
@@ -132,7 +132,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
   public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.AIRAVATA_INTERNAL_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataInternalUserId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+    tmpMap.put(_Fields.CUSTOS_INTERNAL_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("custosInternalUserId", org.apache.thrift.TFieldRequirementType.REQUIRED,
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.GENDER, new org.apache.thrift.meta_data.FieldMetaData("gender", org.apache.thrift.TFieldRequirementType.OPTIONAL,
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
@@ -152,23 +152,23 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
   }
 
   public NSFDemographics() {
-    this.airavataInternalUserId = "DO_NOT_SET_AT_CLIENTS";
+    this.custosInternalUserId = "DO_NOT_SET_AT_CLIENTS";
 
   }
 
   public NSFDemographics(
-    String airavataInternalUserId)
+    String custosInternalUserId)
   {
     this();
-    this.airavataInternalUserId = airavataInternalUserId;
+    this.custosInternalUserId = custosInternalUserId;
   }
 
   /**
    * Performs a deep copy on <i>other</i>.
    */
   public NSFDemographics(NSFDemographics other) {
-    if (other.isSetAiravataInternalUserId()) {
-      this.airavataInternalUserId = other.airavataInternalUserId;
+    if (other.isSetCustosInternalUserId()) {
+      this.custosInternalUserId = other.custosInternalUserId;
     }
     if (other.isSetGender()) {
       this.gender = other.gender;
@@ -205,7 +205,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
 
   @Override
   public void clear() {
-    this.airavataInternalUserId = "DO_NOT_SET_AT_CLIENTS";
+    this.custosInternalUserId = "DO_NOT_SET_AT_CLIENTS";
 
     this.gender = null;
     this.usCitizenship = null;
@@ -214,26 +214,26 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
     this.disabilities = null;
   }
 
-  public String getAiravataInternalUserId() {
-    return this.airavataInternalUserId;
+  public String getCustosInternalUserId() {
+    return this.custosInternalUserId;
   }
 
-  public void setAiravataInternalUserId(String airavataInternalUserId) {
-    this.airavataInternalUserId = airavataInternalUserId;
+  public void setCustosInternalUserId(String CustosInternalUserId) {
+    this.custosInternalUserId = custosInternalUserId;
   }
 
-  public void unsetAiravataInternalUserId() {
-    this.airavataInternalUserId = null;
+  public void unsetCustosInternalUserId() {
+    this.custosInternalUserId = null;
   }
 
-  /** Returns true if field airavataInternalUserId is set (has been assigned a value) and false otherwise */
-  public boolean isSetAiravataInternalUserId() {
-    return this.airavataInternalUserId != null;
+  /** Returns true if field custosInternalUserId is set (has been assigned a value) and false otherwise */
+  public boolean isSetCustosInternalUserId() {
+    return this.custosInternalUserId != null;
   }
 
-  public void setAiravataInternalUserIdIsSet(boolean value) {
+  public void setCustosInternalUserIdIsSet(boolean value) {
     if (!value) {
-      this.airavataInternalUserId = null;
+      this.custosInternalUserId = null;
     }
   }
 
@@ -407,11 +407,11 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case AIRAVATA_INTERNAL_USER_ID:
+    case CUSTOS_INTERNAL_USER_ID:
       if (value == null) {
-        unsetAiravataInternalUserId();
+        unsetCustosInternalUserId();
       } else {
-        setAiravataInternalUserId((String)value);
+        setCustosInternalUserId((String)value);
       }
       break;
 
@@ -460,8 +460,8 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case AIRAVATA_INTERNAL_USER_ID:
-      return getAiravataInternalUserId();
+    case CUSTOS_INTERNAL_USER_ID:
+      return getCustosInternalUserId();
 
     case GENDER:
       return getGender();
@@ -489,8 +489,8 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
     }
 
     switch (field) {
-    case AIRAVATA_INTERNAL_USER_ID:
-      return isSetAiravataInternalUserId();
+    case CUSTOS_INTERNAL_USER_ID:
+      return isSetCustosInternalUserId();
     case GENDER:
       return isSetGender();
     case US_CITIZENSHIP:
@@ -520,12 +520,12 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
     if (this == that)
       return true;
 
-    boolean this_present_airavataInternalUserId = true && this.isSetAiravataInternalUserId();
-    boolean that_present_airavataInternalUserId = true && that.isSetAiravataInternalUserId();
-    if (this_present_airavataInternalUserId || that_present_airavataInternalUserId) {
-      if (!(this_present_airavataInternalUserId && that_present_airavataInternalUserId))
+    boolean this_present_custosInternalUserId = true && this.isSetCustosInternalUserId();
+    boolean that_present_custosInternalUserId = true && that.isSetCustosInternalUserId();
+    if (this_present_custosInternalUserId || that_present_custosInternalUserId) {
+      if (!(this_present_custosInternalUserId && that_present_custosInternalUserId))
         return false;
-      if (!this.airavataInternalUserId.equals(that.airavataInternalUserId))
+      if (!this.custosInternalUserId.equals(that.custosInternalUserId))
         return false;
     }
 
@@ -581,9 +581,9 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
   public int hashCode() {
     int hashCode = 1;
 
-    hashCode = hashCode * 8191 + ((isSetAiravataInternalUserId()) ? 131071 : 524287);
-    if (isSetAiravataInternalUserId())
-      hashCode = hashCode * 8191 + airavataInternalUserId.hashCode();
+    hashCode = hashCode * 8191 + ((isSetCustosInternalUserId()) ? 131071 : 524287);
+    if (isSetCustosInternalUserId())
+      hashCode = hashCode * 8191 + custosInternalUserId.hashCode();
 
     hashCode = hashCode * 8191 + ((isSetGender()) ? 131071 : 524287);
     if (isSetGender())
@@ -616,12 +616,12 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetAiravataInternalUserId()).compareTo(other.isSetAiravataInternalUserId());
+    lastComparison = Boolean.valueOf(isSetCustosInternalUserId()).compareTo(other.isSetCustosInternalUserId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetAiravataInternalUserId()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataInternalUserId, other.airavataInternalUserId);
+    if (isSetCustosInternalUserId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.custosInternalUserId, other.custosInternalUserId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -696,11 +696,11 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
     StringBuilder sb = new StringBuilder("NSFDemographics(");
     boolean first = true;
 
-    sb.append("airavataInternalUserId:");
-    if (this.airavataInternalUserId == null) {
+    sb.append("custosInternalUserId:");
+    if (this.custosInternalUserId == null) {
       sb.append("null");
     } else {
-      sb.append(this.airavataInternalUserId);
+      sb.append(this.custosInternalUserId);
     }
     first = false;
     if (isSetGender()) {
@@ -759,8 +759,8 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
 
   public void validate() throws org.apache.thrift.TException {
     // check for required fields
-    if (!isSetAiravataInternalUserId()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataInternalUserId' is unset! Struct:" + toString());
+    if (!isSetCustosInternalUserId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'custosInternalUserId' is unset! Struct:" + toString());
     }
 
     // check for sub-struct validity
@@ -800,10 +800,10 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
           break;
         }
         switch (schemeField.id) {
-          case 1: // AIRAVATA_INTERNAL_USER_ID
+          case 1: // CUSTOS_INTERNAL_USER_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.airavataInternalUserId = iprot.readString();
-              struct.setAiravataInternalUserIdIsSet(true);
+              struct.custosInternalUserId = iprot.readString();
+              struct.setCustosInternalUserIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -818,7 +818,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
             break;
           case 3: // US_CITIZENSHIP
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.usCitizenship = org.apache.airavata.model.user.USCitizenship.findByValue(iprot.readI32());
+              struct.usCitizenship = org.apache.custos.profile.model.user.USCitizenship.findByValue(iprot.readI32());
               struct.setUsCitizenshipIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -832,7 +832,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
                 ethnicity _elem1;
                 for (int _i2 = 0; _i2 < _list0.size; ++_i2)
                 {
-                  _elem1 = org.apache.airavata.model.user.ethnicity.findByValue(iprot.readI32());
+                  _elem1 = org.apache.custos.profile.model.user.ethnicity.findByValue(iprot.readI32());
                   struct.ethnicities.add(_elem1);
                 }
                 iprot.readListEnd();
@@ -850,7 +850,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
                 race _elem4;
                 for (int _i5 = 0; _i5 < _list3.size; ++_i5)
                 {
-                  _elem4 = org.apache.airavata.model.user.race.findByValue(iprot.readI32());
+                  _elem4 = org.apache.custos.profile.model.user.race.findByValue(iprot.readI32());
                   struct.races.add(_elem4);
                 }
                 iprot.readListEnd();
@@ -868,7 +868,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
                 disability _elem7;
                 for (int _i8 = 0; _i8 < _list6.size; ++_i8)
                 {
-                  _elem7 = org.apache.airavata.model.user.disability.findByValue(iprot.readI32());
+                  _elem7 = org.apache.custos.profile.model.user.disability.findByValue(iprot.readI32());
                   struct.disabilities.add(_elem7);
                 }
                 iprot.readListEnd();
@@ -891,9 +891,9 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.airavataInternalUserId != null) {
-        oprot.writeFieldBegin(AIRAVATA_INTERNAL_USER_ID_FIELD_DESC);
-        oprot.writeString(struct.airavataInternalUserId);
+      if (struct.custosInternalUserId != null) {
+        oprot.writeFieldBegin(CUSTOS_INTERNAL_USER_ID_FIELD_DESC);
+        oprot.writeString(struct.custosInternalUserId);
         oprot.writeFieldEnd();
       }
       if (struct.gender != null) {
@@ -969,7 +969,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
     @Override
     public void write(org.apache.thrift.protocol.TProtocol prot, NSFDemographics struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-      oprot.writeString(struct.airavataInternalUserId);
+      oprot.writeString(struct.custosInternalUserId);
       java.util.BitSet optionals = new java.util.BitSet();
       if (struct.isSetGender()) {
         optionals.set(0);
@@ -1025,15 +1025,15 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
     @Override
     public void read(org.apache.thrift.protocol.TProtocol prot, NSFDemographics struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-      struct.airavataInternalUserId = iprot.readString();
-      struct.setAiravataInternalUserIdIsSet(true);
+      struct.custosInternalUserId = iprot.readString();
+      struct.setCustosInternalUserIdIsSet(true);
       java.util.BitSet incoming = iprot.readBitSet(5);
       if (incoming.get(0)) {
         struct.gender = iprot.readString();
         struct.setGenderIsSet(true);
       }
       if (incoming.get(1)) {
-        struct.usCitizenship = org.apache.airavata.model.user.USCitizenship.findByValue(iprot.readI32());
+        struct.usCitizenship = org.apache.custos.profile.model.user.USCitizenship.findByValue(iprot.readI32());
         struct.setUsCitizenshipIsSet(true);
       }
       if (incoming.get(2)) {
@@ -1043,7 +1043,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
           ethnicity _elem16;
           for (int _i17 = 0; _i17 < _list15.size; ++_i17)
           {
-            _elem16 = org.apache.airavata.model.user.ethnicity.findByValue(iprot.readI32());
+            _elem16 = org.apache.custos.profile.model.user.ethnicity.findByValue(iprot.readI32());
             struct.ethnicities.add(_elem16);
           }
         }
@@ -1056,7 +1056,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
           race _elem19;
           for (int _i20 = 0; _i20 < _list18.size; ++_i20)
           {
-            _elem19 = org.apache.airavata.model.user.race.findByValue(iprot.readI32());
+            _elem19 = org.apache.custos.profile.model.user.race.findByValue(iprot.readI32());
             struct.races.add(_elem19);
           }
         }
@@ -1069,7 +1069,7 @@ public class NSFDemographics implements org.apache.thrift.TBase<NSFDemographics,
           disability _elem22;
           for (int _i23 = 0; _i23 < _list21.size; ++_i23)
           {
-            _elem22 = org.apache.airavata.model.user.disability.findByValue(iprot.readI32());
+            _elem22 = org.apache.custos.profile.model.user.disability.findByValue(iprot.readI32());
             struct.disabilities.add(_elem22);
           }
         }
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/Status.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/Status.java
similarity index 97%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/Status.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/Status.java
index e1af1c4..119a68b 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/Status.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/Status.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.user;
+package org.apache.custos.profile.model.user;
 
 
 import org.apache.thrift.TEnum;
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/USCitizenship.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/USCitizenship.java
similarity index 97%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/USCitizenship.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/USCitizenship.java
index ca79ab1..89cfcc0 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/USCitizenship.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/USCitizenship.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.user;
+package org.apache.custos.profile.model.user;
 
 
 import org.apache.thrift.TEnum;
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/UserProfile.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/UserProfile.java
similarity index 96%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/UserProfile.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/UserProfile.java
index 7e41d59..6b83946 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/UserProfile.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/UserProfile.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.user;
+package org.apache.custos.profile.model.user;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 /**
@@ -73,7 +73,7 @@ package org.apache.custos.profile.models.user;
  * * nationality Countries of citizenship
  * *
  * * comments:
- * *   Free-form information (treated as opaque by Airavata and simply passed to resource).
+ * *   Free-form information (treated as opaque by Custos and simply passed to resource).
  * *
  * * labeledURI:
  *   * Google Scholar, Web of Science, ACS, e.t.c
@@ -87,7 +87,7 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("UserProfile");
 
   private static final org.apache.thrift.protocol.TField USER_MODEL_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("userModelVersion", org.apache.thrift.protocol.TType.STRING, (short)1);
-  private static final org.apache.thrift.protocol.TField AIRAVATA_INTERNAL_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataInternalUserId", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField CUSTOS_INTERNAL_USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("custosInternalUserId", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField USER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("userId", org.apache.thrift.protocol.TType.STRING, (short)3);
   private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)4);
   private static final org.apache.thrift.protocol.TField EMAILS_FIELD_DESC = new org.apache.thrift.protocol.TField("emails", org.apache.thrift.protocol.TType.LIST, (short)5);
@@ -117,7 +117,7 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
   private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new UserProfileTupleSchemeFactory();
 
   private String userModelVersion; // required
-  private String airavataInternalUserId; // required
+  private String custosInternalUserId; // required
   private String userId; // required
   private String gatewayId; // required
   private java.util.List<String> emails; // required
@@ -146,7 +146,7 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
     USER_MODEL_VERSION((short)1, "userModelVersion"),
-    AIRAVATA_INTERNAL_USER_ID((short)2, "airavataInternalUserId"),
+    CUSTOS_INTERNAL_USER_ID((short)2, "custosInternalUserId"),
     USER_ID((short)3, "userId"),
     GATEWAY_ID((short)4, "gatewayId"),
     EMAILS((short)5, "emails"),
@@ -191,8 +191,8 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
       switch(fieldId) {
         case 1: // USER_MODEL_VERSION
           return USER_MODEL_VERSION;
-        case 2: // AIRAVATA_INTERNAL_USER_ID
-          return AIRAVATA_INTERNAL_USER_ID;
+        case 2: // CUSTOS_INTERNAL_USER_ID
+          return CUSTOS_INTERNAL_USER_ID;
         case 3: // USER_ID
           return USER_ID;
         case 4: // GATEWAY_ID
@@ -291,7 +291,7 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
     java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
     tmpMap.put(_Fields.USER_MODEL_VERSION, new org.apache.thrift.meta_data.FieldMetaData("userModelVersion", org.apache.thrift.TFieldRequirementType.REQUIRED,
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
-    tmpMap.put(_Fields.AIRAVATA_INTERNAL_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataInternalUserId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+    tmpMap.put(_Fields.CUSTOS_INTERNAL_USER_ID, new org.apache.thrift.meta_data.FieldMetaData("custosInternalUserId", org.apache.thrift.TFieldRequirementType.REQUIRED,
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.USER_ID, new org.apache.thrift.meta_data.FieldMetaData("userId", org.apache.thrift.TFieldRequirementType.REQUIRED,
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
@@ -352,13 +352,13 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
   public UserProfile() {
     this.userModelVersion = "1.0";
 
-    this.airavataInternalUserId = "DO_NOT_SET_AT_CLIENTS";
+    this.custosInternalUserId = "DO_NOT_SET_AT_CLIENTS";
 
   }
 
   public UserProfile(
     String userModelVersion,
-    String airavataInternalUserId,
+    String custosInternalUserId,
     String userId,
     String gatewayId,
     java.util.List<String> emails,
@@ -371,7 +371,7 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
   {
     this();
     this.userModelVersion = userModelVersion;
-    this.airavataInternalUserId = airavataInternalUserId;
+    this.custosInternalUserId = custosInternalUserId;
     this.userId = userId;
     this.gatewayId = gatewayId;
     this.emails = emails;
@@ -394,8 +394,8 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
     if (other.isSetUserModelVersion()) {
       this.userModelVersion = other.userModelVersion;
     }
-    if (other.isSetAiravataInternalUserId()) {
-      this.airavataInternalUserId = other.airavataInternalUserId;
+    if (other.isSetCustosInternalUserId()) {
+      this.custosInternalUserId = other.custosInternalUserId;
     }
     if (other.isSetUserId()) {
       this.userId = other.userId;
@@ -477,7 +477,7 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
   public void clear() {
     this.userModelVersion = "1.0";
 
-    this.airavataInternalUserId = "DO_NOT_SET_AT_CLIENTS";
+    this.custosInternalUserId = "DO_NOT_SET_AT_CLIENTS";
 
     this.userId = null;
     this.gatewayId = null;
@@ -531,26 +531,26 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
     }
   }
 
-  public String getAiravataInternalUserId() {
-    return this.airavataInternalUserId;
+  public String getCustosInternalUserId() {
+    return this.custosInternalUserId;
   }
 
-  public void setAiravataInternalUserId(String airavataInternalUserId) {
-    this.airavataInternalUserId = airavataInternalUserId;
+  public void setCustosInternalUserId(String custosInternalUserId) {
+    this.custosInternalUserId = custosInternalUserId;
   }
 
-  public void unsetAiravataInternalUserId() {
-    this.airavataInternalUserId = null;
+  public void unsetCustosInternalUserId() {
+    this.custosInternalUserId = null;
   }
 
-  /** Returns true if field airavataInternalUserId is set (has been assigned a value) and false otherwise */
-  public boolean isSetAiravataInternalUserId() {
-    return this.airavataInternalUserId != null;
+  /** Returns true if field custosInternalUserId is set (has been assigned a value) and false otherwise */
+  public boolean isSetCustosInternalUserId() {
+    return this.custosInternalUserId != null;
   }
 
-  public void setAiravataInternalUserIdIsSet(boolean value) {
+  public void setCustosInternalUserIdIsSet(boolean value) {
     if (!value) {
-      this.airavataInternalUserId = null;
+      this.custosInternalUserId = null;
     }
   }
 
@@ -1181,11 +1181,11 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
       }
       break;
 
-    case AIRAVATA_INTERNAL_USER_ID:
+    case CUSTOS_INTERNAL_USER_ID:
       if (value == null) {
-        unsetAiravataInternalUserId();
+        unsetCustosInternalUserId();
       } else {
-        setAiravataInternalUserId((String)value);
+        setCustosInternalUserId((String)value);
       }
       break;
 
@@ -1389,8 +1389,8 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
     case USER_MODEL_VERSION:
       return getUserModelVersion();
 
-    case AIRAVATA_INTERNAL_USER_ID:
-      return getAiravataInternalUserId();
+    case CUSTOS_INTERNAL_USER_ID:
+      return getCustosInternalUserId();
 
     case USER_ID:
       return getUserId();
@@ -1477,8 +1477,8 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
     switch (field) {
     case USER_MODEL_VERSION:
       return isSetUserModelVersion();
-    case AIRAVATA_INTERNAL_USER_ID:
-      return isSetAiravataInternalUserId();
+    case CUSTOS_INTERNAL_USER_ID:
+      return isSetCustosInternalUserId();
     case USER_ID:
       return isSetUserId();
     case GATEWAY_ID:
@@ -1555,12 +1555,12 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
         return false;
     }
 
-    boolean this_present_airavataInternalUserId = true && this.isSetAiravataInternalUserId();
-    boolean that_present_airavataInternalUserId = true && that.isSetAiravataInternalUserId();
-    if (this_present_airavataInternalUserId || that_present_airavataInternalUserId) {
-      if (!(this_present_airavataInternalUserId && that_present_airavataInternalUserId))
+    boolean this_present_custosInternalUserId = true && this.isSetCustosInternalUserId();
+    boolean that_present_custosInternalUserId = true && that.isSetCustosInternalUserId();
+    if (this_present_custosInternalUserId || that_present_custosInternalUserId) {
+      if (!(this_present_custosInternalUserId && that_present_custosInternalUserId))
         return false;
-      if (!this.airavataInternalUserId.equals(that.airavataInternalUserId))
+      if (!this.custosInternalUserId.equals(that.custosInternalUserId))
         return false;
     }
 
@@ -1791,9 +1791,9 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
     if (isSetUserModelVersion())
       hashCode = hashCode * 8191 + userModelVersion.hashCode();
 
-    hashCode = hashCode * 8191 + ((isSetAiravataInternalUserId()) ? 131071 : 524287);
-    if (isSetAiravataInternalUserId())
-      hashCode = hashCode * 8191 + airavataInternalUserId.hashCode();
+    hashCode = hashCode * 8191 + ((isSetCustosInternalUserId()) ? 131071 : 524287);
+    if (isSetCustosInternalUserId())
+      hashCode = hashCode * 8191 + custosInternalUserId.hashCode();
 
     hashCode = hashCode * 8191 + ((isSetUserId()) ? 131071 : 524287);
     if (isSetUserId())
@@ -1906,12 +1906,12 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
         return lastComparison;
       }
     }
-    lastComparison = Boolean.valueOf(isSetAiravataInternalUserId()).compareTo(other.isSetAiravataInternalUserId());
+    lastComparison = Boolean.valueOf(isSetCustosInternalUserId()).compareTo(other.isSetCustosInternalUserId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetAiravataInternalUserId()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataInternalUserId, other.airavataInternalUserId);
+    if (isSetCustosInternalUserId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.custosInternalUserId, other.custosInternalUserId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -2184,11 +2184,11 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
     }
     first = false;
     if (!first) sb.append(", ");
-    sb.append("airavataInternalUserId:");
-    if (this.airavataInternalUserId == null) {
+    sb.append("custosInternalUserId:");
+    if (this.custosInternalUserId == null) {
       sb.append("null");
     } else {
-      sb.append(this.airavataInternalUserId);
+      sb.append(this.custosInternalUserId);
     }
     first = false;
     if (!first) sb.append(", ");
@@ -2411,8 +2411,8 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
       throw new org.apache.thrift.protocol.TProtocolException("Required field 'userModelVersion' is unset! Struct:" + toString());
     }
 
-    if (!isSetAiravataInternalUserId()) {
-      throw new org.apache.thrift.protocol.TProtocolException("Required field 'airavataInternalUserId' is unset! Struct:" + toString());
+    if (!isSetCustosInternalUserId()) {
+      throw new org.apache.thrift.protocol.TProtocolException("Required field 'custosInternalUserId' is unset! Struct:" + toString());
     }
 
     if (!isSetUserId()) {
@@ -2504,10 +2504,10 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 2: // AIRAVATA_INTERNAL_USER_ID
+          case 2: // CUSTOS_INTERNAL_USER_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.airavataInternalUserId = iprot.readString();
-              struct.setAiravataInternalUserIdIsSet(true);
+              struct.custosInternalUserId = iprot.readString();
+              struct.setCustosInternalUserIdIsSet(true);
             } else {
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -2680,7 +2680,7 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
             break;
           case 20: // STATE
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.State = org.apache.airavata.model.user.Status.findByValue(iprot.readI32());
+              struct.State = org.apache.custos.profile.model.user.Status.findByValue(iprot.readI32());
               struct.setStateIsSet(true);
             } else {
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -2764,9 +2764,9 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
         oprot.writeString(struct.userModelVersion);
         oprot.writeFieldEnd();
       }
-      if (struct.airavataInternalUserId != null) {
-        oprot.writeFieldBegin(AIRAVATA_INTERNAL_USER_ID_FIELD_DESC);
-        oprot.writeString(struct.airavataInternalUserId);
+      if (struct.custosInternalUserId != null) {
+        oprot.writeFieldBegin(CUSTOS_INTERNAL_USER_ID_FIELD_DESC);
+        oprot.writeString(struct.custosInternalUserId);
         oprot.writeFieldEnd();
       }
       if (struct.userId != null) {
@@ -2959,7 +2959,7 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
     public void write(org.apache.thrift.protocol.TProtocol prot, UserProfile struct) throws org.apache.thrift.TException {
       org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
       oprot.writeString(struct.userModelVersion);
-      oprot.writeString(struct.airavataInternalUserId);
+      oprot.writeString(struct.custosInternalUserId);
       oprot.writeString(struct.userId);
       oprot.writeString(struct.gatewayId);
       {
@@ -3092,8 +3092,8 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
       org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
       struct.userModelVersion = iprot.readString();
       struct.setUserModelVersionIsSet(true);
-      struct.airavataInternalUserId = iprot.readString();
-      struct.setAiravataInternalUserIdIsSet(true);
+      struct.custosInternalUserId = iprot.readString();
+      struct.setCustosInternalUserIdIsSet(true);
       struct.userId = iprot.readString();
       struct.setUserIdIsSet(true);
       struct.gatewayId = iprot.readString();
@@ -3119,7 +3119,7 @@ public class UserProfile implements org.apache.thrift.TBase<UserProfile, UserPro
       struct.setLastAccessTimeIsSet(true);
       struct.validUntil = iprot.readI64();
       struct.setValidUntilIsSet(true);
-      struct.State = org.apache.airavata.model.user.Status.findByValue(iprot.readI32());
+      struct.State = org.apache.custos.profile.model.user.Status.findByValue(iprot.readI32());
       struct.setStateIsSet(true);
       java.util.BitSet incoming = iprot.readBitSet(15);
       if (incoming.get(0)) {
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/disability.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/disability.java
similarity index 97%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/disability.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/disability.java
index 7063c52..eb0058c 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/disability.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/disability.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.user;
+package org.apache.custos.profile.model.user;
 
 
 import org.apache.thrift.TEnum;
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/ethnicity.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/ethnicity.java
similarity index 97%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/ethnicity.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/ethnicity.java
index 4ee5411..955f16c 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/ethnicity.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/ethnicity.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.user;
+package org.apache.custos.profile.model.user;
 
 
 import org.apache.thrift.TEnum;
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/race.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/race.java
similarity index 98%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/race.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/race.java
index a56e572..3bc91aa 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/race.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/race.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.user;
+package org.apache.custos.profile.model.user;
 
 
 import org.apache.thrift.TEnum;
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/user_profile_modelConstants.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/user_profile_modelConstants.java
similarity index 95%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/user_profile_modelConstants.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/user_profile_modelConstants.java
index dc98ae6..03b89d8 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/user/user_profile_modelConstants.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/user/user_profile_modelConstants.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.user;
+package org.apache.custos.profile.model.user;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 public class user_profile_modelConstants {
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/workspace/Gateway.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/workspace/Gateway.java
similarity index 95%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/workspace/Gateway.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/workspace/Gateway.java
index 6e8609a..54f4c7e 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/workspace/Gateway.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/workspace/Gateway.java
@@ -21,14 +21,14 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.workspace;
+package org.apache.custos.profile.model.workspace;
 
 @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
 @javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
 public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields>, java.io.Serializable, Cloneable, Comparable<Gateway> {
   private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Gateway");
 
-  private static final org.apache.thrift.protocol.TField AIRAVATA_INTERNAL_GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("airavataInternalGatewayId", org.apache.thrift.protocol.TType.STRING, (short)1);
+  private static final org.apache.thrift.protocol.TField CUSTOS_INTERNAL_GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("custosInternalGatewayId", org.apache.thrift.protocol.TType.STRING, (short)1);
   private static final org.apache.thrift.protocol.TField GATEWAY_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayId", org.apache.thrift.protocol.TType.STRING, (short)2);
   private static final org.apache.thrift.protocol.TField GATEWAY_APPROVAL_STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayApprovalStatus", org.apache.thrift.protocol.TType.I32, (short)3);
   private static final org.apache.thrift.protocol.TField GATEWAY_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("gatewayName", org.apache.thrift.protocol.TType.STRING, (short)4);
@@ -52,7 +52,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
   private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GatewayStandardSchemeFactory();
   private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GatewayTupleSchemeFactory();
 
-  private String airavataInternalGatewayId; // optional
+  private String custosInternalGatewayId; // optional
   private String gatewayId; // required
   private GatewayApprovalStatus gatewayApprovalStatus; // required
   private String gatewayName; // optional
@@ -75,7 +75,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
 
   /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
   public enum _Fields implements org.apache.thrift.TFieldIdEnum {
-    AIRAVATA_INTERNAL_GATEWAY_ID((short)1, "airavataInternalGatewayId"),
+    CUSTOS_INTERNAL_GATEWAY_ID((short)1, "custosInternalGatewayId"),
     GATEWAY_ID((short)2, "gatewayId"),
     /**
      *
@@ -113,8 +113,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
      */
     public static _Fields findByThriftId(int fieldId) {
       switch(fieldId) {
-        case 1: // AIRAVATA_INTERNAL_GATEWAY_ID
-          return AIRAVATA_INTERNAL_GATEWAY_ID;
+        case 1: // CUSTOS_INTERNAL_GATEWAY_ID
+          return CUSTOS_INTERNAL_GATEWAY_ID;
         case 2: // GATEWAY_ID
           return GATEWAY_ID;
         case 3: // GATEWAY_APPROVAL_STATUS
@@ -195,11 +195,11 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
   // isset id assignments
   private static final int __REQUESTCREATIONTIME_ISSET_ID = 0;
   private byte __isset_bitfield = 0;
-  private static final _Fields optionals[] = {_Fields.AIRAVATA_INTERNAL_GATEWAY_ID, _Fields.GATEWAY_NAME, _Fields.DOMAIN, _Fields.EMAIL_ADDRESS, _Fields.GATEWAY_ACRONYM, _Fields.GATEWAY_URL, _Fields.GATEWAY_PUBLIC_ABSTRACT, _Fields.REVIEW_PROPOSAL_DESCRIPTION, _Fields.GATEWAY_ADMIN_FIRST_NAME, _Fields.GATEWAY_ADMIN_LAST_NAME, _Fields.GATEWAY_ADMIN_EMAIL, _Fields.IDENTITY_SERVER_USER_NAME, _Fields.IDENTITY_SERVER_PASSWORD_TOKEN, _Fields.DECLINED_REASON, _Fields.OAUTH_CLIENT_ID, _Fields.OA [...]
+  private static final _Fields optionals[] = {_Fields.CUSTOS_INTERNAL_GATEWAY_ID, _Fields.GATEWAY_NAME, _Fields.DOMAIN, _Fields.EMAIL_ADDRESS, _Fields.GATEWAY_ACRONYM, _Fields.GATEWAY_URL, _Fields.GATEWAY_PUBLIC_ABSTRACT, _Fields.REVIEW_PROPOSAL_DESCRIPTION, _Fields.GATEWAY_ADMIN_FIRST_NAME, _Fields.GATEWAY_ADMIN_LAST_NAME, _Fields.GATEWAY_ADMIN_EMAIL, _Fields.IDENTITY_SERVER_USER_NAME, _Fields.IDENTITY_SERVER_PASSWORD_TOKEN, _Fields.DECLINED_REASON, _Fields.OAUTH_CLIENT_ID, _Fields.OAUT [...]
   public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
   static {
     java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
-    tmpMap.put(_Fields.AIRAVATA_INTERNAL_GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("airavataInternalGatewayId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+    tmpMap.put(_Fields.CUSTOS_INTERNAL_GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("custosInternalGatewayId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.GATEWAY_ID, new org.apache.thrift.meta_data.FieldMetaData("gatewayId", org.apache.thrift.TFieldRequirementType.REQUIRED,
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
@@ -260,8 +260,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
    */
   public Gateway(Gateway other) {
     __isset_bitfield = other.__isset_bitfield;
-    if (other.isSetAiravataInternalGatewayId()) {
-      this.airavataInternalGatewayId = other.airavataInternalGatewayId;
+    if (other.isSetCustosInternalGatewayId()) {
+      this.custosInternalGatewayId = other.custosInternalGatewayId;
     }
     if (other.isSetGatewayId()) {
       this.gatewayId = other.gatewayId;
@@ -326,7 +326,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
 
   @Override
   public void clear() {
-    this.airavataInternalGatewayId = null;
+    this.custosInternalGatewayId = null;
     this.gatewayId = null;
     this.gatewayApprovalStatus = null;
     this.gatewayName = null;
@@ -349,26 +349,26 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
     this.requesterUsername = null;
   }
 
-  public String getAiravataInternalGatewayId() {
-    return this.airavataInternalGatewayId;
+  public String getCustosInternalGatewayId() {
+    return this.custosInternalGatewayId;
   }
 
-  public void setAiravataInternalGatewayId(String airavataInternalGatewayId) {
-    this.airavataInternalGatewayId = airavataInternalGatewayId;
+  public void setCustosInternalGatewayId(String custosInternalGatewayId) {
+    this.custosInternalGatewayId = custosInternalGatewayId;
   }
 
-  public void unsetAiravataInternalGatewayId() {
-    this.airavataInternalGatewayId = null;
+  public void unsetCustosInternalGatewayId() {
+    this.custosInternalGatewayId = null;
   }
 
-  /** Returns true if field airavataInternalGatewayId is set (has been assigned a value) and false otherwise */
-  public boolean isSetAiravataInternalGatewayId() {
-    return this.airavataInternalGatewayId != null;
+  /** Returns true if field custosInternalGatewayId is set (has been assigned a value) and false otherwise */
+  public boolean isSetCustosInternalGatewayId() {
+    return this.custosInternalGatewayId != null;
   }
 
-  public void setAiravataInternalGatewayIdIsSet(boolean value) {
+  public void setCustosInternalGatewayIdIsSet(boolean value) {
     if (!value) {
-      this.airavataInternalGatewayId = null;
+      this.custosInternalGatewayId = null;
     }
   }
 
@@ -818,11 +818,11 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
 
   public void setFieldValue(_Fields field, Object value) {
     switch (field) {
-    case AIRAVATA_INTERNAL_GATEWAY_ID:
+    case CUSTOS_INTERNAL_GATEWAY_ID:
       if (value == null) {
-        unsetAiravataInternalGatewayId();
+        unsetCustosInternalGatewayId();
       } else {
-        setAiravataInternalGatewayId((String)value);
+        setCustosInternalGatewayId((String)value);
       }
       break;
 
@@ -983,8 +983,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
 
   public Object getFieldValue(_Fields field) {
     switch (field) {
-    case AIRAVATA_INTERNAL_GATEWAY_ID:
-      return getAiravataInternalGatewayId();
+    case CUSTOS_INTERNAL_GATEWAY_ID:
+      return getCustosInternalGatewayId();
 
     case GATEWAY_ID:
       return getGatewayId();
@@ -1054,8 +1054,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
     }
 
     switch (field) {
-    case AIRAVATA_INTERNAL_GATEWAY_ID:
-      return isSetAiravataInternalGatewayId();
+    case CUSTOS_INTERNAL_GATEWAY_ID:
+      return isSetCustosInternalGatewayId();
     case GATEWAY_ID:
       return isSetGatewayId();
     case GATEWAY_APPROVAL_STATUS:
@@ -1113,12 +1113,12 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
     if (this == that)
       return true;
 
-    boolean this_present_airavataInternalGatewayId = true && this.isSetAiravataInternalGatewayId();
-    boolean that_present_airavataInternalGatewayId = true && that.isSetAiravataInternalGatewayId();
-    if (this_present_airavataInternalGatewayId || that_present_airavataInternalGatewayId) {
-      if (!(this_present_airavataInternalGatewayId && that_present_airavataInternalGatewayId))
+    boolean this_present_custosInternalGatewayId = true && this.isSetCustosInternalGatewayId();
+    boolean that_present_custosInternalGatewayId = true && that.isSetCustosInternalGatewayId();
+    if (this_present_custosInternalGatewayId || that_present_custosInternalGatewayId) {
+      if (!(this_present_custosInternalGatewayId && that_present_custosInternalGatewayId))
         return false;
-      if (!this.airavataInternalGatewayId.equals(that.airavataInternalGatewayId))
+      if (!this.custosInternalGatewayId.equals(that.custosInternalGatewayId))
         return false;
     }
 
@@ -1300,9 +1300,9 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
   public int hashCode() {
     int hashCode = 1;
 
-    hashCode = hashCode * 8191 + ((isSetAiravataInternalGatewayId()) ? 131071 : 524287);
-    if (isSetAiravataInternalGatewayId())
-      hashCode = hashCode * 8191 + airavataInternalGatewayId.hashCode();
+    hashCode = hashCode * 8191 + ((isSetCustosInternalGatewayId()) ? 131071 : 524287);
+    if (isSetCustosInternalGatewayId())
+      hashCode = hashCode * 8191 + custosInternalGatewayId.hashCode();
 
     hashCode = hashCode * 8191 + ((isSetGatewayId()) ? 131071 : 524287);
     if (isSetGatewayId())
@@ -1391,12 +1391,12 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
 
     int lastComparison = 0;
 
-    lastComparison = Boolean.valueOf(isSetAiravataInternalGatewayId()).compareTo(other.isSetAiravataInternalGatewayId());
+    lastComparison = Boolean.valueOf(isSetCustosInternalGatewayId()).compareTo(other.isSetCustosInternalGatewayId());
     if (lastComparison != 0) {
       return lastComparison;
     }
-    if (isSetAiravataInternalGatewayId()) {
-      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.airavataInternalGatewayId, other.airavataInternalGatewayId);
+    if (isSetCustosInternalGatewayId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.custosInternalGatewayId, other.custosInternalGatewayId);
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -1611,12 +1611,12 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
     StringBuilder sb = new StringBuilder("Gateway(");
     boolean first = true;
 
-    if (isSetAiravataInternalGatewayId()) {
-      sb.append("airavataInternalGatewayId:");
-      if (this.airavataInternalGatewayId == null) {
+    if (isSetCustosInternalGatewayId()) {
+      sb.append("custosInternalGatewayId:");
+      if (this.custosInternalGatewayId == null) {
         sb.append("null");
       } else {
-        sb.append(this.airavataInternalGatewayId);
+        sb.append(this.custosInternalGatewayId);
       }
       first = false;
     }
@@ -1855,10 +1855,10 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
           break;
         }
         switch (schemeField.id) {
-          case 1: // AIRAVATA_INTERNAL_GATEWAY_ID
+          case 1: // CUSTOS_INTERNAL_GATEWAY_ID
             if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
-              struct.airavataInternalGatewayId = iprot.readString();
-              struct.setAiravataInternalGatewayIdIsSet(true);
+              struct.custosInternalGatewayId = iprot.readString();
+              struct.setCustosInternalGatewayIdIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
@@ -1873,7 +1873,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
             break;
           case 3: // GATEWAY_APPROVAL_STATUS
             if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
-              struct.gatewayApprovalStatus = org.apache.airavata.model.workspace.GatewayApprovalStatus.findByValue(iprot.readI32());
+              struct.gatewayApprovalStatus = org.apache.custos.profile.model.workspace.GatewayApprovalStatus.findByValue(iprot.readI32());
               struct.setGatewayApprovalStatusIsSet(true);
             } else { 
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
@@ -2028,10 +2028,10 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
       struct.validate();
 
       oprot.writeStructBegin(STRUCT_DESC);
-      if (struct.airavataInternalGatewayId != null) {
-        if (struct.isSetAiravataInternalGatewayId()) {
-          oprot.writeFieldBegin(AIRAVATA_INTERNAL_GATEWAY_ID_FIELD_DESC);
-          oprot.writeString(struct.airavataInternalGatewayId);
+      if (struct.custosInternalGatewayId != null) {
+        if (struct.isSetCustosInternalGatewayId()) {
+          oprot.writeFieldBegin(CUSTOS_INTERNAL_GATEWAY_ID_FIELD_DESC);
+          oprot.writeString(struct.custosInternalGatewayId);
           oprot.writeFieldEnd();
         }
       }
@@ -2182,7 +2182,7 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
       oprot.writeString(struct.gatewayId);
       oprot.writeI32(struct.gatewayApprovalStatus.getValue());
       java.util.BitSet optionals = new java.util.BitSet();
-      if (struct.isSetAiravataInternalGatewayId()) {
+      if (struct.isSetCustosInternalGatewayId()) {
         optionals.set(0);
       }
       if (struct.isSetGatewayName()) {
@@ -2237,8 +2237,8 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
         optionals.set(17);
       }
       oprot.writeBitSet(optionals, 18);
-      if (struct.isSetAiravataInternalGatewayId()) {
-        oprot.writeString(struct.airavataInternalGatewayId);
+      if (struct.isSetCustosInternalGatewayId()) {
+        oprot.writeString(struct.custosInternalGatewayId);
       }
       if (struct.isSetGatewayName()) {
         oprot.writeString(struct.gatewayName);
@@ -2298,12 +2298,12 @@ public class Gateway implements org.apache.thrift.TBase<Gateway, Gateway._Fields
       org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
       struct.gatewayId = iprot.readString();
       struct.setGatewayIdIsSet(true);
-      struct.gatewayApprovalStatus = org.apache.airavata.model.workspace.GatewayApprovalStatus.findByValue(iprot.readI32());
+      struct.gatewayApprovalStatus = org.apache.custos.profile.model.workspace.GatewayApprovalStatus.findByValue(iprot.readI32());
       struct.setGatewayApprovalStatusIsSet(true);
       java.util.BitSet incoming = iprot.readBitSet(18);
       if (incoming.get(0)) {
-        struct.airavataInternalGatewayId = iprot.readString();
-        struct.setAiravataInternalGatewayIdIsSet(true);
+        struct.custosInternalGatewayId = iprot.readString();
+        struct.setCustosInternalGatewayIdIsSet(true);
       }
       if (incoming.get(1)) {
         struct.gatewayName = iprot.readString();
diff --git a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/workspace/GatewayApprovalStatus.java b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/workspace/GatewayApprovalStatus.java
similarity index 97%
rename from custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/workspace/GatewayApprovalStatus.java
rename to custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/workspace/GatewayApprovalStatus.java
index c0e01c3..655d921 100644
--- a/custos-services/profile-service/profile-service-models/src/main/java/org/apache/custos/profile/models/workspace/GatewayApprovalStatus.java
+++ b/custos-profile-service/profile-service-model/src/main/java/org/apache/custos/profile/model/workspace/GatewayApprovalStatus.java
@@ -21,7 +21,7 @@
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.profile.models.workspace;
+package org.apache.custos.profile.model.workspace;
 
 
 import org.apache.thrift.TEnum;
diff --git a/custos-services/profile-service/profile-service-server/pom.xml b/custos-profile-service/profile-service-server/pom.xml
similarity index 87%
rename from custos-services/profile-service/profile-service-server/pom.xml
rename to custos-profile-service/profile-service-server/pom.xml
index 885b851..0de9d74 100644
--- a/custos-services/profile-service/profile-service-server/pom.xml
+++ b/custos-profile-service/profile-service-server/pom.xml
@@ -20,15 +20,13 @@
     <artifactId>profile-service-server</artifactId>
     <name>Custos Profile Service Server</name>
     <description>Module to expose a profile service as a thrift service</description>
-
+    <properties>
+        <maven.compiler.source>1.8</maven.compiler.source>
+        <maven.compiler.target>1.8</maven.compiler.target>
+    </properties>
     <dependencies>
         <dependency>
             <groupId>org.apache.custos</groupId>
-            <artifactId>profile-service-stubs</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.custos</groupId>
             <artifactId>profile-user-core</artifactId>
             <version>${project.version}</version>
         </dependency>
@@ -44,9 +42,8 @@
         </dependency>
         <dependency>
             <groupId>org.apache.custos</groupId>
-            <artifactId>custos-security-service</artifactId>
+            <artifactId>custos-connectors</artifactId>
             <version>${project.version}</version>
-            <scope>compile</scope>
         </dependency>
     </dependencies>
     
diff --git a/custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/handlers/IamAdminServicesHandler.java b/custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/handlers/IamAdminServicesHandler.java
similarity index 92%
rename from custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/handlers/IamAdminServicesHandler.java
rename to custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/handlers/IamAdminServicesHandler.java
index a95fda2..0e10bd0 100644
--- a/custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/handlers/IamAdminServicesHandler.java
+++ b/custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/handlers/IamAdminServicesHandler.java
@@ -19,20 +19,21 @@
  *
  */
 
-package org.apache.custos.service.profile.handlers;
+package org.apache.custos.profile.handlers;
 
 import org.apache.custos.commons.exceptions.ApplicationSettingsException;
 import org.apache.custos.commons.model.error.AuthorizationException;
+import org.apache.custos.commons.model.security.AuthzToken;
 import org.apache.custos.commons.utils.Constants;
 import org.apache.custos.commons.utils.ServerSettings;
-import org.apache.custos.profile.models.tenant.PasswordCredential;
-import org.apache.custos.profile.models.user.UserProfile;
-import org.apache.custos.profile.models.workspace.Gateway;
-import org.apache.custos.security.model.AuthzToken;
-import org.apache.custos.service.profile.iam.admin.services.cpi.IamAdminServices;
-import org.apache.custos.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
-import org.apache.custos.service.profile.iam.admin.services.cpi.iam_admin_services_cpiConstants;
-import org.apache.custos.service.profile.iam.admin.services.core.impl.TenantManagementKeycloakImpl;
+import org.apache.custos.profile.iam.admin.services.cpi.IamAdminServices;
+import org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
+import org.apache.custos.profile.model.tenant.PasswordCredential;
+import org.apache.custos.profile.model.user.UserProfile;
+import org.apache.custos.profile.model.workspace.Gateway;
+import org.apache.custos.security.interceptor.SecurityCheck;
+import org.apache.custos.profile.iam.admin.services.cpi.iam_admin_services_cpiConstants;
+import org.apache.custos.profile.iam.admin.services.core.impl.TenantManagementKeycloakImpl;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -50,7 +51,8 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
+    //TODO: check if tenantAdminPasswordCredential is required
     public Gateway setUpGateway(AuthzToken authzToken, Gateway gateway, PasswordCredential tenantAdminPasswordCredential) throws IamAdminServicesException, AuthorizationException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         PasswordCredential isSuperAdminCredentials = getSuperAdminPasswordCredential();
@@ -75,7 +77,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public boolean isUsernameAvailable(AuthzToken authzToken, String username) throws IamAdminServicesException, AuthorizationException, TException {
         TenantManagementKeycloakImpl keycloakClient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -84,7 +86,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
 
     //ToDo: Will only be secure when using SSL between PGA and Airavata
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public boolean registerUser(AuthzToken authzToken, String username, String emailAddress, String firstName, String lastName, String newPassword) throws IamAdminServicesException, AuthorizationException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -101,7 +103,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public boolean enableUser(AuthzToken authzToken, String username) throws IamAdminServicesException, AuthorizationException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -118,7 +120,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public boolean isUserEnabled(AuthzToken authzToken, String username) throws IamAdminServicesException, AuthorizationException, TException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -132,7 +134,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public boolean isUserExist(AuthzToken authzToken, String username) throws IamAdminServicesException, AuthorizationException, TException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -146,7 +148,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public UserProfile getUser(AuthzToken authzToken, String username) throws IamAdminServicesException, AuthorizationException, TException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -161,7 +163,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
 
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public List<UserProfile> getUsers(AuthzToken authzToken, int offset, int limit, String search)
             throws IamAdminServicesException, AuthorizationException, TException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
@@ -176,7 +178,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public boolean resetUserPassword(AuthzToken authzToken, String username, String newPassword) throws IamAdminServicesException, AuthorizationException, TException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -193,7 +195,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public List<UserProfile> findUsers(AuthzToken authzToken, String email, String userId) throws IamAdminServicesException, AuthorizationException, TException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -207,7 +209,7 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public void updateUserProfile(AuthzToken authzToken, UserProfile userDetails) throws IamAdminServicesException, AuthorizationException, TException {
 
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
@@ -218,8 +220,9 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     @Deprecated
+    //TODO: check if isRealmAdminCredentials required or not
     public boolean addRoleToUser(AuthzToken authzToken, String username, String roleName, PasswordCredential isRealmAdminCredentials) throws IamAdminServicesException, AuthorizationException, TException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -234,8 +237,9 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     @Deprecated
+    //TODO:// check if isRealmAdminCredentials required or not
     public boolean removeRoleFromUser(AuthzToken authzToken, String username, String roleName, PasswordCredential isRealmAdminCredentials) throws IamAdminServicesException, AuthorizationException, TException {
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
@@ -250,8 +254,9 @@ public class IamAdminServicesHandler implements IamAdminServices.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     @Deprecated
+    //TODO: check if PasswordCredential required
     public List<UserProfile> getUsersWithRole(AuthzToken authzToken, String roleName, PasswordCredential isRealmAdminCredentials) throws IamAdminServicesException, AuthorizationException, TException {
 
         TenantManagementKeycloakImpl keycloakclient = new TenantManagementKeycloakImpl();
diff --git a/custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/handlers/TenantProfileServiceHandler.java b/custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/handlers/TenantProfileServiceHandler.java
similarity index 83%
rename from custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/handlers/TenantProfileServiceHandler.java
rename to custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/handlers/TenantProfileServiceHandler.java
index 35a6906..587095d 100644
--- a/custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/handlers/TenantProfileServiceHandler.java
+++ b/custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/handlers/TenantProfileServiceHandler.java
@@ -18,17 +18,18 @@
  * under the License.
  *
 */
-package org.apache.custos.service.profile.handlers;
+package org.apache.custos.profile.handlers;
 
 import org.apache.custos.commons.model.error.AuthorizationException;
-import org.apache.custos.profile.models.workspace.Gateway;
-import org.apache.custos.profile.models.workspace.GatewayApprovalStatus;
-import org.apache.custos.security.model.AuthzToken;
-import org.apache.custos.service.profile.commons.tenant.entities.GatewayEntity;
-import org.apache.custos.service.profile.tenant.core.repositories.TenantProfileRepository;
-import org.apache.custos.service.profile.tenant.cpi.TenantProfileService;
-import org.apache.custos.service.profile.tenant.cpi.exception.TenantProfileServiceException;
-import org.apache.custos.service.profile.tenant.cpi.profile_tenant_cpiConstants;
+import org.apache.custos.commons.model.security.AuthzToken;
+import org.apache.custos.profile.model.workspace.Gateway;
+import org.apache.custos.profile.model.workspace.GatewayApprovalStatus;
+import org.apache.custos.profile.tenant.cpi.TenantProfileService;
+import org.apache.custos.profile.tenant.cpi.exception.TenantProfileServiceException;
+import org.apache.custos.profile.tenant.cpi.profile_tenant_cpiConstants;
+import org.apache.custos.security.interceptor.SecurityCheck;
+import org.apache.custos.profile.commons.tenant.entities.GatewayEntity;
+import org.apache.custos.profile.tenant.core.repositories.TenantProfileRepository;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -61,7 +62,7 @@ public class TenantProfileServiceHandler implements TenantProfileService.Iface {
     public Gateway addGateway(AuthzToken authzToken, Gateway gateway) throws TenantProfileServiceException, AuthorizationException, TException {
         try {
             // Assign UUID to gateway
-            gateway.setAiravataInternalGatewayId(UUID.randomUUID().toString());
+            gateway.setCustosInternalGatewayId(UUID.randomUUID().toString());
             if (!checkDuplicateGateway(gateway)) {
                 // If admin password, copy it in the credential store under the requested gateway's gatewayId
 //                if (gateway.getIdentityServerPasswordToken() != null) {
@@ -69,13 +70,16 @@ public class TenantProfileServiceHandler implements TenantProfileService.Iface {
 //                }
                 gateway = tenantProfileRepository.create(gateway);
                 if (gateway != null) {
-                    logger.info("Added Airavata Gateway with Id: " + gateway.getGatewayId());
+                    logger.info("Added Custos Gateway with Id: " + gateway.getGatewayId());
                     // replicate tenant at end-places only if status is APPROVED
                     if (gateway.getGatewayApprovalStatus().equals(GatewayApprovalStatus.APPROVED)) {
                         logger.info("Gateway with ID: {}, is now APPROVED, replicating to subscribers.", gateway.getGatewayId());
                         return gateway;
                         //dbEventPublisherUtils.publish(EntityType.TENANT, CrudType.CREATE, gateway);
                     }
+                    else {
+                        throw new Exception("Gateway status is not approved");
+                    }
 //                    // return internal id
 //                    return gateway.getAiravataInternalGatewayId();
                 } else {
@@ -112,12 +116,13 @@ public class TenantProfileServiceHandler implements TenantProfileService.Iface {
 //                dbEventPublisherUtils.publish(EntityType.TENANT, CrudType.UPDATE, updatedGateway);
                 return updatedGateway;
             } else {
-                new TException("Could not update the gateway");
+                throw new TException("Could not update the gateway");
             }
         } catch (Exception ex) {
             logger.error("Error updating gateway-profile, reason: " + ex.getMessage(), ex);
             TenantProfileServiceException exception = new TenantProfileServiceException();
             exception.setMessage("Error updating gateway-profile, reason: " + ex.getMessage());
+            throw exception;
         }
     }
 
@@ -138,12 +143,30 @@ public class TenantProfileServiceHandler implements TenantProfileService.Iface {
         }
     }
 
+    //TODO: check why this was not included, add authToken
+    @Override
+    @SecurityCheck
+    public Gateway getGatewayUsingGatewayId(String gatewayId) throws TenantProfileServiceException, AuthorizationException, TException {
+        try {
+            Gateway gateway = tenantProfileRepository.getGatewayUsingId(gatewayId);
+            if (gateway == null) {
+                throw new Exception("Could not find Gateway with ID: " + gatewayId);
+            }
+            return gateway;
+        } catch (Exception ex) {
+            logger.error("Error getting gateway-profile, reason: " + ex.getMessage(), ex);
+            TenantProfileServiceException exception = new TenantProfileServiceException();
+            exception.setMessage("Error getting gateway-profile, reason: " + ex.getMessage());
+            throw exception;
+        }
+    }
+
     @Override
     @SecurityCheck
-    public Gateway deleteGateway(AuthzToken authzToken, String airavataInternalGatewayId, String gatewayId) throws TenantProfileServiceException, AuthorizationException, TException {
+    public Gateway deleteGateway(AuthzToken authzToken, String custosInternalGatewayId, String gatewayId) throws TenantProfileServiceException, AuthorizationException, TException {
         try {
-            logger.debug("Deleting Airavata gateway-profile with ID: " + gatewayId + "Internal ID: " + airavataInternalGatewayId);
-            boolean deleteSuccess = tenantProfileRepository.delete(airavataInternalGatewayId);
+            logger.debug("Deleting Custos gateway-profile with ID: " + gatewayId + "Internal ID: " + custosInternalGatewayId);
+            boolean deleteSuccess = tenantProfileRepository.delete(custosInternalGatewayId);
             if (deleteSuccess) {
                 // delete tenant at end-places
 //                dbEventPublisherUtils.publish(EntityType.TENANT, CrudType.DELETE,
@@ -152,6 +175,9 @@ public class TenantProfileServiceHandler implements TenantProfileService.Iface {
 //                        new Gateway(gatewayId, GatewayApprovalStatus.DEACTIVATED));
                 return new Gateway(gatewayId, GatewayApprovalStatus.DEACTIVATED);
             }
+            else {
+                throw new Exception("Deleting gateway failed");
+            }
         } catch (Exception ex) {
             logger.error("Error deleting gateway-profile, reason: " + ex.getMessage(), ex);
             TenantProfileServiceException exception = new TenantProfileServiceException();
diff --git a/custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/handlers/UserProfileServiceHandler.java b/custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/handlers/UserProfileServiceHandler.java
similarity index 87%
rename from custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/handlers/UserProfileServiceHandler.java
rename to custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/handlers/UserProfileServiceHandler.java
index 74ccf62..1068863 100644
--- a/custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/handlers/UserProfileServiceHandler.java
+++ b/custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/handlers/UserProfileServiceHandler.java
@@ -18,28 +18,29 @@
  * under the License.
  *
 */
-package org.apache.custos.service.profile.handlers;
+package org.apache.custos.profile.handlers;
 
 
+import org.apache.custos.client.profile.service.ProfileServiceClientFactory;
 import org.apache.custos.commons.exceptions.ApplicationSettingsException;
 import org.apache.custos.commons.exceptions.CustosSecurityException;
 import org.apache.custos.commons.model.error.AuthorizationException;
+import org.apache.custos.commons.model.security.AuthzToken;
 import org.apache.custos.commons.utils.Constants;
 import org.apache.custos.commons.utils.CustosUtils;
 import org.apache.custos.commons.utils.ServerSettings;
-import org.apache.custos.profile.models.user.Status;
-import org.apache.custos.profile.models.user.UserProfile;
-import org.apache.custos.profile.models.user.user_profile_modelConstants;
+import org.apache.custos.profile.iam.admin.services.cpi.IamAdminServices;
+import org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
+import org.apache.custos.profile.model.user.Status;
+import org.apache.custos.profile.model.user.UserProfile;
+import org.apache.custos.profile.model.user.user_profile_modelConstants;
+import org.apache.custos.profile.user.core.repositories.UserProfileRepository;
+import org.apache.custos.profile.user.cpi.UserProfileService;
+import org.apache.custos.profile.user.cpi.exception.UserProfileServiceException;
+import org.apache.custos.security.interceptor.SecurityCheck;
 import org.apache.custos.security.manager.CustosSecurityManager;
 import org.apache.custos.security.manager.SecurityManagerFactory;
 import org.apache.custos.security.manager.UserInfo;
-import org.apache.custos.security.model.AuthzToken;
-import org.apache.custos.service.profile.client.ProfileServiceClientFactory;
-import org.apache.custos.service.profile.iam.admin.services.cpi.IamAdminServices;
-import org.apache.custos.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
-import org.apache.custos.service.profile.user.core.repositories.UserProfileRepository;
-import org.apache.custos.service.profile.user.cpi.UserProfileService;
-import org.apache.custos.service.profile.user.cpi.exception.UserProfileServiceException;
 import org.apache.thrift.TException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -60,17 +61,17 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
     }
 
     @Override
-    public String getAPIVersion() throws UserProfileServiceException, TException {
+    public String getAPIVersion() {
         return user_profile_modelConstants.USER_PROFILE_VERSION;
     }
 
     @Override
-    //@SecurityCheck
-    public UserProfile initializeUserProfile(AuthzToken authzToken, String identityServerRealm) throws UserProfileServiceException, AuthorizationException, TException {
+    @SecurityCheck
+    public UserProfile initializeUserProfile(AuthzToken authzToken) throws UserProfileServiceException, AuthorizationException {
         String gatewayId = authzToken.getClaimsMap().get(Constants.GATEWAY_ID);
         try {
             // Load UserInfo for the access token and create an initial UserProfile from it
-            UserInfo userInfo = SecurityManagerFactory.getSecurityManager().getUserInfoFromAuthzToken(authzToken, identityServerRealm);
+            UserInfo userInfo = SecurityManagerFactory.getSecurityManager().getUserInfoFromAuthzToken(authzToken);
             final UserProfile existingProfile = userProfileRepository.getUserProfileByIdAndGateWay(userInfo.getUsername(), gatewayId);
             // If a user profile already exists, just return the userId
             if (existingProfile != null) {
@@ -79,7 +80,7 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
             UserProfile userProfile = new UserProfile();
             userProfile.setUserId(userInfo.getUsername().toLowerCase());
             userProfile.setGatewayId(gatewayId);
-            userProfile.setAiravataInternalUserId(userProfile.getUserId() + "@" + gatewayId);
+            userProfile.setCustosInternalUserId(userProfile.getUserId() + "@" + gatewayId);
             userProfile.addToEmails(userInfo.getEmailAddress());
             userProfile.setFirstName(userInfo.getFirstName());
             userProfile.setLastName(userInfo.getLastName());
@@ -103,12 +104,12 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
     }
 
     @Override
-    //@SecurityCheck
-    public UserProfile addUserProfile(AuthzToken authzToken, UserProfile userProfile) throws UserProfileServiceException, AuthorizationException, TException {
+    @SecurityCheck
+    public UserProfile addUserProfile(AuthzToken authzToken, UserProfile userProfile) throws UserProfileServiceException, AuthorizationException {
         try{
             // Lowercase user id and internal id
             userProfile.setUserId(userProfile.getUserId().toLowerCase());
-            userProfile.setAiravataInternalUserId(userProfile.getUserId() + "@" + userProfile.getGatewayId());
+            userProfile.setCustosInternalUserId(userProfile.getUserId() + "@" + userProfile.getGatewayId());
             userProfile = userProfileRepository.updateUserProfile(userProfile, getIAMUserProfileUpdater(authzToken, userProfile));
             if (null != userProfile) {
                 logger.info("Added UserProfile with userId: " + userProfile.getUserId());
@@ -125,8 +126,8 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
     }
 
     @Override
-    //@SecurityCheck
-    public UserProfile updateUserProfile(AuthzToken authzToken, UserProfile userProfile) throws UserProfileServiceException, AuthorizationException, TException {
+    @SecurityCheck
+    public UserProfile updateUserProfile(AuthzToken authzToken, UserProfile userProfile) throws UserProfileServiceException, AuthorizationException {
         try {
             // After updating the user profile in the database but before committing the transaction, the
             // following will update the user profile in the IAM service also. If the update in the IAM service
@@ -142,6 +143,7 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
             exception.setMessage("Error while Updating user profile. More info : " + e.getMessage());
             throw exception;
         }
+        throw new UserProfileServiceException("User update failed. Please try again.");
     }
 
     private Runnable getIAMUserProfileUpdater(AuthzToken authzToken, UserProfile userProfile) throws UserProfileServiceException {
@@ -176,7 +178,7 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
     }
 
     @Override
-    //@SecurityCheck
+    @SecurityCheck
     public UserProfile deleteUserProfile(AuthzToken authzToken, String userId, String gatewayId) throws UserProfileServiceException, AuthorizationException, TException {
         UserProfile userProfile = null;
         try{
@@ -196,8 +198,8 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
     }
 
     @Override
-    //@SecurityCheck
-    public List<UserProfile> getAllUserProfilesInGateway(AuthzToken authzToken, String gatewayId, int offset, int limit) throws UserProfileServiceException, AuthorizationException, TException {
+    @SecurityCheck
+    public List<UserProfile> getAllUserProfilesInGateway(AuthzToken authzToken, String gatewayId, int offset, int limit) throws UserProfileServiceException, AuthorizationException {
         try{
             List<UserProfile> usersInGateway = userProfileRepository.getAllUserProfilesInGateway(gatewayId, offset, limit);
             if(usersInGateway != null)
@@ -213,7 +215,7 @@ public class UserProfileServiceHandler implements UserProfileService.Iface {
     }
 
     @Override
-    public boolean doesUserExist(AuthzToken authzToken, String userId, String gatewayId) throws UserProfileServiceException, AuthorizationException, TException {
+    public boolean doesUserExist(AuthzToken authzToken, String userId, String gatewayId) throws UserProfileServiceException, AuthorizationException {
         try{
             UserProfile userProfile = userProfileRepository.getUserProfileByIdAndGateWay(userId, gatewayId);
             return null != userProfile;
diff --git a/custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/server/ProfileServiceServer.java b/custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/server/ProfileServiceServer.java
similarity index 79%
rename from custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/server/ProfileServiceServer.java
rename to custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/server/ProfileServiceServer.java
index a70a527..cb1923e 100644
--- a/custos-services/profile-service/profile-service-server/src/main/java/org/apache/custos/service/profile/server/ProfileServiceServer.java
+++ b/custos-profile-service/profile-service-server/src/main/java/org/apache/custos/profile/server/ProfileServiceServer.java
@@ -19,25 +19,22 @@
  *
 */
 
-package org.apache.custos.service.profile.server;
-
-import org.apache.airavata.common.utils.DBInitConfig;
-import org.apache.airavata.common.utils.DBInitializer;
-import org.apache.airavata.common.utils.IServer;
-import org.apache.airavata.common.utils.ServerSettings;
-import org.apache.custos.service.profile.groupmanager.cpi.GroupManagerService;
-import org.apache.custos.service.profile.groupmanager.cpi.group_manager_cpiConstants;
-import org.apache.custos.service.profile.handlers.IamAdminServicesHandler;
-import org.apache.custos.service.profile.iam.admin.services.cpi.IamAdminServices;
-import org.apache.custos.service.profile.iam.admin.services.cpi.iam_admin_services_cpiConstants;
-import org.apache.custos.service.profile.tenant.cpi.TenantProfileService;
-import org.apache.custos.service.profile.tenant.cpi.profile_tenant_cpiConstants;
-import org.apache.custos.service.profile.user.core.utils.UserProfileCatalogDBInitConfig;
-import org.apache.custos.service.profile.user.cpi.UserProfileService;
-import org.apache.custos.service.profile.user.cpi.profile_user_cpiConstants;
-import org.apache.custos.service.profile.handlers.GroupManagerServiceHandler;
-import org.apache.custos.service.profile.handlers.TenantProfileServiceHandler;
-import org.apache.custos.service.profile.handlers.UserProfileServiceHandler;
+package org.apache.custos.profile.server;
+
+import org.apache.custos.commons.utils.DBInitConfig;
+import org.apache.custos.commons.utils.DBInitializer;
+import org.apache.custos.commons.utils.IServer;
+import org.apache.custos.commons.utils.ServerSettings;
+import org.apache.custos.profile.handlers.IamAdminServicesHandler;
+import org.apache.custos.profile.iam.admin.services.cpi.IamAdminServices;
+import org.apache.custos.profile.tenant.cpi.TenantProfileService;
+import org.apache.custos.profile.tenant.cpi.profile_tenant_cpiConstants;
+import org.apache.custos.profile.user.core.utils.UserProfileCatalogDBInitConfig;
+import org.apache.custos.profile.user.cpi.UserProfileService;
+import org.apache.custos.profile.user.cpi.profile_user_cpiConstants;
+import org.apache.custos.profile.iam.admin.services.cpi.iam_admin_services_cpiConstants;
+import org.apache.custos.profile.handlers.TenantProfileServiceHandler;
+import org.apache.custos.profile.handlers.UserProfileServiceHandler;
 import org.apache.thrift.TMultiplexedProcessor;
 import org.apache.thrift.server.TServer;
 import org.apache.thrift.server.TThreadPoolServer;
@@ -106,14 +103,14 @@ public class ProfileServiceServer implements IServer {
             UserProfileService.Processor userProfileProcessor = new UserProfileService.Processor(new UserProfileServiceHandler());
             TenantProfileService.Processor teneantProfileProcessor = new TenantProfileService.Processor(new TenantProfileServiceHandler());
             IamAdminServices.Processor iamAdminServicesProcessor = new IamAdminServices.Processor(new IamAdminServicesHandler());
-            GroupManagerService.Processor groupmanagerProcessor = new GroupManagerService.Processor(new GroupManagerServiceHandler());
+            //GroupManagerService.Processor groupmanagerProcessor = new GroupManagerService.Processor(new GroupManagerServiceHandler());
 
             // create a multiplexed processor
             TMultiplexedProcessor profileServiceProcessor = new TMultiplexedProcessor();
             profileServiceProcessor.registerProcessor(profile_user_cpiConstants.USER_PROFILE_CPI_NAME, userProfileProcessor);
             profileServiceProcessor.registerProcessor(profile_tenant_cpiConstants.TENANT_PROFILE_CPI_NAME, teneantProfileProcessor);
             profileServiceProcessor.registerProcessor(iam_admin_services_cpiConstants.IAM_ADMIN_SERVICES_CPI_NAME, iamAdminServicesProcessor);
-            profileServiceProcessor.registerProcessor(group_manager_cpiConstants.GROUP_MANAGER_CPI_NAME, groupmanagerProcessor);
+            //profileServiceProcessor.registerProcessor(group_manager_cpiConstants.GROUP_MANAGER_CPI_NAME, groupmanagerProcessor);
 
             TServerTransport serverTransport;
 
diff --git a/custos-commons/pom.xml b/custos-profile-service/profile-service-stubs/pom.xml
similarity index 53%
copy from custos-commons/pom.xml
copy to custos-profile-service/profile-service-stubs/pom.xml
index a1a9e93..47aeafc 100644
--- a/custos-commons/pom.xml
+++ b/custos-profile-service/profile-service-stubs/pom.xml
@@ -2,28 +2,33 @@
 <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>
-        <artifactId>custos</artifactId>
+        <artifactId>profile-service</artifactId>
         <groupId>org.apache.custos</groupId>
         <version>1.0-SNAPSHOT</version>
-        <relativePath>../pom.xml</relativePath>
     </parent>
-    
-    <groupId>org.apache.custos</groupId>
-    <artifactId>custos-commons</artifactId>
-    <version>${parent.version}</version>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>profile-service-stubs</artifactId>
     <dependencies>
         <dependency>
             <groupId>org.apache.thrift</groupId>
             <artifactId>libthrift</artifactId>
-            <version>${thrift.version}</version>
+            <version>0.12.0</version>
         </dependency>
         <dependency>
-            <groupId>org.apache.openjpa</groupId>
-            <artifactId>openjpa</artifactId>
-            <version>${openjpa.version}</version>
+            <groupId>org.apache.custos</groupId>
+            <artifactId>profile-service-models</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.custos</groupId>
+            <artifactId>custos-commons</artifactId>
+            <version>1.0-SNAPSHOT</version>
+            <scope>compile</scope>
         </dependency>
     </dependencies>
 
+
 </project>
\ No newline at end of file
diff --git a/custos-services/profile-service/profile-service-stubs/src/main/java/org/apache/custos/service/profile/iam/admin/services/cpi/IamAdminServices.java b/custos-profile-service/profile-service-stubs/src/main/java/org/apache/custos/profile/iam.admin.services.cpi/IamAdminServices.java
similarity index 76%
rename from custos-services/profile-service/profile-service-stubs/src/main/java/org/apache/custos/service/profile/iam/admin/services/cpi/IamAdminServices.java
rename to custos-profile-service/profile-service-stubs/src/main/java/org/apache/custos/profile/iam.admin.services.cpi/IamAdminServices.java
index 05c7ce5..c0327a7 100644
--- a/custos-services/profile-service/profile-service-stubs/src/main/java/org/apache/custos/service/profile/iam/admin/services/cpi/IamAdminServices.java
+++ b/custos-profile-service/profile-service-stubs/src/main/java/org/apache/custos/profile/iam.admin.services.cpi/IamAdminServices.java
@@ -1,98 +1,80 @@
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
 /**
- * Autogenerated by Thrift Compiler (0.10.0)
+ * Autogenerated by Thrift Compiler (0.12.0)
  *
  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
  *  @generated
  */
-package org.apache.custos.service.profile.iam.admin.services.cpi;
-
-    import org.apache.custos.service.profile.iam.admin.services.cpi.exception.IamAdminServicesException;
+package org.apache.custos.profile.iam.admin.services.cpi;
 
-    @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.10.0)")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-06-24")
 public class IamAdminServices {
 
   public interface Iface {
 
-    public java.lang.String getAPIVersion() throws IamAdminServicesException, org.apache.thrift.TException;
+    public String getAPIVersion() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.thrift.TException;
 
-    public org.apache.airavata.model.workspace.Gateway setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public org.apache.custos.profile.model.workspace.Gateway setUpGateway(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.workspace.Gateway gateway, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public boolean isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean isUsernameAvailable(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public boolean registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean registerUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String emailAddress, String firstName, String lastName, String newPassword) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public boolean enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean enableUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public boolean isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean isUserEnabled(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public boolean isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean isUserExist(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public org.apache.airavata.model.user.UserProfile getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public org.apache.custos.profile.model.user.UserProfile getUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public java.util.List<org.apache.airavata.model.user.UserProfile> getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public java.util.List<org.apache.custos.profile.model.user.UserProfile> getUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, int offset, int limit, String search) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public boolean resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean resetUserPassword(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String newPassword) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public java.util.List<org.apache.airavata.model.user.UserProfile> findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public java.util.List<org.apache.custos.profile.model.user.UserProfile> findUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, String email, String userId) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public void updateUserProfile(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.user.UserProfile userDetails) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public boolean addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean addRoleToUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public boolean removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public boolean removeRoleFromUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
-    public java.util.List<org.apache.airavata.model.user.UserProfile> getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException;
+    public java.util.List<org.apache.custos.profile.model.user.UserProfile> getUsersWithRole(org.apache.custos.commons.model.security.AuthzToken authzToken, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException;
 
   }
 
   public interface AsyncIface {
 
-    public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException;
+    public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws org.apache.thrift.TException;
 
-    public void setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException;
+    public void setUpGateway(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.workspace.Gateway gateway, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException;
 
-    public void isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+    public void isUsernameAvailable(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException;
 
-    public void registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+    public void registerUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String emailAddress, String firstName, String lastName, String newPassword, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException;
 
-    public void enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+    public void enableUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException;
 
-    public void isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+    public void isUserEnabled(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException;
 
-    public void isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+    public void isUserExist(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException;
 
-    public void getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException;
+    public void getUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException;
 
-    public void getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
+    public void getUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, int offset, int limit, String search, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
 
-    public void resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+    public void resetUserPassword(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String newPassword, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException;
 
-    public void findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
+    public void findUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, String email, String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
 
-    public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
+    public void updateUserProfile(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.user.UserProfile userDetails, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException;
 
-    public void addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+    public void addRoleToUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException;
 
-    public void removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException;
+    public void removeRoleFromUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException;
 
-    public void getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
+    public void getUsersWithRole(org.apache.custos.commons.model.security.AuthzToken authzToken, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException;
 
   }
 
@@ -116,7 +98,7 @@ public class IamAdminServices {
       super(iprot, oprot);
     }
 
-    public java.lang.String getAPIVersion() throws IamAdminServicesException, org.apache.thrift.TException
+    public String getAPIVersion() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.thrift.TException
     {
       send_getAPIVersion();
       return recv_getAPIVersion();
@@ -128,7 +110,7 @@ public class IamAdminServices {
       sendBase("getAPIVersion", args);
     }
 
-    public java.lang.String recv_getAPIVersion() throws IamAdminServicesException, org.apache.thrift.TException
+    public String recv_getAPIVersion() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.thrift.TException
     {
       getAPIVersion_result result = new getAPIVersion_result();
       receiveBase(result, "getAPIVersion");
@@ -141,21 +123,22 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getAPIVersion failed: unknown result");
     }
 
-    public org.apache.airavata.model.workspace.Gateway setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public org.apache.custos.profile.model.workspace.Gateway setUpGateway(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.workspace.Gateway gateway, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      send_setUpGateway(authzToken, gateway);
+      send_setUpGateway(authzToken, gateway, tenantAdminPasswordCredential);
       return recv_setUpGateway();
     }
 
-    public void send_setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway) throws org.apache.thrift.TException
+    public void send_setUpGateway(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.workspace.Gateway gateway, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.thrift.TException
     {
       setUpGateway_args args = new setUpGateway_args();
       args.setAuthzToken(authzToken);
       args.setGateway(gateway);
+      args.setTenantAdminPasswordCredential(tenantAdminPasswordCredential);
       sendBase("setUpGateway", args);
     }
 
-    public org.apache.airavata.model.workspace.Gateway recv_setUpGateway() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public org.apache.custos.profile.model.workspace.Gateway recv_setUpGateway() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       setUpGateway_result result = new setUpGateway_result();
       receiveBase(result, "setUpGateway");
@@ -171,13 +154,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "setUpGateway failed: unknown result");
     }
 
-    public boolean isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean isUsernameAvailable(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_isUsernameAvailable(authzToken, username);
       return recv_isUsernameAvailable();
     }
 
-    public void send_isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
+    public void send_isUsernameAvailable(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.thrift.TException
     {
       isUsernameAvailable_args args = new isUsernameAvailable_args();
       args.setAuthzToken(authzToken);
@@ -185,7 +168,7 @@ public class IamAdminServices {
       sendBase("isUsernameAvailable", args);
     }
 
-    public boolean recv_isUsernameAvailable() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean recv_isUsernameAvailable() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       isUsernameAvailable_result result = new isUsernameAvailable_result();
       receiveBase(result, "isUsernameAvailable");
@@ -201,13 +184,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isUsernameAvailable failed: unknown result");
     }
 
-    public boolean registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean registerUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String emailAddress, String firstName, String lastName, String newPassword) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_registerUser(authzToken, username, emailAddress, firstName, lastName, newPassword);
       return recv_registerUser();
     }
 
-    public void send_registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword) throws org.apache.thrift.TException
+    public void send_registerUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String emailAddress, String firstName, String lastName, String newPassword) throws org.apache.thrift.TException
     {
       registerUser_args args = new registerUser_args();
       args.setAuthzToken(authzToken);
@@ -219,7 +202,7 @@ public class IamAdminServices {
       sendBase("registerUser", args);
     }
 
-    public boolean recv_registerUser() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean recv_registerUser() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       registerUser_result result = new registerUser_result();
       receiveBase(result, "registerUser");
@@ -235,13 +218,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "registerUser failed: unknown result");
     }
 
-    public boolean enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean enableUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_enableUser(authzToken, username);
       return recv_enableUser();
     }
 
-    public void send_enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
+    public void send_enableUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.thrift.TException
     {
       enableUser_args args = new enableUser_args();
       args.setAuthzToken(authzToken);
@@ -249,7 +232,7 @@ public class IamAdminServices {
       sendBase("enableUser", args);
     }
 
-    public boolean recv_enableUser() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean recv_enableUser() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       enableUser_result result = new enableUser_result();
       receiveBase(result, "enableUser");
@@ -265,13 +248,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "enableUser failed: unknown result");
     }
 
-    public boolean isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean isUserEnabled(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_isUserEnabled(authzToken, username);
       return recv_isUserEnabled();
     }
 
-    public void send_isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
+    public void send_isUserEnabled(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.thrift.TException
     {
       isUserEnabled_args args = new isUserEnabled_args();
       args.setAuthzToken(authzToken);
@@ -279,7 +262,7 @@ public class IamAdminServices {
       sendBase("isUserEnabled", args);
     }
 
-    public boolean recv_isUserEnabled() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean recv_isUserEnabled() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       isUserEnabled_result result = new isUserEnabled_result();
       receiveBase(result, "isUserEnabled");
@@ -295,13 +278,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isUserEnabled failed: unknown result");
     }
 
-    public boolean isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean isUserExist(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_isUserExist(authzToken, username);
       return recv_isUserExist();
     }
 
-    public void send_isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
+    public void send_isUserExist(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.thrift.TException
     {
       isUserExist_args args = new isUserExist_args();
       args.setAuthzToken(authzToken);
@@ -309,7 +292,7 @@ public class IamAdminServices {
       sendBase("isUserExist", args);
     }
 
-    public boolean recv_isUserExist() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean recv_isUserExist() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       isUserExist_result result = new isUserExist_result();
       receiveBase(result, "isUserExist");
@@ -325,13 +308,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "isUserExist failed: unknown result");
     }
 
-    public org.apache.airavata.model.user.UserProfile getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public org.apache.custos.profile.model.user.UserProfile getUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_getUser(authzToken, username);
       return recv_getUser();
     }
 
-    public void send_getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username) throws org.apache.thrift.TException
+    public void send_getUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username) throws org.apache.thrift.TException
     {
       getUser_args args = new getUser_args();
       args.setAuthzToken(authzToken);
@@ -339,7 +322,7 @@ public class IamAdminServices {
       sendBase("getUser", args);
     }
 
-    public org.apache.airavata.model.user.UserProfile recv_getUser() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public org.apache.custos.profile.model.user.UserProfile recv_getUser() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       getUser_result result = new getUser_result();
       receiveBase(result, "getUser");
@@ -355,13 +338,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUser failed: unknown result");
     }
 
-    public java.util.List<org.apache.airavata.model.user.UserProfile> getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public java.util.List<org.apache.custos.profile.model.user.UserProfile> getUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, int offset, int limit, String search) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_getUsers(authzToken, offset, limit, search);
       return recv_getUsers();
     }
 
-    public void send_getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search) throws org.apache.thrift.TException
+    public void send_getUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, int offset, int limit, String search) throws org.apache.thrift.TException
     {
       getUsers_args args = new getUsers_args();
       args.setAuthzToken(authzToken);
@@ -371,7 +354,7 @@ public class IamAdminServices {
       sendBase("getUsers", args);
     }
 
-    public java.util.List<org.apache.airavata.model.user.UserProfile> recv_getUsers() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public java.util.List<org.apache.custos.profile.model.user.UserProfile> recv_getUsers() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       getUsers_result result = new getUsers_result();
       receiveBase(result, "getUsers");
@@ -387,13 +370,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "getUsers failed: unknown result");
     }
 
-    public boolean resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean resetUserPassword(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String newPassword) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_resetUserPassword(authzToken, username, newPassword);
       return recv_resetUserPassword();
     }
 
-    public void send_resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword) throws org.apache.thrift.TException
+    public void send_resetUserPassword(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String newPassword) throws org.apache.thrift.TException
     {
       resetUserPassword_args args = new resetUserPassword_args();
       args.setAuthzToken(authzToken);
@@ -402,7 +385,7 @@ public class IamAdminServices {
       sendBase("resetUserPassword", args);
     }
 
-    public boolean recv_resetUserPassword() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean recv_resetUserPassword() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       resetUserPassword_result result = new resetUserPassword_result();
       receiveBase(result, "resetUserPassword");
@@ -418,13 +401,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "resetUserPassword failed: unknown result");
     }
 
-    public java.util.List<org.apache.airavata.model.user.UserProfile> findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public java.util.List<org.apache.custos.profile.model.user.UserProfile> findUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, String email, String userId) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_findUsers(authzToken, email, userId);
       return recv_findUsers();
     }
 
-    public void send_findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId) throws org.apache.thrift.TException
+    public void send_findUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, String email, String userId) throws org.apache.thrift.TException
     {
       findUsers_args args = new findUsers_args();
       args.setAuthzToken(authzToken);
@@ -433,7 +416,7 @@ public class IamAdminServices {
       sendBase("findUsers", args);
     }
 
-    public java.util.List<org.apache.airavata.model.user.UserProfile> recv_findUsers() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public java.util.List<org.apache.custos.profile.model.user.UserProfile> recv_findUsers() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       findUsers_result result = new findUsers_result();
       receiveBase(result, "findUsers");
@@ -449,13 +432,13 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "findUsers failed: unknown result");
     }
 
-    public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public void updateUserProfile(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.user.UserProfile userDetails) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       send_updateUserProfile(authzToken, userDetails);
       recv_updateUserProfile();
     }
 
-    public void send_updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails) throws org.apache.thrift.TException
+    public void send_updateUserProfile(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.user.UserProfile userDetails) throws org.apache.thrift.TException
     {
       updateUserProfile_args args = new updateUserProfile_args();
       args.setAuthzToken(authzToken);
@@ -463,7 +446,7 @@ public class IamAdminServices {
       sendBase("updateUserProfile", args);
     }
 
-    public void recv_updateUserProfile() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public void recv_updateUserProfile() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       updateUserProfile_result result = new updateUserProfile_result();
       receiveBase(result, "updateUserProfile");
@@ -476,22 +459,23 @@ public class IamAdminServices {
       return;
     }
 
-    public boolean addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean addRoleToUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      send_addRoleToUser(authzToken, username, roleName);
+      send_addRoleToUser(authzToken, username, roleName, tenantAdminPasswordCredential);
       return recv_addRoleToUser();
     }
 
-    public void send_addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws org.apache.thrift.TException
+    public void send_addRoleToUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.thrift.TException
     {
       addRoleToUser_args args = new addRoleToUser_args();
       args.setAuthzToken(authzToken);
       args.setUsername(username);
       args.setRoleName(roleName);
+      args.setTenantAdminPasswordCredential(tenantAdminPasswordCredential);
       sendBase("addRoleToUser", args);
     }
 
-    public boolean recv_addRoleToUser() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean recv_addRoleToUser() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       addRoleToUser_result result = new addRoleToUser_result();
       receiveBase(result, "addRoleToUser");
@@ -507,22 +491,23 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "addRoleToUser failed: unknown result");
     }
 
-    public boolean removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean removeRoleFromUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      send_removeRoleFromUser(authzToken, username, roleName);
+      send_removeRoleFromUser(authzToken, username, roleName, tenantAdminPasswordCredential);
       return recv_removeRoleFromUser();
     }
 
-    public void send_removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName) throws org.apache.thrift.TException
+    public void send_removeRoleFromUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.thrift.TException
     {
       removeRoleFromUser_args args = new removeRoleFromUser_args();
       args.setAuthzToken(authzToken);
       args.setUsername(username);
       args.setRoleName(roleName);
+      args.setTenantAdminPasswordCredential(tenantAdminPasswordCredential);
       sendBase("removeRoleFromUser", args);
     }
 
-    public boolean recv_removeRoleFromUser() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public boolean recv_removeRoleFromUser() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       removeRoleFromUser_result result = new removeRoleFromUser_result();
       receiveBase(result, "removeRoleFromUser");
@@ -538,21 +523,22 @@ public class IamAdminServices {
       throw new org.apache.thrift.TApplicationException(org.apache.thrift.TApplicationException.MISSING_RESULT, "removeRoleFromUser failed: unknown result");
     }
 
-    public java.util.List<org.apache.airavata.model.user.UserProfile> getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName) throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public java.util.List<org.apache.custos.profile.model.user.UserProfile> getUsersWithRole(org.apache.custos.commons.model.security.AuthzToken authzToken, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
-      send_getUsersWithRole(authzToken, roleName);
+      send_getUsersWithRole(authzToken, roleName, tenantAdminPasswordCredential);
       return recv_getUsersWithRole();
     }
 
-    public void send_getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName) throws org.apache.thrift.TException
+    public void send_getUsersWithRole(org.apache.custos.commons.model.security.AuthzToken authzToken, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) throws org.apache.thrift.TException
     {
       getUsersWithRole_args args = new getUsersWithRole_args();
       args.setAuthzToken(authzToken);
       args.setRoleName(roleName);
+      args.setTenantAdminPasswordCredential(tenantAdminPasswordCredential);
       sendBase("getUsersWithRole", args);
     }
 
-    public java.util.List<org.apache.airavata.model.user.UserProfile> recv_getUsersWithRole() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException
+    public java.util.List<org.apache.custos.profile.model.user.UserProfile> recv_getUsersWithRole() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException
     {
       getUsersWithRole_result result = new getUsersWithRole_result();
       receiveBase(result, "getUsersWithRole");
@@ -586,15 +572,15 @@ public class IamAdminServices {
       super(protocolFactory, clientManager, transport);
     }
 
-    public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
+    public void getAPIVersion(org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       getAPIVersion_call method_call = new getAPIVersion_call(resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.String> {
-      public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class getAPIVersion_call extends org.apache.thrift.async.TAsyncMethodCall<String> {
+      public getAPIVersion_call(org.apache.thrift.async.AsyncMethodCallback<String> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
       }
 
@@ -605,9 +591,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public java.lang.String getResult() throws IamAdminServicesException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public String getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -615,20 +601,22 @@ public class IamAdminServices {
       }
     }
 
-    public void setUpGateway(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException {
+    public void setUpGateway(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.workspace.Gateway gateway, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      setUpGateway_call method_call = new setUpGateway_call(authzToken, gateway, resultHandler, this, ___protocolFactory, ___transport);
+      setUpGateway_call method_call = new setUpGateway_call(authzToken, gateway, tenantAdminPasswordCredential, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class setUpGateway_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.airavata.model.workspace.Gateway> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private org.apache.airavata.model.workspace.Gateway gateway;
-      public setUpGateway_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.workspace.Gateway gateway, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class setUpGateway_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.custos.profile.model.workspace.Gateway> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private org.apache.custos.profile.model.workspace.Gateway gateway;
+      private org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential;
+      public setUpGateway_call(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.workspace.Gateway gateway, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.workspace.Gateway> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonb [...]
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.gateway = gateway;
+        this.tenantAdminPasswordCredential = tenantAdminPasswordCredential;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -636,13 +624,14 @@ public class IamAdminServices {
         setUpGateway_args args = new setUpGateway_args();
         args.setAuthzToken(authzToken);
         args.setGateway(gateway);
+        args.setTenantAdminPasswordCredential(tenantAdminPasswordCredential);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public org.apache.airavata.model.workspace.Gateway getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public org.apache.custos.profile.model.workspace.Gateway getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -650,17 +639,17 @@ public class IamAdminServices {
       }
     }
 
-    public void isUsernameAvailable(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+    public void isUsernameAvailable(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       isUsernameAvailable_call method_call = new isUsernameAvailable_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class isUsernameAvailable_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String username;
-      public isUsernameAvailable_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class isUsernameAvailable_call extends org.apache.thrift.async.TAsyncMethodCall<Boolean> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String username;
+      public isUsernameAvailable_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.username = username;
@@ -675,9 +664,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public java.lang.Boolean getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public Boolean getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -685,21 +674,21 @@ public class IamAdminServices {
       }
     }
 
-    public void registerUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+    public void registerUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String emailAddress, String firstName, String lastName, String newPassword, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       registerUser_call method_call = new registerUser_call(authzToken, username, emailAddress, firstName, lastName, newPassword, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class registerUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String username;
-      private java.lang.String emailAddress;
-      private java.lang.String firstName;
-      private java.lang.String lastName;
-      private java.lang.String newPassword;
-      public registerUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String emailAddress, java.lang.String firstName, java.lang.String lastName, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apac [...]
+    public static class registerUser_call extends org.apache.thrift.async.TAsyncMethodCall<Boolean> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String username;
+      private String emailAddress;
+      private String firstName;
+      private String lastName;
+      private String newPassword;
+      public registerUser_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String emailAddress, String firstName, String lastName, String newPassword, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.username = username;
@@ -722,9 +711,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public java.lang.Boolean getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public Boolean getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -732,17 +721,17 @@ public class IamAdminServices {
       }
     }
 
-    public void enableUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+    public void enableUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       enableUser_call method_call = new enableUser_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class enableUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String username;
-      public enableUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class enableUser_call extends org.apache.thrift.async.TAsyncMethodCall<Boolean> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String username;
+      public enableUser_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.username = username;
@@ -757,9 +746,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public java.lang.Boolean getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public Boolean getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -767,17 +756,17 @@ public class IamAdminServices {
       }
     }
 
-    public void isUserEnabled(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+    public void isUserEnabled(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       isUserEnabled_call method_call = new isUserEnabled_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class isUserEnabled_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String username;
-      public isUserEnabled_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class isUserEnabled_call extends org.apache.thrift.async.TAsyncMethodCall<Boolean> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String username;
+      public isUserEnabled_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.username = username;
@@ -792,9 +781,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public java.lang.Boolean getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public Boolean getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -802,17 +791,17 @@ public class IamAdminServices {
       }
     }
 
-    public void isUserExist(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+    public void isUserExist(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       isUserExist_call method_call = new isUserExist_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class isUserExist_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String username;
-      public isUserExist_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class isUserExist_call extends org.apache.thrift.async.TAsyncMethodCall<Boolean> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String username;
+      public isUserExist_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.username = username;
@@ -827,9 +816,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public java.lang.Boolean getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public Boolean getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -837,17 +826,17 @@ public class IamAdminServices {
       }
     }
 
-    public void getUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException {
+    public void getUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       getUser_call method_call = new getUser_call(authzToken, username, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.airavata.model.user.UserProfile> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String username;
-      public getUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class getUser_call extends org.apache.thrift.async.TAsyncMethodCall<org.apache.custos.profile.model.user.UserProfile> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String username;
+      public getUser_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.user.UserProfile> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.username = username;
@@ -862,9 +851,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public org.apache.airavata.model.user.UserProfile getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public org.apache.custos.profile.model.user.UserProfile getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -872,19 +861,19 @@ public class IamAdminServices {
       }
     }
 
-    public void getUsers(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
+    public void getUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, int offset, int limit, String search, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       getUsers_call method_call = new getUsers_call(authzToken, offset, limit, search, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class getUsers_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.airavata.model.user.UserProfile>> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
+    public static class getUsers_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.custos.profile.model.user.UserProfile>> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
       private int offset;
       private int limit;
-      private java.lang.String search;
-      public getUsers_call(org.apache.airavata.model.security.AuthzToken authzToken, int offset, int limit, java.lang.String search, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private String search;
+      public getUsers_call(org.apache.custos.commons.model.security.AuthzToken authzToken, int offset, int limit, String search, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.offset = offset;
@@ -903,9 +892,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public java.util.List<org.apache.airavata.model.user.UserProfile> getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public java.util.List<org.apache.custos.profile.model.user.UserProfile> getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -913,18 +902,18 @@ public class IamAdminServices {
       }
     }
 
-    public void resetUserPassword(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+    public void resetUserPassword(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String newPassword, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       resetUserPassword_call method_call = new resetUserPassword_call(authzToken, username, newPassword, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class resetUserPassword_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String username;
-      private java.lang.String newPassword;
-      public resetUserPassword_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String newPassword, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class resetUserPassword_call extends org.apache.thrift.async.TAsyncMethodCall<Boolean> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String username;
+      private String newPassword;
+      public resetUserPassword_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String newPassword, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.username = username;
@@ -941,9 +930,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public java.lang.Boolean getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public Boolean getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -951,18 +940,18 @@ public class IamAdminServices {
       }
     }
 
-    public void findUsers(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
+    public void findUsers(org.apache.custos.commons.model.security.AuthzToken authzToken, String email, String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       findUsers_call method_call = new findUsers_call(authzToken, email, userId, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class findUsers_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.airavata.model.user.UserProfile>> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String email;
-      private java.lang.String userId;
-      public findUsers_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String email, java.lang.String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class findUsers_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.custos.profile.model.user.UserProfile>> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String email;
+      private String userId;
+      public findUsers_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String email, String userId, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.email = email;
@@ -979,9 +968,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public java.util.List<org.apache.airavata.model.user.UserProfile> getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public java.util.List<org.apache.custos.profile.model.user.UserProfile> getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -989,7 +978,7 @@ public class IamAdminServices {
       }
     }
 
-    public void updateUserProfile(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
+    public void updateUserProfile(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.user.UserProfile userDetails, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler) throws org.apache.thrift.TException {
       checkReady();
       updateUserProfile_call method_call = new updateUserProfile_call(authzToken, userDetails, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
@@ -997,9 +986,9 @@ public class IamAdminServices {
     }
 
     public static class updateUserProfile_call extends org.apache.thrift.async.TAsyncMethodCall<Void> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private org.apache.airavata.model.user.UserProfile userDetails;
-      public updateUserProfile_call(org.apache.airavata.model.security.AuthzToken authzToken, org.apache.airavata.model.user.UserProfile userDetails, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private org.apache.custos.profile.model.user.UserProfile userDetails;
+      public updateUserProfile_call(org.apache.custos.commons.model.security.AuthzToken authzToken, org.apache.custos.profile.model.user.UserProfile userDetails, org.apache.thrift.async.AsyncMethodCallback<Void> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.userDetails = userDetails;
@@ -1014,9 +1003,9 @@ public class IamAdminServices {
         prot.writeMessageEnd();
       }
 
-      public Void getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public Void getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1024,22 +1013,24 @@ public class IamAdminServices {
       }
     }
 
-    public void addRoleToUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+    public void addRoleToUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      addRoleToUser_call method_call = new addRoleToUser_call(authzToken, username, roleName, resultHandler, this, ___protocolFactory, ___transport);
+      addRoleToUser_call method_call = new addRoleToUser_call(authzToken, username, roleName, tenantAdminPasswordCredential, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class addRoleToUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String username;
-      private java.lang.String roleName;
-      public addRoleToUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class addRoleToUser_call extends org.apache.thrift.async.TAsyncMethodCall<Boolean> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String username;
+      private String roleName;
+      private org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential;
+      public addRoleToUser_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.username = username;
         this.roleName = roleName;
+        this.tenantAdminPasswordCredential = tenantAdminPasswordCredential;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -1048,13 +1039,14 @@ public class IamAdminServices {
         args.setAuthzToken(authzToken);
         args.setUsername(username);
         args.setRoleName(roleName);
+        args.setTenantAdminPasswordCredential(tenantAdminPasswordCredential);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public java.lang.Boolean getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public Boolean getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1062,22 +1054,24 @@ public class IamAdminServices {
       }
     }
 
-    public void removeRoleFromUser(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+    public void removeRoleFromUser(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      removeRoleFromUser_call method_call = new removeRoleFromUser_call(authzToken, username, roleName, resultHandler, this, ___protocolFactory, ___transport);
+      removeRoleFromUser_call method_call = new removeRoleFromUser_call(authzToken, username, roleName, tenantAdminPasswordCredential, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class removeRoleFromUser_call extends org.apache.thrift.async.TAsyncMethodCall<java.lang.Boolean> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String username;
-      private java.lang.String roleName;
-      public removeRoleFromUser_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String username, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class removeRoleFromUser_call extends org.apache.thrift.async.TAsyncMethodCall<Boolean> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String username;
+      private String roleName;
+      private org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential;
+      public removeRoleFromUser_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String username, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.username = username;
         this.roleName = roleName;
+        this.tenantAdminPasswordCredential = tenantAdminPasswordCredential;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -1086,13 +1080,14 @@ public class IamAdminServices {
         args.setAuthzToken(authzToken);
         args.setUsername(username);
         args.setRoleName(roleName);
+        args.setTenantAdminPasswordCredential(tenantAdminPasswordCredential);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public java.lang.Boolean getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public Boolean getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1100,20 +1095,22 @@ public class IamAdminServices {
       }
     }
 
-    public void getUsersWithRole(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
+    public void getUsersWithRole(org.apache.custos.commons.model.security.AuthzToken authzToken, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
       checkReady();
-      getUsersWithRole_call method_call = new getUsersWithRole_call(authzToken, roleName, resultHandler, this, ___protocolFactory, ___transport);
+      getUsersWithRole_call method_call = new getUsersWithRole_call(authzToken, roleName, tenantAdminPasswordCredential, resultHandler, this, ___protocolFactory, ___transport);
       this.___currentMethod = method_call;
       ___manager.call(method_call);
     }
 
-    public static class getUsersWithRole_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.airavata.model.user.UserProfile>> {
-      private org.apache.airavata.model.security.AuthzToken authzToken;
-      private java.lang.String roleName;
-      public getUsersWithRole_call(org.apache.airavata.model.security.AuthzToken authzToken, java.lang.String roleName, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transport) throws org.apache.thrift.TException {
+    public static class getUsersWithRole_call extends org.apache.thrift.async.TAsyncMethodCall<java.util.List<org.apache.custos.profile.model.user.UserProfile>> {
+      private org.apache.custos.commons.model.security.AuthzToken authzToken;
+      private String roleName;
+      private org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential;
+      public getUsersWithRole_call(org.apache.custos.commons.model.security.AuthzToken authzToken, String roleName, org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler, org.apache.thrift.async.TAsyncClient client, org.apache.thrift.protocol.TProtocolFactory protocolFactory, org.apache.thrift.transport.TNonblockingTransport transp [...]
         super(client, protocolFactory, transport, resultHandler, false);
         this.authzToken = authzToken;
         this.roleName = roleName;
+        this.tenantAdminPasswordCredential = tenantAdminPasswordCredential;
       }
 
       public void write_args(org.apache.thrift.protocol.TProtocol prot) throws org.apache.thrift.TException {
@@ -1121,13 +1118,14 @@ public class IamAdminServices {
         getUsersWithRole_args args = new getUsersWithRole_args();
         args.setAuthzToken(authzToken);
         args.setRoleName(roleName);
+        args.setTenantAdminPasswordCredential(tenantAdminPasswordCredential);
         args.write(prot);
         prot.writeMessageEnd();
       }
 
-      public java.util.List<org.apache.airavata.model.user.UserProfile> getResult() throws IamAdminServicesException, org.apache.airavata.model.error.AuthorizationException, org.apache.thrift.TException {
-        if (getState() != org.apache.thrift.async.TAsyncMethodCall.State.RESPONSE_READ) {
-          throw new java.lang.IllegalStateException("Method call not finished!");
+      public java.util.List<org.apache.custos.profile.model.user.UserProfile> getResult() throws org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException, org.apache.custos.commons.model.error.AuthorizationException, org.apache.thrift.TException {
+        if (getState() != State.RESPONSE_READ) {
+          throw new IllegalStateException("Method call not finished!");
         }
         org.apache.thrift.transport.TMemoryInputTransport memoryTransport = new org.apache.thrift.transport.TMemoryInputTransport(getFrameBuffer().array());
         org.apache.thrift.protocol.TProtocol prot = client.getProtocolFactory().getProtocol(memoryTransport);
@@ -1140,14 +1138,14 @@ public class IamAdminServices {
   public static class Processor<I extends Iface> extends org.apache.thrift.TBaseProcessor<I> implements org.apache.thrift.TProcessor {
     private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(Processor.class.getName());
     public Processor(I iface) {
-      super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
+      super(iface, getProcessMap(new java.util.HashMap<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>>()));
     }
 
-    protected Processor(I iface, java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
+    protected Processor(I iface, java.util.Map<String, org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> processMap) {
       super(iface, getProcessMap(processMap));
     }
 
-    private static <I extends Iface> java.util.Map<java.lang.String,  org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<java.lang.String, org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
+    private static <I extends Iface> java.util.Map<String,  org.apache.thrift.ProcessFunction<I, ? extends org.apache.thrift.TBase>> getProcessMap(java.util.Map<String, org.apache.thrift.ProcessFunction<I, ? extends  org.apache.thrift.TBase>> processMap) {
       processMap.put("getAPIVersion", new getAPIVersion());
       processMap.put("setUpGateway", new setUpGateway());
       processMap.put("isUsernameAvailable", new isUsernameAvailable());
@@ -1179,11 +1177,16 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public getAPIVersion_result getResult(I iface, getAPIVersion_args args) throws org.apache.thrift.TException {
         getAPIVersion_result result = new getAPIVersion_result();
         try {
           result.success = iface.getAPIVersion();
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
         }
         return result;
@@ -1203,13 +1206,18 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public setUpGateway_result getResult(I iface, setUpGateway_args args) throws org.apache.thrift.TException {
         setUpGateway_result result = new setUpGateway_result();
         try {
-          result.success = iface.setUpGateway(args.authzToken, args.gateway);
-        } catch (IamAdminServicesException Idse) {
+          result.success = iface.setUpGateway(args.authzToken, args.gateway, args.tenantAdminPasswordCredential);
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1229,14 +1237,19 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public isUsernameAvailable_result getResult(I iface, isUsernameAvailable_args args) throws org.apache.thrift.TException {
         isUsernameAvailable_result result = new isUsernameAvailable_result();
         try {
           result.success = iface.isUsernameAvailable(args.authzToken, args.username);
           result.setSuccessIsSet(true);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1256,14 +1269,19 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public registerUser_result getResult(I iface, registerUser_args args) throws org.apache.thrift.TException {
         registerUser_result result = new registerUser_result();
         try {
           result.success = iface.registerUser(args.authzToken, args.username, args.emailAddress, args.firstName, args.lastName, args.newPassword);
           result.setSuccessIsSet(true);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1283,14 +1301,19 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public enableUser_result getResult(I iface, enableUser_args args) throws org.apache.thrift.TException {
         enableUser_result result = new enableUser_result();
         try {
           result.success = iface.enableUser(args.authzToken, args.username);
           result.setSuccessIsSet(true);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1310,14 +1333,19 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public isUserEnabled_result getResult(I iface, isUserEnabled_args args) throws org.apache.thrift.TException {
         isUserEnabled_result result = new isUserEnabled_result();
         try {
           result.success = iface.isUserEnabled(args.authzToken, args.username);
           result.setSuccessIsSet(true);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1337,14 +1365,19 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public isUserExist_result getResult(I iface, isUserExist_args args) throws org.apache.thrift.TException {
         isUserExist_result result = new isUserExist_result();
         try {
           result.success = iface.isUserExist(args.authzToken, args.username);
           result.setSuccessIsSet(true);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1364,13 +1397,18 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public getUser_result getResult(I iface, getUser_args args) throws org.apache.thrift.TException {
         getUser_result result = new getUser_result();
         try {
           result.success = iface.getUser(args.authzToken, args.username);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1390,13 +1428,18 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public getUsers_result getResult(I iface, getUsers_args args) throws org.apache.thrift.TException {
         getUsers_result result = new getUsers_result();
         try {
           result.success = iface.getUsers(args.authzToken, args.offset, args.limit, args.search);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1416,14 +1459,19 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public resetUserPassword_result getResult(I iface, resetUserPassword_args args) throws org.apache.thrift.TException {
         resetUserPassword_result result = new resetUserPassword_result();
         try {
           result.success = iface.resetUserPassword(args.authzToken, args.username, args.newPassword);
           result.setSuccessIsSet(true);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1443,13 +1491,18 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public findUsers_result getResult(I iface, findUsers_args args) throws org.apache.thrift.TException {
         findUsers_result result = new findUsers_result();
         try {
           result.success = iface.findUsers(args.authzToken, args.email, args.userId);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1469,13 +1522,18 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public updateUserProfile_result getResult(I iface, updateUserProfile_args args) throws org.apache.thrift.TException {
         updateUserProfile_result result = new updateUserProfile_result();
         try {
           iface.updateUserProfile(args.authzToken, args.userDetails);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1495,14 +1553,19 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public addRoleToUser_result getResult(I iface, addRoleToUser_args args) throws org.apache.thrift.TException {
         addRoleToUser_result result = new addRoleToUser_result();
         try {
-          result.success = iface.addRoleToUser(args.authzToken, args.username, args.roleName);
+          result.success = iface.addRoleToUser(args.authzToken, args.username, args.roleName, args.tenantAdminPasswordCredential);
           result.setSuccessIsSet(true);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1522,14 +1585,19 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public removeRoleFromUser_result getResult(I iface, removeRoleFromUser_args args) throws org.apache.thrift.TException {
         removeRoleFromUser_result result = new removeRoleFromUser_result();
         try {
-          result.success = iface.removeRoleFromUser(args.authzToken, args.username, args.roleName);
+          result.success = iface.removeRoleFromUser(args.authzToken, args.username, args.roleName, args.tenantAdminPasswordCredential);
           result.setSuccessIsSet(true);
-        } catch (IamAdminServicesException Idse) {
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1549,13 +1617,18 @@ public class IamAdminServices {
         return false;
       }
 
+      @Override
+      protected boolean rethrowUnhandledExceptions() {
+        return false;
+      }
+
       public getUsersWithRole_result getResult(I iface, getUsersWithRole_args args) throws org.apache.thrift.TException {
         getUsersWithRole_result result = new getUsersWithRole_result();
         try {
-          result.success = iface.getUsersWithRole(args.authzToken, args.roleName);
-        } catch (IamAdminServicesException Idse) {
+          result.success = iface.getUsersWithRole(args.authzToken, args.roleName, args.tenantAdminPasswordCredential);
+        } catch (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
           result.Idse = Idse;
-        } catch (org.apache.airavata.model.error.AuthorizationException ae) {
+        } catch (org.apache.custos.commons.model.error.AuthorizationException ae) {
           result.ae = ae;
         }
         return result;
@@ -1567,14 +1640,14 @@ public class IamAdminServices {
   public static class AsyncProcessor<I extends AsyncIface> extends org.apache.thrift.TBaseAsyncProcessor<I> {
     private static final org.slf4j.Logger _LOGGER = org.slf4j.LoggerFactory.getLogger(AsyncProcessor.class.getName());
     public AsyncProcessor(I iface) {
-      super(iface, getProcessMap(new java.util.HashMap<java.lang.String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
+      super(iface, getProcessMap(new java.util.HashMap<String, org.apache.thrift.AsyncProcessFunction<I, ? extends org.apache.thrift.TBase, ?>>()));
     }
 
-    protected AsyncProcessor(I iface, java.util.Map<java.lang.String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+    protected AsyncProcessor(I iface, java.util.Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
       super(iface, getProcessMap(processMap));
     }
 
-    private static <I extends AsyncIface> java.util.Map<java.lang.String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<java.lang.String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
+    private static <I extends AsyncIface> java.util.Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase,?>> getProcessMap(java.util.Map<String,  org.apache.thrift.AsyncProcessFunction<I, ? extends  org.apache.thrift.TBase, ?>> processMap) {
       processMap.put("getAPIVersion", new getAPIVersion());
       processMap.put("setUpGateway", new setUpGateway());
       processMap.put("isUsernameAvailable", new isUsernameAvailable());
@@ -1593,7 +1666,7 @@ public class IamAdminServices {
       return processMap;
     }
 
-    public static class getAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAPIVersion_args, java.lang.String> {
+    public static class getAPIVersion<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getAPIVersion_args, String> {
       public getAPIVersion() {
         super("getAPIVersion");
       }
@@ -1602,10 +1675,10 @@ public class IamAdminServices {
         return new getAPIVersion_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.lang.String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<String> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.String>() { 
-          public void onComplete(java.lang.String o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<String>() {
+          public void onComplete(String o) {
             getAPIVersion_result result = new getAPIVersion_result();
             result.success = o;
             try {
@@ -1613,17 +1686,17 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             getAPIVersion_result result = new getAPIVersion_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -1641,7 +1714,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -1653,12 +1726,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.String> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, getAPIVersion_args args, org.apache.thrift.async.AsyncMethodCallback<String> resultHandler) throws org.apache.thrift.TException {
         iface.getAPIVersion(resultHandler);
       }
     }
 
-    public static class setUpGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setUpGateway_args, org.apache.airavata.model.workspace.Gateway> {
+    public static class setUpGateway<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, setUpGateway_args, org.apache.custos.profile.model.workspace.Gateway> {
       public setUpGateway() {
         super("setUpGateway");
       }
@@ -1667,10 +1740,10 @@ public class IamAdminServices {
         return new setUpGateway_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.workspace.Gateway> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway>() { 
-          public void onComplete(org.apache.airavata.model.workspace.Gateway o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.workspace.Gateway>() { 
+          public void onComplete(org.apache.custos.profile.model.workspace.Gateway o) {
             setUpGateway_result result = new setUpGateway_result();
             result.success = o;
             try {
@@ -1678,21 +1751,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             setUpGateway_result result = new setUpGateway_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -1710,7 +1783,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -1722,12 +1795,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, setUpGateway_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException {
-        iface.setUpGateway(args.authzToken, args.gateway,resultHandler);
+      public void start(I iface, setUpGateway_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.workspace.Gateway> resultHandler) throws org.apache.thrift.TException {
+        iface.setUpGateway(args.authzToken, args.gateway, args.tenantAdminPasswordCredential,resultHandler);
       }
     }
 
-    public static class isUsernameAvailable<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isUsernameAvailable_args, java.lang.Boolean> {
+    public static class isUsernameAvailable<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isUsernameAvailable_args, Boolean> {
       public isUsernameAvailable() {
         super("isUsernameAvailable");
       }
@@ -1736,10 +1809,10 @@ public class IamAdminServices {
         return new isUsernameAvailable_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
-          public void onComplete(java.lang.Boolean o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<Boolean>() {
+          public void onComplete(Boolean o) {
             isUsernameAvailable_result result = new isUsernameAvailable_result();
             result.success = o;
             result.setSuccessIsSet(true);
@@ -1748,21 +1821,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             isUsernameAvailable_result result = new isUsernameAvailable_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -1780,7 +1853,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -1792,12 +1865,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, isUsernameAvailable_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, isUsernameAvailable_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
         iface.isUsernameAvailable(args.authzToken, args.username,resultHandler);
       }
     }
 
-    public static class registerUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerUser_args, java.lang.Boolean> {
+    public static class registerUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, registerUser_args, Boolean> {
       public registerUser() {
         super("registerUser");
       }
@@ -1806,10 +1879,10 @@ public class IamAdminServices {
         return new registerUser_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
-          public void onComplete(java.lang.Boolean o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<Boolean>() {
+          public void onComplete(Boolean o) {
             registerUser_result result = new registerUser_result();
             result.success = o;
             result.setSuccessIsSet(true);
@@ -1818,21 +1891,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             registerUser_result result = new registerUser_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -1850,7 +1923,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -1862,12 +1935,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, registerUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, registerUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
         iface.registerUser(args.authzToken, args.username, args.emailAddress, args.firstName, args.lastName, args.newPassword,resultHandler);
       }
     }
 
-    public static class enableUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, enableUser_args, java.lang.Boolean> {
+    public static class enableUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, enableUser_args, Boolean> {
       public enableUser() {
         super("enableUser");
       }
@@ -1876,10 +1949,10 @@ public class IamAdminServices {
         return new enableUser_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
-          public void onComplete(java.lang.Boolean o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<Boolean>() {
+          public void onComplete(Boolean o) {
             enableUser_result result = new enableUser_result();
             result.success = o;
             result.setSuccessIsSet(true);
@@ -1888,21 +1961,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             enableUser_result result = new enableUser_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -1920,7 +1993,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -1932,12 +2005,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, enableUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, enableUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
         iface.enableUser(args.authzToken, args.username,resultHandler);
       }
     }
 
-    public static class isUserEnabled<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isUserEnabled_args, java.lang.Boolean> {
+    public static class isUserEnabled<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isUserEnabled_args, Boolean> {
       public isUserEnabled() {
         super("isUserEnabled");
       }
@@ -1946,10 +2019,10 @@ public class IamAdminServices {
         return new isUserEnabled_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
-          public void onComplete(java.lang.Boolean o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<Boolean>() {
+          public void onComplete(Boolean o) {
             isUserEnabled_result result = new isUserEnabled_result();
             result.success = o;
             result.setSuccessIsSet(true);
@@ -1958,21 +2031,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             isUserEnabled_result result = new isUserEnabled_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -1990,7 +2063,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2002,12 +2075,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, isUserEnabled_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, isUserEnabled_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
         iface.isUserEnabled(args.authzToken, args.username,resultHandler);
       }
     }
 
-    public static class isUserExist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isUserExist_args, java.lang.Boolean> {
+    public static class isUserExist<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, isUserExist_args, Boolean> {
       public isUserExist() {
         super("isUserExist");
       }
@@ -2016,10 +2089,10 @@ public class IamAdminServices {
         return new isUserExist_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
-          public void onComplete(java.lang.Boolean o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<Boolean>() {
+          public void onComplete(Boolean o) {
             isUserExist_result result = new isUserExist_result();
             result.success = o;
             result.setSuccessIsSet(true);
@@ -2028,21 +2101,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             isUserExist_result result = new isUserExist_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -2060,7 +2133,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2072,12 +2145,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, isUserExist_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, isUserExist_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
         iface.isUserExist(args.authzToken, args.username,resultHandler);
       }
     }
 
-    public static class getUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUser_args, org.apache.airavata.model.user.UserProfile> {
+    public static class getUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUser_args, org.apache.custos.profile.model.user.UserProfile> {
       public getUser() {
         super("getUser");
       }
@@ -2086,10 +2159,10 @@ public class IamAdminServices {
         return new getUser_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.user.UserProfile> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile>() { 
-          public void onComplete(org.apache.airavata.model.user.UserProfile o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.user.UserProfile>() { 
+          public void onComplete(org.apache.custos.profile.model.user.UserProfile o) {
             getUser_result result = new getUser_result();
             result.success = o;
             try {
@@ -2097,21 +2170,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             getUser_result result = new getUser_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -2129,7 +2202,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2141,12 +2214,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, getUser_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.airavata.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, getUser_args args, org.apache.thrift.async.AsyncMethodCallback<org.apache.custos.profile.model.user.UserProfile> resultHandler) throws org.apache.thrift.TException {
         iface.getUser(args.authzToken, args.username,resultHandler);
       }
     }
 
-    public static class getUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUsers_args, java.util.List<org.apache.airavata.model.user.UserProfile>> {
+    public static class getUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUsers_args, java.util.List<org.apache.custos.profile.model.user.UserProfile>> {
       public getUsers() {
         super("getUsers");
       }
@@ -2155,10 +2228,10 @@ public class IamAdminServices {
         return new getUsers_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>>() { 
-          public void onComplete(java.util.List<org.apache.airavata.model.user.UserProfile> o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>>() { 
+          public void onComplete(java.util.List<org.apache.custos.profile.model.user.UserProfile> o) {
             getUsers_result result = new getUsers_result();
             result.success = o;
             try {
@@ -2166,21 +2239,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             getUsers_result result = new getUsers_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -2198,7 +2271,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2210,12 +2283,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, getUsers_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, getUsers_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
         iface.getUsers(args.authzToken, args.offset, args.limit, args.search,resultHandler);
       }
     }
 
-    public static class resetUserPassword<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, resetUserPassword_args, java.lang.Boolean> {
+    public static class resetUserPassword<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, resetUserPassword_args, Boolean> {
       public resetUserPassword() {
         super("resetUserPassword");
       }
@@ -2224,10 +2297,10 @@ public class IamAdminServices {
         return new resetUserPassword_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
-          public void onComplete(java.lang.Boolean o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<Boolean>() {
+          public void onComplete(Boolean o) {
             resetUserPassword_result result = new resetUserPassword_result();
             result.success = o;
             result.setSuccessIsSet(true);
@@ -2236,21 +2309,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             resetUserPassword_result result = new resetUserPassword_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -2268,7 +2341,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2280,12 +2353,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, resetUserPassword_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, resetUserPassword_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
         iface.resetUserPassword(args.authzToken, args.username, args.newPassword,resultHandler);
       }
     }
 
-    public static class findUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, findUsers_args, java.util.List<org.apache.airavata.model.user.UserProfile>> {
+    public static class findUsers<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, findUsers_args, java.util.List<org.apache.custos.profile.model.user.UserProfile>> {
       public findUsers() {
         super("findUsers");
       }
@@ -2294,10 +2367,10 @@ public class IamAdminServices {
         return new findUsers_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>>() { 
-          public void onComplete(java.util.List<org.apache.airavata.model.user.UserProfile> o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>>() { 
+          public void onComplete(java.util.List<org.apache.custos.profile.model.user.UserProfile> o) {
             findUsers_result result = new findUsers_result();
             result.success = o;
             try {
@@ -2305,21 +2378,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             findUsers_result result = new findUsers_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -2337,7 +2410,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2349,7 +2422,7 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, findUsers_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
+      public void start(I iface, findUsers_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
         iface.findUsers(args.authzToken, args.email, args.userId,resultHandler);
       }
     }
@@ -2373,21 +2446,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             updateUserProfile_result result = new updateUserProfile_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -2405,7 +2478,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2422,7 +2495,7 @@ public class IamAdminServices {
       }
     }
 
-    public static class addRoleToUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addRoleToUser_args, java.lang.Boolean> {
+    public static class addRoleToUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, addRoleToUser_args, Boolean> {
       public addRoleToUser() {
         super("addRoleToUser");
       }
@@ -2431,10 +2504,10 @@ public class IamAdminServices {
         return new addRoleToUser_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
-          public void onComplete(java.lang.Boolean o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<Boolean>() {
+          public void onComplete(Boolean o) {
             addRoleToUser_result result = new addRoleToUser_result();
             result.success = o;
             result.setSuccessIsSet(true);
@@ -2443,21 +2516,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             addRoleToUser_result result = new addRoleToUser_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -2475,7 +2548,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2487,12 +2560,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, addRoleToUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
-        iface.addRoleToUser(args.authzToken, args.username, args.roleName,resultHandler);
+      public void start(I iface, addRoleToUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
+        iface.addRoleToUser(args.authzToken, args.username, args.roleName, args.tenantAdminPasswordCredential,resultHandler);
       }
     }
 
-    public static class removeRoleFromUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeRoleFromUser_args, java.lang.Boolean> {
+    public static class removeRoleFromUser<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, removeRoleFromUser_args, Boolean> {
       public removeRoleFromUser() {
         super("removeRoleFromUser");
       }
@@ -2501,10 +2574,10 @@ public class IamAdminServices {
         return new removeRoleFromUser_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<Boolean> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean>() { 
-          public void onComplete(java.lang.Boolean o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<Boolean>() {
+          public void onComplete(Boolean o) {
             removeRoleFromUser_result result = new removeRoleFromUser_result();
             result.success = o;
             result.setSuccessIsSet(true);
@@ -2513,21 +2586,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             removeRoleFromUser_result result = new removeRoleFromUser_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -2545,7 +2618,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2557,12 +2630,12 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, removeRoleFromUser_args args, org.apache.thrift.async.AsyncMethodCallback<java.lang.Boolean> resultHandler) throws org.apache.thrift.TException {
-        iface.removeRoleFromUser(args.authzToken, args.username, args.roleName,resultHandler);
+      public void start(I iface, removeRoleFromUser_args args, org.apache.thrift.async.AsyncMethodCallback<Boolean> resultHandler) throws org.apache.thrift.TException {
+        iface.removeRoleFromUser(args.authzToken, args.username, args.roleName, args.tenantAdminPasswordCredential,resultHandler);
       }
     }
 
-    public static class getUsersWithRole<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUsersWithRole_args, java.util.List<org.apache.airavata.model.user.UserProfile>> {
+    public static class getUsersWithRole<I extends AsyncIface> extends org.apache.thrift.AsyncProcessFunction<I, getUsersWithRole_args, java.util.List<org.apache.custos.profile.model.user.UserProfile>> {
       public getUsersWithRole() {
         super("getUsersWithRole");
       }
@@ -2571,10 +2644,10 @@ public class IamAdminServices {
         return new getUsersWithRole_args();
       }
 
-      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
+      public org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> getResultHandler(final org.apache.thrift.server.AbstractNonblockingServer.AsyncFrameBuffer fb, final int seqid) {
         final org.apache.thrift.AsyncProcessFunction fcall = this;
-        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>>() { 
-          public void onComplete(java.util.List<org.apache.airavata.model.user.UserProfile> o) {
+        return new org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>>() { 
+          public void onComplete(java.util.List<org.apache.custos.profile.model.user.UserProfile> o) {
             getUsersWithRole_result result = new getUsersWithRole_result();
             result.success = o;
             try {
@@ -2582,21 +2655,21 @@ public class IamAdminServices {
             } catch (org.apache.thrift.transport.TTransportException e) {
               _LOGGER.error("TTransportException writing to internal frame buffer", e);
               fb.close();
-            } catch (java.lang.Exception e) {
+            } catch (Exception e) {
               _LOGGER.error("Exception writing to internal frame buffer", e);
               onError(e);
             }
           }
-          public void onError(java.lang.Exception e) {
+          public void onError(Exception e) {
             byte msgType = org.apache.thrift.protocol.TMessageType.REPLY;
             org.apache.thrift.TSerializable msg;
             getUsersWithRole_result result = new getUsersWithRole_result();
-            if (e instanceof IamAdminServicesException) {
-              result.Idse = (IamAdminServicesException) e;
+            if (e instanceof org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) {
+              result.Idse = (org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException) e;
               result.setIdseIsSet(true);
               msg = result;
-            } else if (e instanceof org.apache.airavata.model.error.AuthorizationException) {
-              result.ae = (org.apache.airavata.model.error.AuthorizationException) e;
+            } else if (e instanceof org.apache.custos.commons.model.error.AuthorizationException) {
+              result.ae = (org.apache.custos.commons.model.error.AuthorizationException) e;
               result.setAeIsSet(true);
               msg = result;
             } else if (e instanceof org.apache.thrift.transport.TTransportException) {
@@ -2614,7 +2687,7 @@ public class IamAdminServices {
             }
             try {
               fcall.sendResponse(fb,msg,msgType,seqid);
-            } catch (java.lang.Exception ex) {
+            } catch (Exception ex) {
               _LOGGER.error("Exception writing to internal frame buffer", ex);
               fb.close();
             }
@@ -2626,8 +2699,8 @@ public class IamAdminServices {
         return false;
       }
 
-      public void start(I iface, getUsersWithRole_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.airavata.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
-        iface.getUsersWithRole(args.authzToken, args.roleName,resultHandler);
+      public void start(I iface, getUsersWithRole_args args, org.apache.thrift.async.AsyncMethodCallback<java.util.List<org.apache.custos.profile.model.user.UserProfile>> resultHandler) throws org.apache.thrift.TException {
+        iface.getUsersWithRole(args.authzToken, args.roleName, args.tenantAdminPasswordCredential,resultHandler);
       }
     }
 
@@ -2645,7 +2718,7 @@ public class IamAdminServices {
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
 ;
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -2656,6 +2729,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           default:
@@ -2669,21 +2743,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -2692,7 +2767,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -2720,30 +2795,31 @@ public class IamAdminServices {
     public void clear() {
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof getAPIVersion_args)
@@ -2778,6 +2854,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -2791,8 +2868,8 @@ public class IamAdminServices {
     }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_args(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getAPIVersion_args(");
       boolean first = true;
 
       sb.append(")");
@@ -2812,7 +2889,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
@@ -2892,15 +2969,15 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new getAPIVersion_resultStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new getAPIVersion_resultTupleSchemeFactory();
 
-    public java.lang.String success; // required
-    public IamAdminServicesException Idse; // required
+    public @org.apache.thrift.annotation.Nullable String success; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       SUCCESS((short)0, "success"),
       IDSE((short)1, "Idse");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -2911,6 +2988,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -2928,21 +3006,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -2951,7 +3030,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -2963,7 +3042,7 @@ public class IamAdminServices {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IamAdminServicesException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(getAPIVersion_result.class, metaDataMap);
     }
@@ -2972,8 +3051,8 @@ public class IamAdminServices {
     }
 
     public getAPIVersion_result(
-      java.lang.String success,
-      IamAdminServicesException Idse)
+      String success,
+      org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse)
     {
       this();
       this.success = success;
@@ -2988,7 +3067,7 @@ public class IamAdminServices {
         this.success = other.success;
       }
       if (other.isSetIdse()) {
-        this.Idse = new IamAdminServicesException(other.Idse);
+        this.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
       }
     }
 
@@ -3002,11 +3081,12 @@ public class IamAdminServices {
       this.Idse = null;
     }
 
-    public java.lang.String getSuccess() {
+    @org.apache.thrift.annotation.Nullable
+    public String getSuccess() {
       return this.success;
     }
 
-    public getAPIVersion_result setSuccess(java.lang.String success) {
+    public getAPIVersion_result setSuccess(@org.apache.thrift.annotation.Nullable String success) {
       this.success = success;
       return this;
     }
@@ -3026,11 +3106,12 @@ public class IamAdminServices {
       }
     }
 
-    public IamAdminServicesException getIdse() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
       return this.Idse;
     }
 
-    public getAPIVersion_result setIdse(IamAdminServicesException Idse) {
+    public getAPIVersion_result setIdse(@org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
       this.Idse = Idse;
       return this;
     }
@@ -3050,13 +3131,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((java.lang.String)value);
+          setSuccess((String)value);
         }
         break;
 
@@ -3064,14 +3145,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetIdse();
         } else {
-          setIdse((IamAdminServicesException)value);
+          setIdse((org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
         return getSuccess();
@@ -3080,13 +3162,13 @@ public class IamAdminServices {
         return getIdse();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -3095,11 +3177,11 @@ public class IamAdminServices {
       case IDSE:
         return isSetIdse();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof getAPIVersion_result)
@@ -3157,7 +3239,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -3167,7 +3249,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
+      lastComparison = Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -3180,6 +3262,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -3193,8 +3276,8 @@ public class IamAdminServices {
       }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("getAPIVersion_result(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("getAPIVersion_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -3229,7 +3312,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
@@ -3265,7 +3348,7 @@ public class IamAdminServices {
               break;
             case 1: // IDSE
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.Idse = new IamAdminServicesException();
+                struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
                 struct.Idse.read(iprot);
                 struct.setIdseIsSet(true);
               } else { 
@@ -3339,7 +3422,7 @@ public class IamAdminServices {
           struct.setSuccessIsSet(true);
         }
         if (incoming.get(1)) {
-          struct.Idse = new IamAdminServicesException();
+          struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
           struct.Idse.read(iprot);
           struct.setIdseIsSet(true);
         }
@@ -3356,19 +3439,22 @@ public class IamAdminServices {
 
     private static final org.apache.thrift.protocol.TField AUTHZ_TOKEN_FIELD_DESC = new org.apache.thrift.protocol.TField("authzToken", org.apache.thrift.protocol.TType.STRUCT, (short)1);
     private static final org.apache.thrift.protocol.TField GATEWAY_FIELD_DESC = new org.apache.thrift.protocol.TField("gateway", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+    private static final org.apache.thrift.protocol.TField TENANT_ADMIN_PASSWORD_CREDENTIAL_FIELD_DESC = new org.apache.thrift.protocol.TField("tenantAdminPasswordCredential", org.apache.thrift.protocol.TType.STRUCT, (short)3);
 
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUpGateway_argsStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUpGateway_argsTupleSchemeFactory();
 
-    public org.apache.airavata.model.security.AuthzToken authzToken; // required
-    public org.apache.airavata.model.workspace.Gateway gateway; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.profile.model.workspace.Gateway gateway; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       AUTHZ_TOKEN((short)1, "authzToken"),
-      GATEWAY((short)2, "gateway");
+      GATEWAY((short)2, "gateway"),
+      TENANT_ADMIN_PASSWORD_CREDENTIAL((short)3, "tenantAdminPasswordCredential");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -3379,12 +3465,15 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // AUTHZ_TOKEN
             return AUTHZ_TOKEN;
           case 2: // GATEWAY
             return GATEWAY;
+          case 3: // TENANT_ADMIN_PASSWORD_CREDENTIAL
+            return TENANT_ADMIN_PASSWORD_CREDENTIAL;
           default:
             return null;
         }
@@ -3396,21 +3485,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -3419,7 +3509,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -3429,9 +3519,11 @@ public class IamAdminServices {
     static {
       java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.security.AuthzToken.class)));
       tmpMap.put(_Fields.GATEWAY, new org.apache.thrift.meta_data.FieldMetaData("gateway", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.Gateway.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.profile.model.workspace.Gateway.class)));
+      tmpMap.put(_Fields.TENANT_ADMIN_PASSWORD_CREDENTIAL, new org.apache.thrift.meta_data.FieldMetaData("tenantAdminPasswordCredential", org.apache.thrift.TFieldRequirementType.REQUIRED, 
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.profile.model.tenant.PasswordCredential.class)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUpGateway_args.class, metaDataMap);
     }
@@ -3440,12 +3532,14 @@ public class IamAdminServices {
     }
 
     public setUpGateway_args(
-      org.apache.airavata.model.security.AuthzToken authzToken,
-      org.apache.airavata.model.workspace.Gateway gateway)
+      org.apache.custos.commons.model.security.AuthzToken authzToken,
+      org.apache.custos.profile.model.workspace.Gateway gateway,
+      org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential)
     {
       this();
       this.authzToken = authzToken;
       this.gateway = gateway;
+      this.tenantAdminPasswordCredential = tenantAdminPasswordCredential;
     }
 
     /**
@@ -3453,10 +3547,13 @@ public class IamAdminServices {
      */
     public setUpGateway_args(setUpGateway_args other) {
       if (other.isSetAuthzToken()) {
-        this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
+        this.authzToken = new org.apache.custos.commons.model.security.AuthzToken(other.authzToken);
       }
       if (other.isSetGateway()) {
-        this.gateway = new org.apache.airavata.model.workspace.Gateway(other.gateway);
+        this.gateway = new org.apache.custos.profile.model.workspace.Gateway(other.gateway);
+      }
+      if (other.isSetTenantAdminPasswordCredential()) {
+        this.tenantAdminPasswordCredential = new org.apache.custos.profile.model.tenant.PasswordCredential(other.tenantAdminPasswordCredential);
       }
     }
 
@@ -3468,13 +3565,15 @@ public class IamAdminServices {
     public void clear() {
       this.authzToken = null;
       this.gateway = null;
+      this.tenantAdminPasswordCredential = null;
     }
 
-    public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.security.AuthzToken getAuthzToken() {
       return this.authzToken;
     }
 
-    public setUpGateway_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+    public setUpGateway_args setAuthzToken(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken) {
       this.authzToken = authzToken;
       return this;
     }
@@ -3494,11 +3593,12 @@ public class IamAdminServices {
       }
     }
 
-    public org.apache.airavata.model.workspace.Gateway getGateway() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.profile.model.workspace.Gateway getGateway() {
       return this.gateway;
     }
 
-    public setUpGateway_args setGateway(org.apache.airavata.model.workspace.Gateway gateway) {
+    public setUpGateway_args setGateway(@org.apache.thrift.annotation.Nullable org.apache.custos.profile.model.workspace.Gateway gateway) {
       this.gateway = gateway;
       return this;
     }
@@ -3518,13 +3618,38 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.profile.model.tenant.PasswordCredential getTenantAdminPasswordCredential() {
+      return this.tenantAdminPasswordCredential;
+    }
+
+    public setUpGateway_args setTenantAdminPasswordCredential(@org.apache.thrift.annotation.Nullable org.apache.custos.profile.model.tenant.PasswordCredential tenantAdminPasswordCredential) {
+      this.tenantAdminPasswordCredential = tenantAdminPasswordCredential;
+      return this;
+    }
+
+    public void unsetTenantAdminPasswordCredential() {
+      this.tenantAdminPasswordCredential = null;
+    }
+
+    /** Returns true if field tenantAdminPasswordCredential is set (has been assigned a value) and false otherwise */
+    public boolean isSetTenantAdminPasswordCredential() {
+      return this.tenantAdminPasswordCredential != null;
+    }
+
+    public void setTenantAdminPasswordCredentialIsSet(boolean value) {
+      if (!value) {
+        this.tenantAdminPasswordCredential = null;
+      }
+    }
+
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case AUTHZ_TOKEN:
         if (value == null) {
           unsetAuthzToken();
         } else {
-          setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
+          setAuthzToken((org.apache.custos.commons.model.security.AuthzToken)value);
         }
         break;
 
@@ -3532,14 +3657,23 @@ public class IamAdminServices {
         if (value == null) {
           unsetGateway();
         } else {
-          setGateway((org.apache.airavata.model.workspace.Gateway)value);
+          setGateway((org.apache.custos.profile.model.workspace.Gateway)value);
+        }
+        break;
+
+      case TENANT_ADMIN_PASSWORD_CREDENTIAL:
+        if (value == null) {
+          unsetTenantAdminPasswordCredential();
+        } else {
+          setTenantAdminPasswordCredential((org.apache.custos.profile.model.tenant.PasswordCredential)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case AUTHZ_TOKEN:
         return getAuthzToken();
@@ -3547,14 +3681,17 @@ public class IamAdminServices {
       case GATEWAY:
         return getGateway();
 
+      case TENANT_ADMIN_PASSWORD_CREDENTIAL:
+        return getTenantAdminPasswordCredential();
+
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -3562,12 +3699,14 @@ public class IamAdminServices {
         return isSetAuthzToken();
       case GATEWAY:
         return isSetGateway();
+      case TENANT_ADMIN_PASSWORD_CREDENTIAL:
+        return isSetTenantAdminPasswordCredential();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof setUpGateway_args)
@@ -3599,6 +3738,15 @@ public class IamAdminServices {
           return false;
       }
 
+      boolean this_present_tenantAdminPasswordCredential = true && this.isSetTenantAdminPasswordCredential();
+      boolean that_present_tenantAdminPasswordCredential = true && that.isSetTenantAdminPasswordCredential();
+      if (this_present_tenantAdminPasswordCredential || that_present_tenantAdminPasswordCredential) {
+        if (!(this_present_tenantAdminPasswordCredential && that_present_tenantAdminPasswordCredential))
+          return false;
+        if (!this.tenantAdminPasswordCredential.equals(that.tenantAdminPasswordCredential))
+          return false;
+      }
+
       return true;
     }
 
@@ -3614,6 +3762,10 @@ public class IamAdminServices {
       if (isSetGateway())
         hashCode = hashCode * 8191 + gateway.hashCode();
 
+      hashCode = hashCode * 8191 + ((isSetTenantAdminPasswordCredential()) ? 131071 : 524287);
+      if (isSetTenantAdminPasswordCredential())
+        hashCode = hashCode * 8191 + tenantAdminPasswordCredential.hashCode();
+
       return hashCode;
     }
 
@@ -3625,7 +3777,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
+      lastComparison = Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -3635,7 +3787,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetGateway()).compareTo(other.isSetGateway());
+      lastComparison = Boolean.valueOf(isSetGateway()).compareTo(other.isSetGateway());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -3645,9 +3797,20 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
+      lastComparison = Boolean.valueOf(isSetTenantAdminPasswordCredential()).compareTo(other.isSetTenantAdminPasswordCredential());
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+      if (isSetTenantAdminPasswordCredential()) {
+        lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tenantAdminPasswordCredential, other.tenantAdminPasswordCredential);
+        if (lastComparison != 0) {
+          return lastComparison;
+        }
+      }
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -3661,8 +3824,8 @@ public class IamAdminServices {
     }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("setUpGateway_args(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("setUpGateway_args(");
       boolean first = true;
 
       sb.append("authzToken:");
@@ -3680,6 +3843,14 @@ public class IamAdminServices {
         sb.append(this.gateway);
       }
       first = false;
+      if (!first) sb.append(", ");
+      sb.append("tenantAdminPasswordCredential:");
+      if (this.tenantAdminPasswordCredential == null) {
+        sb.append("null");
+      } else {
+        sb.append(this.tenantAdminPasswordCredential);
+      }
+      first = false;
       sb.append(")");
       return sb.toString();
     }
@@ -3692,6 +3863,9 @@ public class IamAdminServices {
       if (gateway == null) {
         throw new org.apache.thrift.protocol.TProtocolException("Required field 'gateway' was not present! Struct: " + toString());
       }
+      if (tenantAdminPasswordCredential == null) {
+        throw new org.apache.thrift.protocol.TProtocolException("Required field 'tenantAdminPasswordCredential' was not present! Struct: " + toString());
+      }
       // check for sub-struct validity
       if (authzToken != null) {
         authzToken.validate();
@@ -3699,6 +3873,9 @@ public class IamAdminServices {
       if (gateway != null) {
         gateway.validate();
       }
+      if (tenantAdminPasswordCredential != null) {
+        tenantAdminPasswordCredential.validate();
+      }
     }
 
     private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
@@ -3709,7 +3886,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
@@ -3737,7 +3914,7 @@ public class IamAdminServices {
           switch (schemeField.id) {
             case 1: // AUTHZ_TOKEN
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+                struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
                 struct.authzToken.read(iprot);
                 struct.setAuthzTokenIsSet(true);
               } else { 
@@ -3746,13 +3923,22 @@ public class IamAdminServices {
               break;
             case 2: // GATEWAY
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.gateway = new org.apache.airavata.model.workspace.Gateway();
+                struct.gateway = new org.apache.custos.profile.model.workspace.Gateway();
                 struct.gateway.read(iprot);
                 struct.setGatewayIsSet(true);
               } else { 
                 org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
               }
               break;
+            case 3: // TENANT_ADMIN_PASSWORD_CREDENTIAL
+              if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+                struct.tenantAdminPasswordCredential = new org.apache.custos.profile.model.tenant.PasswordCredential();
+                struct.tenantAdminPasswordCredential.read(iprot);
+                struct.setTenantAdminPasswordCredentialIsSet(true);
+              } else { 
+                org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+              }
+              break;
             default:
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
           }
@@ -3778,6 +3964,11 @@ public class IamAdminServices {
           struct.gateway.write(oprot);
           oprot.writeFieldEnd();
         }
+        if (struct.tenantAdminPasswordCredential != null) {
+          oprot.writeFieldBegin(TENANT_ADMIN_PASSWORD_CREDENTIAL_FIELD_DESC);
+          struct.tenantAdminPasswordCredential.write(oprot);
+          oprot.writeFieldEnd();
+        }
         oprot.writeFieldStop();
         oprot.writeStructEnd();
       }
@@ -3797,17 +3988,21 @@ public class IamAdminServices {
         org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
         struct.authzToken.write(oprot);
         struct.gateway.write(oprot);
+        struct.tenantAdminPasswordCredential.write(oprot);
       }
 
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, setUpGateway_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+        struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
         struct.authzToken.read(iprot);
         struct.setAuthzTokenIsSet(true);
-        struct.gateway = new org.apache.airavata.model.workspace.Gateway();
+        struct.gateway = new org.apache.custos.profile.model.workspace.Gateway();
         struct.gateway.read(iprot);
         struct.setGatewayIsSet(true);
+        struct.tenantAdminPasswordCredential = new org.apache.custos.profile.model.tenant.PasswordCredential();
+        struct.tenantAdminPasswordCredential.read(iprot);
+        struct.setTenantAdminPasswordCredentialIsSet(true);
       }
     }
 
@@ -3826,9 +4021,9 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new setUpGateway_resultStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new setUpGateway_resultTupleSchemeFactory();
 
-    public org.apache.airavata.model.workspace.Gateway success; // required
-    public IamAdminServicesException Idse; // required
-    public org.apache.airavata.model.error.AuthorizationException ae; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.profile.model.workspace.Gateway success; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -3836,7 +4031,7 @@ public class IamAdminServices {
       IDSE((short)1, "Idse"),
       AE((short)2, "ae");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -3847,6 +4042,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -3866,21 +4062,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -3889,7 +4086,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -3899,11 +4096,11 @@ public class IamAdminServices {
     static {
       java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.workspace.Gateway.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.profile.model.workspace.Gateway.class)));
       tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IamAdminServicesException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
       tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.error.AuthorizationException.class)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(setUpGateway_result.class, metaDataMap);
     }
@@ -3912,9 +4109,9 @@ public class IamAdminServices {
     }
 
     public setUpGateway_result(
-      org.apache.airavata.model.workspace.Gateway success,
-      IamAdminServicesException Idse,
-      org.apache.airavata.model.error.AuthorizationException ae)
+      org.apache.custos.profile.model.workspace.Gateway success,
+      org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
+      org.apache.custos.commons.model.error.AuthorizationException ae)
     {
       this();
       this.success = success;
@@ -3927,13 +4124,13 @@ public class IamAdminServices {
      */
     public setUpGateway_result(setUpGateway_result other) {
       if (other.isSetSuccess()) {
-        this.success = new org.apache.airavata.model.workspace.Gateway(other.success);
+        this.success = new org.apache.custos.profile.model.workspace.Gateway(other.success);
       }
       if (other.isSetIdse()) {
-        this.Idse = new IamAdminServicesException(other.Idse);
+        this.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
       }
       if (other.isSetAe()) {
-        this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
+        this.ae = new org.apache.custos.commons.model.error.AuthorizationException(other.ae);
       }
     }
 
@@ -3948,11 +4145,12 @@ public class IamAdminServices {
       this.ae = null;
     }
 
-    public org.apache.airavata.model.workspace.Gateway getSuccess() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.profile.model.workspace.Gateway getSuccess() {
       return this.success;
     }
 
-    public setUpGateway_result setSuccess(org.apache.airavata.model.workspace.Gateway success) {
+    public setUpGateway_result setSuccess(@org.apache.thrift.annotation.Nullable org.apache.custos.profile.model.workspace.Gateway success) {
       this.success = success;
       return this;
     }
@@ -3972,11 +4170,12 @@ public class IamAdminServices {
       }
     }
 
-    public IamAdminServicesException getIdse() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
       return this.Idse;
     }
 
-    public setUpGateway_result setIdse(IamAdminServicesException Idse) {
+    public setUpGateway_result setIdse(@org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
       this.Idse = Idse;
       return this;
     }
@@ -3996,11 +4195,12 @@ public class IamAdminServices {
       }
     }
 
-    public org.apache.airavata.model.error.AuthorizationException getAe() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.error.AuthorizationException getAe() {
       return this.ae;
     }
 
-    public setUpGateway_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
+    public setUpGateway_result setAe(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae) {
       this.ae = ae;
       return this;
     }
@@ -4020,13 +4220,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((org.apache.airavata.model.workspace.Gateway)value);
+          setSuccess((org.apache.custos.profile.model.workspace.Gateway)value);
         }
         break;
 
@@ -4034,7 +4234,7 @@ public class IamAdminServices {
         if (value == null) {
           unsetIdse();
         } else {
-          setIdse((IamAdminServicesException)value);
+          setIdse((org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
         }
         break;
 
@@ -4042,14 +4242,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetAe();
         } else {
-          setAe((org.apache.airavata.model.error.AuthorizationException)value);
+          setAe((org.apache.custos.commons.model.error.AuthorizationException)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
         return getSuccess();
@@ -4061,13 +4262,13 @@ public class IamAdminServices {
         return getAe();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -4078,11 +4279,11 @@ public class IamAdminServices {
       case AE:
         return isSetAe();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof setUpGateway_result)
@@ -4153,7 +4354,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -4163,7 +4364,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
+      lastComparison = Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -4173,7 +4374,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
+      lastComparison = Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -4186,6 +4387,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -4199,8 +4401,8 @@ public class IamAdminServices {
       }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("setUpGateway_result(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("setUpGateway_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -4246,7 +4448,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
@@ -4274,7 +4476,7 @@ public class IamAdminServices {
           switch (schemeField.id) {
             case 0: // SUCCESS
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.success = new org.apache.airavata.model.workspace.Gateway();
+                struct.success = new org.apache.custos.profile.model.workspace.Gateway();
                 struct.success.read(iprot);
                 struct.setSuccessIsSet(true);
               } else { 
@@ -4283,7 +4485,7 @@ public class IamAdminServices {
               break;
             case 1: // IDSE
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.Idse = new IamAdminServicesException();
+                struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
                 struct.Idse.read(iprot);
                 struct.setIdseIsSet(true);
               } else { 
@@ -4292,7 +4494,7 @@ public class IamAdminServices {
               break;
             case 2: // AE
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+                struct.ae = new org.apache.custos.commons.model.error.AuthorizationException();
                 struct.ae.read(iprot);
                 struct.setAeIsSet(true);
               } else { 
@@ -4373,17 +4575,17 @@ public class IamAdminServices {
         org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
         java.util.BitSet incoming = iprot.readBitSet(3);
         if (incoming.get(0)) {
-          struct.success = new org.apache.airavata.model.workspace.Gateway();
+          struct.success = new org.apache.custos.profile.model.workspace.Gateway();
           struct.success.read(iprot);
           struct.setSuccessIsSet(true);
         }
         if (incoming.get(1)) {
-          struct.Idse = new IamAdminServicesException();
+          struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
           struct.Idse.read(iprot);
           struct.setIdseIsSet(true);
         }
         if (incoming.get(2)) {
-          struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+          struct.ae = new org.apache.custos.commons.model.error.AuthorizationException();
           struct.ae.read(iprot);
           struct.setAeIsSet(true);
         }
@@ -4404,15 +4606,15 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isUsernameAvailable_argsStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUsernameAvailable_argsTupleSchemeFactory();
 
-    public org.apache.airavata.model.security.AuthzToken authzToken; // required
-    public java.lang.String username; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken; // required
+    public @org.apache.thrift.annotation.Nullable String username; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       AUTHZ_TOKEN((short)1, "authzToken"),
       USERNAME((short)2, "username");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -4423,6 +4625,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // AUTHZ_TOKEN
@@ -4440,21 +4643,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -4463,7 +4667,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -4473,7 +4677,7 @@ public class IamAdminServices {
     static {
       java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.security.AuthzToken.class)));
       tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
@@ -4484,8 +4688,8 @@ public class IamAdminServices {
     }
 
     public isUsernameAvailable_args(
-      org.apache.airavata.model.security.AuthzToken authzToken,
-      java.lang.String username)
+      org.apache.custos.commons.model.security.AuthzToken authzToken,
+      String username)
     {
       this();
       this.authzToken = authzToken;
@@ -4497,7 +4701,7 @@ public class IamAdminServices {
      */
     public isUsernameAvailable_args(isUsernameAvailable_args other) {
       if (other.isSetAuthzToken()) {
-        this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
+        this.authzToken = new org.apache.custos.commons.model.security.AuthzToken(other.authzToken);
       }
       if (other.isSetUsername()) {
         this.username = other.username;
@@ -4514,11 +4718,12 @@ public class IamAdminServices {
       this.username = null;
     }
 
-    public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.security.AuthzToken getAuthzToken() {
       return this.authzToken;
     }
 
-    public isUsernameAvailable_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+    public isUsernameAvailable_args setAuthzToken(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken) {
       this.authzToken = authzToken;
       return this;
     }
@@ -4538,11 +4743,12 @@ public class IamAdminServices {
       }
     }
 
-    public java.lang.String getUsername() {
+    @org.apache.thrift.annotation.Nullable
+    public String getUsername() {
       return this.username;
     }
 
-    public isUsernameAvailable_args setUsername(java.lang.String username) {
+    public isUsernameAvailable_args setUsername(@org.apache.thrift.annotation.Nullable String username) {
       this.username = username;
       return this;
     }
@@ -4562,13 +4768,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case AUTHZ_TOKEN:
         if (value == null) {
           unsetAuthzToken();
         } else {
-          setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
+          setAuthzToken((org.apache.custos.commons.model.security.AuthzToken)value);
         }
         break;
 
@@ -4576,14 +4782,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetUsername();
         } else {
-          setUsername((java.lang.String)value);
+          setUsername((String)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case AUTHZ_TOKEN:
         return getAuthzToken();
@@ -4592,13 +4799,13 @@ public class IamAdminServices {
         return getUsername();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -4607,11 +4814,11 @@ public class IamAdminServices {
       case USERNAME:
         return isSetUsername();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof isUsernameAvailable_args)
@@ -4669,7 +4876,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
+      lastComparison = Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -4679,7 +4886,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
+      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -4692,6 +4899,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -4705,8 +4913,8 @@ public class IamAdminServices {
     }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("isUsernameAvailable_args(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("isUsernameAvailable_args(");
       boolean first = true;
 
       sb.append("authzToken:");
@@ -4750,7 +4958,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
@@ -4778,7 +4986,7 @@ public class IamAdminServices {
           switch (schemeField.id) {
             case 1: // AUTHZ_TOKEN
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+                struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
                 struct.authzToken.read(iprot);
                 struct.setAuthzTokenIsSet(true);
               } else { 
@@ -4842,7 +5050,7 @@ public class IamAdminServices {
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, isUsernameAvailable_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+        struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
         struct.authzToken.read(iprot);
         struct.setAuthzTokenIsSet(true);
         struct.username = iprot.readString();
@@ -4866,8 +5074,8 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUsernameAvailable_resultTupleSchemeFactory();
 
     public boolean success; // required
-    public IamAdminServicesException Idse; // required
-    public org.apache.airavata.model.error.AuthorizationException ae; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -4875,7 +5083,7 @@ public class IamAdminServices {
       IDSE((short)1, "Idse"),
       AE((short)2, "ae");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -4886,6 +5094,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -4905,21 +5114,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -4928,7 +5138,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -4942,9 +5152,9 @@ public class IamAdminServices {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
       tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IamAdminServicesException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
       tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.error.AuthorizationException.class)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isUsernameAvailable_result.class, metaDataMap);
     }
@@ -4954,8 +5164,8 @@ public class IamAdminServices {
 
     public isUsernameAvailable_result(
       boolean success,
-      IamAdminServicesException Idse,
-      org.apache.airavata.model.error.AuthorizationException ae)
+      org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
+      org.apache.custos.commons.model.error.AuthorizationException ae)
     {
       this();
       this.success = success;
@@ -4971,10 +5181,10 @@ public class IamAdminServices {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
       if (other.isSetIdse()) {
-        this.Idse = new IamAdminServicesException(other.Idse);
+        this.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
       }
       if (other.isSetAe()) {
-        this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
+        this.ae = new org.apache.custos.commons.model.error.AuthorizationException(other.ae);
       }
     }
 
@@ -5013,11 +5223,12 @@ public class IamAdminServices {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public IamAdminServicesException getIdse() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
       return this.Idse;
     }
 
-    public isUsernameAvailable_result setIdse(IamAdminServicesException Idse) {
+    public isUsernameAvailable_result setIdse(@org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
       this.Idse = Idse;
       return this;
     }
@@ -5037,11 +5248,12 @@ public class IamAdminServices {
       }
     }
 
-    public org.apache.airavata.model.error.AuthorizationException getAe() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.error.AuthorizationException getAe() {
       return this.ae;
     }
 
-    public isUsernameAvailable_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
+    public isUsernameAvailable_result setAe(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae) {
       this.ae = ae;
       return this;
     }
@@ -5061,13 +5273,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((java.lang.Boolean)value);
+          setSuccess((Boolean)value);
         }
         break;
 
@@ -5075,7 +5287,7 @@ public class IamAdminServices {
         if (value == null) {
           unsetIdse();
         } else {
-          setIdse((IamAdminServicesException)value);
+          setIdse((org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
         }
         break;
 
@@ -5083,14 +5295,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetAe();
         } else {
-          setAe((org.apache.airavata.model.error.AuthorizationException)value);
+          setAe((org.apache.custos.commons.model.error.AuthorizationException)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
         return isSuccess();
@@ -5102,13 +5315,13 @@ public class IamAdminServices {
         return getAe();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -5119,11 +5332,11 @@ public class IamAdminServices {
       case AE:
         return isSetAe();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof isUsernameAvailable_result)
@@ -5192,7 +5405,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -5202,7 +5415,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
+      lastComparison = Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -5212,7 +5425,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
+      lastComparison = Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -5225,6 +5438,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -5238,8 +5452,8 @@ public class IamAdminServices {
       }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("isUsernameAvailable_result(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("isUsernameAvailable_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -5278,7 +5492,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
         __isset_bitfield = 0;
@@ -5316,7 +5530,7 @@ public class IamAdminServices {
               break;
             case 1: // IDSE
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.Idse = new IamAdminServicesException();
+                struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
                 struct.Idse.read(iprot);
                 struct.setIdseIsSet(true);
               } else { 
@@ -5325,7 +5539,7 @@ public class IamAdminServices {
               break;
             case 2: // AE
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+                struct.ae = new org.apache.custos.commons.model.error.AuthorizationException();
                 struct.ae.read(iprot);
                 struct.setAeIsSet(true);
               } else { 
@@ -5410,12 +5624,12 @@ public class IamAdminServices {
           struct.setSuccessIsSet(true);
         }
         if (incoming.get(1)) {
-          struct.Idse = new IamAdminServicesException();
+          struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
           struct.Idse.read(iprot);
           struct.setIdseIsSet(true);
         }
         if (incoming.get(2)) {
-          struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+          struct.ae = new org.apache.custos.commons.model.error.AuthorizationException();
           struct.ae.read(iprot);
           struct.setAeIsSet(true);
         }
@@ -5440,12 +5654,12 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new registerUser_argsStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerUser_argsTupleSchemeFactory();
 
-    public org.apache.airavata.model.security.AuthzToken authzToken; // required
-    public java.lang.String username; // required
-    public java.lang.String emailAddress; // required
-    public java.lang.String firstName; // required
-    public java.lang.String lastName; // required
-    public java.lang.String newPassword; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken; // required
+    public @org.apache.thrift.annotation.Nullable String username; // required
+    public @org.apache.thrift.annotation.Nullable String emailAddress; // required
+    public @org.apache.thrift.annotation.Nullable String firstName; // required
+    public @org.apache.thrift.annotation.Nullable String lastName; // required
+    public @org.apache.thrift.annotation.Nullable String newPassword; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -5456,7 +5670,7 @@ public class IamAdminServices {
       LAST_NAME((short)5, "lastName"),
       NEW_PASSWORD((short)6, "newPassword");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -5467,6 +5681,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // AUTHZ_TOKEN
@@ -5492,21 +5707,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -5515,7 +5731,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -5525,7 +5741,7 @@ public class IamAdminServices {
     static {
       java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.security.AuthzToken.class)));
       tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       tmpMap.put(_Fields.EMAIL_ADDRESS, new org.apache.thrift.meta_data.FieldMetaData("emailAddress", org.apache.thrift.TFieldRequirementType.REQUIRED, 
@@ -5544,12 +5760,12 @@ public class IamAdminServices {
     }
 
     public registerUser_args(
-      org.apache.airavata.model.security.AuthzToken authzToken,
-      java.lang.String username,
-      java.lang.String emailAddress,
-      java.lang.String firstName,
-      java.lang.String lastName,
-      java.lang.String newPassword)
+      org.apache.custos.commons.model.security.AuthzToken authzToken,
+      String username,
+      String emailAddress,
+      String firstName,
+      String lastName,
+      String newPassword)
     {
       this();
       this.authzToken = authzToken;
@@ -5565,7 +5781,7 @@ public class IamAdminServices {
      */
     public registerUser_args(registerUser_args other) {
       if (other.isSetAuthzToken()) {
-        this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
+        this.authzToken = new org.apache.custos.commons.model.security.AuthzToken(other.authzToken);
       }
       if (other.isSetUsername()) {
         this.username = other.username;
@@ -5598,11 +5814,12 @@ public class IamAdminServices {
       this.newPassword = null;
     }
 
-    public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.security.AuthzToken getAuthzToken() {
       return this.authzToken;
     }
 
-    public registerUser_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+    public registerUser_args setAuthzToken(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken) {
       this.authzToken = authzToken;
       return this;
     }
@@ -5622,11 +5839,12 @@ public class IamAdminServices {
       }
     }
 
-    public java.lang.String getUsername() {
+    @org.apache.thrift.annotation.Nullable
+    public String getUsername() {
       return this.username;
     }
 
-    public registerUser_args setUsername(java.lang.String username) {
+    public registerUser_args setUsername(@org.apache.thrift.annotation.Nullable String username) {
       this.username = username;
       return this;
     }
@@ -5646,11 +5864,12 @@ public class IamAdminServices {
       }
     }
 
-    public java.lang.String getEmailAddress() {
+    @org.apache.thrift.annotation.Nullable
+    public String getEmailAddress() {
       return this.emailAddress;
     }
 
-    public registerUser_args setEmailAddress(java.lang.String emailAddress) {
+    public registerUser_args setEmailAddress(@org.apache.thrift.annotation.Nullable String emailAddress) {
       this.emailAddress = emailAddress;
       return this;
     }
@@ -5670,11 +5889,12 @@ public class IamAdminServices {
       }
     }
 
-    public java.lang.String getFirstName() {
+    @org.apache.thrift.annotation.Nullable
+    public String getFirstName() {
       return this.firstName;
     }
 
-    public registerUser_args setFirstName(java.lang.String firstName) {
+    public registerUser_args setFirstName(@org.apache.thrift.annotation.Nullable String firstName) {
       this.firstName = firstName;
       return this;
     }
@@ -5694,11 +5914,12 @@ public class IamAdminServices {
       }
     }
 
-    public java.lang.String getLastName() {
+    @org.apache.thrift.annotation.Nullable
+    public String getLastName() {
       return this.lastName;
     }
 
-    public registerUser_args setLastName(java.lang.String lastName) {
+    public registerUser_args setLastName(@org.apache.thrift.annotation.Nullable String lastName) {
       this.lastName = lastName;
       return this;
     }
@@ -5718,11 +5939,12 @@ public class IamAdminServices {
       }
     }
 
-    public java.lang.String getNewPassword() {
+    @org.apache.thrift.annotation.Nullable
+    public String getNewPassword() {
       return this.newPassword;
     }
 
-    public registerUser_args setNewPassword(java.lang.String newPassword) {
+    public registerUser_args setNewPassword(@org.apache.thrift.annotation.Nullable String newPassword) {
       this.newPassword = newPassword;
       return this;
     }
@@ -5742,13 +5964,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case AUTHZ_TOKEN:
         if (value == null) {
           unsetAuthzToken();
         } else {
-          setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
+          setAuthzToken((org.apache.custos.commons.model.security.AuthzToken)value);
         }
         break;
 
@@ -5756,7 +5978,7 @@ public class IamAdminServices {
         if (value == null) {
           unsetUsername();
         } else {
-          setUsername((java.lang.String)value);
+          setUsername((String)value);
         }
         break;
 
@@ -5764,7 +5986,7 @@ public class IamAdminServices {
         if (value == null) {
           unsetEmailAddress();
         } else {
-          setEmailAddress((java.lang.String)value);
+          setEmailAddress((String)value);
         }
         break;
 
@@ -5772,7 +5994,7 @@ public class IamAdminServices {
         if (value == null) {
           unsetFirstName();
         } else {
-          setFirstName((java.lang.String)value);
+          setFirstName((String)value);
         }
         break;
 
@@ -5780,7 +6002,7 @@ public class IamAdminServices {
         if (value == null) {
           unsetLastName();
         } else {
-          setLastName((java.lang.String)value);
+          setLastName((String)value);
         }
         break;
 
@@ -5788,14 +6010,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetNewPassword();
         } else {
-          setNewPassword((java.lang.String)value);
+          setNewPassword((String)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case AUTHZ_TOKEN:
         return getAuthzToken();
@@ -5816,13 +6039,13 @@ public class IamAdminServices {
         return getNewPassword();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -5839,11 +6062,11 @@ public class IamAdminServices {
       case NEW_PASSWORD:
         return isSetNewPassword();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof registerUser_args)
@@ -5953,7 +6176,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
+      lastComparison = Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -5963,7 +6186,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
+      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -5973,7 +6196,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetEmailAddress()).compareTo(other.isSetEmailAddress());
+      lastComparison = Boolean.valueOf(isSetEmailAddress()).compareTo(other.isSetEmailAddress());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -5983,7 +6206,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName());
+      lastComparison = Boolean.valueOf(isSetFirstName()).compareTo(other.isSetFirstName());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -5993,7 +6216,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName());
+      lastComparison = Boolean.valueOf(isSetLastName()).compareTo(other.isSetLastName());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -6003,7 +6226,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetNewPassword()).compareTo(other.isSetNewPassword());
+      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(other.isSetNewPassword());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -6016,6 +6239,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -6029,8 +6253,8 @@ public class IamAdminServices {
     }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("registerUser_args(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("registerUser_args(");
       boolean first = true;
 
       sb.append("authzToken:");
@@ -6118,7 +6342,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
@@ -6146,7 +6370,7 @@ public class IamAdminServices {
           switch (schemeField.id) {
             case 1: // AUTHZ_TOKEN
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+                struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
                 struct.authzToken.read(iprot);
                 struct.setAuthzTokenIsSet(true);
               } else { 
@@ -6266,7 +6490,7 @@ public class IamAdminServices {
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, registerUser_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+        struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
         struct.authzToken.read(iprot);
         struct.setAuthzTokenIsSet(true);
         struct.username = iprot.readString();
@@ -6298,8 +6522,8 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new registerUser_resultTupleSchemeFactory();
 
     public boolean success; // required
-    public IamAdminServicesException Idse; // required
-    public org.apache.airavata.model.error.AuthorizationException ae; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -6307,7 +6531,7 @@ public class IamAdminServices {
       IDSE((short)1, "Idse"),
       AE((short)2, "ae");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -6318,6 +6542,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -6337,21 +6562,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -6360,7 +6586,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -6374,9 +6600,9 @@ public class IamAdminServices {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
       tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IamAdminServicesException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
       tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.error.AuthorizationException.class)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(registerUser_result.class, metaDataMap);
     }
@@ -6386,8 +6612,8 @@ public class IamAdminServices {
 
     public registerUser_result(
       boolean success,
-      IamAdminServicesException Idse,
-      org.apache.airavata.model.error.AuthorizationException ae)
+      org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
+      org.apache.custos.commons.model.error.AuthorizationException ae)
     {
       this();
       this.success = success;
@@ -6403,10 +6629,10 @@ public class IamAdminServices {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
       if (other.isSetIdse()) {
-        this.Idse = new IamAdminServicesException(other.Idse);
+        this.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
       }
       if (other.isSetAe()) {
-        this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
+        this.ae = new org.apache.custos.commons.model.error.AuthorizationException(other.ae);
       }
     }
 
@@ -6445,11 +6671,12 @@ public class IamAdminServices {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public IamAdminServicesException getIdse() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
       return this.Idse;
     }
 
-    public registerUser_result setIdse(IamAdminServicesException Idse) {
+    public registerUser_result setIdse(@org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
       this.Idse = Idse;
       return this;
     }
@@ -6469,11 +6696,12 @@ public class IamAdminServices {
       }
     }
 
-    public org.apache.airavata.model.error.AuthorizationException getAe() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.error.AuthorizationException getAe() {
       return this.ae;
     }
 
-    public registerUser_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
+    public registerUser_result setAe(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae) {
       this.ae = ae;
       return this;
     }
@@ -6493,13 +6721,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((java.lang.Boolean)value);
+          setSuccess((Boolean)value);
         }
         break;
 
@@ -6507,7 +6735,7 @@ public class IamAdminServices {
         if (value == null) {
           unsetIdse();
         } else {
-          setIdse((IamAdminServicesException)value);
+          setIdse((org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
         }
         break;
 
@@ -6515,14 +6743,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetAe();
         } else {
-          setAe((org.apache.airavata.model.error.AuthorizationException)value);
+          setAe((org.apache.custos.commons.model.error.AuthorizationException)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
         return isSuccess();
@@ -6534,13 +6763,13 @@ public class IamAdminServices {
         return getAe();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -6551,11 +6780,11 @@ public class IamAdminServices {
       case AE:
         return isSetAe();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof registerUser_result)
@@ -6624,7 +6853,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -6634,7 +6863,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
+      lastComparison = Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -6644,7 +6873,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
+      lastComparison = Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -6657,6 +6886,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -6670,8 +6900,8 @@ public class IamAdminServices {
       }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("registerUser_result(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("registerUser_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -6710,7 +6940,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
         __isset_bitfield = 0;
@@ -6748,7 +6978,7 @@ public class IamAdminServices {
               break;
             case 1: // IDSE
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.Idse = new IamAdminServicesException();
+                struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
                 struct.Idse.read(iprot);
                 struct.setIdseIsSet(true);
               } else { 
@@ -6757,7 +6987,7 @@ public class IamAdminServices {
               break;
             case 2: // AE
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+                struct.ae = new org.apache.custos.commons.model.error.AuthorizationException();
                 struct.ae.read(iprot);
                 struct.setAeIsSet(true);
               } else { 
@@ -6842,12 +7072,12 @@ public class IamAdminServices {
           struct.setSuccessIsSet(true);
         }
         if (incoming.get(1)) {
-          struct.Idse = new IamAdminServicesException();
+          struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
           struct.Idse.read(iprot);
           struct.setIdseIsSet(true);
         }
         if (incoming.get(2)) {
-          struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+          struct.ae = new org.apache.custos.commons.model.error.AuthorizationException();
           struct.ae.read(iprot);
           struct.setAeIsSet(true);
         }
@@ -6868,15 +7098,15 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new enableUser_argsStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new enableUser_argsTupleSchemeFactory();
 
-    public org.apache.airavata.model.security.AuthzToken authzToken; // required
-    public java.lang.String username; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken; // required
+    public @org.apache.thrift.annotation.Nullable String username; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       AUTHZ_TOKEN((short)1, "authzToken"),
       USERNAME((short)2, "username");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -6887,6 +7117,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // AUTHZ_TOKEN
@@ -6904,21 +7135,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -6927,7 +7159,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -6937,7 +7169,7 @@ public class IamAdminServices {
     static {
       java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.security.AuthzToken.class)));
       tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
@@ -6948,8 +7180,8 @@ public class IamAdminServices {
     }
 
     public enableUser_args(
-      org.apache.airavata.model.security.AuthzToken authzToken,
-      java.lang.String username)
+      org.apache.custos.commons.model.security.AuthzToken authzToken,
+      String username)
     {
       this();
       this.authzToken = authzToken;
@@ -6961,7 +7193,7 @@ public class IamAdminServices {
      */
     public enableUser_args(enableUser_args other) {
       if (other.isSetAuthzToken()) {
-        this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
+        this.authzToken = new org.apache.custos.commons.model.security.AuthzToken(other.authzToken);
       }
       if (other.isSetUsername()) {
         this.username = other.username;
@@ -6978,11 +7210,12 @@ public class IamAdminServices {
       this.username = null;
     }
 
-    public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.security.AuthzToken getAuthzToken() {
       return this.authzToken;
     }
 
-    public enableUser_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+    public enableUser_args setAuthzToken(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken) {
       this.authzToken = authzToken;
       return this;
     }
@@ -7002,11 +7235,12 @@ public class IamAdminServices {
       }
     }
 
-    public java.lang.String getUsername() {
+    @org.apache.thrift.annotation.Nullable
+    public String getUsername() {
       return this.username;
     }
 
-    public enableUser_args setUsername(java.lang.String username) {
+    public enableUser_args setUsername(@org.apache.thrift.annotation.Nullable String username) {
       this.username = username;
       return this;
     }
@@ -7026,13 +7260,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case AUTHZ_TOKEN:
         if (value == null) {
           unsetAuthzToken();
         } else {
-          setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
+          setAuthzToken((org.apache.custos.commons.model.security.AuthzToken)value);
         }
         break;
 
@@ -7040,14 +7274,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetUsername();
         } else {
-          setUsername((java.lang.String)value);
+          setUsername((String)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case AUTHZ_TOKEN:
         return getAuthzToken();
@@ -7056,13 +7291,13 @@ public class IamAdminServices {
         return getUsername();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -7071,11 +7306,11 @@ public class IamAdminServices {
       case USERNAME:
         return isSetUsername();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof enableUser_args)
@@ -7133,7 +7368,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
+      lastComparison = Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -7143,7 +7378,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
+      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -7156,6 +7391,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -7169,8 +7405,8 @@ public class IamAdminServices {
     }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("enableUser_args(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("enableUser_args(");
       boolean first = true;
 
       sb.append("authzToken:");
@@ -7214,7 +7450,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
@@ -7242,7 +7478,7 @@ public class IamAdminServices {
           switch (schemeField.id) {
             case 1: // AUTHZ_TOKEN
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+                struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
                 struct.authzToken.read(iprot);
                 struct.setAuthzTokenIsSet(true);
               } else { 
@@ -7306,7 +7542,7 @@ public class IamAdminServices {
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, enableUser_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+        struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
         struct.authzToken.read(iprot);
         struct.setAuthzTokenIsSet(true);
         struct.username = iprot.readString();
@@ -7330,8 +7566,8 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new enableUser_resultTupleSchemeFactory();
 
     public boolean success; // required
-    public IamAdminServicesException Idse; // required
-    public org.apache.airavata.model.error.AuthorizationException ae; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -7339,7 +7575,7 @@ public class IamAdminServices {
       IDSE((short)1, "Idse"),
       AE((short)2, "ae");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -7350,6 +7586,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -7369,21 +7606,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -7392,7 +7630,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -7406,9 +7644,9 @@ public class IamAdminServices {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
       tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IamAdminServicesException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
       tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.error.AuthorizationException.class)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(enableUser_result.class, metaDataMap);
     }
@@ -7418,8 +7656,8 @@ public class IamAdminServices {
 
     public enableUser_result(
       boolean success,
-      IamAdminServicesException Idse,
-      org.apache.airavata.model.error.AuthorizationException ae)
+      org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
+      org.apache.custos.commons.model.error.AuthorizationException ae)
     {
       this();
       this.success = success;
@@ -7435,10 +7673,10 @@ public class IamAdminServices {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
       if (other.isSetIdse()) {
-        this.Idse = new IamAdminServicesException(other.Idse);
+        this.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
       }
       if (other.isSetAe()) {
-        this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
+        this.ae = new org.apache.custos.commons.model.error.AuthorizationException(other.ae);
       }
     }
 
@@ -7477,11 +7715,12 @@ public class IamAdminServices {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public IamAdminServicesException getIdse() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
       return this.Idse;
     }
 
-    public enableUser_result setIdse(IamAdminServicesException Idse) {
+    public enableUser_result setIdse(@org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
       this.Idse = Idse;
       return this;
     }
@@ -7501,11 +7740,12 @@ public class IamAdminServices {
       }
     }
 
-    public org.apache.airavata.model.error.AuthorizationException getAe() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.error.AuthorizationException getAe() {
       return this.ae;
     }
 
-    public enableUser_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
+    public enableUser_result setAe(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae) {
       this.ae = ae;
       return this;
     }
@@ -7525,13 +7765,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((java.lang.Boolean)value);
+          setSuccess((Boolean)value);
         }
         break;
 
@@ -7539,7 +7779,7 @@ public class IamAdminServices {
         if (value == null) {
           unsetIdse();
         } else {
-          setIdse((IamAdminServicesException)value);
+          setIdse((org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
         }
         break;
 
@@ -7547,14 +7787,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetAe();
         } else {
-          setAe((org.apache.airavata.model.error.AuthorizationException)value);
+          setAe((org.apache.custos.commons.model.error.AuthorizationException)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
         return isSuccess();
@@ -7566,13 +7807,13 @@ public class IamAdminServices {
         return getAe();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -7583,11 +7824,11 @@ public class IamAdminServices {
       case AE:
         return isSetAe();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof enableUser_result)
@@ -7656,7 +7897,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -7666,7 +7907,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
+      lastComparison = Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -7676,7 +7917,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
+      lastComparison = Boolean.valueOf(isSetAe()).compareTo(other.isSetAe());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -7689,6 +7930,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -7702,8 +7944,8 @@ public class IamAdminServices {
       }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("enableUser_result(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("enableUser_result(");
       boolean first = true;
 
       sb.append("success:");
@@ -7742,7 +7984,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
         __isset_bitfield = 0;
@@ -7780,7 +8022,7 @@ public class IamAdminServices {
               break;
             case 1: // IDSE
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.Idse = new IamAdminServicesException();
+                struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
                 struct.Idse.read(iprot);
                 struct.setIdseIsSet(true);
               } else { 
@@ -7789,7 +8031,7 @@ public class IamAdminServices {
               break;
             case 2: // AE
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+                struct.ae = new org.apache.custos.commons.model.error.AuthorizationException();
                 struct.ae.read(iprot);
                 struct.setAeIsSet(true);
               } else { 
@@ -7874,12 +8116,12 @@ public class IamAdminServices {
           struct.setSuccessIsSet(true);
         }
         if (incoming.get(1)) {
-          struct.Idse = new IamAdminServicesException();
+          struct.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException();
           struct.Idse.read(iprot);
           struct.setIdseIsSet(true);
         }
         if (incoming.get(2)) {
-          struct.ae = new org.apache.airavata.model.error.AuthorizationException();
+          struct.ae = new org.apache.custos.commons.model.error.AuthorizationException();
           struct.ae.read(iprot);
           struct.setAeIsSet(true);
         }
@@ -7900,15 +8142,15 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new isUserEnabled_argsStandardSchemeFactory();
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUserEnabled_argsTupleSchemeFactory();
 
-    public org.apache.airavata.model.security.AuthzToken authzToken; // required
-    public java.lang.String username; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken; // required
+    public @org.apache.thrift.annotation.Nullable String username; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
       AUTHZ_TOKEN((short)1, "authzToken"),
       USERNAME((short)2, "username");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -7919,6 +8161,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 1: // AUTHZ_TOKEN
@@ -7936,21 +8179,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -7959,7 +8203,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -7969,7 +8213,7 @@ public class IamAdminServices {
     static {
       java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
       tmpMap.put(_Fields.AUTHZ_TOKEN, new org.apache.thrift.meta_data.FieldMetaData("authzToken", org.apache.thrift.TFieldRequirementType.REQUIRED, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.security.AuthzToken.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.security.AuthzToken.class)));
       tmpMap.put(_Fields.USERNAME, new org.apache.thrift.meta_data.FieldMetaData("username", org.apache.thrift.TFieldRequirementType.REQUIRED, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
@@ -7980,8 +8224,8 @@ public class IamAdminServices {
     }
 
     public isUserEnabled_args(
-      org.apache.airavata.model.security.AuthzToken authzToken,
-      java.lang.String username)
+      org.apache.custos.commons.model.security.AuthzToken authzToken,
+      String username)
     {
       this();
       this.authzToken = authzToken;
@@ -7993,7 +8237,7 @@ public class IamAdminServices {
      */
     public isUserEnabled_args(isUserEnabled_args other) {
       if (other.isSetAuthzToken()) {
-        this.authzToken = new org.apache.airavata.model.security.AuthzToken(other.authzToken);
+        this.authzToken = new org.apache.custos.commons.model.security.AuthzToken(other.authzToken);
       }
       if (other.isSetUsername()) {
         this.username = other.username;
@@ -8010,11 +8254,12 @@ public class IamAdminServices {
       this.username = null;
     }
 
-    public org.apache.airavata.model.security.AuthzToken getAuthzToken() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.security.AuthzToken getAuthzToken() {
       return this.authzToken;
     }
 
-    public isUserEnabled_args setAuthzToken(org.apache.airavata.model.security.AuthzToken authzToken) {
+    public isUserEnabled_args setAuthzToken(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.security.AuthzToken authzToken) {
       this.authzToken = authzToken;
       return this;
     }
@@ -8034,11 +8279,12 @@ public class IamAdminServices {
       }
     }
 
-    public java.lang.String getUsername() {
+    @org.apache.thrift.annotation.Nullable
+    public String getUsername() {
       return this.username;
     }
 
-    public isUserEnabled_args setUsername(java.lang.String username) {
+    public isUserEnabled_args setUsername(@org.apache.thrift.annotation.Nullable String username) {
       this.username = username;
       return this;
     }
@@ -8058,13 +8304,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case AUTHZ_TOKEN:
         if (value == null) {
           unsetAuthzToken();
         } else {
-          setAuthzToken((org.apache.airavata.model.security.AuthzToken)value);
+          setAuthzToken((org.apache.custos.commons.model.security.AuthzToken)value);
         }
         break;
 
@@ -8072,14 +8318,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetUsername();
         } else {
-          setUsername((java.lang.String)value);
+          setUsername((String)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case AUTHZ_TOKEN:
         return getAuthzToken();
@@ -8088,13 +8335,13 @@ public class IamAdminServices {
         return getUsername();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -8103,11 +8350,11 @@ public class IamAdminServices {
       case USERNAME:
         return isSetUsername();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof isUserEnabled_args)
@@ -8165,7 +8412,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
+      lastComparison = Boolean.valueOf(isSetAuthzToken()).compareTo(other.isSetAuthzToken());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -8175,7 +8422,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
+      lastComparison = Boolean.valueOf(isSetUsername()).compareTo(other.isSetUsername());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -8188,6 +8435,7 @@ public class IamAdminServices {
       return 0;
     }
 
+    @org.apache.thrift.annotation.Nullable
     public _Fields fieldForId(int fieldId) {
       return _Fields.findByThriftId(fieldId);
     }
@@ -8201,8 +8449,8 @@ public class IamAdminServices {
     }
 
     @Override
-    public java.lang.String toString() {
-      java.lang.StringBuilder sb = new java.lang.StringBuilder("isUserEnabled_args(");
+    public String toString() {
+      StringBuilder sb = new StringBuilder("isUserEnabled_args(");
       boolean first = true;
 
       sb.append("authzToken:");
@@ -8246,7 +8494,7 @@ public class IamAdminServices {
       }
     }
 
-    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
+    private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
       try {
         read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
       } catch (org.apache.thrift.TException te) {
@@ -8274,7 +8522,7 @@ public class IamAdminServices {
           switch (schemeField.id) {
             case 1: // AUTHZ_TOKEN
               if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
-                struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+                struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
                 struct.authzToken.read(iprot);
                 struct.setAuthzTokenIsSet(true);
               } else { 
@@ -8338,7 +8586,7 @@ public class IamAdminServices {
       @Override
       public void read(org.apache.thrift.protocol.TProtocol prot, isUserEnabled_args struct) throws org.apache.thrift.TException {
         org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
-        struct.authzToken = new org.apache.airavata.model.security.AuthzToken();
+        struct.authzToken = new org.apache.custos.commons.model.security.AuthzToken();
         struct.authzToken.read(iprot);
         struct.setAuthzTokenIsSet(true);
         struct.username = iprot.readString();
@@ -8362,8 +8610,8 @@ public class IamAdminServices {
     private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new isUserEnabled_resultTupleSchemeFactory();
 
     public boolean success; // required
-    public IamAdminServicesException Idse; // required
-    public org.apache.airavata.model.error.AuthorizationException ae; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse; // required
+    public @org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae; // required
 
     /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
     public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -8371,7 +8619,7 @@ public class IamAdminServices {
       IDSE((short)1, "Idse"),
       AE((short)2, "ae");
 
-      private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
+      private static final java.util.Map<String, _Fields> byName = new java.util.HashMap<String, _Fields>();
 
       static {
         for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
@@ -8382,6 +8630,7 @@ public class IamAdminServices {
       /**
        * Find the _Fields constant that matches fieldId, or null if its not found.
        */
+      @org.apache.thrift.annotation.Nullable
       public static _Fields findByThriftId(int fieldId) {
         switch(fieldId) {
           case 0: // SUCCESS
@@ -8401,21 +8650,22 @@ public class IamAdminServices {
        */
       public static _Fields findByThriftIdOrThrow(int fieldId) {
         _Fields fields = findByThriftId(fieldId);
-        if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
         return fields;
       }
 
       /**
        * Find the _Fields constant that matches name, or null if its not found.
        */
-      public static _Fields findByName(java.lang.String name) {
+      @org.apache.thrift.annotation.Nullable
+      public static _Fields findByName(String name) {
         return byName.get(name);
       }
 
       private final short _thriftId;
-      private final java.lang.String _fieldName;
+      private final String _fieldName;
 
-      _Fields(short thriftId, java.lang.String fieldName) {
+      _Fields(short thriftId, String fieldName) {
         _thriftId = thriftId;
         _fieldName = fieldName;
       }
@@ -8424,7 +8674,7 @@ public class IamAdminServices {
         return _thriftId;
       }
 
-      public java.lang.String getFieldName() {
+      public String getFieldName() {
         return _fieldName;
       }
     }
@@ -8438,9 +8688,9 @@ public class IamAdminServices {
       tmpMap.put(_Fields.SUCCESS, new org.apache.thrift.meta_data.FieldMetaData("success", org.apache.thrift.TFieldRequirementType.DEFAULT, 
           new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
       tmpMap.put(_Fields.IDSE, new org.apache.thrift.meta_data.FieldMetaData("Idse", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, IamAdminServicesException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException.class)));
       tmpMap.put(_Fields.AE, new org.apache.thrift.meta_data.FieldMetaData("ae", org.apache.thrift.TFieldRequirementType.DEFAULT, 
-          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.airavata.model.error.AuthorizationException.class)));
+          new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.custos.commons.model.error.AuthorizationException.class)));
       metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
       org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(isUserEnabled_result.class, metaDataMap);
     }
@@ -8450,8 +8700,8 @@ public class IamAdminServices {
 
     public isUserEnabled_result(
       boolean success,
-      IamAdminServicesException Idse,
-      org.apache.airavata.model.error.AuthorizationException ae)
+      org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse,
+      org.apache.custos.commons.model.error.AuthorizationException ae)
     {
       this();
       this.success = success;
@@ -8467,10 +8717,10 @@ public class IamAdminServices {
       __isset_bitfield = other.__isset_bitfield;
       this.success = other.success;
       if (other.isSetIdse()) {
-        this.Idse = new IamAdminServicesException(other.Idse);
+        this.Idse = new org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException(other.Idse);
       }
       if (other.isSetAe()) {
-        this.ae = new org.apache.airavata.model.error.AuthorizationException(other.ae);
+        this.ae = new org.apache.custos.commons.model.error.AuthorizationException(other.ae);
       }
     }
 
@@ -8509,11 +8759,12 @@ public class IamAdminServices {
       __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SUCCESS_ISSET_ID, value);
     }
 
-    public IamAdminServicesException getIdse() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException getIdse() {
       return this.Idse;
     }
 
-    public isUserEnabled_result setIdse(IamAdminServicesException Idse) {
+    public isUserEnabled_result setIdse(@org.apache.thrift.annotation.Nullable org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException Idse) {
       this.Idse = Idse;
       return this;
     }
@@ -8533,11 +8784,12 @@ public class IamAdminServices {
       }
     }
 
-    public org.apache.airavata.model.error.AuthorizationException getAe() {
+    @org.apache.thrift.annotation.Nullable
+    public org.apache.custos.commons.model.error.AuthorizationException getAe() {
       return this.ae;
     }
 
-    public isUserEnabled_result setAe(org.apache.airavata.model.error.AuthorizationException ae) {
+    public isUserEnabled_result setAe(@org.apache.thrift.annotation.Nullable org.apache.custos.commons.model.error.AuthorizationException ae) {
       this.ae = ae;
       return this;
     }
@@ -8557,13 +8809,13 @@ public class IamAdminServices {
       }
     }
 
-    public void setFieldValue(_Fields field, java.lang.Object value) {
+    public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
       switch (field) {
       case SUCCESS:
         if (value == null) {
           unsetSuccess();
         } else {
-          setSuccess((java.lang.Boolean)value);
+          setSuccess((Boolean)value);
         }
         break;
 
@@ -8571,7 +8823,7 @@ public class IamAdminServices {
         if (value == null) {
           unsetIdse();
         } else {
-          setIdse((IamAdminServicesException)value);
+          setIdse((org.apache.custos.profile.iam.admin.services.cpi.exception.IamAdminServicesException)value);
         }
         break;
 
@@ -8579,14 +8831,15 @@ public class IamAdminServices {
         if (value == null) {
           unsetAe();
         } else {
-          setAe((org.apache.airavata.model.error.AuthorizationException)value);
+          setAe((org.apache.custos.commons.model.error.AuthorizationException)value);
         }
         break;
 
       }
     }
 
-    public java.lang.Object getFieldValue(_Fields field) {
+    @org.apache.thrift.annotation.Nullable
+    public Object getFieldValue(_Fields field) {
       switch (field) {
       case SUCCESS:
         return isSuccess();
@@ -8598,13 +8851,13 @@ public class IamAdminServices {
         return getAe();
 
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
     public boolean isSet(_Fields field) {
       if (field == null) {
-        throw new java.lang.IllegalArgumentException();
+        throw new IllegalArgumentException();
       }
 
       switch (field) {
@@ -8615,11 +8868,11 @@ public class IamAdminServices {
       case AE:
         return isSetAe();
       }
-      throw new java.lang.IllegalStateException();
+      throw new IllegalStateException();
     }
 
     @Override
-    public boolean equals(java.lang.Object that) {
+    public boolean equals(Object that) {
       if (that == null)
         return false;
       if (that instanceof isUserEnabled_result)
@@ -8688,7 +8941,7 @@ public class IamAdminServices {
 
       int lastComparison = 0;
 
-      lastComparison = java.lang.Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
+      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(other.isSetSuccess());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -8698,7 +8951,7 @@ public class IamAdminServices {
           return lastComparison;
         }
       }
-      lastComparison = java.lang.Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
+      lastComparison = Boolean.valueOf(isSetIdse()).compareTo(other.isSetIdse());
       if (lastComparison != 0) {
         return lastComparison;
       }
@@ -8708,7 +8961,7 @@ public class IamAdminServices {
           return lastComparison;
... 41441 lines suppressed ...