So against popular advice, I rolled my own auth and wanted to share. It still has a long way to go, and I absolutely do not want to compete with the SaaS providers, nor do I want to compete with big, professional packages like KeyCloak and Authentik. I just wanted to write something that was easy to use and covered most small use cases.
I put together a blog post detailing the journey that led me to do something so foolish, and I hope people can relate.
Right now, it sports a dual-server, dual-key architecture, has web, cli & JSON/HTTP (faux REST) configuration/admin interfaces, and is written in C# (.NET 8) to allow for ahead-of-time compilation (AOT). The binary sits at 26MB, the memory commit @ rest is 57MB, and startup time is sub-50ms on Windows. Linux builds are similar, if not a bit snappier. I have not yet tested on MacOS, but expect it to run fine there too.
I have basic libraries for Python & Go (very basic), and testing is done via Python harness.
Remember, my goal isn't to compete with the big boys; I just wanted build something solid for my use cases. That went well, so I beefed it up a bit for more general usage. I just want to put something solid out there and iterate on it until it's ready for more general use.
Top comments (2)
pretty cool tbh rolling your own auth sounds like an insane amount of work and i respect the hustle you’ve put in here you ever think about how much you actually learn just pushing through stuff everybody warns you off from
I've learned a ton about auth & tokens, no doubt about it.
As for the hustle, the funny thing is the auth is about 5% of the project, while the config & policy eats up the other 95%. The worst part is you have to write bindings for basically every ecosystem out there if you want any uptake. We'll see how this one goes- I've done C#, js/ts, Go & Python so far.
The worst part though was discovering this morning that the web interface I just spent about 30 hours implementing kills that AOT compilation (which I didn't notice because it built fine). Effing software man, I tell ya.