Best Practice MySQL and storing password to another ODBC database
Posted on 2014-01-28
Have a question regarding how best to store an ODBC password for a different database/server in MySQL. Currently I have an Oracle Database for our Districts student information system.
I am developing a simplex Perl Program for the Web where Parents will be able to enter in their unique user/password for their student (which I will store in a MySQL Database) and then the Perl program will initiate an ODBC connection to the Oracle student database to prepopulate form data on name, address, dob, etc. that is already in the Oracle system to generate the multitude of Registration forms we have that parents hate filling out because much of the form data across the different forms is redundant.
The goal is for them to enter their user/pass into the system, the system pull data from the Oracle database and put into a simple web form, modify any data that needs to be and save this new information into a MySQL database and the parents simply print off the forms they modified to bring in during our registration in the fall.
My problem is this. I can create a MySQL database and create each user for parents, but how SHOULD I store the ODBC password for the Oracle Database which is the keys to the kingdom for reading ALL data in the oracle database?
If I store the Oracle ODBC password in a table in MySQL for the perl program to use to initiate a remote connection to pull data, then any authorized user could in essence remotely connect to the MySQL database and read that password using a command prompt with a simple select statement. While I know our parents or students won't know how to do that, I would rather not chance it.
Is their a way to specify a specific table that only the local host can read from that table, IE a Perl Script on the server executes the select statement to get the password and is then is used to initiate another ODBC connection to Oracle using the info from that table?