Git Product home page Git Product logo

shoaibali / simplesamlphp-module-authqstep Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 260 KB

SimpleSAMLphp module that challenges users to register answers for pre-defined questions with secret answers. Upon successfull registration and/or subsequent re-authentication attempts user is asked to answer one of their selected question using on-screen keyboard. The question is randomly generated everytime.

License: GNU Lesser General Public License v3.0

PHP 80.90% CSS 19.10%

simplesamlphp-module-authqstep's Introduction

This module has been supersede by simplesamlphp-module-auth2factor module here

https://github.com/shoaibali/simplesamlphp-module-auth2factor

simplesamlphp-module-authqstep

SimpleSAMLphp module that challenges users to register answers for pre-defined questions with secret answers. Upon successfull registration and/or subsequent re-authentication attempts user is asked to answer one of their selected question using on-screen keyboard. The question is randomly generated everytime.

Two-step authentication module for simpleSAMLphp using questions and answers.

Configure it by adding an entry to config/authsources.php such as this:


       'authqstep' => array(
        'authqstep:authqstep',
             'db.dsn' => 'mysql:host=db.example.com;port=3306;dbname=idpauthqstep',
             'db.username' => 'simplesaml',
             'db.password' => 'password',
             'db.answers_salt' => 'secretsalt',
             'mainAuthSource' => 'ldap',
             'minAnswerLength' => 5,
             'uidField' => 'uid',
             'initSecretQuestions' => array('Question 1', 'Question 2', 'Question 3')
         ),
  

Once user provides their ldap credentials, if they have pre-existing answers registered in the database they are randomly asked one of their chosen question. The answers are provided using on-screen keyboard for security reasons and to avoid key logging.

If the user is new, they go through the process of chosing their questions and their respective answers. In order to complete the login process user must provide a correct answer to its question.

All answers are normalized to lowercase to accomodate for hashing.

Please note that in a high availibility scenario the secret salt set in config.php for all instances of SimpleSAMLphp need to be the same in order for this to succesfully match user's answer.

PS: Database schema for answers and questions is automagically generated once the module is enabled.

Dependencies

  • Jquery-ui
  • Jquery-keyboard

Requirements

  • MySQL
  • PHP-MySQL PDO library support

simplesamlphp-module-authqstep's People

Contributors

shoaibali avatar

Stargazers

Laila Tabourit avatar

Watchers

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