You are here

README.txt in Secure Site 8

Same filename in this branch
  1. 8 README.txt
  2. 8 digest_md5/README.txt
Same filename and directory in other branches
  1. 5 README.txt
  2. 6.2 README.txt
  3. 6 README.txt
  4. 7.2 README.txt
The Secure Site module allows site administrators to make a site or part of a
site private. You can restrict access to the site by role. This means the site
will be inaccessible to search engines and other crawlers, but you can still
allow access to certain people.

You can also secure remote access to RSS feeds. You can keep content private and
protected, but still allow users to get notification of new content and other
actions via RSS with news readers that support user:pass@example.com/node/feed
URLs, or have direct support for user name and password settings. This is
especially useful when paired with the Organic Groups module or other node
access systems.


Installation
------------

  1. Place the entire securesite directory into your sites/all/modules
     directory.

  2. Enable the Secure Site module by navigating to:

     Administer >> Site building >> Modules

  3. Configure the Secure Site permissions:

     Administer >> User management >> Permissions

     Set the user roles that are allowed to access secured pages by giving those
     roles the "access secured pages" permission.

  4. Configure the Secure Site module:

     Administer >> Site configuration >> Secure Site


Configuration
-------------

  - Force authentication

    This setting controls whether users will be forced to authenticate before
    viewing pages. By default, authentication is never forced.

    1. Never

       This setting will prevent Secure Site from hiding pages.

    2. Always

       This setting will hide your entire site from unauthenticated users.

    3. During maintenance

       This setting will hide your site during maintenance.

    4. On restricted pages

       This setting will hide only pages that anonymous users cannot access.

  - Authentication type

    Three methods of authentication are available. Please note that HTTP
    authentication requires extra configuration if PHP is not installed as an
    Apache module. See the Known issues section of this file for details.

    1. HTTP digest

       This will enable HTTP digest authentication. The user's browser will
       prompt for the user's name and password before displaying the page.

       Digest authentication protects a user's password from eavesdroppers when
       you are not using SSL to encrypt the connection. However, it can only be
       used when a copy of the password is stored on the server. For security
       reasons, Drupal does not store passwords. You will need to configure
       scripts to securely save passwords and authenticate users. See README.txt
       in the digest_md5 directory for details.

       When digest authentication is enabled, passwords will be saved when users
       log in or set their passwords. If you use digest authentication to
       protect your whole site, you should allow guest access or allow another
       authentication type until users whose passwords are not yet saved have
       logged in. Otherwise, you may lock yourself out of your own site.

    1. HTTP basic

       This will enable HTTP basic authentication. The user's browser will
       prompt for the user's name and password before displaying the page.
       Basic authentication is not secure unless you are using SSL to encrypt
       the connection.

    2. Use HTML log-in form

       This method uses a themeable HTML log-in form for user name and password
       input. This method is the most reliable as it does not rely on the
       browser for authentication. Like HTTP basic, it is insecure unless you
       are using SSL to encrypt the connection.

    HTTP authentication is recommended for secure feeds, because feed readers
    are not likely to be able to handle forms. You can enable all three types of
    authentication at the same time.

  - Digest authentication script

    For security, HTTP digest authentication uses an external script to check
    passwords. Enter the digest authentication script exactly as it would appear
    on the command line.

  - Password storage script

    For security, HTTP digest authentication uses an external script to save
    passwords. Enter the password storage script exactly as it would appear on
    the command line.

  - Authentication realm

    You can use this field to name your login area. This is primarily used with
    HTTP Auth.

  - Guest user name and password

    If you give anonymous users the "access secured pages" permission, you can
    set a user name and password for anonymous users. If not set, guests can use
    any name and password.

  - Customize HTML forms

    "Custom message for login form" and "Custom message for password reset form"
    are used in the HTML forms when they are displayed. If the latter box is
    empty, Secure Site will not offer to reset passwords. Please note, the login
    form is only displayed when the HTML login form authentication mode is used.


Theming
-------

Secure Site's HTML output is controlled by three files:

