Hello again! During my tests, I "reinstalled" a new Identity Server v5.3.0 where I let the default configuration for the primary user store. I configured my custom secondary user store which retrieves data from a database. This custom user store is implemented by extending te AbstractUserStoreManager class and I generated a OSGi bundle which I dropped in the repository/components/dropins directory.
So I can see my list of users coming from this user store when I display it from the identity server. But, when I want to display the roles of a suer, I noticed that the primary user store is called (in my case, that was the default org.wso2.carbon.user.core.ldap.ReadWriteLDAPUserStoreManager configured in the user-mgt.xml configuration file) to check if the user existed and to retrieve its roles. Did I miss something in my implementation of the user store to have the effect of the primary user store taking the lead to retrieve the roles physically located on the secondary user store? Regards, Thomas 2017-08-17 11:22 GMT+02:00 Thomas LEGRAND <[email protected]>: > Hello, > > I really don't understand why my "external" roles don't appear in the list > and why no role methods are called in my connector because, when I > configure a LDAP one, I can see the roles retrieved from the LDAP are > listed with the internal ones. > > I set the log level to DEBUG to see that the LDAP user store is calling > the internal role retrieval method before checking if the user exists: > > [2017-08-17 11:18:00,647] DEBUG > {org.wso2.carbon.user.core.common.AbstractUserStoreManager} > - Retrieving internal roles for user name : a.bresson and search filter * > [2017-08-17 11:18:00,648] DEBUG > {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} > - Searching for user a.bresson > > But in my case, the user check method isn't even called! > > If I continue with the logs, I can see that: > > [2017-08-17 11:18:00,653] DEBUG > {org.wso2.carbon.user.core.ldap.ReadOnlyLDAPUserStoreManager} > - Reading roles with the memberOfProperty Property: memberOf > > Following this source code [1], it seems that it executes the method to > retrieve the external roles. On my side, in my own connector, that does not > even go there because it doesn't even check if the user exists. > > What am I missing? > > Regards, > > Thomas > > [1] https://github.com/biliroy/carbon4-kernel/blob/ > master/core/org.wso2.carbon.user.core/src/main/java/org/ > wso2/carbon/user/core/ldap/ReadOnlyLDAPUserStoreManager.java#L1724 > > 2017-08-16 9:56 GMT+02:00 Thomas LEGRAND <[email protected]>: > >> Hello everybody, >> >> I am writing a custom user store for the Identity Server and I >> successfully retrieved my list of users from my database. But when I try to >> display the roles of a user by clicking on the "View Roles" button [1], >> only the internal roles are displayed. >> I implemented the methods doGetExternalRoleListOfUser(), >> doGetDisplayNamesForInternalRole(), doGetSharedRoleListOfUser() to log >> something on the INFO level but nothing happens. >> >> Can someone tell me which method to implement? >> >> Regards, >> >> Thomas >> >> [1] [image: Images intégrées 1] >> > >
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
