keycloak cli tool
Project description
Keycloak_sync
Sync users with keycloak by providing a csv file.
Features
- Sync users with csv files
- Export users to csv files
- Delete users from csv files
- Sync users from Google Object Stroage
Tech
Keycloak_sync uses a number of open source projects to work properly:
- [python-keycloak]
- [pandas]
- [numpy]
- [PyYAML]
- [Cerberus]
- [coloredlogs]
- [click]
- [colorama]
- [google-cloud-storage]
And of course Keycloak_sync itself is open source with a public repository on GitHub.
Installation
Keycloak_sync requires python v3.8+ to run.
Install the dependencies and devDependencies and start the cli.
cd keycloak_sync
poetry install
poetry run entrypoint.py --help
CLI
pip install keycloak_sync
kcctl --version
kcctl --help
kcctl sync --help
kcctl export --help
kcctl delete --help
Sync
KEYCLOAK_SERVER_URL='https://keycloak.com/auth/' \
KEYCLOAK_REALM_NAME='keycloak-realm' \
KEYCLOAK_CLIENT_ID='keycloak-api' \
KEYCLOAK_CLIENT_SECRET='**********' \
CSV_FILE_TEMPLATE='~/template.yaml' \
CSV_FILE_NAME='~/users.csv' \
kcctl sync
Delete
KEYCLOAK_SERVER_URL='https://keycloak.com/auth/' \
KEYCLOAK_REALM_NAME='keycloak-realm' \
KEYCLOAK_CLIENT_ID='keycloak-api' \
KEYCLOAK_CLIENT_SECRET='**********' \
CSV_FILE_TEMPLATE='~/template.yaml' \
kcctl delete
Export
KEYCLOAK_SERVER_URL='https://keycloak.com/auth/' \
KEYCLOAK_REALM_NAME='keycloak-realm' \
KEYCLOAK_CLIENT_ID='keycloak-api' \
KEYCLOAK_CLIENT_SECRET='**********' \
CSV_FILE_TEMPLATE='~/template.yaml' \
CSV_FILE_NAME='~/users.csv' \
kcctl export
Docker
Keycloak_sync is very easy to install and deploy in a Docker container.
By default, the Docker will expose port 8080, so change this within the Dockerfile if necessary. When ready, simply use the Dockerfile to build the image.
cd keycloak_sync
docker build -t <youruser>/Keycloak_sync:${package.version} .
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
keycloak_sync-1.0.0.tar.gz
(11.4 kB
view hashes)
Built Distribution
Close
Hashes for keycloak_sync-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e79f745d9bdb19cc1ae708c137ea013861082a5e6af66edaf7c2005c06c1f422 |
|
MD5 | 4558488f1018edd94fb8900352cdbf05 |
|
BLAKE2b-256 | 382b7dcfa504fa5713575475ac3b237f75ee9a84c814e6d44ff5eee66978098d |