Closed 5cat closed 1 year ago
Hey @losfair any update on this?
I temporarily removed mention of the auto-creation feature from readme because it is insecure (with data plane exposed to internet everyone can create namespaces) - we need to figure out a better security strategy here.
Implemented a solution for for #109 in
mvstore
so the creation happens at the server side.I thought about doing it in the
mvsqlite
(client) side but I didnt know how to pass variables there and it looked messy when I thought about it.The flag for the feature in mvstore is
--auto-create-namespace
, if someone want some clients using this features and others dont, they can run two instances ofmvstore
with different prefixes.Tried my best to keep it minimal and mostly copy pasted stuff, not a rust expert so let me know if there is something wrong i made.
Also a side question, is there a way to get the
ns_id
with the information in thecreate_namespace
function so I dont have to calllookup_nskey
aftercreate_namespace
? I tried so hard to know where can I get thens_id
from the variables insidecreate_namespace
but sadly I coudint without doing atxn.get
insidecreate_namespace
after the commit