[Policy] Deprecate Ban module

Created on 10 May 2012, about 12 years ago
Updated 27 May 2024, about 1 month ago

The problem

In Drupal 7 we removed 90% of the 'access rules' functionality that used to live in user module, but IP blocking was given a reprieve by Dries.

In Drupal 8, the remaining IP blocking functionality was moved into Ban module #1161486: Move IP blocking into its own module โ†’ , this was after moving access rules into its own module in #228594: UMN Usability: split access rules into an optional module โ†’ .

Not much has happened to ban module since then, except when it gets touched by other cleanup issues (like converting hook_help()).

According to stats in ๐ŸŒฑ By default deprecate non-experimental modules that are used by less 5% of sites before the next major version Active ban module is used by approximately 8% of sites.

Since this issue was opened, there are now some equivalent modules in contrib for Drupal 8.

https://www.drupal.org/project/autoban โ†’

https://www.drupal.org/project/advban โ†’

https://www.drupal.org/project/restrict_by_ip โ†’

Advanced ban is a direct replacement of the core module, and has 6.5k users. Autoban integrates optionally wither either ban or advanced ban. Restrict by IP has 8k users and seems to be standalone.

Proposed solution

Move ban module to contrib as-is, deprecate it in Drupal 11 for removal in Drupal 12.

๐Ÿ“Œ Task
Status

Active

Component

Idea

Created by

๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

Live updates comments and jobs are added and updated live.
  • API clean-up

    Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.

  • Needs release manager review

    It is used to alert the release manager core committer(s) that an issue significantly affects the overall technical debt or release timeline of Drupal, and their signoff is needed. See the governance policy draft for more information.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States xjm

    Removing a module from core requires the signoff of the subsystem maintainer when there is one, as well as all the committer roles.

    The committer team recently reviewed our scoring exercise on all core modules, and there was not clear consensus to remove Ban, so it needs to be discussed further (both by the committers, and with input from the community).

    Thanks!

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    Just for posterity we're six weeks from the 15 year anniversary of me first opening an issue to try to remove this from core #228594: UMN Usability: split access rules into an optional module โ†’ .

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia larowlan ๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ.au GMT+10

    From a framework manager point of view, I'm happy for it to be moved to contrib. There are a number of contrib solutions, and larger sites will using something at the WAF/CDN layer. Not removing the tag as giving others a chance to chime in.

  • ๐Ÿ‡ฎ๐Ÿ‡ทIran tsotoodeh

    There are a number of contrib solutions, and larger sites will using something at the WAF/CDN layer.

    Totally agreed on this. In my point of view, from the perspective of webmaster banning an IP address is not a webmaster task but rather the task of network administration of the project, which as you mentioned should be done at the WAF or CDN level. The task itself, with today's technology could be easily done and resolved when appropriate credentials are provided.
    In addition, from the security stand point it is best suited to prevent the malicious/intruder traffic stopped at the edge not the production environment. Also there are more means to mitigate bad actors.
    I suggest, Drupal as a content management system be more focused on providing modules that offer best digital experience.

  • ๐Ÿ‡จ๐Ÿ‡ณChina jungle Chongqing, China

    I was thinking of introducing a Ban entity to make it more extendable. The current ban_ip table has two fields iid(unique ID for IP addresses) and ip. -- It's a simple module, unlikely to have many issues reported as other core modules. Inactivity makes sense to me.

    There are a number of contrib solutions

    Yes, there are related contrib modules, but I prefer none of them. E.g., I hope to see a reason why the IP is banned. autoban, advban etc. can not show me that.

    and larger sites will using something at the WAF/CDN layer.

    There are small sites built with Drupal without WAF or CDN, e.g. some personal blog sites.

    In short, I hope it can adopt entity, instead of being removed.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States xjm

    Regarding the proposal in #39, that could also be done if/when the module is moved to contrib. :)

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands yoroy

    The two obvious alternatives in contrib appear to be in good shape, both with releases made this year
    https://www.drupal.org/project/autoban โ†’
    https://www.drupal.org/project/advban โ†’

    Lets just go ahead and do this? Removing the framework manager review tag as @catch opened this issue and @larowlan chimed in at #1570102-37: [Policy] Deprecate Ban module in Drupal 10 and move it to contrib for Drupal 11 โ†’

  • ๐Ÿ‡ณ๐Ÿ‡ฑNetherlands yoroy

    Lets not be too eager here Roy!

  • ๐Ÿ‡ฆ๐Ÿ‡บAustralia larowlan ๐Ÿ‡ฆ๐Ÿ‡บ๐Ÿ.au GMT+10

    See #37

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand quietone New Zealand

    Removing versions from the title. They can be added back if this is approved.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch

    I think we should revisit this, again, with project browser + recipes getting closer to stable and Drupal CMS/starshot coming through too.

    There could be a recipe, either just generally in contrib or included with Drupal CMS, for anti-spam/anti-abuse. For me, the 'silent captcha' modules like honeypot and/or antibot are more important for this than IP banning, but it could include ban module or one of the contrib alternatives instead as well.

    That way it would be one less module when you install core, and Drupal CMS and recipes seems like a good fit for anti-spam/anti-abuse modules where there are big benefits to being able to swap in and out (and combine) different approaches. It would not take 16 years to move something in or out of starshot as it has here.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States effulgentsia

    +1 to #45. I opened https://github.com/phenaproxima/starshot-prototype/issues/98 for visibility there as well.

  • ๐Ÿ‡ฌ๐Ÿ‡งUnited Kingdom catch
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Gรกbor Hojtsy Hungary

    Drupal CMS and recipes seems like a good fit for anti-spam/anti-abuse modules where there are big benefits to being able to swap in and out (and combine) different approaches. It would not take 16 years to move something in or out of starshot as it has here.

    Fully agreed with this. Updated the suggested version numbers in the issue summary to reality. While the core committers did not agree yet in 2023 on this, I think the project browser + recipes solution changes the situation significantly for modules like this.

Production build 0.69.0 2024