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
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 keycloak_sync-1.0.0.tar.gz.
File metadata
- Download URL: keycloak_sync-1.0.0.tar.gz
- Upload date:
- Size: 11.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ce9d23197f42d0eb0c6ee00040fd845f5d91dc495c42b66fc32b09e1bfb6962b
|
|
| MD5 |
eeb825b9c9bfe737ca3a6ff5c3a944eb
|
|
| BLAKE2b-256 |
609f69f4ca7ed19872806b6f12b140cfd260f185c30b14a9aa68dce557c08718
|
File details
Details for the file keycloak_sync-1.0.0-py3-none-any.whl.
File metadata
- Download URL: keycloak_sync-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e79f745d9bdb19cc1ae708c137ea013861082a5e6af66edaf7c2005c06c1f422
|
|
| MD5 |
4558488f1018edd94fb8900352cdbf05
|
|
| BLAKE2b-256 |
382b7dcfa504fa5713575475ac3b237f75ee9a84c814e6d44ff5eee66978098d
|