Skip to main content

A user authentication and management library.

Project description

ZenAuth-server

Server-side components for the ZenAuth monorepo.

日本語: see README_ja.md.

For how to run the server (Uvicorn) and environment variables, see the repository root README.

Bulk import (CSV)

You can bulk create/update users/apps/roles/scopes from CSV.

Script:

  • server/src/scripts/import_csv.py

Usage

python server/src/scripts/import_csv.py \
	--dsn "sqlite+pysqlite:////absolute/path/to/zenauth.sqlite3" \
	--roles roles.csv \
	--scopes scopes.csv \
	--apps apps.csv \
	--users users.csv
  • --mode create fails if a record already exists.
  • --mode upsert (default) creates or updates.

CSV formats

roles.csv

Headers:

  • role_name (required)
  • display_name (optional, defaults to role_name)
  • description (optional)
  • scopes (optional, comma-separated scope names; binds scopes to the role)

scopes.csv

Headers:

  • scope_name (required)
  • display_name (optional, defaults to scope_name)
  • description (optional)
  • roles (optional, comma-separated role names; binds roles to the scope)

apps.csv

Headers:

  • app_id (required)
  • display_name (optional)
  • description (optional)
  • return_to (required; absolute http(s) URL or absolute path starting with /)

users.csv

Headers:

  • user_name (required)
  • password (required for new users)
  • roles (optional, comma-separated role names)
  • real_name (optional)
  • division (optional)
  • description (optional)
  • policy_epoch (optional; used for new users; default=1)

If passwords are already hashed (bcrypt), pass --password-already-hashed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zenauth_server-0.1.1.tar.gz (109.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zenauth_server-0.1.1-py3-none-any.whl (130.1 kB view details)

Uploaded Python 3

File details

Details for the file zenauth_server-0.1.1.tar.gz.

File metadata

  • Download URL: zenauth_server-0.1.1.tar.gz
  • Upload date:
  • Size: 109.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for zenauth_server-0.1.1.tar.gz
Algorithm Hash digest
SHA256 279492bce74570cf03f97fecfbb5603dea7ecbce1bbe854716a223b10853ea55
MD5 e0285b8b6030f2b42020d7829af8140c
BLAKE2b-256 0e69b98c0657f67c3dced470f7b3a1ccaa3d1906d79e17e5493d20661d145745

See more details on using hashes here.

File details

Details for the file zenauth_server-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: zenauth_server-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 130.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for zenauth_server-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 460a72deaec832810f6ea71a578ce1ef5b3517810f72342877f2540a38cc7b22
MD5 226a78f4625ee0fba6f71e1c7242807f
BLAKE2b-256 ab5b0a9c5f226e4adb999d0be700642f52914ab29a4a6e09bfd0a68fcfbf3b72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page