All Projects β†’ RijulGulati β†’ zauth

RijulGulati / zauth

Licence: MIT license
2FA (Two-Factor Authentication) application for CLI terminal with support to import/export andOTP files.

Programming Languages

go
31211 projects - #10 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to zauth

rci
πŸ”’β€‚better code inputs for react/web
Stars: ✭ 805 (+987.84%)
Mutual labels:  2fa
kagi
WebAuthn security keys and TOTP multi-factor authentication for Django
Stars: ✭ 17 (-77.03%)
Mutual labels:  2fa
Morpheus
A Matrix client written in Go-QT
Stars: ✭ 20 (-72.97%)
Mutual labels:  golang-application
authy-extractor
Extract 2FA tokens from Authy.
Stars: ✭ 30 (-59.46%)
Mutual labels:  2fa
gosearch
a fast, real-time file searching program for linux
Stars: ✭ 68 (-8.11%)
Mutual labels:  golang-application
urlredir
Educational URL redirector service in Go
Stars: ✭ 26 (-64.86%)
Mutual labels:  golang-application
k8s-canary
Walkthrough of Canary deployment on Kubernetes
Stars: ✭ 18 (-75.68%)
Mutual labels:  golang-application
AuthPress
Add 2-factor authentication to your WordPress blog site.
Stars: ✭ 16 (-78.38%)
Mutual labels:  2fa
shibboleth-mfa-u2f-auth
U2F multifactor authentication plugin for Shibboleth IdPv3
Stars: ✭ 25 (-66.22%)
Mutual labels:  2fa
AutoSpotting
Saves up to 90% of AWS EC2 costs by automating the use of spot instances on existing AutoScaling groups. Installs in minutes using CloudFormation or Terraform. Convenient to deploy at scale using StackSets. Uses tagging to avoid launch configuration changes. Automated spot termination handling. Reliable fallback to on-demand instances.
Stars: ✭ 2,058 (+2681.08%)
Mutual labels:  golang-application
tfa
tfa is a 2fa cli tool that aims to help you to generate 2fa code on CI/CD pipelines.
Stars: ✭ 25 (-66.22%)
Mutual labels:  2fa
authentication-service
Authentication microservice. The integration only requires redirects and JWT tokens
Stars: ✭ 19 (-74.32%)
Mutual labels:  2fa
server
Server/API for Vela (Target's official Pipeline Automation Framework)
Stars: ✭ 74 (+0%)
Mutual labels:  golang-application
yoti-php-sdk
The PHP SDK for interacting with the Yoti Platform
Stars: ✭ 22 (-70.27%)
Mutual labels:  2fa
duo go
An implementation of the Duo Security Web SDK in Go/Golang.
Stars: ✭ 12 (-83.78%)
Mutual labels:  2fa
Sentry-Picam
A simple wildlife camera for Raspberry Pis.
Stars: ✭ 121 (+63.51%)
Mutual labels:  golang-application
ganggo
MOVED TO https://git.feneas.org/ganggo
Stars: ✭ 32 (-56.76%)
Mutual labels:  golang-application
wagtail-2fa
2 Factor Authentication for Wagtail
Stars: ✭ 63 (-14.86%)
Mutual labels:  2fa
BoringAuth
Straightforward password, passphrase, TOTP, and HOTP user authentication
Stars: ✭ 49 (-33.78%)
Mutual labels:  2fa
framework
A stylish PHP application framework crafted using Slim, Twig, Eloquent and Sentinel designed to get you from clone to production in a matter of minutes.
Stars: ✭ 56 (-24.32%)
Mutual labels:  2fa

zauth

zauth is a 2FA (Two-Factor Authentication) application for terminal written in Go.


zauth

Features

  • Supports both TOTP and HOTP codes.
  • Add new entries directly from CLI.
    • support setting custom digits (default: 6)
    • support setting a custom period (TOTP) (default: 30)
    • support SHA1, SHA256 and SHA512 algorithms (TOTP)
  • Import/Export andOTP backups (encrypted files supported).
  • More upcoming features in What's next

If you would like any other app to be supported, please create an issue and (if possible) provide an unencrypted sample backup file. Of course I am accepting pull requests as well :)


Installation

$ go install github.com/grijul/zauth@latest

By default, zauth stores it entries in $HOME/.zauth directory.

Using Docker

zauth can be installed using docker as well. Running the following command pulls zauth image and runs zauth -h command.

$ docker run grijul/zauth:latest zauth -h

You can bind container's /root/.zauth directory to your host's $HOME/.zauth directory to use zauth.json from your host system. Something like this should work:

$ docker run -v $HOME/.zauth:/root/.zauth zauth:latest zauth

Important Note: There is only 1 docker image with latest tag on docker hub. Since there is no release cycle (as of now), I manually have to update the docker image whenever there are new commits. So the image is subject to be outdated and may not contain latest changes/fixes. I will try to update the image as frequently as possible.

If latest changes are desired, you can build docker image from source (it's easier than it sounds).


Building from source

  • Clone repository and cd into dir

      $ git clone https://github.com/grijul/zauth.git && cd zauth
    
  • Build using go build command

      $ go build .
    

Building docker image from source

  1. Clone repository and cd into dir

     $ git clone https://github.com/grijul/zauth.git && cd zauth
    
  2. Build docker image

     $ docker build -t zauth:latest .
    
  3. Run docker image

     $ docker run zauth:latest zauth -h
    

Examples

Print OTP

$ zauth

If zauth.json file exists, corresponding entries will be printed. Else the above command will give a file not found error.

This will simply print zauth entries with OTP and exit. If you wish to watch zauth entries update every second, you can use watch command.

$ watch -n1 zauth

Add new entry

$ zauth entry -new

A prompt will be displayed to capture necessary details (secret, issuer, etc..).


List entries

$ zauth entry -list

Import decrypted file

$ zauth import -file <import_file> -type <import_type>

-file flag tells zauth which file to import

-type flag tells zauth what type of file is being imported (supported files)


Import encrypted file

$ zauth import -file <import_file> -type <import_type> -decrypt

-decrypt flag tells zauth that import file is encrypted, and prompts user for decryption password. If not provided, files are assumed to be decrypted.


Import file (entries are overwritten)

$ zauth import -file <import_file> -type <import_type> -overwrite

-overwrite flag overwrites existing entries with new entries. If not provided, entries are appended.


Export file

$ zauth export -type <export_type> -encrypt

-encrypt flag tells zauth that exported file should be encrypted. If not provided, exported file is decrypted.

The file exported (encrypted/decrypted) is compatible with export_type app. This means user should be able to import this exported file back to export_type app.


Supported app files for import

  • andOTP - supports both encrypted/decrypted file. [-type=andotp]

Supported app files for export

  • andOTP - supports both encrypted/decrypted file. [-type=andotp]

What's next

  • zauth uses json file to store it's entries. At this moment, this json file is unencrypted. It'd be better we could have encrypted file instead.
  • Edit/Delete entries from CLI.

Contact

Feel free to get in touch with me via Twitter or Email.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].