IProviderEncryptionOptions Interface
Configuration object for the Katlux end-to-end encryption pipeline. Accepted by RequestProvider.setEncryption(), and the encryption option on AAPIDataProvider-based providers (CAPIFlatClientDataProvider, CAPITreeClientDataProvider). Uses the standard Web Crypto API (crypto.subtle) with AES-256-GCM by default โ zero external npm dependencies.
๐ Encryption & SSR Security Guide ยท ๐ CWebCryptoEncryptionProvider ยท ๐๏ธ AEncryptionProvider ยท ๐ IEncryptionProvider
โ ๏ธ Security Notice: Never store symmetric secrets in public client configs (such as useRuntimeConfig().public). Keys must be retrieved dynamically per session via authenticated APIs. Offline mutation queues automatically persist payloads in encrypted form.
Use IProviderEncryptionOptions to configure encryption on a data provider (e.g. ADataProvider implementations) or directly on RequestProvider:
const provider = new CAPIFlatClientDataProvider({
encryption: {
enabled: true,
key: 'my-32-char-secret-passphrase!!!'
}
})const provider = new CAPIFlatClientDataProvider({
encryption: {
enabled: true,
key: 'my-32-char-secret-passphrase!!!',
decryptOnSSR: false
}
})const provider = new CAPIFlatClientDataProvider({
encryption: {
enabled: true,
key: () => useAuth().getSessionKey()
}
})const provider = new CAPIFlatClientDataProvider({
encryption: {
enabled: true,
key: 'secret',
fields: ['ssn', 'balance', 'fullName']
}
})