- securesite-page.tpl.php: Template for Secure Site pages. Works in the same way
  as page.tpl.php.

- securesite-user-login.tpl.php: Template for the user log-in form.

- securesite-user-pass.tpl.php: Template for the password reset form.

You can theme Secure Site's HTML output by copying these files to your theme's
directory. The files in your theme's directory will become the templates for all
Secure Site HTML output.


Configuring cron jobs
---------------------

If HTTP authentication is forced, cron jobs will need to authenticate
themselves. See http://drupal.org/cron for more details on configuring cron
jobs. These examples show how to add a user name and password (note: Lynx does
not support digest authentication):

45 * * * * /usr/bin/lynx -auth=username:password -source http://example.com/cron.php
45 * * * * /usr/bin/wget --user=username --password=password -O - -q http://example.com/cron.php
45 * * * * /usr/bin/curl --anyauth --user username:password --silent --compressed http://example.com/cron.php


Known issues
------------

  - Authentication on PHP/CGI installations

    If you are using HTTP Auth and are unable to login, PHP could be running in
    CGI mode. When run in CGI mode, the normal HTTP Auth login variables are not
    available to PHP. To work-around this issue, add the following rewrite rule
    at the end of the .htaccess file in Drupal's root installation directory:

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

    After making the suggested change in Drupal 6, the rewrite rules would
    look like this:

    # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !=/favicon.ico
    RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

  - Authentication when running Drupal via IIS

    If you are using HTTP Auth and are unable to login when Drupal is running on
    an IIS server, make sure that the PHP directive cgi.rfc2616_headers is set
    to 0 (the default value).

File

