Problem
Bakery is hard to customize for specific use cases:

  • 7.x-2.x does not do user field sharing (see #1107692: Port bakery 6.x-2.x to 7.x-2.x for details)
  • Registration and login redirect can break too easily
  • Bakery's methods for uniquely identifying user across sites is out-dated and should now use UUIDs
  • Bakery development is difficult because of cookie metaphors and use
  • Hard to test

Proposed solution

Simplify Bakery down to what it does best: creating and validating a cookie and authentication

Employ a hook system to allow site-specific customization of user-related process flows and data management (related #556666: Sync hooks: Enable sharing of arbitrary data)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

coltrane’s picture

We could use a map format, textarea for defining machine names, master to remote. 7.x-2.x would have a field depending on if it's master (fields to profiles) or slave (profiles to fields) though the textarea needs to also allow both 7.x master and slave.

greggles’s picture

Timezones are also not shared.

coltrane’s picture

This patch readies Bakery 6.x-2.x for no longer explicitly handling Profile fields. Subsequent patches will build off this.

fuzzy76’s picture

Subscribing. Even just a backend engine with some hooks would've been useful here.

sumitk’s picture

We need this for DrupalCon website and mobile apps .... any updates here?

greggles’s picture

No, and I think it's very unlikely any will appear organically unless Ben has more time/energy for this than I imagine.

sumitk’s picture

Okay I solved this by fetching speaker bio fields form d.o ... so not a blocker for me now.

kaizerking’s picture

have any one thought about this data sharing,
I have D7 and D6 as sub domain using bakery SSO it is working fine, I also want toshare some data from D7 to D6 and soem data from D6 to D7, is there any way out
or else can we share the screens of each other
if i use bartik theme and 1 column will display data from D6 and if i am in D6 1 column from D7 or some sort of solution?

coltrane’s picture

Title: Figure out how to share data in the future » Bakery 3.x and pluggable account management
Version: 7.x-1.x-dev » 7.x-2.x-dev

Refocusing this issue to be about Bakery 3.x - will update the issue summary

tunic’s picture

Talking about Bakery Nougat functionality I think that Bakery has to use more Drupal-generic mechanismo to implement its functionality. For example, Bakery hooks to login/register form, so any other operations with user that do not use those forms are completely ignored by Bakery.

coltrane’s picture

tunic, can you elaborate on the problem you allude to in #10? What other operations would you want Bakery to interact with?

Any suggestions or ideas around a solution?

tunic’s picture

Bakery hooks on form_alter to set its own submit handler for user register form. That's ok for the use case where a user registers himself, but it fails if a user is created programatically, because no user form submit handler is fired. Also, because Bakery redirects user client to master to get the Chocolate Chip cookie. This prevents to use Bakery mechanism to create users because it may be no browser to redirect to master. That's why Bakery Nougat was needed.

coltrane’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Issue tags: +Bakery 3.x

I've pushed a 3.x branch to git and created a dev release. Branch contains a Bakery class for containing Bakery's core functionality of creating and validating an SSO cookie.

I've stripped the .module of its other functionality for now. Will need to figure out what is part of core Bakery and what's appropriate for sub-modules.

coltrane’s picture

Issue summary: View changes

Updated issue summary.

m1r1k’s picture

Issue summary: View changes
FileSize
47.82 KB

Lets introduce some hooks and try to split bakery module into at least two parts: main one that contains only SSO related logic and move all synchronization and drupal messages to separate on 'bakery_own_sync' to avoid massive overrides if we have separate sync engine like services.

Here is a first version of patch

m1r1k’s picture

Here is another update

ar-jan’s picture

Here's an example that I suppose could (or should) be made possible by this issue: an option to allow only users with a particular user role on the master site to login to a slave site.

Would that be possible?

fuzzy76’s picture

What happened to 3.x? Are there still plans to finish the rewrite?