1
1
Fork 0
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2024-05-05 14:06:04 +02:00
infrastructure/misc/kcadm_wrapper.sh
Evangelos Foutras 046efd7fb2
kcadm_wrapper.sh: call kcadm.sh instead of kcadm
I think this was renamed when Keycloak switched to Quarkus.
2022-11-12 18:58:15 +02:00

21 lines
809 B
Bash
Executable File

#!/usr/bin/env bash
#
# Script that wraps kcadm.sh to securely get our credentials.
# It always operates on the realm `archlinux` for convenience.
#
# Example invocation:
# misc/kcadm_wrapper.sh get realms
# misc/kcadm_wrapper.sh get authentication/flows
# Refer to the API docs for which resources exist:
# https://www.keycloak.org/docs-api/10.0/rest-api/index.html
# See for general kcadm usage:
# https://github.com/keycloak/keycloak-documentation/blob/master/server_admin/topics/admin-cli.adoc
kcadm.sh "$@" \
-r archlinux \
--no-config \
--server https://accounts.archlinux.org \
--realm master \
--user $(misc/get_key.py group_vars/all/vault_keycloak.yml vault_keycloak_admin_user) \
--password $(misc/get_key.py group_vars/all/vault_keycloak.yml vault_keycloak_admin_password)