Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for publishing and fetching key value mappings #2

Open
tiziano88 opened this issue Jun 14, 2023 · 5 comments
Open

add support for publishing and fetching key value mappings #2

tiziano88 opened this issue Jun 14, 2023 · 5 comments
Assignees

Comments

@tiziano88
Copy link
Member

More details to come, but this would allow building a sort of namespaced k/v store, in which keys are arbitrary strings, and values are digests of existing ent items

cc @rbehjati @thmsbinder

@tiziano88 tiziano88 self-assigned this Jun 14, 2023
@tiziano88
Copy link
Member Author

cc @conradgrobler @benlaurie

@tiziano88
Copy link
Member Author

a free-for-all flat namespace would obviously not work -- who decides who gets to use the key google, or any other well known and potentially misleading string?

I'm thinking maybe a two level structure, in which the first level is the digest of an ECDSA public key (similar to how .onion addresses work), then the second level could be an arbitrary string (or maybe even that could be a digest of the string, to avoid having human recognisable elements in the URL).

So a full URL to fetch an item may look like

http://ent-url/lookup/8tUPjCTg3JigvHP9o4ZnZ51JTkCjjYoHibh5z8VUDg23QtkzvCnWHNWxe8rqbQXdizf9NKiRQgNWbj7Zo2FNongVq8/8tW2YFDxYB3hoxaq112VLLCPFrWN6zMZqY3ppaHF7ZbFWyBFrnpXTbtTsuFxoivFdFjbF2WhfFT3Jb3LoBPDcRhcaM

it does not exactly roll off the tongue, but I think it has nice properties, including that the ent server cannot forge such an entry (since it would actually be signed by the private key, which ent would not have) -- the client will also get the signature as additional metadata for verification of course

@rbehjati
Copy link

As a REST API, I suggest something like: POST /index/insert for inserting a mapping and GET /index/retrieve/{key} for retrieving a mapping. But I am not that attached to the naming, or the use of REST. Although I am not sure how you'd use a gRPC service on command line.

@rbehjati
Copy link

Good point about namespacing. So if we want to upload an entry we have to sign it? But it is public, right? Anyone with the digest of the ECDSA public key can do the look up?

@tiziano88
Copy link
Member Author

Yes we would sign it. We already have an API key to allow clients to upload entries, this would be an additional secret that we need to give to the client, and each client would get its own, ideally (unless we intentionally want to share the top level namespace across clients). And yes, publishing the public key is out of scope, it can happen in any way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants