Forum: Ruby on Rails Using Random Longer Non-Sequential IDs

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
9904f8acaf66a3c1a4b4434676be11cf?d=identicon&s=25 John Kopanas (Guest)
on 2006-02-13 00:17
(Received via mailing list)
Instead of using sequential integers for IDs for my objects I was
wondering if I could easily make it so that my IDs where longer auto-
generated random strings/integers.

So instead of:
http://www.mydomain.com/user/view/1

Would be:

http://www.mydomain.com/user/view/d81096b87a7c5565f

On top of that... is there big benefits for security reasons to use
non-sequential numbers?  Is it worth it?

Thanks :-)

John Kopanas
http://www.kopanas.com


=====================================================================
http://www.soen.info - source of the freshest software engineering
information on the net
http://cusec.soen.info - software engineering conference
59de94a56fd2c198f33d9515d1c05961?d=identicon&s=25 Tom Mornini (Guest)
on 2006-02-13 00:42
(Received via mailing list)
On Feb 12, 2006, at 3:17 PM, John Kopanas wrote:

> On top of that... is there big benefits for security reasons to use
> non-sequential numbers?  Is it worth it?

No, security through obscurity will just give you a false sense of
security.

--
-- Tom Mornini
5d15c6821f3c3054c04b85471824ba7c?d=identicon&s=25 Roustem Karimov (Guest)
on 2006-02-13 01:23
(Received via mailing list)
On Sunday, February 12, 2006, at 6:17 PM, John Kopanas wrote:
>
>http://www.soen.info - source of the freshest software engineering
>information on the net
>http://cusec.soen.info - software engineering conference
>
>
>_______________________________________________
>Rails mailing list
>Rails@lists.rubyonrails.org
>http://lists.rubyonrails.org/mailman/listinfo/rails

You can add an extra column to your table and generate random unique id
(unique secondary key). We used this approach to display order pages on
http://www.palmsphere.com

Best Regards, Roustem.
This topic is locked and can not be replied to.