The security team now has a FAQ that mentions the following:

Another case where no security announcement is required is when an exploit requires one of the following permissions:

  • Administer filters
  • Administer users
  • Administer permissions
  • Administer content types
  • Administer site configuration

In general, every permission that in itself already enables site-takeover.

Why do we have 5 different "super-admin" permissions? Clearly not every Drupal site admin on Earth understands that all 5 of those are effectively "own the site" perms. If having access to any of them gives you powers to accomplish all of them, why pretend there's any priv separation among them at all? Why not a single "super-user" permission? Something like:

"Administer as superuser" ?

Wouldn't that be a lot clearer for people trying to configure permissions on their sites? Wouldn't that remove the illusion that any of these permissions are actually distinct that could safely be granted to a non-super-admin on their own?

Comments

greggles’s picture

I understand the underlying goal here - why have 5 if they allow you to own the site?

But I think there's also good reason to keep them separate: the person who administers users is often (usually?) different than the person who administers filters. Permissions are not only about security, but also about presenting a logical UI to the end user.

I suggest an alternate solution is to help these "super perms" to stick out more in the UI as permissions that can be used by a malicious end user to take over the site.

meba’s picture

I totally agree with greggles...

dww’s picture

Permissions are not only about security, but also about presenting a logical UI to the end user.

That's a very good point I hadn't considered. Hiding functionality people don't normally need is a valid use of a permission, even if they could maliciously overcome that and access the functionality, anyway. Preventing accidental human error from causing damage is another worthy goal, even if it's no protection against outright malice.

Okay, probably the original proposal here should be "won't fixed", but perhaps we should alter the scope to address the UX problem of clearly marking these perms as "super-admin" in some way in the UI?

moshe weitzman’s picture

We have permission descriptions now. Just use those.

David_Rothstein’s picture

We actually already use the permission descriptions to warn about security risks -- there are a bunch in Drupal 7 that have this text:

Warning: Give to trusted roles only; this permission has security implications.

These messages are themed as placeholders (which makes them practically invisible in the UI) and there are other wonky things about it, but they are there.

However, I figured I'd take a look and see which permissions we actually label that way in D7 core. There appear to be seven of them:

  • use PHP for settings
  • administer unit tests
  • administer filters
  • administer nodes
  • bypass node access
  • administer permissions
  • select account cancellation method

The incomplete overlap between this list and the one in the security team FAQ is a bit troubling... I think this should be considered a bug to be fixed.

catch’s picture

I'm pretty sure the lack of overlap is because the security team list is for Drupal 6, whereas this is from HEAD.

fwiw I agree with leaving these as separate permissions, and also trying to make it obvious that their in a trusted users only' group - this would also fit well with the work going on around filter permissions.

David_Rothstein’s picture

Title: Combine all site-owning super-admin permissions into one » Correctly label all site-owning super-admin permissions
Category: task » bug
Priority: Normal » Critical

That might be true for some of them, but the fact that, say, "administer users" does not currently get a warning is a pretty serious bug. With that permission, you can kind of, like, hijack any user account on the site, including user 1....

Bojhan’s picture

Category: bug » task

This isn't whole issue is not attacking a bug - can we scale the scope of this issue to fix the one bug that is mentioned in #7 or make a new one? The other functionality doesn't seem very tuned, do we really need to warn users about everything? It sets a very unfriendly tone.

David_Rothstein’s picture

The issue mentioned in #7 was actually already fixed in #616616: Warn about "Administer Users".

I'm not a fan of the current "warning" UI either (too verbose), but fixing that may be for a separate issue (unless the answer is don't warn about any permissions at all). Whatever UI we have, though, we need to go through and make sure that it is being applied consistently and for the correct permissions.

sun.core’s picture

Priority: Critical » Normal

Not sure whether this qualifies as critical.

David_Rothstein’s picture

Priority: Normal » Critical

I think it does. If we're going to continue labeling these permissions at all (as we do now), we better label the right ones - otherwise we give people wrong information that could encourage them to configure their sites insecurely.

mrfelton’s picture

To summarize the current state. Here is a list of the various permissions with security permissions (as mentioned in this thread), detailing which ones have a warning, and what that warning is:

  • administer site configuration (-)
  • administer users (1)
  • administer permissions(1)
  • administer content (1)
  • administer content types (-)
  • administer and use any text formats and filters (2)
  • use the (x) text format (2)
  • administer tests (1)
  • use PHP for settings (1)
  • bypass content acces access (1)
  • select method for cancelling own account (1)

Key
- => no warning text
1 => "Warning: Give to trusted roles only; this permission has security implications."
2 => "Warning: This permission may have security implications depending on how the text format is configured."

So it looks like there are just a couple left that need warning text 1 added?

greggles’s picture

@mrfelton that's a great summary and I think your proposal makes a lot of sense. I also agree this is critical given how many people misconfigure these values.

mrfelton’s picture

