Skip to main content

keycloak-user-transfer

This is yet another tool for transferring huge amount of users from PostgreSQL to Keycloak using Keycloak REST API. It supports groups, custom user attributes, creation of disabled users and users with verified mail.

Configuration

  • db:
    • user_sql: Sql query for fetching users. (Remember: Cast all column types to varchar due bug in psycopg2)
    • cursor_fetch_size: This script use PostgreSQL binary cursors to iterate large amount of user rows. You can set cursor fetch size with this value.
  • keycloak:
    • base_url: Keycloak base url without trailling slash on end. Ex: https://sso.myhost.tld
    • realm: Which realm to insert users.
    • admin-cli-secret: Client secret of "Admin-cli" client. This script use service account on master realm to create users. You can learn more about service accounts in Keycloak here.
  • mappings:
    • user_fields: Key-value mappings of user fields. Keys are Keycloak fields and values are the corresponding columns on the database.
    • user_attributes: Key-value mappings of user attributes. Keys are Keycloak fields and values are the corresponding columns on the database.
    • groups: Key-value mappings of group names and Keycloak IDs. (Groups must created before transfer.)
    • groups_field: Corresponding column that group names concatenate with delimiter.

This tool set random secure temporary password for user for additional security. You should send password reset mail to them.

Usage

After installing package from PyPI, define your config.yml path via KEYCLOAK_USER_TRANSFER_CONFIG environment variable then run keycloak_user_transfer command.

Metadata

Release files for keycloak-user-transfer 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for keycloak-user-transfer 1.0.2
File Interpreter ABI Platform Actions
keycloak_user_transfer-1.0.2-py3-none-any.whl Python 3 none any Details for keycloak_user_transfer-1.0.2-py3-none-any.whl

Release files / keycloak_user_transfer-1.0.2-py3-none-any.whl

Download URL keycloak_user_transfer-1.0.2-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
afaaf71911f801f6323b797745121d45fd68c7db81de413852ec15dbb0495172
BLAKE2b-256 checksum
How to use checksums
dc0109616aa7a3371f36cb055421666269b491515fb51e7e32772045f465a393
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.13

Security for keycloak-user-transfer 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page