fgerlits commented on code in PR #1725:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1725#discussion_r1496160803
##########
encrypt-config/EncryptConfig.h:
##########
@@ -21,40 +21,29 @@
#include "Utils.h"
-namespace org {
-namespace apache {
-namespace nifi {
-namespace minifi {
-namespace encrypt_config {
+namespace org::apache::nifi::minifi::encrypt_config {
class EncryptConfig {
public:
- enum class EncryptionType {
- ENCRYPT,
- RE_ENCRYPT
- };
-
explicit EncryptConfig(const std::string& minifi_home);
- EncryptionType encryptSensitiveProperties() const;
- void encryptFlowConfig() const;
+ void encryptSensitiveValuesInMinifiProperties() const;
+ void encryptSensitiveValuesInFlowConfig(const std::optional<std::string>&
component_id, const std::optional<std::string>& property_name, const
std::optional<std::string>& property_value) const;
+ void encryptWholeFlowConfigFile() const;
- private:
- std::filesystem::path bootstrapFilePath() const;
- std::filesystem::path propertiesFilePath() const;
+ [[nodiscard]] bool isReencrypting() const;
- EncryptionKeys getEncryptionKeys() const;
- std::string hexDecodeAndValidateKey(const std::string& key, const
std::string& key_name) const;
- void writeEncryptionKeyToBootstrapFile(const utils::crypto::Bytes&
encryption_key) const;
+ private:
+ [[nodiscard]] std::filesystem::path bootstrapFilePath() const;
+ [[nodiscard]] std::filesystem::path propertiesFilePath() const;
+ [[nodiscard]] std::filesystem::path flowConfigPath() const;
+ static std::string flowConfigContent(const std::filesystem::path&
config_path);
Review Comment:
yes, good idea -- done in 195fdc307610b4dcdf40d76ad83345f240382f2e
--
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]