A keycloak admin client implemented by bash.
Basically, the way to use is 99% the same as kcadm.sh. But in kcadm.sh
, it delegate the command to java application. However, in some environment, JVM is too heavy to execute.
- Pure bash. Few dependencies. (bash, curl, and jq)
- Refresh token automatically
- Support login by user and service account
- Same configuration as
kcadm.sh
provides - More high level commands than
kcadm.sh
. (e.g. manage roles, members, scopes)
- curl - as http client
- jq - json processor
-
Login
kcadm config credentials \ --server https://<keycloak>/auth \ --realm master \ --user keycloak \ --password <password>
-
get the resources
kcadm get realms
-
For more detail, please see the help
kcadm help kcadm help <command> kcadm <command> --help
Based on shunit2.Please put shunit2
to $PATH variable
make test
Run integration test against the $KC_URL. It will create a realm 'kcadm-it' by default.
export KC_URL="https://<keycloak>/auth"
export KC_USER="keycloak"
export KC_PASSWORD="<password>"
make integration-test