This is a simple user management application for Keycloak. It allows you to configure users and their roles in a file. This Application will then create/update the users and assign them the roles in Keycloak. It will also delete/disable users that are not in the configuration file.
The configuration file is a simple json file. It contains the following fields:
keycloak_url
: The url of the keycloak serverauth_realm
: The realm to authenticate against (usually master)auth_username
: The username to authenticate with (usually admin)auth_password
: The password to authenticate withauth_client_id
: The client id to authenticate with (usually admin-cli)delete_users
: If set to true, users that are not in the configuration file will be deletedrealm
: The realm to manage users in
The user configuration is a simple json file. It contains the following fields:
users
: An array of users to create/updateusername
: The username of the useremail
: The email of the user (optional)enabled
: Whether the user is enabled (default: true, optional)firstName
: The first name of the user (optional)lastName
: The last name of the user (optional)roles
: An array of roles to assign to the user
To run the application, simply execute the following command:
keycloak-user -c <CONFIG_FILE> -u <USER_FILE>
To build the application, simply execute the following command:
cargo build --release
This project is licensed under the MIT license. See the LICENSE file for more info.