Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

FEAT > Middleware DI for custom hooks/handlers #73

Open
maurerbot opened this issue Dec 24, 2021 · 1 comment
Open

FEAT > Middleware DI for custom hooks/handlers #73

maurerbot opened this issue Dec 24, 2021 · 1 comment

Comments

@maurerbot
Copy link

maurerbot commented Dec 24, 2021

Wondering if hypercore can or thinking about supporting middleware for use cases like auth. For example, a hook that checks a signature before accepting a mutation or returning a value.

This is great if you had a node that tries to mutate logs, kv, etc without the permission to do so. Other nodes on the network should be able to check signatures in those messages before accepting.

Blacklisting peers would also be a nice feature for repeat offenders.

@maurerbot maurerbot changed the title FEAT > Middleware DI for custom hook in the system FEAT > Middleware DI for custom hooks/handlers Dec 24, 2021
@maurerbot
Copy link
Author

maurerbot commented Dec 24, 2021

I was digging into the NOISE framework and I'm wondering if the above can be achieved with https://noiseprotocol.org/noise.html#payload-security-properties

The problem I'm trying to solve is attributing a static keypair to a set of keys in hyperbee KV so that only the holder of the keypair can access specific keys.

For example, a daap discovers and connects to hypercore peers and the daap user "logs in" using their wallet. They should only be able to access (read and write) content they own.

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

No branches or pull requests

1 participant