authnzerver.authdb module¶
This contains SQLAlchemy models for the authnzerver.
-
authnzerver.authdb.
create_authdb
(authdb_url, database_metadata=MetaData(bind=None), echo=False, returnconn=False)[source]¶ This creates an authentication database for an arbitrary SQLAlchemy DB URL.
-
authnzerver.authdb.
create_sqlite_authdb
(auth_db_path, database_metadata=MetaData(bind=None), echo=False, returnconn=False)[source]¶ This creates the local SQLite auth DB.
-
authnzerver.authdb.
get_auth_db
(authdb_path, database_metadata=MetaData(bind=None), echo=False)[source]¶ This just gets a connection to the auth DB.
-
authnzerver.authdb.
initial_authdb_inserts
(auth_db_path, permissions_json=None, database_metadata=MetaData(bind=None), superuser_email=None, superuser_pass=None, echo=False)[source]¶ This does initial set up of the auth DB.
- adds an anonymous user
- adds a superuser with: - userid = UNIX userid - password = random 16 bytes)
- sets up the initial permissions table
Returns the superuser userid and password.