473,396 Members | 1,784 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Securing client/server communication

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.

Aug 12 '08 #1
5 3156
On Aug 12, 2:10*pm, AeonOfTime <s.mordz...@gmail.comwrote:
How would you go about securing the data exchanges?
You only want the client to do requests to the server. Therefore, the
client has to tell the server it is him and nobody else. This can be
done by supplying a password/cookie to the server on each request. As
long as nobody else knows the password, you're save.

Furthermore, you should not send the password plain-text over the
internet. You could use HTTPS or send a hash (MD5, SHA1) of the
password instead.
Aug 12 '08 #2
On Aug 12, 2:27*pm, Sjoerd <sjoer...@gmail.comwrote:
On Aug 12, 2:10*pm, AeonOfTime <s.mordz...@gmail.comwrote:
How would you go about securing the data exchanges?

You only want the client to do requests to the server. Therefore, the
client has to tell the server it is him and nobody else. This can be
done by supplying a password/cookie to the server on each request. As
long as nobody else knows the password, you're save.

Furthermore, you should not send the password plain-text over the
internet. You could use HTTPS or send a hash (MD5, SHA1) of the
password instead.
Hi Sjoerd, that makes sense - thanks a bundle. If I make sure the
client identifies itself, it can simply provide a user ID to access
that user's specific data - I don't need more than that. I always try
to keep it simple, but sometimes I get tangled up in details :|
Aug 12 '08 #3
AeonOfTime wrote:
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.
First of all, clients are not normally built on PHP. Client systems
generally don't have PHP installed. Additionally, if they do use PHP as
a client app, they won't be able to use the browser for a GUI. They'll
either be restricted to CLI or you'll have to have them install a PHP
GUI, also.
How would you go about securing the data exchanges?
Secure data transfer is typically performed with SSL. But my question
is - what is being transferred that you need SSL? Is there anything
potentially harmful if leaked, like credit card numbers or other
personal data? And even if someone does intercept a game move
(unlikely, but possible), what real harm will it do?
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?
If you have sessions on the client side, then not only are you requiring
the user to install PHP, but a web server on their client. Even fewer
are going to do this.
Thanks in advance for any input you may have.

Sounds like the wrong approach to me. If you really need a client side
app, you should be using a Java applet, not PHP. Java is installed on
many (most?) systems, it has a GUI, and can easily use it's own
communications mechanism between the client and server.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Aug 12 '08 #4
On Aug 12, 3:02*pm, Jerry Stuckle <jstuck...@attglobal.netwrote:
AeonOfTime wrote:
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.

First of all, clients are not normally built on PHP. *Client systems
generally don't have PHP installed. *Additionally, if they do use PHP as
a client app, they won't be able to use the browser for a GUI. *They'll
either be restricted to CLI or you'll have to have them install a PHP
GUI, also.
Hi jerry, I may have used the wrong terminology there. In my case, the
client is the PHP script that runs on my own server, and which
generates web pages via which users play the game. It is not a client
in the traditional sense that it runs on the user's system. Ideally I
will have one physical machine for the server that exists simply as a
central management source for game data, and several other physical
machines for rendering the game with load balancing.

Thus the only thing a user needs is a browser, and the communication
between client and server happens only between my own personal
scripts. Sorry for the confusion.
>
How would you go about securing the data exchanges?

Secure data transfer is typically performed with SSL. *But my question
is - what is being transferred that you need SSL? *Is there anything
potentially harmful if leaked, like credit card numbers or other
personal data? *And even if someone does intercept a game move
(unlikely, but possible), what real harm will it do?
The harm lies in the fact that I plan on making the game code open
source in the future, giving players full insight in how the system
works. There is no critical data being exchanged per se, but I do not
want any data to be leaked either. I don't think I will go for an SSL
connection though, that would be overkill and slow down the
communication somewhat. I think a unique client token will be enough -
that way even if you were able to intercept something you could not do
anything with it.
>
Sounds like the wrong approach to me. *If you really need a client side
app, you should be using a Java applet, not PHP. *Java is installed on
many (most?) systems, it has a GUI, and can easily use it's own
communications mechanism between the client and server.
Yes, java or even flash could have been a choice for a GUI, but I
settled for plain old HTML for now with enhanced functionalities in
Flash and AJAX, it is sufficient for what I have in mind.

Thanks for the input.
Aug 12 '08 #5
On Aug 12, 1:10*pm, AeonOfTime <s.mordz...@gmail.comwrote:
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.
HTTPS is the only sensible way to go - even if you run your own CA

C.
Aug 12 '08 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

88
by: Mike | last post by:
Is there a way to determine what a user's default email client is? I read a post from 3 years ago that said no. I guess I'm hoping something has come along since then.
3
by: Harlin | last post by:
Hi, I installed the admin client on my WebSphere box. I am now attempting to connect to my DB2 server (on another box). I have been able to find the DB2 server, instance and needed databases....
4
by: Christian Westerlund | last post by:
Hi! Does anyone know if it is possible for a client server communication easy in .NET with these requirements: The client always initiates the communication The server only answers (responds)...
11
by: Wm. Scott Miller | last post by:
Hello all! We are building applications here and have hashing algorithms to secure secrets (e.g passwords) by producing one way hashes. Now, I've read alot and I've followed most of the advice...
0
by: alberich | last post by:
I have a problem securing my webservice with Windows authentication. The goal is a client app transfering (large amounts of) data to a server which is blocked for anonymous requests. To do this,...
2
by: thilandeneth | last post by:
i need to do telnet via a web server please give me a idia to initiate the project following requirements are needed 1 Create web based custom telnet client to communicate with remote...
4
by: =?Utf-8?B?aGlsZXlq?= | last post by:
Hi, I'm developing a web service that needs to communicate with a custom application on an intranet. There is also a configuration utility which may be run on a different server machine for...
0
by: Maurizio | last post by:
I'd like to ask some suggestion regarding a software that I'm developping. For develop the project I've to use VB.NET and Framework 3.5 This is a Client Server application. I've some computer...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.