Giter Site home page Giter Site logo

duo-hotp's Introduction

Duo HOTP

Duo can authenticate using HOTP - Hash(message authentication code)-based One-Time Password.

But it has some proprietary covers over the OATH (Initiative for Open Authentication) standard.

simonseo/nyuad-spammer has code to work around this. duo.py is largely copied from there

Usage

also see duo.py -h or the doc string of duo.py

  1. generate a new duo QR code for an android tablet within your institution's device management portal
  2. copy the url of the QR code image . it should look like https://api-e4c9863e.duosecurity.com/frame/qr?value=c53Xoof7cFSOHGxtm69f-YXBpLWU0Yzk4NjNlLmR1b3NlY3VyaXR5LmNvbQ
  3. ./duo.py new 'https://URL-OF-IMAGE' to register
  4. push continue in the browser
  5. ./duo.py next for future authentication

Convenience

consider adding binding in sxkd, xbindkeys, etc for

duo.py next -s ~/secure/myinstitution_duo.json  | xclip -i

Warnings

  • The default secret.json file is not encrypted! Be careful where you store it (see -s switch).
  • if you generate too many next calls w/out passing on to duo, you'll leave the validation window and duo will not authenticate.

Install

pip install -r requirements.txt # pyotp docopt requests
./duo.py -h

Tests

testing is limited.

python -m doctest duo.py

TODO

  • support GPG to secure secret file

TOTP

duo.py is specific to duo's HOTP. For time based one time passwords (Google Authenticator, Microsoft Authenticator), look at oath-toolkit

KEY=$(zbarimg /path/to/qr-image.png)
oathtool --totp --base32 $KEY

duo-hotp's People

Contributors

willforan avatar

Stargazers

 avatar

Watchers

 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.