diff options
author | Piotr Wielebski <piotr.wielebski@nokia.com> | 2019-04-10 11:59:26 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-04-10 11:59:26 +0000 |
commit | 6a7e8dce0126f355a0ef5663304825bea4c79a20 (patch) | |
tree | a3fed8e56ab49bb32ef39cd8ef4f8b53c749b947 /sources/hv-collector-configuration/src/main | |
parent | 4d76345d06ee7591d839723a82026f6d8e756c65 (diff) | |
parent | c138b700030d22ae0bdbd6992fb4a4d8a3431798 (diff) |
Merge "Read passwords from files"
Diffstat (limited to 'sources/hv-collector-configuration/src/main')
-rw-r--r-- | sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationMerger.kt | 4 | ||||
-rw-r--r-- | sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationValidator.kt | 12 | ||||
-rw-r--r-- | sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/PartialConfiguration.kt (renamed from sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/partial_configuration.kt) | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationMerger.kt b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationMerger.kt index 56e48038..e6707825 100644 --- a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationMerger.kt +++ b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationMerger.kt @@ -39,9 +39,9 @@ internal class ConfigurationMerger { sslDisable = base.sslDisable.updateToGivenOrNone(update.sslDisable), keyStoreFile = base.keyStoreFile.updateToGivenOrNone(update.keyStoreFile), - keyStorePassword = base.keyStorePassword.updateToGivenOrNone(update.keyStorePassword), + keyStorePasswordFile = base.keyStorePasswordFile.updateToGivenOrNone(update.keyStorePasswordFile), trustStoreFile = base.trustStoreFile.updateToGivenOrNone(update.trustStoreFile), - trustStorePassword = base.trustStorePassword.updateToGivenOrNone(update.trustStorePassword), + trustStorePasswordFile = base.trustStorePasswordFile.updateToGivenOrNone(update.trustStorePasswordFile), streamPublishers = base.streamPublishers.updateToGivenOrNone(update.streamPublishers), diff --git a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationValidator.kt b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationValidator.kt index 613ae302..f4ce592f 100644 --- a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationValidator.kt +++ b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/ConfigurationValidator.kt @@ -120,22 +120,22 @@ internal class ConfigurationValidator { SecurityConfiguration( createSecurityKeys( File(it.keyStoreFile.bind()).toPath(), - it.keyStorePassword.bind(), + File(it.keyStorePasswordFile.bind()).toPath(), File(it.trustStoreFile.bind()).toPath(), - it.trustStorePassword.bind() + File(it.trustStorePasswordFile.bind()).toPath() ).toOption() ) } private fun createSecurityKeys(keyStorePath: Path, - keyStorePassword: String, + keyStorePasswordPath: Path, trustStorePath: Path, - trustStorePassword: String) = + trustStorePasswordPath: Path) = ImmutableSecurityKeys.builder() .keyStore(ImmutableSecurityKeysStore.of(keyStorePath)) - .keyStorePassword(Passwords.fromString(keyStorePassword)) + .keyStorePassword(Passwords.fromPath(keyStorePasswordPath)) .trustStore(ImmutableSecurityKeysStore.of(trustStorePath)) - .trustStorePassword(Passwords.fromString(trustStorePassword)) + .trustStorePassword(Passwords.fromPath(trustStorePasswordPath)) .build() private fun validatedCollectorConfig(partial: PartialConfiguration) = diff --git a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/partial_configuration.kt b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/PartialConfiguration.kt index d09a52e4..51f6a665 100644 --- a/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/partial_configuration.kt +++ b/sources/hv-collector-configuration/src/main/kotlin/org/onap/dcae/collectors/veshv/config/impl/PartialConfiguration.kt @@ -44,12 +44,12 @@ internal data class PartialConfiguration( val sslDisable: Option<Boolean> = None, @SerializedName("security.keys.keyStoreFile") val keyStoreFile: Option<String> = None, - @SerializedName("security.keys.keyStorePassword") - val keyStorePassword: Option<String> = None, + @SerializedName("security.keys.keyStorePasswordFile") + val keyStorePasswordFile: Option<String> = None, @SerializedName("security.keys.trustStoreFile") val trustStoreFile: Option<String> = None, - @SerializedName("security.keys.trustStorePassword") - val trustStorePassword: Option<String> = None, + @SerializedName("security.keys.trustStorePasswordFile") + val trustStorePasswordFile: Option<String> = None, @SerializedName("logLevel") val logLevel: Option<LogLevel> = None, |