Skip to content

whazor/stupid-auth

Repository files navigation

stupid-auth

What is this?

This is a simple authentication server that uses secure cookies to authenticate users. It is meant for home lab use and is not meant to be used in production.

Currently, it only supports forward auth from NGINX, and can be used to add authentication to services that do not support auth, or support auth via header.

Is this secure?

Every authentication system makes different tradeoffs. This system is designed to be easy to use and secure enough for home lab use.

The goal is to take the tradeoffs that only make sense for a home lab environment. Using this in an enterprise setting would be stupid. Can you imagine a sys admin restarting the auth server because one user forgot their password?

Are we secure yet?

To check:

Why?

Alternative auth systems often use Redis and/or PostgreSQL to manage their state and users. But maintaining two databases can be a lot of effort, and if one of them breaks your entire cluster can become locked.

So we want to have a rock-solid auth server that is stupidly simple. Instead of storing users in a database, we store them in a YAML file. Instead of storing sessions in Redis, we store them in memory.

Goals

Supported

  • nginx ingress
  • traefik
  • haproxy
  • envoy

Usage

Setup stupid-auth, you might want to first create an empty users k8s secret to start the application.

Open https://stupid-auth.example.com/tutorial in your browser and follow the instructions.

From the tutorial you will learn how to create a users.yaml file and how to create a secret from it.

kubectl create secret generic stupid-auth-users --from-file=users.yaml

About

Stupidly simple auth

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 2

  •  
  •