finds.dev

ZenProjects/Apache-Authmemcookie-Module

"Auth MemCookie" is an Apache Authentication and authorization modules based on "cookie" Authentication mechanism

View on GitHubHomepage ↗

★ 13CGPL-3.0updated Nov 2024

// the take

An Apache 2.x module that gates access based on a cookie whose value is a lookup key into memcached session data. It doesn't authenticate users itself — a separate login page (in any language with a memcached client) does that and writes the session; the module just validates the cookie and enforces Require rules on each request. Fits teams fronting legacy or non-SSO apps with Apache and want cheap session-based gating without touching the app.

Authentication is fully decoupled from enforcement, so the login page can be PHP, Perl, Java, whatever already talks to your LDAP/DB. It emulates PHP_AUTH_USER/REMOTE_USER so existing basic-auth-style app code works unmodified. It supports both the old apache 2.0/2.2 and newer 2.3/2.4 authz providers (mcac-group, mcac-public), plus libmemcached's consistent-hash distribution and SASL auth for multi-server memcached setups. There's CI building the module on every push, which is more than most abandonware C modules in this space have.

Session state, including an optional plaintext password field, lives in memcached with no encryption — anyone who can reach the memcached port can read or forge sessions, and the module does nothing to help lock that down. The IP-matching feature trusts X-Forwarded-For or Via headers in modes 1/2, which is spoofable by the client unless you've already got a trusted proxy stripping those headers upstream. It's a C Apache module parsing network input in the auth path, so any memory bug here is a security bug, and with only 13 stars and sparse recent activity there isn't much of a community checking for that. Most shops solving this problem today reach for oauth2-proxy or mod_auth_openidc instead of a bespoke cookie+memcached scheme, so adopting this means signing up to maintain a niche piece of infrastructure yourself.

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
13
Forks
8
Language
C
License
GPL-3.0
Last commit
5 Nov 2024

// nearby

If Apache-Authmemcookie-Module isn't quite it.

All repos →