@@ -48,30 +48,40 @@ pub struct NifiSensitivePropertiesConfig {
4848 pub algorithm : Option < NifiSensitiveKeyAlgorithm > ,
4949}
5050
51- #[ derive( strum:: Display , Clone , Debug , Deserialize , Eq , JsonSchema , PartialEq , Serialize ) ]
51+ #[ derive(
52+ strum:: Display , Clone , Debug , Default , Deserialize , Eq , JsonSchema , PartialEq , Serialize ,
53+ ) ]
5254#[ serde( rename_all = "camelCase" ) ]
5355pub enum NifiSensitiveKeyAlgorithm {
5456 // supported in v2
5557 #[ strum( serialize = "NIFI_PBKDF2_AES_GCM_256" ) ]
5658 NifiPbkdf2AesGcm256 ,
59+
5760 // supported in v2
61+ #[ default]
5862 #[ strum( serialize = "NIFI_ARGON2_AES_GCM_256" ) ]
5963 NifiArgon2AesGcm256 ,
64+
6065 // Deprecated in v1 -> can be removed when 1.x.x is no longer supported
6166 #[ strum( serialize = "NIFI_BCRYPT_AES_GCM_128" ) ]
6267 NifiBcryptAesGcm128 ,
68+
6369 // Deprecated in v1 -> can be removed when 1.x.x is no longer supported
6470 #[ strum( serialize = "NIFI_BCRYPT_AES_GCM_256" ) ]
6571 NifiBcryptAesGcm256 ,
72+
6673 // Deprecated in v1 -> can be removed when 1.x.x is no longer supported
6774 #[ strum( serialize = "NIFI_PBKDF2_AES_GCM_128" ) ]
6875 NifiPbkdf2AesGcm128 ,
76+
6977 // Deprecated in v1 -> can be removed when 1.x.x is no longer supported
7078 #[ strum( serialize = "NIFI_ARGON2_AES_GCM_128" ) ]
7179 NifiArgon2AesGcm128 ,
80+
7281 // Deprecated in v1 -> can be removed when 1.x.x is no longer supported
7382 #[ strum( serialize = "NIFI_SCRYPT_AES_GCM_128" ) ]
7483 NifiScryptAesGcm128 ,
84+
7585 // Deprecated in v1 -> can be removed when 1.x.x is no longer supported
7686 #[ strum( serialize = "NIFI_SCRYPT_AES_GCM_256" ) ]
7787 NifiScryptAesGcm256 ,
@@ -105,9 +115,3 @@ impl NifiSensitiveKeyAlgorithm {
105115 Ok ( ( ) )
106116 }
107117}
108-
109- impl Default for NifiSensitiveKeyAlgorithm {
110- fn default ( ) -> Self {
111- Self :: NifiArgon2AesGcm256
112- }
113- }
0 commit comments