Adds camelCase support for encrypted field mappings (#342)
Extends encrypted field mappings to include camelCase variants to support consistency and compatibility with different naming conventions. Updates reverse mappings for Drizzle ORM to allow conversion between camelCase and snake_case field names. Improves integration with systems using mixed naming styles.
This commit is contained in:
@@ -17,18 +17,31 @@ class FieldCrypto {
|
|||||||
private static readonly ENCRYPTED_FIELDS = {
|
private static readonly ENCRYPTED_FIELDS = {
|
||||||
users: new Set([
|
users: new Set([
|
||||||
"password_hash",
|
"password_hash",
|
||||||
|
"passwordHash",
|
||||||
"client_secret",
|
"client_secret",
|
||||||
|
"clientSecret",
|
||||||
"totp_secret",
|
"totp_secret",
|
||||||
|
"totpSecret",
|
||||||
"totp_backup_codes",
|
"totp_backup_codes",
|
||||||
|
"totpBackupCodes",
|
||||||
"oidc_identifier",
|
"oidc_identifier",
|
||||||
|
"oidcIdentifier",
|
||||||
|
]),
|
||||||
|
ssh_data: new Set([
|
||||||
|
"password",
|
||||||
|
"key",
|
||||||
|
"key_password",
|
||||||
|
"keyPassword",
|
||||||
]),
|
]),
|
||||||
ssh_data: new Set(["password", "key", "key_password"]),
|
|
||||||
ssh_credentials: new Set([
|
ssh_credentials: new Set([
|
||||||
"password",
|
"password",
|
||||||
"private_key",
|
"private_key",
|
||||||
|
"privateKey",
|
||||||
"key_password",
|
"key_password",
|
||||||
|
"keyPassword",
|
||||||
"key",
|
"key",
|
||||||
"public_key",
|
"public_key",
|
||||||
|
"publicKey",
|
||||||
]),
|
]),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user