---------- Forwarded message ---------- From: Bernard Paris <bernard.pa...@uclouvain.be> Date: Fri, Jun 8, 2018 at 6:15 PM Subject: Re: [Dev] migrating/transfering users and roles To: Maneesha Wijesekara <manee...@wso2.com>
Hello, we just do a new users database dump, and this time we changed the owner id in the dump file before importing the datas into the postgres DB. So now we have got absolutely NO warnings during DB restore, we are sure the DB was correctly an fully imported. Again we can see all users and their assigned roles in the console. Anyway the role base authentication does't work as it does on the "old" system from where the users datas and handler class are coming. Indeed the log messages tell there is a problem with the realm, so the user roles list cannot be found : TID: [-1234] [] [2018-06-08 09:08:58,470] DEBUG {org.wso2.api.authorization.RoleBasedAuthorizationHandler} - Rest API Basic auth Handler tenant: -1234 {org.wso2.api.authorization. RoleBasedAuthorizationHandler} TID: [-1234] [] [2018-06-08 09:08:58,470] DEBUG {org.wso2.api.authorization.RoleBasedAuthorizationHandler} - Unable to get the realm {org.wso2.api.authorization. RoleBasedAuthorizationHandler} TID: [-1234] [] [2018-06-08 09:08:58,471] INFO {org.wso2.api.authorization.RoleBasedAuthorizationHandler} - Unable to authorize the user with the UserName : epc {org.wso2.api.authorization.RoleBasedAuthorizationHandler} That makes me think it could me a problem that have nothing to do with users table. By the way I created from scratch in the web console a new user, give him roles, and the authorization failed too with same error. Our handler was copied from: https://github.com/malakasilva/ESB/blob/master/ESB-Artifacts/Role_Based_ Authorization_Handler/src/main/java/org/wso2/api/authorization/ RoleBasedAuthorizationHandler.java Bernard Le 8 juin 2018 à 09:25, Bernard Paris <bernard.pa...@uclouvain.be> a écrit : Hi Maneesha thanks for your answer. I did the database transfer ; since the tables owner in the DB have changed I got some warnings. Anyway in the web console of EI I see all users and their roles. Great I think… until I tested some services which need authentication using org.wso2.api.authorization.RoleBasedAuthorizationHandler. It doesn't work anymore, I see this error messages int the logs: TID: [-1234] [] [2018-06-08 09:08:58,470] DEBUG {org.wso2.api.authorization.RoleBasedAuthorizationHandler} - Rest API Basic auth Handler tenant: -1234 {org.wso2.api.authorization. RoleBasedAuthorizationHandler} TID: [-1234] [] [2018-06-08 09:08:58,470] DEBUG {org.wso2.api.authorization.RoleBasedAuthorizationHandler} - Unable to get the realm {org.wso2.api.authorization. RoleBasedAuthorizationHandler} TID: [-1234] [] [2018-06-08 09:08:58,471] INFO {org.wso2.api.authorization.RoleBasedAuthorizationHandler} - Unable to authorize the user with the UserName : epc {org.wso2.api.authorization.RoleBasedAuthorizationHandler} Any idea of what's the matter ? Bernard Le 7 juin 2018 à 10:14, Maneesha Wijesekara <manee...@wso2.com> a écrit : Hi Bernard, You can simply restore a backup of database used to store users in ESB 5.0.0 to EI 6.2.0, as mentioned in our documentation [1]. If you used secondary user stores in WSO2 ESB 5.0.0, you need to copy the 'userstore' folder resided in <ESB_HOME>/repository/deployment/server/ directory to the <EI_HOME>/repository/deployment/server/ directory in WSO2 EI 6.2.0. [1] https://docs.wso2.com/display/EI620/Upgrading+from+ WSO2+Enterprise+Service+Bus#UpgradingfromWSO2EnterpriseSer viceBus-Upgradingthedatabase Regards Maneesha On Thu, Jun 7, 2018 at 1:31 PM, Bernard Paris <bernard.pa...@uclouvain.be> wrote: > Hello, > > we are migrating form wso2-ESB 5.0 to brandnew servers with wso2-ei6.2. > How could we migrate users and roles from the old system to the other ? > > Thanks for this, > > *Bernard* > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > *Bernard Paris* *Publication programme d'études - gestion ESB* Informaticien SGSI/SISG Service général du système d'information (SGSI) Place des Sciences, 4 <https://maps.google.com/?q=Place+des+Sciences,+4&entry=gmail&source=g> bte L6.08.01 1348 Louvain-la-Neuve Email: bernard.pa...@uclouvain.be <bernard.pa...@uclouvain.be> Tél. 32 (0)10 47 45 27 https://uclouvain.be/fr/decouvrir/sgsi.html -- Maneesha Wijesekara Software Engineer - QA Team WSO2 Inc. Email: manee...@wso2.com Linkedin: http://linkedin.com/in/maneeshawijesekara Mobile: +94712443119
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev