Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Entity Access Password

390 sites Security covered Drupal 11 · not 10 Entity ecosystem
View on drupal.org

This module allows you to restrict access to content by requiring a password. You can set passwords at the entity, bundle, or global level, and choose which view modes are protected. When protected content is viewed in a protected mode without access, a password form is displayed instead.

The Entity Access Password module allows to restrict access to fieldable entities by requiring to enter a password.

The module provides a new field type: Password protection.

The administrator can choose per field instance the behavior (among other settings):

  • the password level (can be cumulative):
    • entity password
    • bundle password
    • global password
  • the protected view modes

When a protected content entity is displayed in a protected view mode, if the user does not have access then it is the "Password protected" view mode that is displayed instead. That way, the administrator have a very flexible way to control how the password form is displayed, with the field formatter and view mode granularity.

Warning! As the module only switches the displayed view mode, a user can still access the content if exposed through web services for example.

The module does not implement hook_entity_access() to allow to still see password protected entities in listings otherwise the user would not be able to access the form to unlock the entity with a direct link.

Development notes

The module makes an intensive usage of services and service collectors to be able to let you introduce your own logic if needed. Among those services, you can add your own password validation, access check and access storage logic by implementing services with the appropriate tags.

Installation

  • Install as you would normally install a contributed Drupal module. For further
    information, see Installing Drupal Modules.
  • You need to enable at least one module providing an access backend otherwise the module loses its interest. By default there are two sub-modules providing an access backend:
    • Entity Access Password Session Backend (entity_access_password_session_backend) - Allows to store granted access in the session.
    • Entity Access Password User Data Backend (entity_access_password_user_data_backend) - Allows to store granted access in the user data backend for more persistent access storage. Does nothing for anonymous users.

Configuration

This is a straight forward configuration example, read the documentation pages for detailed instructions:

  • Enable the Entity Access Password module on your site.
  • You can configure a global password on the configuration page (/admin/config/content/entity_access_password/settings).
  • Add a "Password protection" field to a content type.
  • Configure the "Password protected" view mode to display the password field.
  • Select the behavior on this field instance:
    • entity password and/or bundle password and/or global password
    • which view mode will be protected
  • Go to one content edit form where the field is added and enable password protection.
  • View your entity as an anonymous user, the content should be rendered in the "Password protected" view mode and so the password field should be displayed.

Similar projects and how they are different

  • Protected Pages - Protected Pages uses the path to protect your page so you can password protect Views pages for example. With Entity Access Password, content creators can add the password as they create content, they don't have to go to another configuration page.

Maintainers

Organizations without Drupal.org page which sponsored the project:

Depends on

Dependencies of the latest stable release

  • file Drupal core
  • user Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
4
Tracked since
Dec 2025
Latest release
1 month ago
Releases (12 mo)
4 ▲ from 0
Maintenance
Active

Release Timeline

Releases

Version Type Core Release date
2.0.1 Stable 11 Jul 19, 2026
2.0.0 Stable 11 Dec 20, 2025
2.x-dev Dev 11 Dec 9, 2025
1.x-dev Dev 10–11 Dec 8, 2025