|
Security issues with the GM backend
It is difficult to authenticate communication between a server and a HTML5 applicationThis follows from the fact that the application is ultimately a script running on a machine that is outside your control. It is hard to ensure that an HTTP action really did originate from the application and not a modified copy or a manual HTTP tool. Embedding a "key" helps but is still only "security through obscurity". Communicating with a server other than the application's host will trigger CORS cross-site restrictionsThis limitation unreliably blocks communication between your application and a CGI server if the server has a different hostname than the application's server. Currently I know of three solutions:
At this time I am advocating option 2, but on the assumption that impersonation will at most allow an attacker to deface a high score table, and possibly disrupt saved games. Communicating with a database typically requires a further username and password, embedded in the scriptThis just seems like a frustrating weakness of CGI scripting, though it is hard to see how it could be fixed. If the username and password are stored in a configuration file then the file may need to be marked as executable to prevent it being inadvertently shared via HTTP. In the absence of a dedicated process authentication service the best we can do is to hide the database access details. Security through obscurity again. Shared CGI servers may allow other account holders to access your filesThis problem is diminishing as it is increasingly likely that a hosting account will feature a dedicated virtual machine, but under the older model all user accounts were stored as usernames under one operating system, and the shared web server had its own username. As the web server needed to access files to serve them the system needed group-read permissions as a minimum and this could be abused. Security Precautions
|