get - Security : primary key parameter in an url -


i have question security. have website using url that:

www.mysite.com/product?id=4 

on server side, check of course if product id=4 exists , if connected user has right permission see page product. if not user gets error "not authorized".

my problem id=4 primary key of table. , wonder if idea primary key appears in clear in url.

perhaps

www.mysite.com/product?id=45t6yhyu431azefgthu78n 

is better? better transform these parameters in address bar? or not necessary if security managed correctly on server side ?

it depends on identifier refers to. have wonder attacker can information. leaking opaque identifier in url give attacker valuable information? can he/she use information retrieve more information in unsecured way?

if example identifier medical record number (mrn) used in other systems , on numerous paper forms, hipaa violation use identifier in url.

if on other hand identifier points product in inventory table fine use in url fragment or query parameter.


Comments

Popular posts from this blog

python - argument must be rect style object - Pygame -

webrtc - Which ICE candidate am I using and why? -

c# - Better 64-bit byte array hash -