bug6065: moved addition of branding arg from security to general

This commit is contained in:
Axel Uhl committed 2024-11-07 11:05:16 +01:00
1 parent 2bbd623c48
commit 27a1bf1481
1 file changed
+6 -3
@@ -175,10 +175,14 @@ extends AwsApplicationConfiguration<ShardingKey, SailingAnalyticsMetrics, Sailin
* {@link DefaultProcessConfigurationVariables#ADDITIONAL_JAVA_ARGS ${ADDITIONAL_JAVA_ARGS}} variable.
* An example string in the resulting sequence could be {@code "-Da=b"}. This implementation returns the
* system properties required to configure security shared across the
* {@link SharedLandscapeConstants#DEFAULT_DOMAIN_NAME} domain.
* {@link SharedLandscapeConstants#DEFAULT_DOMAIN_NAME} domain, as well as the activation of SAP branding,
* assuming that this runs under the {@link SharedLandscapeConstants#DEFAULT_DOMAIN_NAME default domain}.
*/
protected Iterable<String> getAdditionalJavaArgs() {
return getAdditionalJavaArgsForSharedSecurity(SharedLandscapeConstants.DEFAULT_DOMAIN_NAME, SharedLandscapeConstants.DEFAULT_SECURITY_SERVICE_REPLICA_SET_NAME);
final List<String> result = new ArrayList<>();
Util.addAll(getAdditionalJavaArgsForSharedSecurity(SharedLandscapeConstants.DEFAULT_DOMAIN_NAME, SharedLandscapeConstants.DEFAULT_SECURITY_SERVICE_REPLICA_SET_NAME), result);
result.add("-D"+ClientConfigurationListener.DEBRANDING_PROPERTY_NAME+"=false"); // activate branding when running under default SAP domain
return result;
}
protected void addUserDataForPort(final Map<ProcessConfigurationVariable, String> result, ProcessConfigurationVariable variable, Integer port) {
@@ -201,7 +205,6 @@ extends AwsApplicationConfiguration<ShardingKey, SailingAnalyticsMetrics, Sailin
protected Iterable<String> getAdditionalJavaArgsForSharedSecurity(final String defaultDomainName, final String defaultSecurityServiceReplicaSetName) {
return Arrays.asList(
"-Dsecurity.sharedAcrossSubdomainsOf="+defaultDomainName,
"-D"+ClientConfigurationListener.DEBRANDING_PROPERTY_NAME+"=false", // activate branding when running under default SAP domain
"-Dsecurity.baseUrlForCrossDomainStorage=https://"+getDefaultSecurityServiceReplicaSetHostname(defaultDomainName, defaultSecurityServiceReplicaSetName),
"-Dgwt.acceptableCrossDomainStorageRequestOriginRegexp=https?://(.*\\.)?"+(defaultDomainName.replaceAll("\\.", "\\\\."))+"(:[0-9]*)?$");
}