durable_queue_encryption 1.1.0
durable_queue_encryption: ^1.1.0 copied to clipboard
Encrypts durable_queue task payloads and error messages at rest with AES-256-GCM. Wraps any storage, including SQLite.
1.1.0 #
- A task that cannot be decrypted no longer stops the queue. Before, the
queue retried reading it forever, so a lost key or one changed record
stopped every task behind it.
getNextReadysets such a task aside: it is held, with its encrypted data unchanged, andtasksSetAsidereports it.getreturns null for it, and the lists andfindActiveByDeduplicationKeyskip it, instead of throwingPayloadDecryptionException. A limitedgetByStatusstill returns up to its limit of readable tasks.
recoveredTaskIds(): the tasks that were set aside and can be read again, for example after the key was restored, to release withDurableQueue.release.- Forwards queue state (
QueueStateStorage, such as rate limits) to the wrapped storage, encrypted like the tasks. State that cannot be decrypted reads as none, so the queue starts it empty. - Requires
durable_queue1.1.0 or later.
1.0.0 #
- First stable release, for
durable_queue1.0. No API changes from 0.1.2; breaking changes now wait for 2.0.
0.1.2 #
- Encrypts the failure history (
StoredTask.failures, fromDurableQueue(failureHistory:)) like the last failure: each stored error reads[encrypted], and the originals are restored on read. - Requires
durable_queue0.5.11 or later.
0.1.1 #
- Passes
QueueStorageCallGuardchecks on to the wrapped storage, sodurable_queue_driftstill refuses calls made inside a drift transaction when it is encrypted. - Requires
durable_queue0.5.10 or later.
0.1.0 #
- Initial release.
EncryptedQueueStorage: wraps anyQueueStorageand encrypts each task's payload and last error message and stack trace, with the task id as associated data. Deduplication keys and groups are stored as HMAC-SHA256 tags for lookups and restored on read (protectLookupKeys, on by default).AesGcmCipher: AES-256-GCM with a random nonce per write, subkeys derived with HMAC-SHA256,generateKey(), and key rotation throughpreviousKeys.PayloadCipher: the interface for other ciphers.- Tasks stored before encryption are still read (
readPlaintext);reencryptAll()encrypts them, or moves every task to a new key. PayloadDecryptionExceptionfor records that cannot be decrypted, andunreadableTaskIds()to find them after a key is lost.- Tested with the shared storage contract over memory and SQLite storage, and against data encrypted by an independent AES-GCM implementation.