README.txt
View source
  1. The Secure Site module allows site administrators to make a site or part of a
  2. site private. You can restrict access to the site by role. This means the site
  3. will be inaccessible to search engines and other crawlers, but you can still
  4. allow access to certain people.
  5. You can also secure remote access to RSS feeds. You can keep content private and
  6. protected, but still allow users to get notification of new content and other
  7. actions via RSS with news readers that support user:pass@example.com/node/feed
  8. URLs, or have direct support for user name and password settings. This is
  9. especially useful when paired with the Organic Groups module or other node
  10. access systems.
  11. Installation
  12. ------------
  13. 1. Place the entire securesite directory into your sites/all/modules
  14. directory.
  15. 2. Enable the Secure Site module by navigating to:
  16. Administer >> Site building >> Modules
  17. 3. Configure the Secure Site permissions:
  18. Administer >> User management >> Permissions
  19. Set the user roles that are allowed to access secured pages by giving those
  20. roles the "access secured pages" permission.
  21. 4. Configure the Secure Site module:
  22. Administer >> Site configuration >> Secure Site
  23. Configuration
  24. -------------
  25. - Force authentication
  26. This setting controls whether users will be forced to authenticate before
  27. viewing pages. By default, authentication is never forced.
  28. 1. Never
  29. This setting will prevent Secure Site from hiding pages.
  30. 2. Always
  31. This setting will hide your entire site from unauthenticated users.
  32. 3. During maintenance
  33. This setting will hide your site during maintenance.
  34. 4. On restricted pages
  35. This setting will hide only pages that anonymous users cannot access.
  36. - Authentication type
  37. Three methods of authentication are available. Please note that HTTP
  38. authentication requires extra configuration if PHP is not installed as an
  39. Apache module. See the Known issues section of this file for details.
  40. 1. HTTP digest
  41. This will enable HTTP digest authentication. The user's browser will
  42. prompt for the user's name and password before displaying the page.
  43. Digest authentication protects a user's password from eavesdroppers when
  44. you are not using SSL to encrypt the connection. However, it can only be
  45. used when a copy of the password is stored on the server. For security
  46. reasons, Drupal does not store passwords. You will need to configure
  47. scripts to securely save passwords and authenticate users. See README.txt
  48. in the digest_md5 directory for details.
  49. When digest authentication is enabled, passwords will be saved when users
  50. log in or set their passwords. If you use digest authentication to
  51. protect your whole site, you should allow guest access or allow another
  52. authentication type until users whose passwords are not yet saved have
  53. logged in. Otherwise, you may lock yourself out of your own site.
  54. 1. HTTP basic
  55. This will enable HTTP basic authentication. The user's browser will
  56. prompt for the user's name and password before displaying the page.
  57. Basic authentication is not secure unless you are using SSL to encrypt
  58. the connection.
  59. 2. Use HTML log-in form
  60. This method uses a themeable HTML log-in form for user name and password
  61. input. This method is the most reliable as it does not rely on the
  62. browser for authentication. Like HTTP basic, it is insecure unless you
  63. are using SSL to encrypt the connection.
  64. HTTP authentication is recommended for secure feeds, because feed readers
  65. are not likely to be able to handle forms. You can enable all three types of
  66. authentication at the same time.
  67. - Digest authentication script
  68. For security, HTTP digest authentication uses an external script to check
  69. passwords. Enter the digest authentication script exactly as it would appear
  70. on the command line.
  71. - Password storage script
  72. For security, HTTP digest authentication uses an external script to save
  73. passwords. Enter the password storage script exactly as it would appear on
  74. the command line.
  75. - Authentication realm
  76. You can use this field to name your login area. This is primarily used with
  77. HTTP Auth.
  78. - Guest user name and password
  79. If you give anonymous users the "access secured pages" permission, you can
  80. set a user name and password for anonymous users. If not set, guests can use
  81. any name and password.
  82. - Customize HTML forms
  83. "Custom message for login form" and "Custom message for password reset form"
  84. are used in the HTML forms when they are displayed. If the latter box is
  85. empty, Secure Site will not offer to reset passwords. Please note, the login
  86. form is only displayed when the HTML login form authentication mode is used.
  87. Theming
  88. -------
  89. Secure Site's HTML output is controlled by three files:
  90. - securesite-page.tpl.php: Template for Secure Site pages. Works in the same way
  91. as page.tpl.php.
  92. - securesite-user-login.tpl.php: Template for the user log-in form.
  93. - securesite-user-pass.tpl.php: Template for the password reset form.
  94. You can theme Secure Site's HTML output by copying these files to your theme's
  95. directory. The files in your theme's directory will become the templates for all
  96. Secure Site HTML output.
  97. Configuring cron jobs
  98. ---------------------
  99. If HTTP authentication is forced, cron jobs will need to authenticate
  100. themselves. See http://drupal.org/cron for more details on configuring cron
  101. jobs. These examples show how to add a user name and password (note: Lynx does
  102. not support digest authentication):
  103. 45 * * * * /usr/bin/lynx -auth=username:password -source http://example.com/cron.php
  104. 45 * * * * /usr/bin/wget --user=username --password=password -O - -q http://example.com/cron.php
  105. 45 * * * * /usr/bin/curl --anyauth --user username:password --silent --compressed http://example.com/cron.php
  106. Known issues
  107. ------------
  108. - Authentication on PHP/CGI installations
  109. If you are using HTTP Auth and are unable to login, PHP could be running in
  110. CGI mode. When run in CGI mode, the normal HTTP Auth login variables are not
  111. available to PHP. To work-around this issue, add the following rewrite rule
  112. at the end of the .htaccess file in Drupal's root installation directory:
  113. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  114. After making the suggested change in Drupal 6, the rewrite rules would
  115. look like this:
  116. # Rewrite URLs of the form 'x' to the form 'index.php?q=x'.
  117. RewriteCond %{REQUEST_FILENAME} !-f
  118. RewriteCond %{REQUEST_FILENAME} !-d
  119. RewriteCond %{REQUEST_URI} !=/favicon.ico
  120. RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
  121. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  122. - Authentication when running Drupal via IIS
  123. If you are using HTTP Auth and are unable to login when Drupal is running on
  124. an IIS server, make sure that the PHP directive cgi.rfc2616_headers is set
  125. to 0 (the default value).