Status: Active » Needs review
StatusFileSize
new2.14 KB

Here is a patch that does what I outlined in #12 (adds the missing warning messages to 'administer site configuration' and 'administer content types' permissions).

David_Rothstein’s picture

Thanks! - looks like a good start to me. Note that "administer and use any text formats and filters" should be a (1) rather than a (2), although I already have an open bug report about that somewhere so we don't really need to fix it here.

I worry a bit about ones that aren't on this list at all, though (for example, 'administer software updates'). We need to look carefully at all the new Drupal 7 permissions.

BTW, does 'administer tests' really need this warning label? Off the top of my head, I'm not clear on what makes it dangerous.

Bojhan’s picture

Honestly, I don't see this patch being any good - its a bad trend we set. To warn people for all bad possible configuration, by simply inserting a warning text. It probally won't fix the problem the user will experience, all it will set is a "I told you so" and warning text makes users feel like we think they are dumb.

This should really be more intelligent, par example only giving a warning when giving it to registerd users or to annonymous, not giving a warning for newly created roles. Given that, will be Drupal 8.x stuff... Is this really critical? I whish we can find a better solution for this.

greggles’s picture

Well, right now we have an "I told you so" buried in the handbook and nobody knows about it so they make their sites unsafe. Is that better?

It is really hard to make this intelligent because many sites will automatically grant a role when a user creates an account so we have to check "anonymous, authenticated, any-role-created-by-the-7-modules-that-automatically-grant-roles-or-sell-roles."

catch’s picture

Agreed with #17. An "I told you so" in the admin interface is better than one linked in a reply from the security team when you either report a security issue with a module or your site was hacked.

alexanderpas’s picture

I also think it should really be more intelligent, far example only giving a warning when giving it to registerd users or to anonymous, not giving a warning for custom created roles.

also the-7-modules-that-automatically-grant-roles-or-sell-roles should be able to hook into this verification process somehow.

Maybe even blocking certain actions for anonymous. (Seriously, WTF?)

dww’s picture

@alexanderpas: yes, while it's tempting to say "anon should never have access to X", there are drupal sites installed inside private networks where our assumptions about X will be wrong. while we can and should go out of our way to make sure sites know they're doing something potentially stupid and wrong, we shouldn't completely prevent it in case they know what they're doing...

catch’s picture

Status: Needs review » Reviewed & tested by the community

Also, this is just a description added to permissions. It's not warning you when you actually grant it to someone, flashing drupal_set_message() etc. everywhere. Given there's only two string changes in this patch, I'm marking this RTBC. Cleverer stuff might be nice, but we can do that in new, non-critical issues.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD.

I agree with Bojhan that a larger discussion about how these dangerous permissions should be identified and what should happen if they're enabled for specific roles does indeed feel like D8 material to me. But it's very difficult to justify not adding this same disclaimer that's already been in D7 for over a year on all of the dangerous permissions identified by the security team in that handbook page.

David_Rothstein’s picture

Status: Fixed » Needs work

Back to "needs work" for the remaining permissions.

Bojhan’s picture

@David So what are those remaining permissions?

David_Rothstein’s picture

The one I know for sure that doesn't currently have the warning but needs to have it added is:

  • Run software updates: Since on some server configurations this permission allows you to execute arbitrary PHP code. (And it really needs to be renamed back to "Administer software updates" also.)

Two that come to mind that currently have the warning but potentially do not need it are:

  • Administer tests: I can't really imagine why this is a fundamentally dangerous permission, although I do see now that on sites with HTTP auth creds entered, there is an administrative screen where this permission allows you to see the HTTP auth password in clear text. We really should just stop showing that password in clear text though (especially if it's the only thing that makes this permission a dangerous one).
  • Administer nodes: In theory since "bypass node access" was split off into a different permission, it seems like this one could be downgraded? (assuming that split was complete)

I don't know if there are others - it would take a careful look at how permissions are being used in order to be sure. This should definitely happen before release, but I don't think we're in a huge rush, since some functionality might still change (and given that #248598: Label permissions which are warned about in the user interface is now in, these warnings can now be removed and added at any time without breaking the string freeze also).

klausi’s picture

Status: Needs work » Needs review
StatusFileSize
new927 bytes

So here is a patch that renames "Run software updates" to "Administer software updates", adds the restriction to it and removes the restriction from Testing permissions. Showing the HTTP auth password or not should be a different issue. Administer nodes permission was not changed.

alexiswatson’s picture

Reviewed and confirmed that the patch works as expected.

David_Rothstein’s picture

Status: Needs review » Needs work

I don't think we can remove the warning from "Administer tests" unless we also stop using it to show passwords in clear text...

David_Rothstein’s picture

Status: Needs work » Needs review
StatusFileSize
new713 bytes

