From 67cc5f43e39258d19f6bd45df80a742fc3b5bab4 Mon Sep 17 00:00:00 2001 From: Ian McEwen Date: Thu, 12 Dec 2024 13:15:36 -0700 Subject: [PATCH] Revise settings for keycloak admin --- src/terrain/clients/keycloak/admin.clj | 4 ++-- src/terrain/util/config.clj | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/terrain/clients/keycloak/admin.clj b/src/terrain/clients/keycloak/admin.clj index 6bdcf41a..40e4f9ba 100644 --- a/src/terrain/clients/keycloak/admin.clj +++ b/src/terrain/clients/keycloak/admin.clj @@ -7,12 +7,12 @@ (defn- keycloak-admin-url "Builds a Keycloak admin API URL with the given path components." [& components] - (str (apply curl/url (config/keycloak-admin-base-uri) "realms" (config/keycloak-realm) components))) + (str (apply curl/url (config/keycloak-admin-base-uri) "admin" "realms" (config/keycloak-realm) components))) (defn- keycloak-admin-token-url "Like keycloak-admin-url but for the 'master' realm to get a token to use with the API" [& components] - (str (apply curl/url (config/keycloak-base-uri) "realms" "master" components))) + (str (apply curl/url (config/keycloak-admin-base-uri) "realms" "master" components))) (defn get-token "Obtains authorization token data for the admin service account. You'll probably want the access_token field in the return value." diff --git a/src/terrain/util/config.clj b/src/terrain/util/config.clj index c54ceb7f..3eaf502f 100644 --- a/src/terrain/util/config.clj +++ b/src/terrain/util/config.clj @@ -700,7 +700,7 @@ (cc/defprop-optstr keycloak-admin-base-uri "The base URI to use for administrative requests to Keycloak." [props config-valid configs] - "terrain.keycloak.admin-base-uri" "https://keycloaktest2.cyverse.org/auth/admin") + "terrain.keycloak.admin-base-uri" "https://keycloaktest2.cyverse.org/auth") (declare keycloak-admin-client-id) (cc/defprop-str keycloak-admin-client-id