auth_lite
auth_lite is a lightweight authentication server tailored for web servers that utilize features like the nginx auth_request module. Instead of relying on traditional .htpasswd files, auth_lite employs a nimble SQLite database, making the management of credentials more efficient and seamless.
Installation
-
Clone the repository:
-
Build the project:
-
The compiled binary will be available in the
target/releasedirectory.
Setup
-
Add a user:
This will prompt you for a password. Passwords are hashed and stored securely.
-
Setup nginx:
In your nginx configuration, incorporate the
auth_requestdirective:location /protected/ { auth_request /_auth; ... } location = /_auth { internal; proxy_pass http://127.0.0.1:YOUR_AUTH_LITE_PORT/auth; }Make sure to replace
YOUR_AUTH_LITE_PORTwith the portauth_liteis listening on. -
Start the
auth_liteserver:
Usage
To manage users in the auth_lite SQLite database:
-
Add a user:
-
List all users:
-
Remove a user:
-
Change a user's password:
Contributing
Contributions are warmly welcomed! Whether it's bug reports, feature requests, or code contributions, please open an issue or a pull request.
License
auth_lite is licensed under the MIT License.