This post is about a new feature which is to be released with WSO2 Identity Server (IS) 5.2.0. This feature introduces a new service which enables users to count users, roles, claims etc. through the Management Console (MC) and Admin services.
Lets look at how to use this service.
1. Download the IS 5.2.0 from the WSO2 products page once it is available.
http://wso2.com/products/identity-server/
2. Enable the JDBC User store as the primary user store. Refer here to configure a JDBC User Store
3. Add the below property inside <UserStoreManager class="org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager"> config in /repository/conf/user-mgt.xml
<Property name="CountRetrieverClass">org.wso2.carbon.identity.user.store.count.jdbc.JDBCUserStoreCountRetriever</Property>
4. Change the HideAdminServiceWSDLs property in /repository/conf/carbon.xml to false to get access to the WSDL's of the admin services
<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>
<Property name="CountRetrieverClass">org.wso2.carbon.identity.user.store.count.jdbc.JDBCUserStoreCountRetriever</Property>
4. Change the HideAdminServiceWSDLs property in /repository/conf/carbon.xml to false to get access to the WSDL's of the admin services
<HideAdminServiceWSDLs>false</HideAdminServiceWSDLs>
5. Start the IS server
Access the User Store Count via MC
Login to the MC and navigate to Users and Roles
Under Users, you will be able to see a new table named "Count Users" where you can count the number of users in each domain, with different claims and user name patterns etc.
Similarly, under Roles you will be able to see a new table named "Count Roles" where you can count roles in different user store domains.
Access the User Store Count via Admin Services
Access the WSDL of UserStoreCountService service by browsing https://localhost:9443/services/UserStoreCountService?wsdl
If the WSDL is loading, access the methods of the service through SoapUI. Here, you will have access to additional methods (CountByClaimsInDomain, countClaims) than from UI (MC).
Note:
Currently, this feature supports only JDBC User Stores. But users have the capability to extend this feature by writing their own class implementing correct interfaces. Refer here for more info in extending this feature.
Hope this post helps you to use this new feature available from WSO2 IS 5.2.0. Feel free to add a comment if you have any queries :)
No comments:
Post a Comment