Python based CLI to generate otp from given configuration
- File Based Configuration: Reads configuration from a txt file, making it easy to manage and update authentication settings.
- OTP Generation: Generates One-Time Passwords (OTPs) based on the provided configuration, enhancing security for authentication processes.
- Command Line Interface: Provides a simple CLI for users to interact with the tool, allowing for easy execution and integration into existing workflows.
- Lightweight: Designed to be lightweight and efficient, ensuring quick OTP generation without unnecessary overhead.
- Web Server: Can be run as a web server to provide OTP generation as a service, allowing for integration with other applications and systems.
To use the Sentinel-Authenticator, you need to provide a configuration in a txt file where each line represent a otpauth
url in the format of otpauth://TYPE/LABEL?PARAMETERS where:
TYPEis the type of OTP (e.g., totp or hotp).LABELis a human-readable identifier for the OTP (e.g., "My Service").PARAMETERSare key-value pairs that define the OTP settings (e.g., secret, issuer, algorithm, digits, period).
It is also important to configure environment variables to set configuration file path
CONFIGURATION_FILE=./target/totp.txtPull Docker image and run a container. Container is by default the webserver implementation.
Swagger endpoint is exposed at relative path /apidocs
Run the CLI to generate OTPs based on the provided configuration file. The generated OTPs will be printed to the console and can be used in other applications as needed. The CLI can be executed with the following command:
# Get help
python app.py -h
# Generate OTPs
python app.py totp generate
# Run web server
python app.py webserver startEvery commands have -h or --help flag to get more information about the command and its usage.