You are here

README.txt in Bakery Single Sign-On System 6.2

Same filename and directory in other branches
  1. 6 README.txt
  2. 7.4 README.txt
  3. 7.2 README.txt
  4. 7.3 README.txt
Bakery module, for single sign-on between Drupal sites on the same domain.

In this README:
  * Bakery versions and compatibility
  * Installation and setup
  * How Bakery works
  * Notes on terminology
  * Common problems, troubleshooting, and support
  * Sharing account information using Bakery
  * Notes on registration/sign-in on subsites
  * Notes on migrating to Bakery
  * Known issues
  * Further information and support

Bakery versions and compatibility:
===========================================
This is the 2.x branch of the Bakery module for Drupal 6. The 2.x branch differs
mainly from the 1.x branch by offering slave site registration and login.

2.x versions between major branches of Drupal are compatible, meaning you can
run a Drupal 7 version of the 2.x branch of Bakery with a Drupal 6 version of
the 2.x branch. 1.x and 2.x branches are not compatible.

Installation and setup:
===========================================
Bakery provides single sign-on (SSO) functionality for two or more sites.
Deploy this module on the authoritative "master" Drupal server and the secondary
"slave" or subsite server. The master and slave must be on the same domain*.

Enable and configure Bakery on the master server first. It is recommended that
you use the UID 1 Drupal account for this configuration.

  1. Enable Bakery at admin/build/modules
  2. Visit admin/settings/bakery to configure

This is the master site.

  3. Check the box for "Is this the master site?"
  4. Enter the full URL of this site, including ending forward slash
    - Example: http://example.org/

For SSO to work, Bakery must know the slave, or subsites, to use.

  5. Enter the full URLs of each slave site, separated by newlines
    - Example:  http://store.example.org/
                http://api.example.org/

