🔑 Manage Data Access
Reading time 🕒 6 mins
Control Your Data
Alice will learn how to grant access to her protected data and manage who can use it.
When you protect your data, you can authorize specific users and applications to access it. This means an authorized user will be able to use an authorized iApp to compute your protected data.
🔐 The Authorization Flow
Here is a simple diagram to explain the process:
🔓 Grant the iApp Access to Your Data
Remember the iApp address you saved from the previous chapter? You'll need it now to grant access to your protected data.
You will sign two messages:
- A message granting access to the iApp
- An authentication message to post your granted access on a broadcasting service (iExec marketplace)
Let's look at the code that makes this possible:
const grantedAccess = await dataProtectorCore.grantAccess({
protectedData: '0x123abc...',
authorizedApp: '0x456def...',
authorizedUser: '0x789cba...',
});
As we don't have the Bob's wallet address, we'll use the zero address to grant access to all users.
🏃 Time to run
You're now ready to process your protected data in a trusted environment:
iapp run <my-iapp-address> --protectedData
🎉 Congratulations! You've successfully completed the core workflow of protecting and processing data with iExec!
What's next: Data Monetization
We've completed the first step of the journey! You can now integrate the DataProtector SDK into your dApp, secure your data, grant access to users and iApps, and process it safely.
But here's where it gets even more exciting... monetization!.
Our SDK offers flexible monetization mechanisms, allowing you to create protected data collections and implement advanced models like subscriptions, rentals, or direct sales. The choice is yours!
Want to see it in action? Check out our Content Creator Demo where you can:
- Create and protect your own content
- Set pricing and access rules
- Manage subscriptions and rentals
- Track your earnings
For more technical details, see the DataProtector Sharing documentation.
You have one more step to complete the journey, and it's the easy one. Let's go to the bonus chapter!