Skip to content

cBioPortal/kc-user-importer

Repository files navigation

Keycloak Client API and utility scripts

Installation

poetry install

# Activate virtual environment
poetry shell

Env variables

# For py scripts
export ACCESS_TOKEN=<keycloak_access_token>

.env dotfile (for Makefile examples)

# .example.env
# KC_HOST=https://<keycloak-host>
# KC_REALM=<realm>
# KC_CLIENT_ID=<clientID>
# KC_CLIENT_SECRET=<clientSecret>
# KC_GRANT_TYPE=client_credentials

Usage

Create keycloak users from a users.json file

python ./scripts/add_users_to_keycloak.py --users example.users.json

Parse user + group membership files from Microsoft entra AD into a user.json

file

python ./scripts/parse_entra_users.py -i entra_users_export.csv --groups ./groups

About

Keycloak Legacy Light Client and user import scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published