From 06d41df23443a78764ea86db5027710cdc68f849 Mon Sep 17 00:00:00 2001 From: "matej.vukosav" Date: Tue, 20 Aug 2024 16:28:39 +0200 Subject: [PATCH] refactor: update --- docs/01-explore/03-manifesto.mdx | 133 ++++++++++++++++----- docs/03-getting-started/01-setup.mdx | 53 +++++--- docs/03-getting-started/03-example-app.mdx | 10 +- docs/04-build/04-dev-mode.mdx | 84 ++++++++++--- 4 files changed, 211 insertions(+), 69 deletions(-) diff --git a/docs/01-explore/03-manifesto.mdx b/docs/01-explore/03-manifesto.mdx index 20e40ffd..cef4dc54 100644 --- a/docs/01-explore/03-manifesto.mdx +++ b/docs/01-explore/03-manifesto.mdx @@ -5,64 +5,131 @@ title: 'The Data Sovereignty Manifesto' ## Vision & Mission -We envision a digital world where users decide how and when their data is stored, processed, and accessed. In such a future, individuals will be compensated with a share of the profit, if they provide consent for their data to be utilized by a specific entity for a specific context. Our framework will ensure that data sharing is consensual, secure, and transparent, allowing users to reclaim their privacy and digital autonomy. - -In the digital age, the concept of privacy has evolved significantly. Traditional notions of privacy, often centred around the control of personal information, have been challenged by the pervasive nature of digital technologies. In a world where your data flows freely across the internet, and is processed by centralized servers, the control over your personal information is often lost. A future dominated by AI, where your digital personalities can be replicated and exploited, calls for urgent safeguarding of contextual integrity and data privacy. We aim to empower individuals to take charge of their digital identities. - -Contextual integrity is a theory developed by Helen Nissenbaum, that suggests privacy is preserved when information flows appropriately according to social norms within specific contexts. Rather than focusing solely on the individual's control over their data, contextual integrity considers the context-specific norms that govern information sharing and usage. Different social settings or spheres (e.g., healthcare, financial records, personal relationships and similar), different actors, attributes and conditions under which information is shared, each have their own expectations for information flow. By examining these parameters, contextual integrity provides a nuanced understanding of privacy that is sensitive to the specific social contexts in which information is used. - -The digital environment involves numerous actors, including users, service providers, third-party advertisers, and data brokers. This complexity increases the difficulty of tracking and managing information flows. Bad actors exploit data streams, leading to breaches of privacy and trust. We believe that every individual should have the power to control their personal data. Our mission is to build a peer-to-peer ecosystem that enables users to dictate who they share their data with and how data access is managed. - -Digital platforms often merge multiple contexts, making it difficult to distinguish appropriate information flows. For example, social media combines personal, professional and public spheres, challenging traditional privacy norms. Digital technologies enable the collection and analysis of vast amounts of diverse data, often beyond what individuals explicitly share. This includes metadata, behavioral data, and similar, which complicates consent and control and often gives away much more about the user than the user actually understands or wants to share. The principles governing data transmission in the digital world are often non-transparent and dynamic. Terms of service and privacy policies frequently change, and the mechanisms of data sharing and processing are not always transparent to users. - +We envision a digital world where users decide how and when their data is +stored, processed, and accessed. In such a future, individuals will be +compensated with a share of the profit, if they provide consent for their data +to be utilized by a specific entity for a specific context. Our framework will +ensure that data sharing is consensual, secure, and transparent, allowing users +to reclaim their privacy and digital autonomy. + +In the digital age, the concept of privacy has evolved significantly. +Traditional notions of privacy, often centred around the control of personal +information, have been challenged by the pervasive nature of digital +technologies. In a world where your data flows freely across the internet, and +is processed by centralized servers, the control over your personal information +is often lost. A future dominated by AI, where your digital personalities can be +replicated and exploited, calls for urgent safeguarding of contextual integrity +and data privacy. We aim to empower individuals to take charge of their digital +identities. + +Contextual integrity is a theory developed by Helen Nissenbaum, that suggests +privacy is preserved when information flows appropriately according to social +norms within specific contexts. Rather than focusing solely on the individual's +control over their data, contextual integrity considers the context-specific +norms that govern information sharing and usage. Different social settings or +spheres (e.g., healthcare, financial records, personal relationships and +similar), different actors, attributes and conditions under which information is +shared, each have their own expectations for information flow. By examining +these parameters, contextual integrity provides a nuanced understanding of +privacy that is sensitive to the specific social contexts in which information +is used. + +The digital environment involves numerous actors, including users, service +providers, third-party advertisers, and data brokers. This complexity increases +the difficulty of tracking and managing information flows. Bad actors exploit +data streams, leading to breaches of privacy and trust. We believe that every +individual should have the power to control their personal data. Our mission is +to build a peer-to-peer ecosystem that enables users to dictate who they share +their data with and how data access is managed. + +Digital platforms often merge multiple contexts, making it difficult to +distinguish appropriate information flows. For example, social media combines +personal, professional and public spheres, challenging traditional privacy +norms. Digital technologies enable the collection and analysis of vast amounts +of diverse data, often beyond what individuals explicitly share. This includes +metadata, behavioral data, and similar, which complicates consent and control +and often gives away much more about the user than the user actually understands +or wants to share. The principles governing data transmission in the digital +world are often non-transparent and dynamic. Terms of service and privacy +policies frequently change, and the mechanisms of data sharing and processing +are not always transparent to users. ## Rationale and Addressing the Problem -◦ Legal frameworks should consider the specific contexts in which data is used. This means creating sector-specific privacy regulations that account for the unique norms and expectations of each context. - -◦ Digital platforms must be transparent about their data practices and accountable for maintaining appropriate information flows. This includes clear communication about how data is collected, used, and shared, as well as mechanisms for users to hold platforms accountable. +◦ Legal frameworks should consider the specific contexts in which data is used. +This means creating sector-specific privacy regulations that account for the +unique norms and expectations of each context. -◦ Empowering users with tools to manage their privacy in context-specific ways is crucial. This can involve granular privacy settings, consent mechanisms that reflect contextual norms, and educational initiatives to inform users about their privacy rights and risks. +◦ Digital platforms must be transparent about their data practices and +accountable for maintaining appropriate information flows. This includes clear +communication about how data is collected, used, and shared, as well as +mechanisms for users to hold platforms accountable. -◦ Designers and developers of digital technologies should incorporate contextual integrity principles into the design of systems and services. This means considering the social contexts in which their technologies will be used and ensuring that information flows align with context-specific norms. +◦ Empowering users with tools to manage their privacy in context-specific ways +is crucial. This can involve granular privacy settings, consent mechanisms that +reflect contextual norms, and educational initiatives to inform users about +their privacy rights and risks. -◦ Regulators have tried to address this issue by implementing data protection laws. However, in practice, there are no effective tools to solve the problem easily, and the regulations are prone to human error. This results in unnecessary bureaucracy, without solving the problem at its core. +◦ Designers and developers of digital technologies should incorporate contextual +integrity principles into the design of systems and services. This means +considering the social contexts in which their technologies will be used and +ensuring that information flows align with context-specific norms. + +◦ Regulators have tried to address this issue by implementing data protection +laws. However, in practice, there are no effective tools to solve the problem +easily, and the regulations are prone to human error. This results in +unnecessary bureaucracy, without solving the problem at its core. ## Core Values and Beliefs **Privacy** - We believe that privacy is a fundamental human right. +We believe that privacy is a fundamental human right. **Ownership & Control** - Data should be owned and managed by the user whose data it is, not by large corporations, big tech, or the government. Individuals should have complete control over their digital footprint. +Data should be owned and managed by the user whose data it is, not by large +corporations, big tech, or the government. Individuals should have complete +control over their digital footprint. **Transparency & Security** - Data management processes must be transparent and understandable. Personal data should be protected against unauthorized access and misuse. - - +Data management processes must be transparent and understandable. Personal data +should be protected against unauthorized access and misuse. ## Goals and Objectives -The need for data sovereignty is urgent. Daily data breaches compromise medical records, putting lives at risk, financial records are disclosed, leading to theft, and personal secrets can be exposed without consent. In a world where data is a valuable asset, it is essential to create a fair and secure environment. Contextual integrity, which addresses data privacy in the digital age, must be upheld to protect individual rights and foster trust in digital interactions. -Our goals include: +The need for data sovereignty is urgent. Daily data breaches compromise medical +records, putting lives at risk, financial records are disclosed, leading to +theft, and personal secrets can be exposed without consent. In a world where +data is a valuable asset, it is essential to create a fair and secure +environment. Contextual integrity, which addresses data privacy in the digital +age, must be upheld to protect individual rights and foster trust in digital +interactions. Our goals include: -◦ Creating a robust, secure, and user-friendly peer-to-peer protocol for data access control. +◦ Creating a robust, secure, and user-friendly peer-to-peer protocol for data +access control. -◦ Providing tools and resources to enable builders to develop Self Sovereign Apps, where users can manage their data independently. +◦ Providing tools and resources to enable builders to develop Self Sovereign +Apps, where users can manage their data independently. -◦ Target developers to raise awareness, join the movement, and build products within this new framework. +◦ Target developers to raise awareness, join the movement, and build products +within this new framework. -◦ Educating the public about the importance of data sovereignty and how to protect their digital identity. +◦ Educating the public about the importance of data sovereignty and how to +protect their digital identity. -◦ Developing user economy models, for the users to be compensated when their data is used by profit-making entities. +◦ Developing user economy models, for the users to be compensated when their +data is used by profit-making entities. ## Join the Movement -The future of our digital world depends on the actions we take today. By reclaiming control over our personal data, we can ensure privacy, security, and fairness for all. -We call on developers to build innovative solutions that prioritize user-controlled data management. We urge individuals to take greater care of their digital identity and privacy, advocating for a future where personal data is respected and protected. Join us in creating a fair and secure digital world. -Let us rise to the challenge and create a digital environment where data sovereignty is the norm, not the exception. Because it is YOUR data, and YOU should control what happens to it! - - +The future of our digital world depends on the actions we take today. By +reclaiming control over our personal data, we can ensure privacy, security, and +fairness for all. We call on developers to build innovative solutions that +prioritize user-controlled data management. We urge individuals to take greater +care of their digital identity and privacy, advocating for a future where +personal data is respected and protected. Join us in creating a fair and secure +digital world. Let us rise to the challenge and create a digital environment +where data sovereignty is the norm, not the exception. Because it is YOUR data, +and YOU should control what happens to it! diff --git a/docs/03-getting-started/01-setup.mdx b/docs/03-getting-started/01-setup.mdx index e517040b..d1cf65c4 100644 --- a/docs/03-getting-started/01-setup.mdx +++ b/docs/03-getting-started/01-setup.mdx @@ -52,55 +52,72 @@ Node is now initialized and ready for use. ### SSL/TLS Support -To be able to access the the node from external source on the same network you will need to install the generated self-signed certificate. +To be able to access the the node from external source on the same network you +will need to install the generated self-signed certificate. -> **_NOTE:_** Installing the SSL certificate is only necessary if you plan to access the node from an external source on the same network. If you are running the application locally, you do not need to install the certificate. +> **_NOTE:_** Installing the SSL certificate is only necessary if you plan to +> access the node from an external source on the same network. If you are +> running the application locally, you do not need to install the certificate. ### Steps to Add the Certificate to Your Device 1. **Locate the Certificate**: - - Download the certificate from `http://localhost:/admin-api/certificate`. - - The `` is the port number used as an argument in the `--server-port` flag in the section [Initialize and start your node (separate terminal)](#initialize-and-start-your-node-separate-terminal). - - For example: - \`\`\`bash - http://localhost:2428/admin-api/certificate - \`\`\` + + - Download the certificate from + `http://localhost:/admin-api/certificate`. + - The `` is the port number used as an argument in the + `--server-port` flag in the section + [Initialize and start your node (separate terminal)](#initialize-and-start-your-node-separate-terminal). + - For example: \`\`\`bash http://localhost:2428/admin-api/certificate \`\`\` 2. **Add the Certificate to Trusted Certificates**: - **For Windows**: - 1. Open the `Run` dialog (Win + R) and type `mmc` to open the Microsoft Management Console. + + 1. Open the `Run` dialog (Win + R) and type `mmc` to open the Microsoft + Management Console. 2. Go to `File` -> `Add/Remove Snap-in...`. 3. Select `Certificates` and click `Add`. 4. Choose `Computer account`, then `Next` and `Finish`. - 5. Expand `Certificates (Local Computer)` -> `Trusted Root Certification Authorities`. + 5. Expand `Certificates (Local Computer)` -> + `Trusted Root Certification Authorities`. 6. Right-click `Certificates`, then `All Tasks` -> `Import...`. 7. Follow the prompts to import the certificate file. - **For macOS**: + 1. Double-click the certificate file. 2. This will open the `Keychain Access` application. 3. Choose `System` from the list of keychains. 4. Drag and drop the certificate into the `System` keychain. 5. Authenticate with your administrator password if prompted. 6. Right-click the certificate and select `Get Info`. - 7. Expand the `Trust` section and select `Always Trust` from the `When using this certificate` dropdown. + 7. Expand the `Trust` section and select `Always Trust` from the + `When using this certificate` dropdown. - **For Linux**: - 1. Copy the certificate to `/usr/local/share/ca-certificates/` (or `/etc/pki/ca-trust/source/anchors/` depending on your distribution). - 2. Run `sudo update-ca-certificates` (or `sudo update-ca-trust extract` for Red Hat-based distributions). + 1. Copy the certificate to `/usr/local/share/ca-certificates/` (or + `/etc/pki/ca-trust/source/anchors/` depending on your distribution). + 2. Run `sudo update-ca-certificates` (or `sudo update-ca-trust extract` for + Red Hat-based distributions). 3. **Restart Your Browser**: - - Close and reopen your web browser to ensure it recognizes the newly added certificate. + - Close and reopen your web browser to ensure it recognizes the newly added + certificate. ### Rules for Generating SSL Certificates -- If a certificate doesn't exist, a new one will be generated based on your current local IP address. +- If a certificate doesn't exist, a new one will be generated based on your + current local IP address. - If a certificate exists for the current IP address, it will be used. -- If a certificate exists but is not configured for the current IP address, a new certificate will be created. +- If a certificate exists but is not configured for the current IP address, a + new certificate will be created. -> **_NOTE:_** Every time a new certificate is generated (e.g., on the first start of the server or when the IP address changes), you will need to add it to your device's trusted certificates. +> **_NOTE:_** Every time a new certificate is generated (e.g., on the first +> start of the server or when the IP address changes), you will need to add it +> to your device's trusted certificates. ### Congratulations on Setting Up Your Node! -Your next step is to add an authentication mechanism to your node by adding a decentralized identity. +Your next step is to add an authentication mechanism to your node by adding a +decentralized identity. diff --git a/docs/03-getting-started/03-example-app.mdx b/docs/03-getting-started/03-example-app.mdx index b154a99c..ff48bbb2 100644 --- a/docs/03-getting-started/03-example-app.mdx +++ b/docs/03-getting-started/03-example-app.mdx @@ -9,17 +9,19 @@ you need to create new context where application will be installed. ### Create new context -To create new context, node CLI has to be used. -There are two possible options of creating new context. +To create new context, node CLI has to be used. There are two possible options +of creating new context. -1. If the node already has application installed, create new context using command: +1. If the node already has application installed, create new context using + command: ```bash title="Terminal" $ meroctl context create --application >> ``` -2. If application is not installed then install the application and create new context using commands: +2. If application is not installed then install the application and create new + context using commands: ```bash title="Terminal" $ meroctl app install --path /path/to/app diff --git a/docs/04-build/04-dev-mode.mdx b/docs/04-build/04-dev-mode.mdx index 0fcf6895..6933e37d 100644 --- a/docs/04-build/04-dev-mode.mdx +++ b/docs/04-build/04-dev-mode.mdx @@ -28,34 +28,72 @@ Dev mode offers several advantages: ## Prerequisites -Before using dev mode, ensure you have a node and a coordinator node running. This should be done in a -separate terminal window. +Before using dev mode, ensure you have a node and a coordinator node running. +This should be done in a separate terminal window. For more information, see the +[Setup guide](/getting-started/setup). ## How to Use Dev Mode -To use dev mode, you'll use the `context create` command with the `--dev` flag. +To list all supported commands, run the following command: + +```bash title="Terminal" +cargo run -p meroctl -- --node-name node1 --home data help +``` + +Supported commands: + +- `init` Initialize node configuration +- `config` Configure the node +- `run` Run a node +- `context` Manage contexts +- `app` Manage applications +- `help` Print this message or the help of the given subcommand(s) + Here's the basic syntax: +All commands share the same prefix: + ```bash title="Terminal" -cargo run -p meroctl -- --home --node-name context create --dev --path --version +cargo run -p meroctl -- --home --node-name ``` ### Parameters: -- `--home`: Specifies the path to the home directory. +- `--home`: Specifies the path to the home directory. ( In our example we are + using `data` as the home directory) - `--node-name`: Specifies the name of the node. -- `--dev`: Enables dev mode. -- `--path`: Specifies the path to your WASM file. -- `--version`: Specifies the version of your application (optional). -## Example Usage +- `--path`: Specifies the absolute path to your WASM file. + +Create dev context using installed app + +```bash title="Terminal" +cargo run -p meroctl -- --home --node-name context create --watch +``` + +Output + +```bash title="Terminal" +$ cargo run -p meroctl -- --home data --node-name node1 context create --watch ./path/to/binary.wasm +Application `` installed! +Context `` created! +Context{contextId} -> Application{appId} +(i) Watching for changes to "./path/to/binary.wasm" +``` + +Invite coordinator or other local nodes to participate in the context ```bash title="Terminal" -$ cargo run -p meroctl -- --home data --node-name node1 context create --dev --path ./path/to/binary.wasm --version 1.0.0 -Created BTgDJ5FezfFJCMWzRWScXiwkgfMHX3zX4s3Qum7Gf4pb linked to application ./path/to/binary.wasm +cargo run -p meroctl -- --node-name coordinator --home data context join --context-id contextId ``` -This command will: +Output + +```bash title="Terminal" +Context 41gdT47MW9CJ5Y9S1hhpxnQT7C9oPVZZAtxv2erJAiK4 sucesfully joined +``` + +Create context command will: 1. Install your application locally. 2. Create a new context. @@ -81,8 +119,14 @@ $ cargo run -p meroctl -- --home data --node-name node1 context ls 2. Create a context for a published application: ```bash title="Terminal" -$ cargo run -p meroctl -- --home data --node-name node1 context create --application-id APwGT9wuLwjkBoGxRR9thpS89VsbazYd6CpMpyqx4b5J -Created BTgDJ5FezfFJCMWzRWScXiwkgfMHX3zX4s3Qum7Gf4pb with application APwGT9wuLwjkBoGxRR9thpS89VsbazYd6CpMpyqx4b5J +$ cargo run -p meroctl -- --home data --node-name node1 context create --application-id +``` + +Output + +```bash title="Terminal" +Context `contextId` created! +Context{contextId} -> Application{appId} ``` ### From development to Publication @@ -96,3 +140,15 @@ When you're ready to move from local development to publishing your application: 3. After publication, you can create contexts for your published application using the --application-id flag instead of dev mode. + +Install the local app on node for debugging + +```bash title="Terminal" +cargo run -p meroctl -- --home --node-name app install –-path +``` + +Output + +```bash title="Terminal" +Application installed successfully. Application ID: +```