Managing Authentik users via YAML files
Project description
Authentik User Manager
Manage Authentik users and group memberships via YAML configuration files.
Features
- Synchronize users and group memberships with Authentik instance
- Configure users and their group memberships via YAML files
- Create individual invitation links for new users
- Email notification system for user invitations
Installation
Install and run via pipx (Recommended)
pipx makes installing and running Python programs easier and avoids conflicts with other packages. Install it with:
pip3 install pipx
The following one-liner both installs and runs this program from PyPI:
pipx run authentik-user-manager
If you want to use authentik-user-manager without prepending it with pipx run every time, install it globally:
pipx install authentik-user-manager
To upgrade authentik-user-manager to the newest available version:
pipx upgrade authentik-user-manager
Other installation methods
You may also use pip directly:
pip install authentik-user-manager
CLI Usage
authentik-user-manager provides a command-line interface for synchronizing users and their group memberships with an Authentik instance.
Command Structure
auth-user-mgr <command> [options]
Main Commands
sync
Synchronize users with the Authentik instance:
auth-user-mgr sync -c <config_file> -u <users_file_or_directory>
For detailed help on any command with additional flags such as --dry and --no-email:
auth-user-mgr sync --help
import
Import users from a CSV file into the user inventory YAML files. This is useful for batch-adding users to groups, e.g. for events:
auth-user-mgr import -i <csv_file> -u <users_file_or_directory> -o <output_yaml> -g <groups>
For each user in the CSV:
- If they already exist in a YAML file under
-u, their group memberships are updated in-place. - If they are not found, they are appended to the
-ooutput file with the specified groups.
Example:
auth-user-mgr import -i participants.csv -u config/users/ -o config/users/event.yaml -g "Event Group,Speakers"
The CSV file must have the columns name and email (required). A username column is optional — if empty, the username will be auto-generated at sync time. See config/users.import.sample.csv for an example.
Use --dry to preview changes without modifying any files:
auth-user-mgr import -i participants.csv -u config/users/ -o config/users/event.yaml -g "Event Group" --dry
For detailed help:
auth-user-mgr import --help
Configuration
The application's configuration and the list of managed users are stored in YAML files. You can find sample configuration files in the config/ directory.
Note: There are two ways how to store your users inventory:
- In a single file, as shown in
config/users.sample.yaml - In multiple files in one directory, as shown in
config/users.sample/
API permissions
Especially for automated syncs, it is recommended to set up a system user in Authentik and create an API token for them. The following permissions are required:
- User: Can view User
- Group: Can view Group
- Group: Add user to group
- Group: Remove user from group
- Group: Can add Group
- Flow: Can view Flow
- Invitation: Can view Invitation
- Invitation: Can add Invitation
- Invitation: Can delete Invitation
Development and Contribution
We welcome contributions to improve this library. Please read CONTRIBUTING.md for all information.
License
The content of this repository is licensed under the Apache 2.0 license.
There may be components under different, but compatible licenses or from different copyright holders. The project is REUSE compliant which makes these portions transparent. You will find all used licenses in the LICENSES directory.
The project has been started by the OpenRail Association. You are welcome to contribute!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file authentik_user_manager-1.3.0.tar.gz.
File metadata
- Download URL: authentik_user_manager-1.3.0.tar.gz
- Upload date:
- Size: 18.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc09e7196faeaae394170a5d648d6f2ceb19d0f4f2017681214c2c9b04bcdca5
|
|
| MD5 |
168bb0ce7ad5ab9edb5e0e78efedfc9f
|
|
| BLAKE2b-256 |
b446f2606c8bdbc974e242e05b7cb078527fcab1d68a0e6049790cc97962aa33
|
Provenance
The following attestation bundles were made for authentik_user_manager-1.3.0.tar.gz:
Publisher:
publish.yaml on OpenRailAssociation/authentik-user-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authentik_user_manager-1.3.0.tar.gz -
Subject digest:
cc09e7196faeaae394170a5d648d6f2ceb19d0f4f2017681214c2c9b04bcdca5 - Sigstore transparency entry: 1581222434
- Sigstore integration time:
-
Permalink:
OpenRailAssociation/authentik-user-manager@9e178b26e2116cbdacf9d99fd8fbd3c195aa4e4e -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/OpenRailAssociation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@9e178b26e2116cbdacf9d99fd8fbd3c195aa4e4e -
Trigger Event:
release
-
Statement type:
File details
Details for the file authentik_user_manager-1.3.0-py3-none-any.whl.
File metadata
- Download URL: authentik_user_manager-1.3.0-py3-none-any.whl
- Upload date:
- Size: 22.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
984c5c16a350d44d945ee0aeefdc2dac7a0055f876ac54c4d4169efdc83d159d
|
|
| MD5 |
40fec858fabfbfea9aaa100e54796340
|
|
| BLAKE2b-256 |
852f7c4bb7928db7b5904b103f22e5250fc773d0d1d124548316ec1664ff44aa
|
Provenance
The following attestation bundles were made for authentik_user_manager-1.3.0-py3-none-any.whl:
Publisher:
publish.yaml on OpenRailAssociation/authentik-user-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
authentik_user_manager-1.3.0-py3-none-any.whl -
Subject digest:
984c5c16a350d44d945ee0aeefdc2dac7a0055f876ac54c4d4169efdc83d159d - Sigstore transparency entry: 1581222479
- Sigstore integration time:
-
Permalink:
OpenRailAssociation/authentik-user-manager@9e178b26e2116cbdacf9d99fd8fbd3c195aa4e4e -
Branch / Tag:
refs/tags/v1.3.0 - Owner: https://github.com/OpenRailAssociation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@9e178b26e2116cbdacf9d99fd8fbd3c195aa4e4e -
Trigger Event:
release
-
Statement type: