Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,6 @@ public class SmartConnectorConfig {
*/
public static final String CONF_KEY_VALIDATE_OUTGOING_BINDINGS_WRT_INCOMING_BINDINGS = "sc.validate.outgoing.bindings.wrt.incoming.bindings";

/**
* Key to configure the hostname of the machine this Knowledge Engine Runtime
* (KER) runs on.
*
* @deprecated Replaced by
* {@link SmartConnectorConfig#CONF_KEY_KE_RUNTIME_EXPOSED_URL}
*/
@Deprecated
public static final String CONF_KEY_KE_RUNTIME_HOSTNAME = "ke.runtime.hostname";

/**
* Key to configure the URL of the Knowledge Directory where this KER can find
* other KERs in the network. Note that overriding this configuration property
Expand Down Expand Up @@ -65,11 +55,11 @@ public class SmartConnectorConfig {
public static final String CONF_KEY_KE_RUNTIME_USE_EDC = "ke.runtime.use.edc";

/**
* Key to configure the EDC participant ID for this KER, matching the participant ID
* of its control plane and identity hub.
* Key to configure the EDC participant ID for this KER, matching the
* participant ID of its control plane and identity hub.
*/
public static final String CONF_KEY_KE_EDC_PARTICIPANT_ID = "ke.edc.participant.id";

/**
* Key to configure where a KER can reach the protocol API of its own control
* plane if using EDC.
Expand All @@ -83,7 +73,8 @@ public class SmartConnectorConfig {
public static final String CONF_KEY_KE_EDC_MANAGEMENT_URL = "ke.edc.management.url";

/**
* Key to configure where a KER can reach its data plane public API if using EDC.
* Key to configure where a KER can reach its data plane public API if using
* EDC.
*/
public static final String CONF_KEY_KE_EDC_DATAPLANE_PUBLIC_URL = "ke.edc.dataplane.public.url";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,6 @@ public class KeRuntime {

Config config = ConfigProvider.getConfig();
ConfigValue exposedUrl = config.getConfigValue(SmartConnectorConfig.CONF_KEY_KE_RUNTIME_EXPOSED_URL);
ConfigValue hostname = config.getConfigValue(SmartConnectorConfig.CONF_KEY_KE_RUNTIME_HOSTNAME);

// Using MicroProfile Config's source ordinal to determine if default
// configuration got overridden?
if (exposedUrl.getSourceOrdinal() > 100 && hostname.getSourceOrdinal() > 100) {
LOG.error("KE runtime must be configured with {} or {}, not both.",
SmartConnectorConfig.CONF_KEY_KE_RUNTIME_EXPOSED_URL,
SmartConnectorConfig.CONF_KEY_KE_RUNTIME_HOSTNAME);
LOG.info("Using {} allows the use of a reverse proxy for TLS connections, which is recommended.",
SmartConnectorConfig.CONF_KEY_KE_RUNTIME_EXPOSED_URL);
System.exit(1);
}

// execute some validation on the EXPOSED URL, because it can have severe
// consequences
Expand Down
Loading