I've been asked to populate a flash file with some data from a database. I said, "Great, I will write some PHP that talks to the database and outputs xml. The swf can call that file."
My boss then told me that that solution wouldn't make the cut with IS, and I would have to find a more secure way of doing it. Ugh!
My proposed solution is to create some business logic that lives outside our corporate firewall. The actionscript will make a request to that file, which will send a secure request to a middle tier, which will reside behind the firewall. The middle tier will handle the request by connecting to the database and returning the appropriate data back through the firewall over the same secure connection. The business logic then outputs xml and everybody is happy.
I have diagrammed what I'm trying to do to make it very clear: http://twitpic.com/2kj0tk
Here are my questions:
- Does this solution comply with industry best practice?
- Will it work?
- What code do I need to write in each tier to establish a secure connection and transfer data over that firewall? I thought maybe I could use cURL, but I don't know if this would work through the firewall. Would anybody mind relating how they would solve this, with code samples if possible?
- It may work out that I end up having to write the solution in .NET. How would that change my approach?4.
- What, if any, other information do you need from me to help solve this problem?
Thanks guys!