Git Product home page Git Product logo

radius-mongodb's Introduction

MongoDB module for FreeRADIUS

This module allow you to use MongoDB as FreeRADIUS backend (instead of a LDAP).

How it works ?

Each time your radius receives a authorization request, FreeRADIUS will check user credentials stored in MongoDB.

The request looks like :

{
	"mac": "00-11-22-33-44-55",
	"username": "john"
}

If a document matches, MongoDB will return :

{
	.. some data ..
	"password": "secret"
	.. some data ..
}

FreeRADIUS will now compare given password and MongoDB password (only cleartext password).

Install

  • Copy the directory rlm_mongo/ into src/modules/
  • Add "rlm_mongo" in src/modules/stable
  • Build as usual
    • ./configure
    • make
    • make install
  • Edit your configuration
    • Create a file named mongo in raddb/modules/ and insert your configuration (see below)
    • Add in your site configuration in authorize sub-section "mongo"
  • Run radiusd

Configuration

mongo {
	port = "27017"
	ip = "192.168.1.181"

	base = 	"production.users"
	username_field = "username"
	password_field = "password"

	# Check mac address (optionnal)
	# mac_field = "mac"

	# Check enable account (optionnal)
	# enable_field = "activate"
}

Tips

If you use rlm_mongo in inner-tunnel and mac filter, ensure you have this in eap.conf : copy_request_to_tunnel = yes

If you want to use NTLM password, only replace Cleartext-Password by NT-Password in rlm_mongo.c

Credits

Guillaume Rose, Roman Shterenzon

radius-mongodb's People

Contributors

guillaumerose avatar romanbsd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.