oscerd commented on code in PR #29819:
URL: https://github.com/apache/camel/pull/29819#discussion_r4584081900
##########
components/camel-hashicorp-vault/src/main/java/org/apache/camel/component/hashicorp/vault/HashicorpVaultClientSettings.java:
##########
@@ -117,32 +117,46 @@ static HashicorpVaultClientSettings
fromEnvironmentOrConfiguration(
settings.setAzureResource(environment.apply(AZURE_RESOURCE_ENV));
settings.setAzureClientId(environment.apply(AZURE_CLIENT_ID_ENV));
} else if (configuration != null) {
- settings.setHost(configuration.getHost());
- settings.setPort(configuration.getPort());
- settings.setScheme(configuration.getScheme());
- settings.setCloud(configuration.isCloud());
- settings.setNamespace(configuration.getNamespace());
- settings.setAuthentication(configuration.getAuthentication());
- settings.setToken(configuration.getToken());
- settings.setRoleId(configuration.getRoleId());
- settings.setSecretId(configuration.getSecretId());
- settings.setRole(configuration.getRole());
- settings.setJwt(configuration.getJwt());
- settings.setJwtFile(configuration.getJwtFile());
- settings.setAuthMountPath(configuration.getAuthMountPath());
- settings.setTrustStore(configuration.getTrustStore());
-
settings.setTrustStorePassword(configuration.getTrustStorePassword());
- settings.setKeyStore(configuration.getKeyStore());
- settings.setKeyStorePassword(configuration.getKeyStorePassword());
- settings.setAwsIamServerId(configuration.getAwsIamServerId());
- settings.setAwsRegion(configuration.getAwsRegion());
- settings.setAwsStsEndpoint(configuration.getAwsStsEndpoint());
- settings.setAzureResource(configuration.getAzureResource());
- settings.setAzureClientId(configuration.getAzureClientId());
+ settings = fromConfiguration(configuration);
}
return settings;
}
+ /**
+ * The settings of the vault configuration (camel.vault.hashicorp) alone,
without the CAMEL_HASHICORP_VAULT_*
+ * environment variables of the properties function: such as for Camel on
Spring Boot, which binds the vault
+ * configuration itself.
+ *
+ * @param configuration the vault configuration
+ * @since 4.24
Review Comment:
davsclaus added the `@return` on both methods in 3fea6bc.
`fromConfiguration` is package-private again in 782b125: after the review of
apache/camel-spring-boot#2091, the Spring Boot side uses
`fromEnvironmentOrConfiguration`, the same settings as the properties function
of the CamelContext.
_Claude Code on behalf of oscerd_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]