Closed (fixed)
Project:
Provision
Version:
6.x-1.0-rc2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Mar 2010 at 17:25 UTC
Updated:
12 Jun 2014 at 08:41 UTC
Jump to comment: Most recent
Comments
Comment #1
gregglesIs it a requirement or an option that the credentials are in the Apache configuration?
Comment #2
adrian commentedit's not that critical an issue in my mind.
a) the information is specified in the apache configuration so that it is impossible to leak the database credentials between sites. Site A with php access can no longer peek inside the settings.php file of Site B in a multi-site configuration.
b) displaying the information to site administrators does not mean they can make use of them. Unless they have PHP access they can not make a connection to the database, because the grant is incredibly paranoid.
c) I was unaware that page even existed, but it is simple enough to construct the virtualhost record for either the platform or site to explicitly disallow access to it.
Comment #3
anarcat commentedI believe that if people can execute a
phpinfo(), they can execute arbitrary code and therefore read whatever Drupal uses to store its database credentials: they can read settings.php, read the global $db_url, etc.In short, once you have PHP access, you own the site. So while I share your concern about admin/reports/status/php, I think the issue is much larger than that, and not dependent on the environment technique we use right now, which resolves another much more severe security issue, which is that sites can read and write each other's database when Aegir is installed out of the box.
The tradeoff is clearly in favor of the mod_env at this point.
I would also think that the issue here is with Drupal itself: phpinfo() may yield confidential information, no matter what your setup is. It should be protected by a stricter permission..
Comment #4
drummWhat specifically would phpinfo() provide that is a security risk? Follow http://drupal.org/node/101494 if there is something notable. I don't think Drupal core will change this as phpinfo() does provide valuable debugging information.
Sounds like C in #2 can fix this issue.
And/or settings.php (or whatever uses the environment valriables) could unset them as they are used. Of course they would still be there if a bare phpinfo() file was present, but then we are back to already having arbitrary server access.
Comment #5
Anonymous (not verified) commentedThe masked credentials prevent admin users on a site from divulging the creds of *another* site in multisite.
I don't consider the ability of an admin user to see his/her own site's database creds to be a security risk. If you consider it to be, don't give your user admin access. Access to the phpinfo() and seeing the creds is probably only one in a sea of many other risks you run by giving such admin access.
I'm going to be bold and close this as the security issue is dubious and dwarfed by the hole we fix with the masked credentials. And no-one has come up with anything better in nearly a year.
I don't even agree with blocking /admin/reports/status/php because that page could still be useful.
Comment #6
anarcat commentedSo there is a way to fix this, I believe.
Comment #7
anarcat commentedAnd here it is: http://drupalcode.org/project/provision.git/commitdiff/6c27429f3bdf9e768...
Commit merged in stable branch too.
That one was painful. I actually had to go through php5's source code to figure out how apache_setenv() worked, to find the right combination.
Comment #8
omega8cc commentedI think this should be here only for Apache inside some
if(apache){write_it}as it will be never used in Nginx (even if it will not cause any issues it is useless for Nginx).Comment #9
anarcat commentedGood catch - i'll just check for the existence of the function.
Too bad the template doesn't have access to the provision_db_cloaking settings (or does it?) as it makes the template more difficult to read...