A bit of background -
I am running a game server that runs in Java and a forum that runs in PHP (phpbb). I have accounts associated with the game and the forum, so changing the password in the game automatically changes the password for the forum account. The two systems use different password hashing algorithms, and I need to update the password hash on the forum side using the built-in phpbb functions, that is, I have to call them from a PHP script (instead of running my own code).
To do this, I decided that Java would call the PHP script by making an HTTP request to the PHP script whenever the password needs to be changed in order to call the PHP script that completes the password - changing the process for the forum account. However, I do not want to put the plaintext password in any HTTP call, as it can appear in log files and possibly in other accessible areas. My current idea is that when the Java side changes passwords, it puts the new plaintext password in the database table and then makes an HTTP request to run the PHP script so that the hash or sensitive information does not get into the HTTP request. The HTTP request will only transmit the username of the account to be changed and the hash file of the md5 shared key plus the username for authentication. When the PHP script is launched, it extracts the new plaintext password for the user from the database, immediately removes it, then launches the plaintext password through the phpbb hash algorithm and updates the forum database.
Under typical conditions, the plaintext password is likely to be in the database less than a second before it is deleted. Ideally, I would not store it anywhere at all, but I'm not sure how else to communicate the desired change from Java to PHP, when I can not predict that there will be a hash password for the forum, so I need to somehow send the password plain text for a PHP script that performs hashing.
Any ideas on a better way to do this, or is there any feedback on keeping the plaintext password for a very short period of time? I believe that MySQL login is safe and not shared with other people or projects.
Thanks!
DivideByHero
source share