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.0.tar.gz (37.3 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.0-py3-none-any.whl (57.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: zenauth_server-0.1.0.tar.gz
  • Upload date:
  • Size: 37.3 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.0.tar.gz
Algorithm Hash digest
SHA256 8d2cdf6514fac3339ab369aaa6b4950193e5f61680ad1b5730589f24e1a908ac
MD5 2a886aef624254652abcb2833799033a
BLAKE2b-256 fa8d8ea4ac7a7e6b31b147f9dc9984066325ac9c9bea05311368d22ca64e9d6b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: zenauth_server-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 57.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36d1ed480d8a446d165e20781b8248a93746b187dc4ef003b14f383ed1ead713
MD5 0bcc6392f09a04046ebd03493ba77c45
BLAKE2b-256 df1163b66def15c88c3efaa2e4bd031898c0c1960287f9306a8c318b530b8afa

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