Skip to main content

Company in a Box, Part 6 of 11: Choosing open-source apps: the SSO test

A series on building a company's IT with containers and open source

When I made the rule "every app signs in through Keycloak", I thought it was an integration task. It turned out to be a selection process. Something between a job interview and a reality TV show, where apps get voted off the island.

Over a few months it removed more apps than any other reason. Every time, the lab got better.

Free software first

Before the SSO test, there's an even earlier filter, and it's a personal one.

I've been a member of the Free Software Foundation for a while. My rule for Inner Bits is: free software wherever possible, and pay only when there's genuinely no alternative. That's not a purity contest (the host runs Windows, I've made my peace with that in post 1). It's a practical choice:

  • You can read the code, fix it, and keep running it when the vendor changes its mind.
  • Your data sits in formats and databases you control.
  • It's what makes "accessible to anyone" actually accessible. A per-seat licence is a gate. Free software isn't.

So every app in the lab starts as a free software (or free community edition) candidate. Then it has to survive the SSO test.

The graveyard

From the Git history, a moment of silence for the fallen:

Was Replaced by Cause of death
WordPress Drupal Got hacked shortly after installation. Drupal was the natural next stop
Splunk Free Loki + Grafana Splunk Free has no authentication and no alerting. Also, not free software
Greenbone / OpenVAS netscan (Nmap + Nuclei) No SSO, and ~57 GB of volumes
ONLYOFFICE Euro-Office Other vendors are dropping ONLYOFFICE for Euro-Office; I followed the crowd for once
SQL Server nothing Pure Microsoft-guy reflex. Completely useless here: nothing in the lab needed it
Dremio Trino + Superset Wanted Keycloak-native data tools
phpLDAPadmin, then LDAP Account Manager nothing LDAP itself was retired
phpMyAdmin and pgAdmin DbGate Two tools, two logins, one of them with no login at all

WordPress deserves a moment of its own. It went in, and very shortly afterwards somebody else had let themselves in too. In my defence, it's the most attacked CMS on the planet, and bots start probing a fresh install before you've even picked a theme. It didn't get a second chance, and Drupal was the natural replacement: it installs itself from the command line, signs in through Keycloak, and its installer and update scripts are blocked from the internet by the Traefik rules in post 3. Lesson learned: never expose a half-configured app to the internet, not even "just for a minute".

Each one was days or weeks of work. None of it was wasted. Living with an app for a while is the fastest way to know exactly what you need from its replacement.

The interview questions

The rule began as "does it support SSO?". It's grown into a short interview:

  1. Does the free edition do OIDC or SAML? Many vendors keep SSO for the enterprise tier: the infamous "SSO tax". This rejected DefectDojo (its open-source version has no SSO at all) and CloudBeaver (OIDC is Enterprise-only) before they ever got a container.
  2. Can a group become a role? Apps that read a groups claim make lab-admins mean something. Apps that don't need manual grants, and manual grants drift.
  3. Can I configure it from a script? API, CLI or config file. If setup is only a web wizard, every rebuild needs me sitting in front of it, clicking "Next" like it's 2003.
  4. Is it one or two containers? Not a hard rule. But a ten-container app had better be worth ten containers.
  5. Is the image maintained? Some images on Docker Hub haven't been rebuilt in a year and carry more CVEs than features. The scanner from post 9 is very good at finding these.

When SSO is paywalled: the gate

Some apps ace everything except question 1. Plane, the project-management tool, is a great Community Edition, but its OIDC is a paid feature.

But Plane CE does support "Sign in with GitLab". And GitLab signs in through Keycloak. So:

browser ──> oauth2-proxy gate (Keycloak, lab-users) ──> Plane
       ──> "Continue with GitLab" ──> GitLab ──> already signed in via Keycloak

One password, one MFA prompt, and nothing touches Plane's login page without going through Keycloak first. Is it a Rube Goldberg machine? A little. Does it work every time? Yes. A setup script creates the GitLab OAuth app and Plane's settings, so a rebuild still needs zero clicks.

Plane also gave me one of the lab's funniest bugs. Its bundled web server applies a per-IP rate limit. Behind Traefik on Docker Desktop, every browser in the world arrives from the same NAT address. So the entire world shared one rate limit, and everyone got HTTP 429 after a few clicks. The fix was my own copy of its Caddy config without that limit, and a note in the handbook to check it after every upgrade.

Never settle

Here's a personality trait my colleagues already know about: I'm never quite happy with "it works". If a tool works but there's a better one out there, I'll find it, usually around midnight, and the old one's days are numbered.

In a VM world, that habit is expensive. Swapping an app means a new VM, a migration and a weekend. In a Compose file, it's a new service block, a sign-in script and a push. Containers made my restlessness affordable. (Whether that's a good thing is a question for my free time to answer.)

Four upgrades I'm especially pleased with:

phpMyAdmin + pgAdmin → DbGate. For months the lab had two database admin tools: phpMyAdmin for MariaDB and pgAdmin for PostgreSQL. Two UIs, two sets of habits, two sign-in stories. pgAdmin did OIDC fine. phpMyAdmin has no SSO at all, so it lived behind an oauth2-proxy gate and then opened MariaDB with no login of its own. Worse, it also listened on a local port with no login whatsoever. My security scanner raised an eyebrow. I raised two.

DbGate replaced both on the same day. One web UI for MariaDB and PostgreSQL, signing in with Keycloak natively, letting only lab-admins in. The connections are predefined in the Compose file, so nobody can add new ones from the UI, and it publishes no port at all: Traefik is the only way in. I looked at CloudBeaver first, and it fell at question 1: OIDC is Enterprise-only. Two tools out, one in, and one fewer open door. That's my favourite kind of maths.

