GithubHelp home page GithubHelp logo

shoaibali / apache2-mod_auth_memcookie Goto Github PK

View Code? Open in Web Editor NEW

This project forked from piersharding/apache2-mod_auth_memcookie

0.0 2.0 0.0 138 KB

Fork to support SimpleSAMLphp and Apache 2.4

Shell 0.93% C 99.07%

apache2-mod_auth_memcookie's Introduction

apache2-mod_auth_memcookie

Fork to support SimpleSAMLphp and Apache 2.4

Takes a session cookie, looks this up in Memcache. Sets REMOTE_USER to UserName value in session. Optionally Takes all the other session values and sticks them in X_* env vars and HTTP headers.

Configure Apache:

# Configuration example for using auth_memcookie module
LoadModule mod_auth_memcookie_module /usr/lib/apache2/modules/mod_auth_memcookie.so

<IfModule auth_memcookie.c>
  <Location /some_service>
    Auth_memCookie_CookieName AuthMemCookie
    Auth_memCookie_Memcached_AddrPort 127.0.0.1:11211
    Auth_memCookie_Add_Remote_User_Header on
    Auth_memCookie_SessionHeaders on
    Auth_memCookie_SetSessionHTTPHeader on

    # to redirect unauthorized user to the login page
    ErrorDocument 401 "/simplesaml/authmemcookie.php"

    Auth_memCookie_Authoritative on
    AuthType Cookie
    AuthName "Login To Thing"
    Require valid-user
  </Location>

ProxyPass /some_service http://localhost:8787
ProxyPassReverse /some_service http://localhost:8787

</IfModule>

Configuration options:

  • Auth_memCookie_Memcached_AddrPort: ip or host address(es) and port (':' separated) of memcache daemon(s) to be used, comma separated list
  • Auth_memCookie_SessionTableSize: Max number of elements in session information table. 25 by default
  • Auth_memCookie_SetSessionHTTPHeader: Set to 'yes' to set session information in http headers of the authenticated users, no by default
  • Auth_memCookie_CookieName: Name of cookie to get session ID from
  • Auth_memCookie_MatchIP_Mode: Set to '1' to use 'X-Forwarded-For' http header, and to '2' to use 'Via' http header, otherwise use apache remote_ip. set to '0' by default
  • Auth_memCookie_Authoritative: Set to 'yes' to allow access control to be passed along to lower modules, set to 'no' by default
  • Auth_memCookie_SilmulateAuthBasic: Set to 'no' to fix http header and auth_type for simulating auth basic for scripting languages like php auth framework work, set to 'no' by default
  • Auth_memCookie_SessionHeaders: Comma seperated list of headers that define a session - these get unset
  • Auth_memCookie_Add_Remote_User_Header: Set to 'yes' to pass username in te header X-Remote-User, set to 'no' by default

Dependencies

  • apache2-dev
  • libmemcache-dev

Build

See build.sh for an example of how to build a debian package

apache2-mod_auth_memcookie's People

Contributors

adrianschroeter avatar mlschroe avatar piersharding avatar shoaibali avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.