Hi Pubudu,

We are glad to see your interest in "*21: [IS] Document Based NoSQL Support
for WSO2 Identity Server Database*" project. In order to make you familiar
with this project with regard to WSO2 platform, we would like you to
complete the following task which would provide an understanding on how the
userstore managers are used in WSO2 products.


1. Refer [1] and understand how a userstore manager can be written and used
in a product like WSO2 Identity Server [2].

2. Refer [3] and understand more about Claims and Claim Management.

3. Referring [1], extend the
org.wso2.carbon.user.core.jdbc.JDBCUserStoreManager class and write your
own JDBC userstore manaager. (MySQL is preferred).

4. Introduce a new claim called lastPasswordResetTimestamp which tracks the
timestamp of each user's last successful password reset attempt. (in WSO2
Identity Server). For this you can refer [1] and override the
doUpdateCredential, doUpdateCredentialByAdmin methods in the custom
userstore manager you wrote in previous step. Inside these methods after
successful password reset, set the current timestemp as a user claim. For
this you can refer [4].

5. In the JDBC userstore manager you have written in above step, override
the doAuthenticate method. Inside the method, after performing
authentication, compare the timestamp of the last time the user updated the
credentials with current timestamp. If it is greater than 60 days (you can
hardcode this value for the moment) return an exception with a message
saying the user has to reset the password as it is expired. (For the users
where the claim for password reset timestamp is empty, you can let the
users successfully authenticate)

When performing above tasks, if you face any difficulty, you can ask for
help from this mail thread. You can use GitHub to share your source code
and after completing a deliverable from above steps, you can share your
progress with us.

If you need further clarifications, please get back.

[1] https://docs.wso2.com/display/IS510/Writing+a+Custom+User+Store+Manager
[2] http://wso2.com/products/identity-server/
[3]
http://tharindue.blogspot.com/2015/08/claim-management-operations-in-wso2.html
[4]
http://tharindue.blogspot.com/2015/12/tracking-last-successful-login-attempt.html
[5]
http://tharindue.blogspot.com/2015/05/a-workaround-for-renaming-username-of.html

Regards,
TharinduE

On Sat, Mar 12, 2016 at 3:50 PM, Pubudu Dodangoda <pubudu.do...@gmail.com>
wrote:

> Hi,
>
> I am an undergraduate of Department of Computer Science and Engineering,
> University of Moratuwa. While going through the GSoC project ideas posted
> by WSO2, I found the following two very interesting.
>
> 1) Proposal 21: [IS] Document Based NoSQL Support for WSO2 Identity Server
> Database
> 2) Proposal 22: [IS] RESTful Fine Grained Authorization-as-a-Service
> (AZaaS)
>
> I found these two projects to be interesting since I have worked with
> MongoDB, JUnit, Selenium, REST and SOAP and WSO2 Products.
> I am currently studying about these two projects. Please let me know if
> there is anything that I could refer, analyze or implement before sending
> you my approach on this project. And also if possible, Can you please
> elaborate more on these two projects, so I can select one and focus more on
> that.
>
> I am sorry for being late to send this email. That was because of my
> semester exams.
>
> Thank You and Kind Regards,
>
> Pubudu
>
> --
> Pubudu Dodangoda
> BSc Engineering(Hon's) Undergraduate
> Department of Computer Science Engineering
> University of Moratuwa
> 0716053681 / 0775192994
>



-- 

Tharindu Edirisinghe
Software Engineer | WSO2 Inc
Platform Security Team
Blog : tharindue.blogspot.com
mobile : +94 775181586
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to