Two other required fields for Bakery to work are the private key and the cookie
domain.

  6. Enter a long and secure private key
  7. Enter the domain to use for Bakery cookies. These cookies are shared so
     the domain should be the top level with leading period.
    - Example: .example.org
  8. Save configuration (we'll come back to the other fields)

Now to enable and configure Bakery on the slave or subsite. If possible, you should
log in and use the UID 1 Drupal account for this configuration.

  9. Enable Bakery at admin/build/modules
  10. Visit admin/settings/bakery to configure

This is a subsite site.

  11. Do not check the master site box
  12. Enter the full URL of the master site set in step #4
  13. The slave sites textarea can be left blank
  14. Enter the exact same private key set in step #6
  15. Enter the exact same domain set in step #7
  16. Save configuration (we'll come back to the other fields)

Bakery should now be set to work for the master and this slave site. Open a
different browser than the one you are currently using and visit the master
site. Log in with a standard account. Once successful visit the slave site and
confirm that you are also logged in. If you encountered problems at any point
please consult the section here labeled "Problems and support".

You can now enable and configure Bakery for sites in your network if required,
or read the section labeled "Sharing account information using Bakery".

If you encounter problems with single sign-on between the sites consult the
section here called "Common problems, troubleshooting, and support".

* Master and slave must be on the same domain, but are not required to be at
certain levels. For example, you can have the master be sub.example.com and a
slave be example.com.

How Bakery works:
===========================================
Bakery provides single sign-on between Drupal sites on the same domain using a
shared cookie. When a user authenticates on a site they are sent a cookie by
Drupal, containing a unique identifier for that user. Sub-sequent requests by
that user will contain the identifier, allowing Drupal to recognize that the
request is coming from a specific user, an authenticated user. This process is
handled by Drupal core. Bakery augments the login process and sends an
additional cookie (referred internally to as the CHOCOLATECHIP cookie). Should
the user now visit a sub-site (on the same domain) their browser will send this
Bakery-created cookie. On the sub-site Bakery will recognize the cookie and if
it is valid will authenticate the user (via Drupal core's processes). The user
is now authenticated on both sites while only have to log on to one.

Notes on terminology:
===========================================
Bakery documentation and discussion makes repeated reference to the words
"master" and "slave". The terms stem from the common communication model between
devices or processes in computer systems where one has unidirectional control
over another. In Bakery's case, the master is the site with authoritative
account and authentication information. The master is occasionaly referred to as
the "main" site. The slave site can be referred to as the "subsite", but since
Bakery does not enforce top-level and sub-domains the term "subsite" may be
incorrect for some instances.

Common problems, troubleshooting, and support:
===========================================
  * How do I disable Bakery?
    If you do not have access to disable the Bakery module via the UI you'll
    need access to the Drupal database for the site. To disable Bakery run this
    query: UPDATE system SET status = 0 WHERE name = 'bakery';After that you'll
    also need to clear caches.

  * Bakery/single sign-on/authentication does not work.
    Attempt one or all of the following until it is working:
    - Confirm you've followed the setup steps correctly with particular
      attention on the following details:
        + All slave sites are listed as so on the master's Bakery config page
        + Master and slave sites in config fields end with a forward slash (/)
        + The secret key is the same across sites
        + The cookie domain Bakery config field is the same across sites
        + The cookie domain config field has a leading period (.example.org)
    - Clear Drupal caches, clear browser cache, clear browser cookies
    - Occasionaly it may be necessary to explicitly set the Drupal site
      settings.php $cookie_domain variable. The settings.php $cookie_domain 
      variable should match the domain the site is for in addition to having a
      leading period. For example, if the site is store.example.org set the
      $cookie_domain to '.store.example.org' and set the master's $cookie_domain
      to '.example.org'.

Consult the online documentation at http://drupal.org/node/567410 for more
information. Please use the public issue queue of Bakery for all bugs and
feature requests: http://drupal.org/project/issues/bakery.

Sharing account information using Bakery:
===========================================
A modest amount of account data sharing between Bakery-enabled sites is
supported. The core account fields 'name' and 'mail' are always synchronized.

The following fields from user accounts are optionally synchronized:
  * status
  * user picture
  * language
  * signature
  * timezone

If you have the core profile module enabled any created fields can be optionally
synchronized. Note that for profile fields to be synchronized an exactly
matching 

Notes on registration/sign-in on subsites:
===========================================
This feature is important for usability. It's also really easy to configure your
site so that this feature is horrible for usability. A few examples:

Registration:
This feature does not support saving any data other than the username, e-mail 
address, and fields created with the core profile module. If you have other 
modules that modify the registration process to add fields or make the form
behave differently they are unlikely to work properly from the subsite. 

You should keep the "allow registration" and "Require e-mail verification when 
a visitor creates an account" settings the same on all sites. If your
master site disallows registration then no subsites will be allowed to create
accounts either and users will be confused why they see a form but it doesn't
work.

Notes on migrating to Bakery:
===========================================
Migrating to using Bakery can be a fairly simple process. This process will work
for separate sites and for a shared users table, though the latter can require a
few additional steps.

Pre-migration data synchronization is recommended to alleviate potential
account mis-matches. According to Bakery two accounts are in sync when the
username and email are identical and the slave account's init property contains
the URL of the user edit page on the master
(e.g. http://example.org/user/9/edit -- where example.org is the master). The
UID of the accounts do not need to be identical. It is recommended you at least
synchronize usernames and email address for accounts that belong to the same
person across sites.

For people that do not have joint accounts you could ask them via email to
create an account on the site where there account does not exist, to assist the
process.

For accounts that have the same username but different email addresses Bakery
provides a self-service mechanism for synchronizing accounts, but in the event
this is inadequate or confusing you should provide a site administrator contact
mechanism (form or email address) that is easily distinguishable.

In case there are duplicate accounts on one of the sites, the module
http://drupal.org/project/usermerge may help reconcile.

If you have a shared users table solution between sites you will need to remove
that connection before migrating to Bakery. First, populate the other users
tables by synchronizing accounts. Modify settings.php on the shared sites to
remove the table information from the database connection details. If the cookie
domain begins with a leading dot you probably want to remove it, as it could
cause issues when users move between sites.

Once synchronization is complete you can follow the steps listed above on
installation and setup of Baker.

Known issues:
===========================================
  * Values in profile fields exposed on the subsite that are not set on the
    master will not be saved.
  * Bakery is currently incompatible with a configuration that requires
    administrator approval of accounts. An account registered on the slave will
    not be set to blocked on the master.
  * Bakery is not compatible with modules that takeover core Drupal's login and
    registration forms, e.g. ldapprov.

Further information and support:
===========================================
Consult the online documentation at http://drupal.org/node/567410 for more
information.

Please use the public issue queue of Bakery for all bugs and feature requests:
http://drupal.org/project/issues/bakery

File

README.txt
View source
  1. Bakery module, for single sign-on between Drupal sites on the same domain.
  2. In this README:
  3. * Bakery versions and compatibility
  4. * Installation and setup
  5. * How Bakery works
  6. * Notes on terminology
  7. * Common problems, troubleshooting, and support
  8. * Sharing account information using Bakery
  9. * Notes on registration/sign-in on subsites
  10. * Notes on migrating to Bakery
  11. * Known issues
  12. * Further information and support
  13. Bakery versions and compatibility:
  14. ===========================================
  15. This is the 2.x branch of the Bakery module for Drupal 6. The 2.x branch differs
  16. mainly from the 1.x branch by offering slave site registration and login.
  17. 2.x versions between major branches of Drupal are compatible, meaning you can
  18. run a Drupal 7 version of the 2.x branch of Bakery with a Drupal 6 version of
  19. the 2.x branch. 1.x and 2.x branches are not compatible.
  20. Installation and setup:
  21. ===========================================
  22. Bakery provides single sign-on (SSO) functionality for two or more sites.
  23. Deploy this module on the authoritative "master" Drupal server and the secondary
  24. "slave" or subsite server. The master and slave must be on the same domain*.
  25. Enable and configure Bakery on the master server first. It is recommended that
  26. you use the UID 1 Drupal account for this configuration.
  27. 1. Enable Bakery at admin/build/modules
  28. 2. Visit admin/settings/bakery to configure
  29. This is the master site.
  30. 3. Check the box for "Is this the master site?"
  31. 4. Enter the full URL of this site, including ending forward slash
  32. - Example: http://example.org/
  33. For SSO to work, Bakery must know the slave, or subsites, to use.
  34. 5. Enter the full URLs of each slave site, separated by newlines
  35. - Example: http://store.example.org/
  36. http://api.example.org/
  37. Two other required fields for Bakery to work are the private key and the cookie
  38. domain.
  39. 6. Enter a long and secure private key
  40. 7. Enter the domain to use for Bakery cookies. These cookies are shared so
  41. the domain should be the top level with leading period.
  42. - Example: .example.org
  43. 8. Save configuration (we'll come back to the other fields)
  44. Now to enable and configure Bakery on the slave or subsite. If possible, you should
  45. log in and use the UID 1 Drupal account for this configuration.
  46. 9. Enable Bakery at admin/build/modules
  47. 10. Visit admin/settings/bakery to configure
  48. This is a subsite site.
  49. 11. Do not check the master site box
  50. 12. Enter the full URL of the master site set in step #4
  51. 13. The slave sites textarea can be left blank
  52. 14. Enter the exact same private key set in step #6
  53. 15. Enter the exact same domain set in step #7
  54. 16. Save configuration (we'll come back to the other fields)
  55. Bakery should now be set to work for the master and this slave site. Open a
  56. different browser than the one you are currently using and visit the master
  57. site. Log in with a standard account. Once successful visit the slave site and
  58. confirm that you are also logged in. If you encountered problems at any point
  59. please consult the section here labeled "Problems and support".
  60. You can now enable and configure Bakery for sites in your network if required,
  61. or read the section labeled "Sharing account information using Bakery".
  62. If you encounter problems with single sign-on between the sites consult the
  63. section here called "Common problems, troubleshooting, and support".
  64. * Master and slave must be on the same domain, but are not required to be at
  65. certain levels. For example, you can have the master be sub.example.com and a
  66. slave be example.com.
  67. How Bakery works:
  68. ===========================================
  69. Bakery provides single sign-on between Drupal sites on the same domain using a
  70. shared cookie. When a user authenticates on a site they are sent a cookie by
  71. Drupal, containing a unique identifier for that user. Sub-sequent requests by
  72. that user will contain the identifier, allowing Drupal to recognize that the
  73. request is coming from a specific user, an authenticated user. This process is
  74. handled by Drupal core. Bakery augments the login process and sends an
  75. additional cookie (referred internally to as the CHOCOLATECHIP cookie). Should
  76. the user now visit a sub-site (on the same domain) their browser will send this
  77. Bakery-created cookie. On the sub-site Bakery will recognize the cookie and if
  78. it is valid will authenticate the user (via Drupal core's processes). The user
  79. is now authenticated on both sites while only have to log on to one.
  80. Notes on terminology:
  81. ===========================================
  82. Bakery documentation and discussion makes repeated reference to the words
  83. "master" and "slave". The terms stem from the common communication model between
  84. devices or processes in computer systems where one has unidirectional control
  85. over another. In Bakery's case, the master is the site with authoritative
  86. account and authentication information. The master is occasionaly referred to as
  87. the "main" site. The slave site can be referred to as the "subsite", but since
  88. Bakery does not enforce top-level and sub-domains the term "subsite" may be
  89. incorrect for some instances.
  90. Common problems, troubleshooting, and support:
  91. ===========================================
  92. * How do I disable Bakery?
  93. If you do not have access to disable the Bakery module via the UI you'll
  94. need access to the Drupal database for the site. To disable Bakery run this
  95. query: UPDATE system SET status = 0 WHERE name = 'bakery';After that you'll
  96. also need to clear caches.
  97. * Bakery/single sign-on/authentication does not work.
  98. Attempt one or all of the following until it is working:
  99. - Confirm you've followed the setup steps correctly with particular
  100. attention on the following details:
  101. + All slave sites are listed as so on the master's Bakery config page
  102. + Master and slave sites in config fields end with a forward slash (/)
  103. + The secret key is the same across sites
  104. + The cookie domain Bakery config field is the same across sites
  105. + The cookie domain config field has a leading period (.example.org)
  106. - Clear Drupal caches, clear browser cache, clear browser cookies
  107. - Occasionaly it may be necessary to explicitly set the Drupal site
  108. settings.php $cookie_domain variable. The settings.php $cookie_domain
  109. variable should match the domain the site is for in addition to having a
  110. leading period. For example, if the site is store.example.org set the
  111. $cookie_domain to '.store.example.org' and set the master's $cookie_domain
  112. to '.example.org'.
  113. Consult the online documentation at http://drupal.org/node/567410 for more
  114. information. Please use the public issue queue of Bakery for all bugs and
  115. feature requests: http://drupal.org/project/issues/bakery.
  116. Sharing account information using Bakery:
  117. ===========================================
  118. A modest amount of account data sharing between Bakery-enabled sites is
  119. supported. The core account fields 'name' and 'mail' are always synchronized.
  120. The following fields from user accounts are optionally synchronized:
  121. * status
  122. * user picture
  123. * language
  124. * signature
  125. * timezone
  126. If you have the core profile module enabled any created fields can be optionally
  127. synchronized. Note that for profile fields to be synchronized an exactly
  128. matching
  129. Notes on registration/sign-in on subsites:
  130. ===========================================
  131. This feature is important for usability. It's also really easy to configure your
  132. site so that this feature is horrible for usability. A few examples:
  133. Registration:
  134. This feature does not support saving any data other than the username, e-mail
  135. address, and fields created with the core profile module. If you have other
  136. modules that modify the registration process to add fields or make the form
  137. behave differently they are unlikely to work properly from the subsite.
  138. You should keep the "allow registration" and "Require e-mail verification when
  139. a visitor creates an account" settings the same on all sites. If your
  140. master site disallows registration then no subsites will be allowed to create
  141. accounts either and users will be confused why they see a form but it doesn't
  142. work.
  143. Notes on migrating to Bakery:
  144. ===========================================
  145. Migrating to using Bakery can be a fairly simple process. This process will work
  146. for separate sites and for a shared users table, though the latter can require a
  147. few additional steps.
  148. Pre-migration data synchronization is recommended to alleviate potential
  149. account mis-matches. According to Bakery two accounts are in sync when the
  150. username and email are identical and the slave account's init property contains
  151. the URL of the user edit page on the master
  152. (e.g. http://example.org/user/9/edit -- where example.org is the master). The
  153. UID of the accounts do not need to be identical. It is recommended you at least
  154. synchronize usernames and email address for accounts that belong to the same
  155. person across sites.
  156. For people that do not have joint accounts you could ask them via email to
  157. create an account on the site where there account does not exist, to assist the
  158. process.
  159. For accounts that have the same username but different email addresses Bakery
  160. provides a self-service mechanism for synchronizing accounts, but in the event
  161. this is inadequate or confusing you should provide a site administrator contact
  162. mechanism (form or email address) that is easily distinguishable.
  163. In case there are duplicate accounts on one of the sites, the module
  164. http://drupal.org/project/usermerge may help reconcile.
  165. If you have a shared users table solution between sites you will need to remove
  166. that connection before migrating to Bakery. First, populate the other users
  167. tables by synchronizing accounts. Modify settings.php on the shared sites to
  168. remove the table information from the database connection details. If the cookie
  169. domain begins with a leading dot you probably want to remove it, as it could
  170. cause issues when users move between sites.
  171. Once synchronization is complete you can follow the steps listed above on
  172. installation and setup of Baker.
  173. Known issues:
  174. ===========================================
  175. * Values in profile fields exposed on the subsite that are not set on the
  176. master will not be saved.
  177. * Bakery is currently incompatible with a configuration that requires
  178. administrator approval of accounts. An account registered on the slave will
  179. not be set to blocked on the master.
  180. * Bakery is not compatible with modules that takeover core Drupal's login and
  181. registration forms, e.g. ldapprov.
  182. Further information and support:
  183. ===========================================
  184. Consult the online documentation at http://drupal.org/node/567410 for more
  185. information.
  186. Please use the public issue queue of Bakery for all bugs and feature requests:
  187. http://drupal.org/project/issues/bakery