authplus

command module
v0.0.0-...-5774f92 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 27, 2023 License: MIT Imports: 19 Imported by: 0

README


AuthPlus

Overview

AuthPlus is lightweight, scalable, and secure hardware-based user authentication API.

AuthPlus makes it easy for developers to restrict their applications to specific target machines.

AuthPlus features:

  • User authentication and management
  • License generation and management
  • Out of the box parameter validation
  • HMAC (SHA256) response data encryption
  • Built-in request ratelimiting

AuthPlus is built to be self-hosted and configured to users needs.

Getting Started

Ready to self-host AuthPlus?

  1. Ensure that Go and Python are installed on the machine.

  2. Clone the repository with git clone https://github.com/ayushgun/authplus.

  3. Initialize a MongoDB cluster with a database titled authentication and two collections titled licenses and users. Set the database_uri in configuration/config.env to the MongoDB connection URI.

  4. Generate a Fernet encryption key using this script. Set the encryption_key in configuration/config.env to the generated Fernet encryption key.

  5. Set the admin_password and client_password in configuration/config.env to two randomly generated passwords. These passwords are used for HTTP basic authentication, and should be scoped to the client and server level.

  6. Customize the API URL and port by setting api_url in configuration/config.env to the desired port:url. A default localhost URL has been set out of the box.

  7. Run the API with go run main.go. All API dependencies will automatically be installed, given that Go is locally installed and set up correctly.

Testing

If you plan on modifying the API, a default test suite has been included in this repository.

To run the test suite:

  1. Ensure that pip is installed on the machine.

  2. Start the API with go run main.go.

  3. Move to the test suite directory with cd tests. Then, install the test suite dependencies with pip3 install -r requirements.txt.

  4. Run the test suite with python3 api_tests.py.

Contributing

We want to make contributing to this project as easy and transparent as possible, whether it's:

  • Reporting an issue
  • Discussing the current state of the project
  • Submitting a fix
  • Proposing new features

To get started, check Issues for a list of tracked issues.

Acknowledgements

Ayush Gundawar is the author of this project. His website can be found here.

Gin is the foundational technology used to build AuthPlus. Thank you to the open-source Gin community for building a wonderful, lightweight, and performant HTTP web framework.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL