ex0dus-0x / microkv Goto Github PK
View Code? Open in Web Editor NEWMinimal and persistent key-value store designed with security in mind
License: MIT License
Minimal and persistent key-value store designed with security in mind
License: MIT License
Lines 307 to 314 in 610cdee
Seems that the type parameter K
is not actually used in exists
. The compiler cannot infer the type for K
, so I must add an explicit type annotation in order to call exists
.
We should consider phasing out secstr
for our own "secured memory" implementation, with full support for other primitives for isolating memory pages to support different OSes:
Linux - typical support for mlock
and zeroing, but also thinking MFD_SECRET_*
, as posed here to further isolate sensitive memory from kernel space and even cache. Have not seen a merge upstream to a new revision yet, but interesting to think about.
macOS - mlock
again, but also potentially pushing support for Secure Enclave storage, which will requiring signing rather than our current symmetric encryption.
Windows - CryptProtectMemory
and SecureZeroMemory
for explicit zeroing.
Backing to other native "keyring" implementations (Credential Manager, macOS Keychain) are also interesting and provides security and isolation for free(-ish).
Finish up the client implementation to support spawning a microkv service. Incorporate Dockerfile if necessary.
Thank you for creating this awesome project. The only issue I have is that the current state of the read and write lock are lacking helper functions to be useful. I see the following main issues:
I propose we extend the index map in such a way that we have helper functions (that are also used internally by the namespaces). With them, users can use them inside a lock like this
db.lock_write(|mut kv| {
kv.kv_put(db, "namespace", "key", 1);
}
I created a PR that serves as a proposal to discuss a a possible direction we could go to solve this problem (#15). If this is the way we want to go, I can extend it to the remaining useful functions and we can merge the PR.
I would love to hear your opinion on this issue.
Demonstrate how we can implement some type of consensus, ideally with Raft with microkv. This should work with the CLI application that is currently being implemented, and should demonstrate how the minimal API can be incorporated well within a distributed systems context.
Besides using strong symmetric encryption for cold storage, we could also use threshold-based techniques to try to shard the database for some type of distribution.
Line 230 in 610cdee
The only use of _value
is to pass a reference to bincode::serialize
. Thus, _value
should be of type &V
instead of V
. The way it is now: if your caller has only a reference then you force your caller to make an unnecessary clone into _value
in order to call put
.
Right now I'm struggling with opening a database that doesn't end with .kv
. I propose to create a new function like
pub fn open_with_path<S: AsRef<str>>(path_to_kv: PathBuf) -> Result<Self>
For example, path to KV can be /home/user/path/dontcare/keyvaluestore.my
. This will result in a more generic way of opening the kv store and easier way to pass the path argument from a file selector (for example).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.