yorkshirepudding's picture

I'm wondering how integrations work with Backdrop.  Is it the case, that it is possible to integrate with backdrop without any additional module in backdrop?  The reason I think this might be the case is searching in the install modules page for civicrm comes back with modules that extend the integration but no base integration module.

I have a particular use case in mind, that of the open source Meeting Room Booking System (MRBS). I've used MRBS (https://mrbs.sourceforge.io/) a few times over the years. I'm currently implementing a gym booking system using it linked to the parent Joomla site. Many moons ago, MRBS had a Drupal module that allowed it to share logins (https://www.drupal.org/project/mrbs), but this was shut down as it was a security risk.

Currently, MRBS has the ability to authenticate using Joomla or Wordpress (amongst other methods). I think it could be a useful feather in Backdrop's cap if we could get an integration for authentication, and ideally email addresses/Display names.

I can't work out exactly how the Joomla integration works - all I did was created some roles in the main site, a link to the MRBS site and set the config to use Joomla authentication and recognise those role IDs and point to the Joomla base path.

I'm wondering if a Backdrop integration would be similar, mainly implemented in MRBS, but maybe some roles added?  Is there a specific API that civiCRM uses to get the authentication from backdrop?  Where could I look for this?

I think this could potentially be wider.  If we can make it easy for other systems to integrate with Backdrop we create a stronger incentive for organisations to move.

My particular use cases I'm thinking of for MRBS is churches who nearly always need to have a way of booking resources.  When the Drupal integration went, I had to switch to using the native db authentication with php sessions.  However, when I started with this gym booking system on the Joomla site, it started me thinking that I would really like to get MRBS linking to Backdrop.

I tried to start a conversation on Zulip but it got no replies and dropped from the horizon.  I thought by re-posting on the forum, it gives chance for a longer conversation and for any information to be available for longer.

Comments

indigoxela's picture

Hi yorkshirepudding,

when it comes to authentication, I'd assume that you need some sort of "bridging code" - usually a module.

This has to happen in a clean and proper way to prevent security breaches.

If you find a (supported!) D7 module that provides what you need, it might be worth porting. Writing from scratch is probably too much effort - unless someone really needs it.

indigoxela's picture

If it doesn't have to be MRBS - you might be able to do a booking service with Backdrop modules.

I never heard of MRBS and, of course, never used it. It seems to me, it isn't widely used. Maybe you find an alternative, that's easier to integrate (with a larger community).

oadaeh's picture

It doesn't look like MRBS has a published API, but someone started creating an API using Lumen here: https://github.com/santiagomr/lumen-MRBS-api

To see more of how the WordPress, Joomla, and Drupal CMSs are connecting to MRBS, I would need to dig into the code.

On an initial, quick read through of the Drupal module, it looks like it's directly accessing the MRBS database, rather than making API calls, so that's probably how that is being done. That's fine, if the two are on the same computer, but it doesn't work so well if they're on different computers.

There isn't anything stopping taking the D7 module, fixing it up (it has quite a bit of insecure code in it), and using it, but if you want something more robust, I would probably start with the Lumen-based code above.

It's possible the WordPress or Joomla implementations have something more usable than the Drupal implementation, but I haven't seen them.

Thanks oadaeh - it gives me food for thought.  Typically, all the use cases for having these two integrated would be on the same hosting account, either within a subfolder or on a subdomain.  I had in a sub folder when I was using it.  

Robust would be better albeit a steeper learning curve.

The authentication for Joomla is all in MRBS - there is no Joomla module in the CMS; I implemented this on a Joomla site recently.  Not sure how Wordpress does it.  Both of these authentication methods are based on the CMS being on the same server as MRBS.

I think Services module may be a better bet as the Lumen module appears to be for other systems to interact with MRBS rather than for MRBS to authenticate with other systems.