Hi all,
First off - most impressed by AppGameKit on HTML5. Very nice.
I've been looking at how to protect assets from just being downloaded from the app's folder when stored on a webserver.
The problem is, that if the address "http://whateversite.com/MyApp/AGKPlayerData.data" (for example) is entered into the browser, the graphics for the game can be downloaded and nicked. I know we could encrypt these, by the way. This thread is about how we could secure these files so that Joe Public could not get at them in the first place.
I have tried setting permissions on the other files in the folder, but AGKPlayer needs to be able to read these to run the game. AGKPlayer's security context is the same as a public viewing of the website, so if we make the files unavailable to the outside world, AGKPlayer can't get at them either.
To my mind, there are two options here. Firstly, find some way to run AGKPlayer in a different security context so that it can access the protected files it needs. I don't know how you'd do this.
Secondly, randomise/mangle the filenames in some way. Maybe put all files apart from the html and related graphics into a randomly-named subfolder (AGKPlayer would somehow know this name, and be able to find its files).
Just thinking aloud. Does anyone else have any thoughts about this?
Cheers,
James