openDesk User import or generation tool
This script allows you to either import an existing user list into an openDesk environment, or to create randomly generated fictitious users for it.
Prerequisites
- Credentials to use the UDM REST API, in openDesk the
default.admin
as well as other accounts that are part of theDomain Admin
group are authorized to make us of the API. This will probably change in the future to use a less generic group to API use only. - Access to the UDM REST API must be requested by the operator as by default that access is prohibited. In the openDesk deployment the attribute
functional.externalServices.nubus.udmRestApi.enabled
allows to toggle the service.
Running the script locally
You have to have Python 3 and PIP installed. For Debian based systems you can get it done like this:
sudo apt install python3 python3-pip
Afterwards you install the script's requirements like:
pip install -r requirements.txt
Running the script from within the container
You also can use the image that is build including the script and the necessary prerequisites.
export CONTAINER=registry.opencode.de/bmi/opendesk/components/platform-development/images/user-import:latest
docker run --rm -it ${CONTAINER} /bin/sh
Commandline
Execute
./user_import_udm_rest_api.py
and you will get information which parameters the script requires and/or accepts.
Note: No actions will be taken if an user already exists on the import target.
(Demo) Data
When creating dummy accounts the used data is read from files that can be found in the ./data
directory. There is also a little helper script for fetching additional images.
Text files
The sources for the text files are provided in the respective file headers.
/data/images_?/*
Profile pictures: The profile pictures have been taken from https://thispersondoesnotexists.com which is using StyleGAN2 to create artificial profile pictures. As copyright protection cannot be applied to AI "art" at the moment, we are free to use the pictures.
To fetch additional pictures you can make use of fetch_thispersondoesnotexist_100.sh
and sorted the pictures manually into the matching subdirectory.
License
This project uses the following license: Apache-2.0
Copyright
Copyright (C) 2023 Bundesministerium des Innern und für Heimat, PG ZenDiS "Projektgruppe für Aufbau ZenDiS"