Explain open membership hubs

I’m not quite understanding the usecase for “Open membership hubs”… would this be the method used to create collections of data that can be shared across apps?

@aaron @jude @larry

Open-membership hubs allow writes from any user but still only allow writes to occur on a bucket if that request is authorized for the bucket. These are useful for running a service provider for multiple users, and this is how, say, hub.blockstack.org works.

2 Likes

I may be misunderstanding, so the user would have to specify that they want to use an open-membership hub, and as of now that would be the chosen storage driver for any app that they use? Or should the open-membership storage path be defined on every driver as an option selectable by each individual app?

I may be misunderstanding, so the user would have to specify that they want to use an open-membership hub, and as of now that would be the chosen storage driver for any app that they use? Or should the open-membership storage path be defined on every driver as an option selectable by each individual app?

Apps don’t select which gaia driver to use – that selection is performed by the gaia hub. Apps speak to the gaia hub, and the gaia hub uses drivers to speak to backend storage providers.

A hub will accept requests for a path /$address/filename.txt only if a request contains a valid authentication token for $address. Applications always write to paths like /$app_user_address/filename.txt, where the $app_user_address is derived from the user’s application private key (and therefore, the app can generate a valid authentication token).

An open-membership hub allows writes for any addresses (though again, it validates those writes). This means that it will operate as a storage system for any user wishing to use it. If I ran my own gaia hub, I probably wouldn’t want to store data on behalf of other people’s applications, profiles, etc., so I would only want to accept requests for writes to addresses which correspond to my applications.

The blockstack-browser configures which hub a user will connect to and use (this is currently not-configurable in the browser, but will be eventually). Currently, this defaults to hub.blockstack.org

1 Like

Hey @aaron,

Does this work now? This seems like it’d be a good solution for managing teams. The documentation is there for open membership hubs, but I’m wondering if this is supported yet by both blockstack.js and the browser. Thanks!

Yep, @jehunter5811, this works now – the default Gaia hub is an open-membership hub.

Closed membership hubs are a bit more cumbersome to operate – they use whitelists for the allowed writer-addresses. Because each user’s app writes with a different writer-address, this means that the whitelist would need to contain each of those addresses.