Hi All,
Now this isnt a pure perl question as it involves the full web application (which is written in perl), I hope nobody minds me asking the question here.
Right, I have a web application, in simplest terms its a online booking engine now it allows clients to create a booking and will take the clients credit card details. However the actual money is not taken online but used by the same companies payment gateway on a internally secure network, this gateway is beyond the scope of the question.
So to try to keep things as secure as possibly GPG encryption is in place on the webservers, so theres a public key stored on the web facing servers. When a user enters there details the details are encrypted and then stored temporarily on the mysql database (which is not in DMZ).
Now a seperate server on an internal network a script checks for new bookings and if found decrypts the details using the private key on this server (passphrase are passed in on script startup so not stored in code). It then encrypts again with another GPG key of the payment gateway and passes the details to the gateway (via FTP)... at this point is is beyond my control. As soon as this is completed the credit card details are wiped from the online database as it would be wrong to leave them around.
So
Question 1)
is given the circumstances above I am still leaving potential holes in the security from the web application perspective ? I have no control over the payment gateway ?
The next part is a seperate interface, this is effectively a management system and allows authorised staff to view bookings, issue vouchers and do a variety of administration tasks which are needed to do. Now this whole system is used by multi parts of a large company, not all of them have the auto payment system and thus instead of the payment details being automatically entered into the payment gateway a member of staff will check for unprocessed bookings, when they select one if they have the rights then the cc details are decrypted (again passphrase passed in on web server start) and authorised user will enter the cc details manually into the payment gateway and close the booking which results in the cc details being wiped.
Now the actual login system is pretty simple which I think is one flaw, its a simple username/password system where password is a md5 encryption, theres a series of rights a user can have to be able to view informations, and have to have certain rights to see the details. Also the users are all well inside the companies LAN so *gulp* should be trusted users, to date there have been no known abuse of this system.
Question 2)
It is vital that the authorised users have access to the details, however with what I have mentioned above am I missing something. ?
Now this whole booking engine has proved so popular among the sub companies other companies not within the secure network wish to access this *administration tool*, already a few companies have limited access, to provide this access they go to a ssl section of the online engine this is restricted by using apache allowing only access by designated IP addresses (Who I ask the current partners to provide me and I validate) as well as the htaccess file. If they get past this point then I use mod_rewrite to act as a reverse proxy to the secure server inside the LAN. However only some pages are allowed access too.
Now the company wishes to allow trusted companies to also have access to where the authorised users can view credit card system, so whilst the above procedures will stay in place then the users will be able to see cc details (before wiped of course). They would be accessing over the internet (so going to a secure area of the online engine). I am very very dubious about allowing such access, if I restrict by IP and log all access and also use htaccess is this enough ? the alternative is forcing the companies to invest in a secure vpn or such not.
Question 3)
What do you all think of the above scenario ? is it too risky that we could get compromised, can anyone suggest a better way of doing it.
I am by far no expert on security which is why I am asking this, I of course use taint checking warnings and strict for the perl code.
Your help greatly appreciated
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.