Let's assume a web application (in this case a browser-based game)
with a custom HTTP server built on PHP, and a client also built on
PHP. The client uses the server to access and change data. Even if the
client server communication is not directly visible to the user (who
logs into the client), the fact that the server is publicly accessible
(a port sniffer would be enough to find it) means the communication
has to be secured.
How would you go about securing the data exchanges?
I am thinking of using unique tokens that are given to each client and
which have to be provided in the data sets, and which would only be
valid for a given amount of time before they have to be renewed. I am
a bit confused though, as I have the user authentication on the
clientside (via sessions) and the communication with the server which
happens in the background. Can I use the same session maybe, or does
that open new vulnerabilities ?
Thanks in advance for any input you may have.
with a custom HTTP server built on PHP, and a client also built on
PHP. The client uses the server to access and change data. Even if the
client server communication is not directly visible to the user (who
logs into the client), the fact that the server is publicly accessible
(a port sniffer would be enough to find it) means the communication
has to be secured.
How would you go about securing the data exchanges?
I am thinking of using unique tokens that are given to each client and
which have to be provided in the data sets, and which would only be
valid for a given amount of time before they have to be renewed. I am
a bit confused though, as I have the user authentication on the
clientside (via sessions) and the communication with the server which
happens in the background. Can I use the same session maybe, or does
that open new vulnerabilities ?
Thanks in advance for any input you may have.
Comment