apache - How to securely share PHP sessions between virtual hosts. -
this typical apache httpd serving php pages on several virtual hosts.
the reason want share sessions between virtual hosts, bridge old version of our mini-app, , provide new experience of our new beta version users.
immediately after realized sessions shared default, added $_session["instance"] variable in globally-included per-site handler, checks page permission this:
the "instance" variable checked against hard-coded per-site environment variable, , if unmatch, user redirected login page.
the existence of user identity checked in session variables, redirect if unset.
the group membership compared against hard-coded in current page, redirect if unmatch.
item 2 , 3 pre-existing. these session variables set login page, no other page modifies them.
there hardly reason justifying implementing session separation using php, other ease configuration when migrating alternative server program in unlikely future.
so question is: other things cautious about, when dealing sessions security?
Comments
Post a Comment