Git Product home page Git Product logo

radiii's Introduction

RADIII

A small FreeRADIUS Perl script that allows patron auth against the III Sierra PatronAPI.

Installing / Getting started

This module depends on the following Perl modules:

  • DateTime
  • LWP (The World-Wide Web library for Perl)

And the following software:

  • Perl (5) (this is probabaly included in the base install of most distros)
  • FreeRADIUS
  • FreeRADIUS Perl module

They should be available in the package repository of your distribution and installed very easily by doing something like this:

Debian/Ubuntu

$ sudo apt-get update
$ sudo apt-get install libdatetime-perl libwww-perl freeradius

RHEL/CentOS

$ sudo yum install perl-DateTime perl-libwww-perl freeradius freeradius-perl

Once installed, FreeRADIUS will need to be configured appropriately. Some basic examples might be given at a future time, otherwise look over the FreeRADIUS documentation.

Deploying / Publishing

A Docker image is currently under development and when finished the Dockerfile will be included in this repository

Features

  • Allows a FreeRADIUS server to authenticate and authorize patrons based on their accounts in the Sierra database
  • Disallows access if a patron account is expired, manually blocked, or with fines over a configurable threshold

Configuration

At the moment, there are only 3 Environment variabled that need to be set for configuration of this script. This is only an example, and you should replace the given values with values that represent your environment.

Additionally, you will need these environment variables to be reset after a boot. This can usually be done by editing /etc/profile or by adding a file to /etc/profile.d/

# What is your timezone?
$ export RADIII_TIMEZONE=America/Detroit

# What is the base URL for your III Sierra server?
$ export RADIII_BASEURL=http://sierra-app.example.org:4500

# What is the maximum fine allowed for patrons to use services?
$ export RADIII_MAX_FINE=3.99

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

This isn't a complicated script, so just please try and keep things neat.

Licensing

The code in this project is licensed under BSD-3 license. For more information, please see the LICENSE file.

radiii's People

Watchers

James Cloos avatar

radiii's Issues

Update README.md

The current README file is just a boilerplate and does not include useful information.

Update the script to use ENV variables

The script currently requires users to update the source code itself to change basic settings (API endpoint, fee amounts, timezone). While this might not be too much trouble for someone building up a FreeRADIUS server themselves, we are aiming to create a viable Docker image. Docker images seem much easier to configure using environment variables

Create a Dockerfile

Lets make this a little easier to install/use and just create a Dockerfile and docker-compose.yml. Eventually we can push Docker images to the Docker Hub.

Access PatronAPI over HTTPS

The current plugin accesses the PatronAPI over standard HTTP, which needs to change. This hopefully won't require much change, perhaps just including a different www access lib and a few bits of refactoring.

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.