@Test public void testCreateConfig() { DatabusConfigView result = underTest.createDatabusConfigs("accessKey", "secret".toCharArray(), null, "myEndpoint"); assertTrue(result.isEnabled()); assertEquals("accessKey", result.getAccessKeyId()); assertEquals("secret", new String(result.getAccessKeySecret())); assertEquals("myEndpoint", result.getEndpoint()); assertEquals("Ed25519", result.toMap().get("accessKeySecretAlgorithm")); }
public DatabusConfigView createDatabusConfigs(String accessKeyId, char[] accessKeySecret, String secretAlgorithm, String endpoint) { final DatabusConfigView.Builder builder = new DatabusConfigView.Builder(); boolean validAccessKeySecret = accessKeySecret != null && StringUtils.isNotEmpty(new String(accessKeySecret)); boolean enableDbus = validAccessKeySecret && StringUtils.isNoneEmpty(endpoint, new String(accessKeySecret)); if (enableDbus) { builder.withEndpoint(endpoint) .withAccessKeyId(accessKeyId) .withAccessKeySecret(accessKeySecret) .withAccessKeySecretAlgorithm(secretAlgorithm); } else { LOGGER.debug("Although metering or cluster deployment log reporting is enabled, databus " + "credentials/endpoint is not provided properly. endpoint: {}, accessKey: {}, privateKey: {}", endpoint, accessKeyId, validAccessKeySecret ? "*****" : "<empty>"); } return builder .withEnabled(enableDbus) .build(); }
DatabusConfigService { public DatabusConfigView createDatabusConfigs(String accessKeyId, char[] accessKeySecret, String secretAlgorithm, String endpoint) { final DatabusConfigView.Builder builder = new DatabusConfigView.Builder(); boolean validAccessKeySecret = accessKeySecret != null && StringUtils.isNotEmpty(new String(accessKeySecret)); boolean enableDbus = validAccessKeySecret && StringUtils.isNoneEmpty(endpoint, new String(accessKeySecret)); if (enableDbus) { builder.withEndpoint(endpoint) .withAccessKeyId(accessKeyId) .withAccessKeySecret(accessKeySecret) .withAccessKeySecretAlgorithm(secretAlgorithm); } else { LOGGER.debug("Although metering or cluster deployment log reporting is enabled, databus " + "credentials/endpoint is not provided properly. endpoint: {}, accessKey: {}, privateKey: {}", endpoint, accessKeyId, validAccessKeySecret ? "*****" : "<empty>"); } return builder .withEnabled(enableDbus) .build(); } }
DatabusConfigService { public DatabusConfigView createDatabusConfigs(String accessKeyId, char[] accessKeySecret, String secretAlgorithm, String endpoint) { final DatabusConfigView.Builder builder = new DatabusConfigView.Builder(); boolean validAccessKeySecret = accessKeySecret != null && StringUtils.isNotEmpty(new String(accessKeySecret)); boolean enableDbus = validAccessKeySecret && StringUtils.isNoneEmpty(endpoint, new String(accessKeySecret)); if (enableDbus) { builder.withEndpoint(endpoint) .withAccessKeyId(accessKeyId) .withAccessKeySecret(accessKeySecret) .withAccessKeySecretAlgorithm(secretAlgorithm); } else { LOGGER.debug("Although metering or cluster deployment log reporting is enabled, databus " + "credentials/endpoint is not provided properly. endpoint: {}, accessKey: {}, privateKey: {}", endpoint, accessKeyId, validAccessKeySecret ? "*****" : "<empty>"); } return builder .withEnabled(enableDbus) .build(); }  }
DatabusConfigService { public DatabusConfigView createDatabusConfigs(String accessKeyId, char[] accessKeySecret, String secretAlgorithm, String endpoint) { final DatabusConfigView.Builder builder = new DatabusConfigView.Builder(); boolean validAccessKeySecret = accessKeySecret != null && StringUtils.isNotEmpty(new String(accessKeySecret)); boolean enableDbus = validAccessKeySecret && StringUtils.isNoneEmpty(endpoint, new String(accessKeySecret)); if (enableDbus) { builder.withEndpoint(endpoint) .withAccessKeyId(accessKeyId) .withAccessKeySecret(accessKeySecret) .withAccessKeySecretAlgorithm(secretAlgorithm); } else { LOGGER.debug("Although metering or cluster deployment log reporting is enabled, databus " + "credentials/endpoint is not provided properly. endpoint: {}, accessKey: {}, privateKey: {}", endpoint, accessKeyId, validAccessKeySecret ? "*****" : "<empty>"); } return builder .withEnabled(enableDbus) .build(); }  DatabusConfigView createDatabusConfigs(String accessKeyId,
            char[] accessKeySecret, String secretAlgorithm, String endpoint); }
DatabusConfigService { public DatabusConfigView createDatabusConfigs(String accessKeyId, char[] accessKeySecret, String secretAlgorithm, String endpoint) { final DatabusConfigView.Builder builder = new DatabusConfigView.Builder(); boolean validAccessKeySecret = accessKeySecret != null && StringUtils.isNotEmpty(new String(accessKeySecret)); boolean enableDbus = validAccessKeySecret && StringUtils.isNoneEmpty(endpoint, new String(accessKeySecret)); if (enableDbus) { builder.withEndpoint(endpoint) .withAccessKeyId(accessKeyId) .withAccessKeySecret(accessKeySecret) .withAccessKeySecretAlgorithm(secretAlgorithm); } else { LOGGER.debug("Although metering or cluster deployment log reporting is enabled, databus " + "credentials/endpoint is not provided properly. endpoint: {}, accessKey: {}, privateKey: {}", endpoint, accessKeyId, validAccessKeySecret ? "*****" : "<empty>"); } return builder .withEnabled(enableDbus) .build(); }  DatabusConfigView createDatabusConfigs(String accessKeyId,
            char[] accessKeySecret, String secretAlgorithm, String endpoint);  }