No description
  • Python 35.5%
  • CSS 31.5%
  • HTML 17.6%
  • JavaScript 12.6%
  • Shell 1.9%
  • Other 0.9%
Find a file
Sajeyks 4eeb25a3ea Add Kubernetes manifests
A kustomize base with a Deployment (2 replicas, migrate_locked init
container, liveness, readiness and startup probes, uid 10001 with a
read-only root filesystem, all capabilities dropped, RuntimeDefault
seccomp, no service account token, resource requests and limits), plus
a Service, an Ingress for account.ungleich.ch, a PodDisruptionBudget
and a ConfigMap with every non-secret setting.

The Secret is not part of the base, so credentials stay out of git;
secret.example.yaml and the README show how to create it. The README
also lists what the cluster must provide and what to confirm before
going live (StartTLS on the LDAP servers, HSTS).
2026-11-06 15:53:50 +03:00
dal Don't report a failed signup when only the OTP seed failed 2026-11-06 15:52:21 +03:00
deploy/k8s Add Kubernetes manifests 2026-11-06 15:53:50 +03:00
dev Cap slapd's open-file limit in the dev LDAP image 2026-11-06 15:53:50 +03:00
.dockerignore Rewrite the Dockerfile for production and Kubernetes 2026-11-06 15:35:39 +03:00
.gitignore Compute the next uidNumber from LDAP instead of a local file 2026-11-06 15:03:57 +03:00
docker-compose.dev.yml Support PostgreSQL configured from the environment 2026-11-06 15:31:01 +03:00
Dockerfile Rewrite the Dockerfile for production and Kubernetes 2026-11-06 15:35:39 +03:00
env.sample Support PostgreSQL configured from the environment 2026-11-06 15:31:01 +03:00
gunicorn.conf.py Rewrite the Dockerfile for production and Kubernetes 2026-11-06 15:35:39 +03:00
manage.py Move project files to root directory 2019-02-17 17:43:06 +01:00
README.md Register add 2021-12-12 20:39:32 +01:00
requirements.txt Serve static files with WhiteNoise 2026-11-06 15:35:33 +03:00

Ungleich Account Management Webapp

This service runs on account.ungleich.ch and allows customers manage their ungleich account (register, edit mail & password, ...).

Status v2

  • See below ungleichuser/
  • register view created
  • Not solved:
    • email verification before user is created
  • Solved
    • Finding highest uid, increasing by 1

Todos for v2:

  • Rewrite/create new app Django 4.0 based (ungleichuser)
  • Do not use django-auth-ldap, because it uses python-ldap
  • Update the template HTML to bootstrap5
  • Use ldap3
  • Check/verify the ldap registration
  • Ensure multiple ldap servers are supported
  • Cleanup this readme
  • Use the following "captcha" for all forms:
    • Extra form field named "random"
    • Present the user the following text:
  • Create Dockerfile / ensure it works in kubernetes

Next steps

  • Override/use custom form to allow captcha

Development Setup

python3 -m venv venv
. ./venv/bin/activate
pip install -r requirements.txt
``

## Functionality

x Allow user to register in a specific subtree
x Verify that user does not exist in another subtree
x Assign an id
- Allow password reset [via Mail?]
- DB usage: for password reset?

## Parameters

Via environment variables:

* LDAPSERVERS=".." -- White space separated list of LDAP-Servers
* ADMIN_DN="" -- we use this DN to connect to LDAP
* ADMIN_PASSWORD="" -- we use this password to connect to LDAP
* SECRET_KEY
* DEBUG
* ALLOWED_HOSTS


## Views

### Register view

Form: [get]

* username
* password1
* password2

Post receiver: [post]

* E-Mail verification

E-Mail verify: [get]

* Create user

### Password reset view

* captcha
* username or email