[gatein-issues] [JBoss JIRA] (GTNPORTAL-2771) Ensure that generated rememberme token is really unique

Marek Posolda (JIRA) jira-events at lists.jboss.org
Wed Dec 12 09:09:17 EST 2012


     [ https://issues.jboss.org/browse/GTNPORTAL-2771?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marek Posolda updated GTNPORTAL-2771:
-------------------------------------

              Status: Pull Request Sent  (was: Open)
    Git Pull Request: https://github.com/gatein/gatein-portal/pull/296


Pull request based on approach 2 (generate different tokenId if it already exists). So generating of token is based on random number and format of tokens is still the same.
                
> Ensure that generated rememberme token is really unique
> -------------------------------------------------------
>
>                 Key: GTNPORTAL-2771
>                 URL: https://issues.jboss.org/browse/GTNPORTAL-2771
>             Project: GateIn Portal
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>            Reporter: Marek Posolda
>            Assignee: Marek Posolda
>
> Currently we are generating random rememberme tokens based on random int number (random.nextInt()). In systems with millions or many thousands login, this discriminator is not enough. 
> We should improve it and fix it either by:
> 1) Ensure that generated token is really unique. In system with many logins the random number may not be unique enough, so we need to add other info (like System.currentTimeMillis() or counter or both...)
> 2) In case that token already exists, we should generate other one instead of refresh the current one.
> Maybe combination of both approaches would be best :-)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the gatein-issues mailing list