configuration IS

This commit is contained in:
Alfredo Oliviero 2024-11-27 16:58:31 +01:00
parent dff363c1ac
commit 09078c2afb
2 changed files with 12 additions and 7 deletions

View File

@ -8,6 +8,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
- read d4s-dynamic-scope configuration on Keycloak server from IS, and set uma = !d4s-dynamic-scope [#28129]
- added common/js/utils.js dependency
- moved IS configuration to Auth/IAM from Service/IAM
## [v1.0.0] - 2023-07-15

View File

@ -26,7 +26,10 @@ public class CC_Portlet extends MVCPortlet {
// private CC_Config configuration = null;
public final static String IS_AUTH_RESOURCE_NAME = "IAM";
public final static String IS_AUTH_CATEGORY = "Service";
// public final static String IS_AUTH_CATEGORY = "Service"; // moved configuration to Auth/IAM
public final static String IS_AUTH_CATEGORY = "Auth";
public final static String IS_AUTH_ENTRYPOINT = "d4science";
public final static String IS_AUTH_DYNAMIC_SCOPE_PROPERTY = "d4s-dynamic-scope";
@ -66,7 +69,12 @@ public class CC_Portlet extends MVCPortlet {
IsServerConfig auth_config = isclient.serviceConfigFromIS(IS_AUTH_RESOURCE_NAME,
IS_AUTH_CATEGORY, IS_AUTH_ENTRYPOINT);
config.auth_url = auth_config.getServerUrl();
try {
config.d4s_dynamic_scope = Boolean.parseBoolean(auth_config.getProperty(IS_AUTH_DYNAMIC_SCOPE_PROPERTY));
} catch (Exception e) {
config.d4s_dynamic_scope = false;
}
IsServerConfig ccp_config = isclient.serviceConfigFromIS(IS_CCP_RESOURCE_NAME,
IS_CCP_CATEGORY, IS_CCP_ENTRYPOINT);
config.ccp_url = ccp_config.getServerUrl();
@ -76,11 +84,7 @@ public class CC_Portlet extends MVCPortlet {
config.cdn_url = cdn_config.getServerUrl();
try {
config.d4s_dynamic_scope = Boolean.parseBoolean(cdn_config.getProperty(IS_AUTH_DYNAMIC_SCOPE_PROPERTY));
} catch (Exception e) {
config.d4s_dynamic_scope = false;
}
config.use_uma = ! config.d4s_dynamic_scope;