OK, thinking about this a bit more, the HTTP auth credentials issue probably doesn't actually make "Administer tests" a dangerous permission, since if you can view the page where those credentials are displayed, you probably already had to know them in the first place to be able to access the website? Plus, looking at CVS history, it appears the permission warning predates those, so it certainly wasn't the reason it was added. However, what to do about this permission is probably best discussed separately in the SimpleTest queue, where people who understand all the innards of SimpleTest might be able to weigh in. So I've created separate issues here:
#799932: Simpletest HTTP authentication credentials should use the 'password' form element
#799936: "Administer tests" permission shouldn't be labeled a security risk

Meanwhile, here is a reroll of #26 to remove that part of the patch so it only focuses on 'administer software updates'.

There is more reviewing of permissions to be done before this issue can be closed out, but this one would make a good interim commit to get in sooner rather than later, especially since it changes a translatable string. Note that everywhere else in core besides the permission description itself was already still referring to this as "Administer software updates" (e.g., user-facing text in update.php, code comments in settings.php, etc) so all we are doing here is reverting back the permissions page to the text that was already decided on and is already in use everywhere else.

pwolanin’s picture

Looks good to me (assuming all test pass).

dww’s picture

Status: Needs review » Reviewed & tested by the community

#29 is definitely a good move. I'm not sure why it was changed, but yes, it should be reverted back to how it was. Thanks.

dries’s picture

It is not clear why we are renaming this permission?

David_Rothstein’s picture

We're restoring it to its original name, which is still the name that's used to refer to this permission everywhere else in Drupal except on this one page.

And "Run software updates" doesn't accurately convey the extent what the permission allows you to do (upload new code in addition to running it).

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. I'm marking this 'fixed' but we might want to follow-up on the other things, I'm guessing.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

David_Rothstein’s picture

Status: Closed (fixed) » Active

Let's reopen so we can potentially follow up on other things. The 'administer nodes' discussion above is not resolved (although that could maybe get its own issue), but more generally it would be a lot more comforting if we reviewed the permission list at least one more time before release to make sure we're not missing anything.

For example, I've heard people discuss that permissions like 'administer menu' and 'administer blocks' might be considered inherently dangerous since by design they let a malicious user mess up a site pretty badly (although not really take it over completely), so we should at least talk about where the 'dangerous' line should be drawn, before the final version of D7 is released.

moshe weitzman’s picture

IMO, those links are not dangerous enough to merit this class of notice. The description should be enough. Lets not overuse the danger warning

Bojhan’s picture

Priority: Critical » Normal

Although David_Rothstein his concerns are valid this by no means is a critical issue any more. Also the more you add, the less effective it becomes - keep it in mind.

DudleyDooRight’s picture

What are thoughts on having two 'super admins' established? In the case of an organization where there may be a 'backup' required to change regular permissions (in case someone is out). Is this even possible?

pwolanin’s picture

Version: 7.x-dev » 8.x-dev
mgifford’s picture

Issue summary: View changes

@David_Rothstein this is what we have for Administer nodes & Administer unit tests which are the two items in #25 there were open and needing to be degraded:

    'administer nodes' => array(
      'title' => t('Administer content'),
      'restrict access' => TRUE,
    ),
    'administer unit tests' => array(
      'title' => t('Administer tests'),
      'restrict access' => TRUE,
    ),

I'm not sure what needs to change or what else is outstanding from the initial summary.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • webchick committed 56e60eb on 8.3.x
    #594412 by mrfelton: Correctly label all site-owning super-admin...
  • Dries committed 1c9b84a on 8.3.x
    - Patch #594412 by mrfelton, klausi, David_Rothstein: correctly label...

  • webchick committed 56e60eb on 8.3.x
    #594412 by mrfelton: Correctly label all site-owning super-admin...
  • Dries committed 1c9b84a on 8.3.x
    - Patch #594412 by mrfelton, klausi, David_Rothstein: correctly label...

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • webchick committed 56e60eb on 8.4.x
    #594412 by mrfelton: Correctly label all site-owning super-admin...
  • Dries committed 1c9b84a on 8.4.x
    - Patch #594412 by mrfelton, klausi, David_Rothstein: correctly label...

  • webchick committed 56e60eb on 8.4.x
    #594412 by mrfelton: Correctly label all site-owning super-admin...
  • Dries committed 1c9b84a on 8.4.x
    - Patch #594412 by mrfelton, klausi, David_Rothstein: correctly label...

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

  • webchick committed 56e60eb on 9.1.x
    #594412 by mrfelton: Correctly label all site-owning super-admin...
  • Dries committed 1c9b84a on 9.1.x
    - Patch #594412 by mrfelton, klausi, David_Rothstein: correctly label...

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

prudloff’s picture

I see this was committed.
Is something still needed here or can we close this?

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

prudloff’s picture

Status: Active » Postponed (maintainer needs more info)
dww’s picture

Status: Postponed (maintainer needs more info) » Fixed

Yes, we can close this. 😅 the tooling has evolved a lot in the last 16 years.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.