Drupal


Error

You must log in or register to view this page

Drupal is a сontent management system.

Architecture

Drupal can run on any web server, but Apache, Nginx, and Microsoft IIS Webserver are the most compatible. Drupal version 11 and later do not support Microsoft IIS Webserver. The product also communicates with a database.

Software pattern summary

The following table gives an overview of the pattern characteristics:

Product componentOS typeVersioningPattern depth
DrupalUNIX, WindowsActive, FileInstance-based

Platforms supported by the pattern

The pattern discovers Drupal deployments on the UNIX and Windows systems.

Identification

To run a discovery of the product, the pattern must be triggered. This section describes conditions under which the pattern can be triggered.

Pattern trigger

The pattern is triggered by a SoftwareInstance that matches one of the following criteria:

  • Type equals “Apache Webserver” and the config_file attribute is populated.
  • Type ends with “Apache Web Server” and the config_file attribute is populated.
  • Type equals “Nginx Webserver” and the configuration_file attribute is populated.
  • Type equals “Microsoft IIS Webserver”.

False positive checking

Based on SoftwareComponents

Pattern triggerEvidence that Drupal is running (at least one of these must be true)
Apache SoftwareInstance with SoftwareComponents
  • The SoftwareComponent instance name contains drupal.
  • At least one of the SoftwareComponent configuration files contains an entry to DocumentRoot that references Drupal.  We find the configuration files by looking at what DiscoveredFile nodes have contributed to this SoftwareComponent
  • Versioning is successful.

 

Apache SoftwareInstance with no SoftwareComponents
  • The configuration file referenced on in the config_file attribute of the SI contains an entry to DocumentRoot that references Drupal.
  • Versioning is successful.

 

Nginx
  • The root obtained from one of the configuration files contains drupal
  • An include directory in one the configuration files has the name ‘drupal’
  • An include directory in one of the configuration files contains a file called drupal.conf

 

IIS
  • The child of the IIS trigger process contains the -ap drupal argument.
  • The child of the IIS trigger process contains the -h drupal.config argument.

 

Simple identification mappings

The pattern does not create Simple Identification Mappings.

Versioning

Version information for the product is collected by using the active versioning and file versioning methods.

Installation root

The pattern gets the installation root by one of the following methods:

  • For Apache Based Webservers, it is the DocumentRoot as reported in the config_file .  If we have evidence that a SoftwareComponent is running Drupal this config_file is the file linked to that SoftwareComponent.  Otherwise it is the file described in the config_file attribute of the SI
  • For Nginx Webservers, it is the root as reported in one of the Nginx configuration files.
  • For Microsoft IIS Webservers, it is the path to the drupal.config file. The pattern obtains this path from the -h option of the IIS child process.

Active versioning

The pattern runs the <install root>/drush status command to obtain the value of the Drupal version.

File versioning

The pattern attempts to find the version from one of the following files:

FileMethod to read the fileText to search for in the file
<install_root>/web/core/lib/Drupal.phpRead the file by using Discoveryconst VERSION = <version>
<install root>/docs/CHANGELOG.txtParse the file with findstr or grepDrupal <version>

Application model produced by the software pattern

The pattern creates an instance-based SoftwareInstance with the key based on the type and the key of the trigger node (the SoftwareComponent if we can link Druapl to a particular Apache SoftwareComponent, the SoftwareInstance otherwise)

The pattern creates a client-server relationship to the triggering node (the SoftwareInstance or SoftwareComponent)

The pattern finds the linked database from the following attributes given by the drush status command:

  • DB hostname
  • DB driver (could be MySQL, MariaDB, MongoDB, MSSQL, or PostgreSQL)
  • DB port
  • DB name

The pattern creates a client-server relationship to the database. The database is the server.

The following figure shows a pattern model visualization: 

1757948040764-581.png

Subject matter expertise

Inputs from subject matter experts are welcome on any other potential approaches not discussed in this topic.

Testing

The pattern has been tested against the available customer data.

Open issues

There are no known open issues with this pattern.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC Discovery content reference