52°F

Aaron Parecki

  • Articles
  • Notes
  • Photos
  • Wiki Upgrades and Backups - IndieWeb Challenge

    December 2, 2017

    This post is part of the IndieWeb Challenge to ship something every day of December!

    Today I worked on the long-standing project to upgrade our wiki to a recent MediaWiki version. 

    Wiki Upgrade

    I started by taking a snapshot of the database and restoring it to my laptop, then installed the latest MediaWiki version there. After running through the MediaWiki upgrade scripts, I had to test each extension we use, and either update it or drop it. I documented this progress on the upgrade page, and trimmed down the extension list to just the ones we absolutely need. I published these in a new repository so they're now tracked in version control: https://github.com/indieweb/mediawiki-extensions

    New Wiki Login

    One of the major sticking points of the upgrade was needing to redo the IndieAuth extension, since there have been some major changes to the internal auth mechanism of MediaWiki over the years. I was not looking forward to writing that code again, so I went with a completely different approach this time. Instead of writing any MediaWiki code, I installed the (well-maintained) Auth remoteuser extension, which just expects an environment variable to be set with the user that's logged in. Typically this is used with HTTP Basic Auth, but any mechanism that sets the environment variable will work.

    I paired this with an nginx module Lasso designed to work with any OAuth or IndieAuth-compatible API. I pointed the proxy at indieauth.com so the actual authentication logic is delegated there. I got the whole thing running on my laptop after a bit of fiddling. It's pretty slick. The wiki login/logout links are replaced by redirects to the proxy, which seamlessly redirect you to indieauth.com. Overall this should not be a hugely different experience to the end user. Below is a screen recording of the flow. (Ignore the 404 not found page at the end, that's a glitch in my local environment.)

    What you don't see happening is that clicking on the log in link actually takes you to sso.indieweb.org, which redirects to indieauth.com, which then redirects back to sso.indieweb.org and then back to the wiki. It happens all very quickly!

    This also means that the cookie is set on *.indieweb.org, so it will be available to every other subdomain, so I can eventually make the chat logs know who you are when you're logged in to the wiki! This will become even more important once I set up Calagator for our events.

    You can try out this flow right now, since I launched it on the server. Right now only a test domain is using it, events.indieweb.org. It just has a simple log in/log out link, but it's enough to demonstrate the functionality!

    Wiki Backups

    Since I'm about to do something drastic -- update MediaWiki -- it is always a good idea to have backups! For a while I've had a text dump of the wiki available via rsync (details here), but I wanted something that felt a little more robust as well. Today I set up that workflow to also commit all the changes to a git repo and push to GitHub! Since it's git, it means it will retain all versions of edits rather than clobbering the pages and even potentially deleting pages.

    If you're interested in helping keep a backup copy of the wiki, you can set up an automatic process to clone this repo! github.com/indieweb/wiki I'm hoping that by having it available on GitHub, it's easier for more people to help back it up. An added bonus is you'll have an offline-copy of the wiki you can browse locally! (Just make sure you clone it to a case-sensitive filesystem!)

    Portland, Oregon
    Sat, Dec 2, 2017 8:27pm -08:00 #indiewebchallenge #indieweb
    1 like 3 mentions
    • Ryan Barrett

    Other Mentions

    • Aaron Parecki aaronparecki.com
      My 2017 Year in Review
      Thu, Jan 4, 2018 2:40pm -08:00
    • Percolator percolator.today
      Episode 15: The IndieWeb Wiki and IndieAuth
      Wed, Dec 6, 2017 4:00pm -08:00
    • Aaron Parecki aaronparecki.com
      Episode 15: The IndieWeb Wiki and IndieAuth
      Thu, Dec 7, 2017 12:00am +00:00
Posted in /articles using quill.p3k.io

Hi, I'm Aaron Parecki, Director of Identity Standards at Okta, and co-founder of IndieWebCamp. I maintain oauth.net, write and consult about OAuth, and participate in the OAuth Working Group at the IETF. I also help people learn about video production and livestreaming. (detailed bio)

I've been tracking my location since 2008 and I wrote 100 songs in 100 days. I've spoken at conferences around the world about owning your data, OAuth, quantified self, and explained why R is a vowel. Read more.

  • Director of Identity Standards at Okta
  • IndieWebCamp Founder
  • OAuth WG Editor
  • OpenID Board Member

  • 🎥 YouTube Tutorials and Reviews
  • 🏠 We're building a triplex!
  • ⭐️ Life Stack
  • ⚙️ Home Automation
  • All
  • Articles
  • Bookmarks
  • Notes
  • Photos
  • Replies
  • Reviews
  • Trips
  • Videos
  • Contact
© 1999-2025 by Aaron Parecki. Powered by p3k. This site supports Webmention.
Except where otherwise noted, text content on this site is licensed under a Creative Commons Attribution 3.0 License.
IndieWebCamp Microformats Webmention W3C HTML5 Creative Commons
WeChat ID
aaronpk_tv