Earlier while using Askar for record storage, encryption at rest was handled inherently by the built-in encrypted wallet storage, ensuring that sensitive records/ details in the records(connections keys, credentials details, messages etc.) are encrypted automatically without requiring additional implementation effort.
However, when using the Drizzle Storage Module, encryption at rest is not inherently provided by the storage layer. Data is stored in plaintext unless the implementer adds custom encryption logic.
This creates a security gap compared to the Askar-based setup.
Implementing an optional, configurable field-level encryption at rest in the Drizzle Storage module would help address this gap and improve the overall security posture.
Proposal -
- Field-Level Encryption
- Only configured columns are encrypted
- Avoids encrypting queryable/indexed fields
- Supports selective protection of sensitive attributes
- Transparent Operation
- Automatic encryption on
save and update
- Automatic decryption on
get, find etc.
- Use this feature configuration based
- Enable this while configuring agent; get from
agentContext or from DrizzleStorageModule
Sample configuration -
DrizzleStorageModule({
encryption: {
key: process.env.STORAGE_ENCRYPTION_KEY,
fields: {
DidCommConnectionRecord: ['metadata', 'invitation'],
CredentialExchangeRecord: ['metadata'],
BasicMessage: ['content']
}
}
})
I would appreciate feedback and thoughts on this.
Earlier while using Askar for record storage, encryption at rest was handled inherently by the built-in encrypted wallet storage, ensuring that sensitive records/ details in the records(connections keys, credentials details, messages etc.) are encrypted automatically without requiring additional implementation effort.
However, when using the Drizzle Storage Module, encryption at rest is not inherently provided by the storage layer. Data is stored in plaintext unless the implementer adds custom encryption logic.
This creates a security gap compared to the Askar-based setup.
Implementing an optional, configurable field-level encryption at rest in the Drizzle Storage module would help address this gap and improve the overall security posture.
Proposal -
saveandupdateget,findetc.agentContextor fromDrizzleStorageModuleSample configuration -
I would appreciate feedback and thoughts on this.