Splunk → Loki + Grafana. Splunk was in the lab out of pure day-job habit. It's a brilliant search engine, and I know my way around it. But Splunk Free has no authentication and no alerting, and it isn't free software. Loki stores logs, Alloy ships them, and I read them in Grafana, behind Keycloak, right next to the metrics and dashboards. Less powerful search, much better fit. (Post 8 has the details.)

Dremio → Trino + Superset. I wanted SQL across all the company's data (Zabbix alerts, Matomo visits, LiteLLM usage, iTop tickets) in one place. Dremio did it, but didn't fit the identity model. So it became two tools, each better at its own job. Trino is the query engine and signs in through Keycloak, even for JDBC clients (they pop open a browser to log in, which still feels like magic). Superset does the dashboards and queries Trino as the signed-in person, so access rules apply per user. Both are admins-only, every data source is read-only, and the finance department of Inner Bits (me) is thrilled.

Greenbone → netscan. Greenbone is the open-source vulnerability scanner. It's also enormous, has its own user database with no SSO, and keeps its reports in yet another web UI. I replaced it with a small container that runs Nmap (with CVE matching) and Nuclei on a schedule and sends results to Loki. They show up in Grafana, behind Keycloak, next to everything else. Smaller, more useful, one less password. (Post 9 has the details.)

And the biggest swap of all wasn't an app: it was the directory. The road from LDAP to Keycloak only is in post 5.

Notice the pattern? Every swap ended with fewer logins, fewer open ports, and more of it in one place. That's not a coincidence. That's the SSO test doing its job.

The cast that made it

Inner Bits is meant to look like a real company, so here's who survived, by department:

  • Everyone: mail and webmail (Stalwart, Roundcube), files, chat, video and documents (Nextcloud with Talk and Euro-Office), XMPP chat (Prosody), intranet (HumHub), mailing lists (Sympa), an AI assistant (Open WebUI)
  • Marketing and web: Drupal, Matomo, LimeSurvey
  • Sales: EspoCRM
  • HR and training: Moodle
  • Projects: Plane
  • Engineering: GitLab, SonarQube, n8n
  • Finance and management: Trino and Superset over everything
  • IT: iTop as service desk and CMDB (Zabbix opens tickets in it automatically), Zabbix, Grafana, Prometheus, Loki, Technitium DNS, DbGate, and the security scanners

Does a home lab need all of this? Absolutely not. Does a company? Yes. And every one of them taught me something about how that kind of software plugs in, which is the whole point.

The lesson for the day job

The SSO tax is real, and it shapes architecture far more than vendors admit. When an app's identity story doesn't fit, the workarounds (gates, shared accounts, manual grants) become the most fragile part of the system.

Asking "how does it sign in?" before "what can it do?" would have saved me a lot of installs I later deleted. I'm going to start asking it earlier at work too. Procurement is going to love me.

Next: how a git push becomes a deployment on a Windows desktop, and what Windows Update thinks about that.

Read next: Company in a Box, Part 7 of 11: Every Git push is a deployment

Comments

Popular posts from this blog

Company in a Box, Part 1 of 11: Why I'm building a company's IT with containers and open source

A series on building a company's IT with containers and open source Hi. I'm an IT admin. I've been doing this long enough to have strong opinions about Group Policy and long enough to have strong feelings about printers. For most of my career, my home lab looked exactly like my day job: a Hyper-V host and a handful of VMs. Each one had its own OS to patch, its own disk to grow, its own backup job, and its own creative way of breaking at 2 a.m. It worked. It also stopped teaching me anything. These days every vendor README starts with docker compose up , and I was still out here lovingly hand-crafting a VM for each one, like a medieval monk illuminating manuscripts. So I moved the lab to containers. Then things got slightly out of hand. A confession about who I am Let's get this out of the way, because it explains every decision in this series. I'm a Microsoft guy. Windows Server, Active Directory, Exchange, Hyper-V: that's my day job, and I'm good at...

Company in a Box, Part 11 of 11: What it costs vs. SaaS and the cloud

A series on building a company's IT with containers and open source Ten posts in, it's time for the question everyone skips to: is this worth it? Inner Bits runs a small company's IT on one desktop. What does that cost? What would the same company pay to rent it all as SaaS? And what if you ran the exact same stack on a rented server at Hetzner, OVH, Azure or AWS instead of under your desk? Get comfortable, there are tables. Three of them. What the lab costs to run All prices are what I pay in Portugal. Item Cost Hardware a ~€1,500 desktop (32 GB RAM, a GPU for the AI models); over five years, ~€25 a month Electricity ~€15–30 a month Domain name ~€1 a month (about €12 a year) Cloudflare ~€5 a month (Workers Paid; Tunnel, Email Routing and DNS are free) Stalwart Enterprise licence paid (see the ledger below) Tailscale free personal plan Software €0 for everything else. Every app is free software or a free community edition Total ro...

Company in a Box, Part 9 of 11: Patched images and vulnerability scanning

A series on building a company's IT with containers and open source Running a company's IT means running its security too. A home lab is an easy place to skip that. "It's just at home." "It's behind the VPN." Famous last words, usually followed by a very educational weekend. Inner Bits has a public website, inbound mail and a tunnel from the internet. It's meant to show what a small company could run. So it gets the treatment I'd expect at work: hardened containers, patched images, and scanning that happens whether I remember it or not. The baseline: same rules for everyone Every service in the Compose file merges a shared hardening block: no-new-privileges , so a process can't climb its way up through setuid binaries; a PID limit , so a fork bomb only blows up its own container; a memory limit of about twice normal use. On top of that: healthchecks on the databases and key services, databases never recreated unattended, and se...