No description
  • Python 35.5%
  • CSS 31.5%
  • HTML 17.6%
  • JavaScript 12.6%
  • Shell 1.9%
  • Other 0.9%
Find a file
Sajeyks dad66040ed Keep passwords out of activation links
The activation link carried base64-encoded username, password, names
and email, so plaintext passwords ended up in mail archives, browser
history and proxy logs.

Registration now hashes the password to {SSHA} immediately and stores
it in a new PendingRegistration table (migration 0002). The emailed
link is /activate/<token>/ with a random token only, and activation
writes the stored hash into LDAP. Pending entries expire after 24h,
like reset tokens. This also drops the PseudoUser/token-generator
workaround.

Links in emails sent before deployment stop working; those users must
register again.
2026-11-06 15:02:41 +03:00
dal Keep passwords out of activation links 2026-11-06 15:02:41 +03:00
dev Add local OpenLDAP 2.6 test server for development 2026-11-06 14:46:24 +03:00
logs Add end-to-end tests and pin production baseline dependencies 2026-11-06 14:46:24 +03:00
ungleichuser Register add 2021-12-12 20:39:32 +01:00
.gitignore Add dal/ldap_max_uid_file to .gitignore 2019-02-23 21:25:15 +01:00
docker-compose.dev.yml Add local OpenLDAP 2.6 test server for development 2026-11-06 14:46:24 +03:00
Dockerfile Register add 2021-12-12 20:39:32 +01:00
manage.py Move project files to root directory 2019-02-17 17:43:06 +01:00
nameko-func.py Add ldap user create support 2019-01-26 15:19:58 +01:00
README.md Register add 2021-12-12 20:39:32 +01:00
requirements.txt Add end-to-end tests and pin production baseline dependencies 2026-11-06 14:46:24 +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