Abandoned Project Cindernet

Discussion in 'Support' started by Bloodcinder, Oct 11, 2012.

  1. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    As part of my development for the new Bloodcinder site (which will be running WordPress), I want to set it up so that accounts between that site and Simreq are tied together. There are no good premade solutions to this, so what I am probably going to end up doing is setting up an LDAP server, which acts as a central username/password/email repository which both WordPress and phpBB can communicate with.

    That is, once the LDAP server is set up, WordPress and phpBB will automatically synchronize any user accounts they have onto the LDAP server, and if there is a user in LDAP but not in WordPress or phpBB then it will be created automatically. This will have the transparent effect of having a single account on both sites. That is, any existing forum user will already have member's access on the Bloodcinder site, and anybody who's posted a comment or made a purchase on the Bloodcinder site will automatically have access to the forum, for purposes of having a subforum for book feedback tied together. (In actuality, the accounts wouldn't be created until used, so just because somebody buys something from my publishing site doesn't mean a new user shows up in the forum. It would only show up if they try to log into the forum, but they will be able to do so without having to register.)

    Practically speaking, nobody's going to notice this. However, setting this up requires me to upgrade my Dreamhost package, install a bunch of software, and go through a potentially complicated setup process, during which it is possible I will have to take the forum down for a few days. Further, I could break it completely and have to restore the databases. The only way to do that safely is for me to lock the forum so that nothing happens while I'm working.

    TLDR: in the next few weeks, I may have the lock the forum for a weekend in order to implement these changes that nobody will notice but me.

    The ultimate purpose, by the way, is not just for fan discussion. Eventually I or other Simreq members may want to publish some RP books based on custom rulesets, perhaps for sale as paper or perhaps just free PDF's (or both). Anybody who bought it would have immediate forum access both to player/DM support and even to play games with the creators themselves.
     
  2. spiritguardian1

    spiritguardian1 New Member

    Likes Received:
    0
    Local Time:
    1:38 PM
    Re: Site Update Announcements

    Sounds good. I have been trying to get time to do work on my websites as well...haven't had an update to mine in 1-2 years (though I mostly use it as a repository these days), though I set up for my girlfriend using a lot of the nice plugins from Dreamhost 2 months ago. Short of having your own server you can do absolutely anything to, dreamhost has been a great webhost with lots of options.
    I like hearing about these updates because it helps give me ideas for some side projects. Sounds great.
     
  3. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    Re: Site Update Announcements

    I love Dreamhost. Any problems I've ever had (which have been very few) were resolved for me quite quickly. The only limitations I have are that I'm on shared hosting right now, so I can't run extra processes, like an LDAP server. However, I only pay about $10 a month right now for hosting, and by moving up to a virtual private server I'd only be paying $15. I think it's a jump I want to make, for the added features.

    I hear you about the time issues. We're real life adults now with jobs and stuff. It can be hard to find the time. Anymore, I feel pleased with myself when I stay up 1 hour some night to tweak a minor template setting. I find myself motivated to undertake this, though, because it synthesizes together my hobbies and my business, so theoretically it's lucrative.
     
  4. spiritguardian1

    spiritguardian1 New Member

    Likes Received:
    0
    Local Time:
    1:38 PM
    Re: Site Update Announcements

    Adult life sucks :(
    And yeah, I pay around $10 as well, we must have the same bundle. I have thought about what advantages there are to the upgrade, but I simply haven't made that jump yet...but it certainly is tempting. And yep, been with Dreamhost since 2006 or so, with limited issues. Once when I was on a dying server, I had about 1 day downtime that we quickly got resolved. The day was mostly just a transfer of files time delay. Overall, great hosting. I tried either Bluehost or 1and1 and didn't like them very well.
     
  5. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    Re: Site Update Announcements

    Minor problem. Turns out the built-in LDAP authentication in phpBB is not a two-way sync. If a user logins using LDAP and doesn't have a Simreq account yet, phpBB will create it. However, if the user logs in to phpBB and doesn't have an LDAP entry yet, it won't make it. So the sync only happens one-way. I might be able to create a mod that fixes that issue.
     
  6. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    Re: Site Update Announcements

    Currently migrating everything to the VPS server. There may or may not be downtimes.

    Scratch that. Turns out, like all things Dreamhost, it was completely painless.
     
    Last edited: Jun 12, 2015
  7. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    Re: Project LDAP

    Well, I broke the server, and most of the websites were down for an hour. But on the plus side, the "reset server" option really does get everything back to normal. So I don't have too many fears about playing around and breaking it again in the future, but that will have to wait for tomorrow.

    Looks like I will, indeed, be using the weekend for this.

    I decided to make this a project log thread since most of what I post isn't a significant site update notice but since some people (especially Brian) might care to know the details of the progress or lack thereof.
     
  8. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    Re: Project LDAP

    After plenty of sudo apt-get'ing and webbing together a bunch of symlinks for ini files, I've finally managed to enable LDAP support in PHP. Somehow, doing prohibitively annoying things in Linux and finally getting it to work is very fulfilling.

    Now I just need to decide whether I will install OpenLDAP or ApacheDS as my LDAP server. The former is I guess what you'd call the "standard." The latter is Java-based. I might need to look into which is more suitable for small applications and which uses more memory.
     
  9. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    Re: Project LDAP

    Although I've had some fun, I've discovered that LDAP is way beyond my needs. I'm better off writing my own shared user database and writing alternate auth plugins for both WordPress and phpBB to sync them together. Somehow, that'll actually be easier.

    That said, I do enjoy having the Dreamhost private server, so I will be sticking with that. It will let me do other things in the future that I haven't been able to do before because I hadn't been able to run persistent processes.

    From now on I'm going to refer to this as "Project Cindernet."
     
  10. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    One possible solution is to setup MySQL triggers. Whenever a new user is added in the phpBB database (or WordPress), it trips a trigger that automatically passes the same information on to the other database. Likewise, if ever there is an update on one of them it automatically updates the other ones when it trips the trigger. I might have a middle-man database in case I ever have more than 2 applications involved and so that there is a central repository.

    It's a weird solution, but it wouldn't require me to actually modify phpBB or WordPress at all. It would just be an automated and invisible synchronization process. I'm looking into it.
     
  11. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    It looks like the triggers thing is going to work well. The one problem is that currently the encrypted versions of user passwords are done differently between WordPress (which does it using an open source industry standard) and phpBB (which does it with a modified version). I'll have to make sure that they both encrypt their passwords the same way, and if there is a 3rd system which interfaces with this project in the future then it will also have to encrypt in the same way.

    All this is to make sure that if you change your password in one site it will change it in the other. It's just not as simple as the usernames or emails because of the differences in secure password storage.

    As I said in the update announcements, this may break your account, but all you have to do is reset your password, and you're under no obligation to use a different password than you did before.
     
  12. Bloodcinder

    Bloodcinder Developer

    Likes Received:
    326
    Local Time:
    2:38 PM
    By making sure everything used the same password system, fine-tuning the triggers, and doing a bunch of coding to make sure that nothing gets messed up, I think I've finished.

    It currently only works for new members of either site (not existing forum members). If you register for one site, you get an entry put for you in Cindernet. You don't show up on any of the other sites by default. However, if you go to one of the other sites and try to login with the same username and password, your account there is instantly created, as if you were already a member there.

    The only details that are shared between the accounts are username, password, and email. Everything else is site-specific. I will be manually adding in Cindernet accounts for everybody at Simreq. Then anybody here will be able to log directly into the Bloodcinder Press site when it becomes available.

    I've bug tested pretty thoroughly. There is a known "feature" which might seem like a bug. If you register on one of the sites and thereby get a Cindernet account, then your accounts on the sites are deleted, you'll still have a Cindernet name listed in the database, thereby locking the name down and preventing reuse. If ever it's an issue, I decided it's too nuanced to try to automate, so an issue like that can be handled manually.

    In the future, if I create any services of any other kind, they will tie into the Cindernet system so that nobody needs more that one login.