Commit Graph

10 Commits

Author SHA1 Message Date
Andras Banki-Horvath
d89f51d1d0
multi: add reset closure to kvdb.Update
Similarly as with kvdb.View this commits adds a reset closure to the
kvdb.Update call in order to be able to reset external state if the
underlying db backend needs to retry the transaction.
2020-11-05 17:57:12 +01:00
Andras Banki-Horvath
2a358327f4
multi: add reset closure to kvdb.View
This commit adds a reset() closure to the kvdb.View function which will
be called before each retry (including the first) of the view
transaction. The reset() closure can be used to reset external state
(eg slices or maps) where the view closure puts intermediate results.
2020-11-05 17:57:12 +01:00
Conner Fromknecht
455ddfebdb
multi: rename: ReadBucket to RBucket 2020-05-26 18:21:08 -07:00
Conner Fromknecht
d0d2ca403d
multi: rename ReadTx to RTx 2020-05-26 18:20:37 -07:00
Olaoluwa Osuntokun
557b930c5f
watchtower: convert to use new kvdb abstraction 2020-03-18 19:35:01 -07:00
Conner Fromknecht
059887bd7b
watchtower/wtdb: apply sanity checks to session policy before accepting 2019-06-13 19:54:22 -07:00
Conner Fromknecht
37052f1561
watchtower/wtdb: only accept properly sized blobs
Modifies the bbolt and mock tower databases to only accept blobs that
are the expected size of the session's blob type. This prevents resource
exhaustion attacks where a client may provide disproportionately large
encrypted blob, even though all supported blob types are of fixed-size.
2019-06-13 19:54:22 -07:00
Conner Fromknecht
1b89ba1782
watchtower/multi: move BreachHint to blob pkg 2019-06-13 17:40:04 -07:00
Conner Fromknecht
ec7c16fdc1
watchtower/wtdb: prepare for addition of client db
This commit renames the variables dbName to towerDBName and dbVersions
to towerDBVersions, to distinguish between the upcoming clientDBName
clientDBVersions. We also move resusable portions of the database
initialization and default endianness to its own file so that it can be
shared between both tower and client databases.
2019-05-23 20:47:08 -07:00
Conner Fromknecht
3ef2a36733
watchtower/wtdb/tower_db: add TowerDB and db versioning 2019-04-26 17:21:35 -07:00