Skip to content

Varnish module for access control based on cookies

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
COPYING
Notifications You must be signed in to change notification settings

linksilver/libvmod-access

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libvmod-access

Build Status

Description

Varnish module implementing cookie-based access control.

Warning

This module is EXPERIMENTAL - do not use in production! It is only for education purpose.

Setup

  1. install required packages for building the module (instructions for Fedora 22)

     $ sudo dnf install automake libtool make varnish varnish-libs-devel python-docutils
    
  2. clone repo

     $ git clone git@github.com:lemonde/libvmod-access.git
     $ cd libvmod-access/
    
  3. switch to master branch (for Varnish 4.0, branch 3.0 is for Varnish 3.0) :

     $ git checkout master
    
  4. build module

     $ ./autogen.sh
     $ ./configure
     $ make
    
  5. run unit tests

     $ make check
    
  6. have fun!

VCL function

access.check()

Prototype

    access.check(STRING SERVICE, STRING COOKIE_NAME, STRING SALT)

Return value

	BOOL

Description

    Returns true if a request with a valid cookie is sent, false otherwise.

Example

    if (req.url ~ "^/protected/")
    {
            if (access.check("protected_content", "__access", "salt used for checksum"))
            {       
                    // access granted
            }
            else
            {
                    // access denied
            }
    }

License

MIT

About

Varnish module for access control based on cookies

Resources

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.5%
  • Shell 10.5%