Introduction
An opinionated HTTP Auth Server written in Go, designed to seamlessly integrate with the Nginx Mail Proxy module, providing authentication functionality for accessing mail services. With this server you can ensure only authorized users can interact with your mail server.
What do I mean by opinionated?
The server supports PostgreSQL mail account stores and the bcrypt hashing algorithm only. This is due to the fact that I've written this application for my personal use in the first place but also owed to the fact that I want to keep the codebase as light as possible.
This has some major advantages:
- easy maintainability
- overall higher security by having less external dependencies but also less code that can break or leak information
- better performance by using a specialized postgres library that allows connection pooling as compared to the much simper
database/sql
library on its own
At the same time it's less useful for some folks.
Anyways, feel free to open an issue with a feature request if you're missing something and we can talk about the possibility of implementation.
And as a last resort you can always fork ;-)
Badges
![Coverage]()
Features
- Support for PostgreSQL datbases that hold the mail server user store
- Support for the bcrypt password hashing algorithm
- Logging of invalid authentication attempts to implement easy rate limiting with tools like Fail2Ban
- Container images to easily deploy and update the auth server
How to do ...?
Take a look at the Wiki (coming soon) for instructions on building, running and integrating the application.
Image signing
Published container images are signed, as well as the signature of the distroless base image is being verified during build.
You can confirm the authenticity of the image after pulling it with this sigstore public key:
-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEODjAHajAM/VWVR8JniY6AO+2kmPB
DFC+ba67y0T/5uRtfc1M+D6GKlXn4s3BgjfM0goVlfA5sEc1J2kAGoOm+w==
-----END PUBLIC KEY-----
License
This software is licensed under the AGPLv3.