finds.dev

tai/mod-auth-ticket-for-lighttpd

Auth module which uses signed cookie for authentication. Developed to protect whole server using app-level SSO (OpenID, OAuth, etc).

View on GitHub

★ 10Cupdated Jan 2019

// the take

A lighttpd module that bridges cookie-based SSO (OpenID, OAuth) into legacy HTTP Basic Auth, so apps that only understand $REMOTE_USER can sit behind a modern identity provider without code changes. It's for someone running old HTTP-BA-based apps on lighttpd who wants to front them with SSO instead of rewriting auth logic.

The identity-mapping trampoline pattern (SSO login page signs a cookie, module verifies and swaps it for an internal token, then injects a Basic Auth header) is a clean way to retrofit SSO onto apps that can't be touched. Scoped tightly to one job instead of trying to be a full OpenID relying party, which keeps the C code small and the attack surface narrow.

The reference PHP implementation in the README rolls its own crypto: a hand-written XOR stream cipher with an MD5-derived keystream, not an authenticated encryption scheme like AES-GCM. That's a textbook way to get a forgeable or distinguishable ciphertext, and it's the exact code most adopters will copy-paste into production. Last commit is from 2019 and there's no CI, tests, or TODO burn-down since (the README itself lists memory cleanup for expired entries as unfinished, i.e. a known resource leak). Single-maintainer project with 10 stars and no evidence of use beyond the author's own setup, so there's no community vetting of the security-critical parts. Config and demo apps use plaintext shared secrets with no rotation story.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
10
Forks
7
Language
C
Last commit
11 Jan 2019

// nearby

If mod-auth-ticket-for-lighttpd isn't quite it.

All repos →