Leverage the benefits of Filecoin’s decentralized storage with Nevermined’s access control thanks to our latest integration
Since its inception, the core feature of Nevermined has always been data sharing. Over time we have enhanced the capabilities and services that you can provide on your data through Nevermined (Data In-Situ Compute, Federated Learning, Provenance, NFTs) but Decentralized Access Control has always been a core part of our architecture.
One of the design principles of the Nevermined Access Control is that the data owner should never lose control over its data. We achieve this by never storing any data on Nevermined itself. Instead, we integrate with existing data storage solutions in order to make it as easy as possible for data providers to use Nevermined. Current integrations include centralized technologies like Amazon S3, Azure, On-premise, as well as decentralized solutions like IPFS. In this blog post, we will give an overview of how we integrated Nevermined with Filecoin (for a full technical specification see Filecoin Storage).
Nevermined Storage Providers
At the center of every client interaction with Nevermined is the Gateway. In this context, the gateway works as an enforcer for the Access Control, by checking if both the client and the data provider fulfilled the access conditions previously defined on a service agreement. If everything is correct the Gateway fetches the data and forwards it to the client.
The client never gains any information of where the data is stored. This has two advantages: first the client is never able to share the location of the data; and second the location of the data or the storage solution where the data resides is transparent for Nevermined and the Gateway is always able to fetch the data for storage solutions with which it has integrations with.
The way that Nevermined provides integration with different storage solutions is through what we call Storage Providers. Storage Providers are code components that can be enabled in the Gateway. The Gateway is able to decide which service provider to use based on the information included in the URI for the data.
Nevermined Filecoin Specification
We chose to use Powergate because of the API-driven solution they provide for storage across Filecoin and IPFS, and since we already supported IPFS this gives data providers the flexibility to take advantage of the cold and hot storage solution provided by Powergate by leveraging both IPFS and Filecoin. It also makes it easier for data providers to manage data under multiple addresses.
From a usability point of view, the only thing that changes for a data provider is how they define the URI that points to the data in the definition of the asset metadata.
In case of files stored in Filecoin the URI starts with the `cid://` schema and can include additional information in order to take advantage of different features of Powergate:
- CID Hash — Identifier of the content in the Filecoin network
- Powergate Host — Hostname of the powergate node that can be used to fetch the file
- Powergate Port — Port where is running the powergate service that can be used to fetch the file
- Powergate Token — Token to use to fetch the file
- Deal Id — Identifier of the Deal that allow to pin the file to IPFS
Some example of Filecoin URIs include:
Filecoin Decentralized Access Control with Nevermined
With the Nevermined Filecoin integration users can now have granular access control over who can access the data. The entire Nevermined stack is now capable of using Filecoin and this does not include only the Gateway and the fetching of the data but also the possibility of uploading data directly to Filecoin through the SDKs.
To demonstrate the Filecoin integration we used it in our experimental NFT Marketplace:
This video shows how a user could specify a file that already exists in Filecoin.
By integrating Filecoin into Nevermined we are able to enhance the features of Filecoin by providing granular access control on top of your data stored on Filecoin. Not only that but data stored on Filecoin immediately benefits from all the current and future features of Nevermined, including compute to the data, full data provenance through W3C provenance standard, a decentralized storage solution for NFTs as well as enhancing the economics of the ecosystem by combining it with the data monetization features of Nevermined.
Originally posted on 2021-06-11 on Medium.