Skip to content

Commit 819f54f

Browse files
Merge pull request #75 from MatrixAI/feature-getting-started-finalized
Polykey-Docs: Complete V1 of Polykey-CLI Tutorials
2 parents c5d747e + fa92d35 commit 819f54f

File tree

11 files changed

+668
-151
lines changed

11 files changed

+668
-151
lines changed

docs/tutorials/polykey-cli/README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ The tutorial here should be followed in order, and the goal is to make use of Po
1414

1515
The CLI is open-source and available on GitHub: [Polykey CLI](https://github.com/MatrixAI/Polykey-CLI).
1616

17-
We automatically build and test the CLI on the following platforms:
17+
### Supported Platforms
1818

19-
- Linux x64
20-
- Linux arm64
21-
- MacOS x64
22-
- MacOS arm64
19+
Polykey is continuously built and tested on:
20+
21+
- Linux x64 / arm64
22+
- MacOS x64 / arm64
2323
- Windows x64
2424
- Docker
2525

@@ -29,28 +29,28 @@ Polykey is currently in beta. Its interface is at various levels of stability. S
2929

3030
## Getting Started
3131

32-
To begin managing & sharing secrets effectively with Polykey, follow the tutorials in the sequence outlined below:
32+
Start your journey with Polykey by following the tutorials below in sequence:
3333

3434
:::tip
35-
You may also reference the following [demo video](https://vimeo.com/884649667) for the getting started tutorial but you will first need to complete the installation instructions for Polykey-CLI.
35+
For a visual walkthrough, check out our [getting started demo video](https://vimeo.com/884649667) after installing Polykey.
3636
:::
3737

38-
1. **[Installation](/docs/tutorials/polykey-cli/installation)**: Set up Polykey CLI on your preferred platform.
39-
2. **[Bootstrap Keypair](/docs/tutorials/polykey-cli/bootstrapping)**: Initialize your node and connect to the Polykey network.
40-
3. **[Managing Vaults](/docs/tutorials/polykey-cli/managing-vaults)**: Create and manage secure vaults for effective secrets storage.
41-
4. **[Managing Secrets](/docs/tutorials/polykey-cli/managing-secrets)**: Explore comprehensive methods for handling and organizing secrets within vaults.
42-
5. **[Claiming Digital Identities](/docs/tutorials/polykey-cli/claiming-digital-identities)**: Authenticate and establish your identity across the Polykey network.
43-
6. **[Discovering Other User's Identities](/docs/tutorials/polykey-cli/discovering-other-users)**: Locate and verify identities of other users to manage access.
44-
7. **[Sharing Vaults](/docs/tutorials/polykey-cli/sharing-vaults)**: Share vaults securely with trusted peers.
45-
46-
These initial tutorials will guide new users through the basic functionalities of setting up Polykey, starting their node (similar to creating a Web3 wallet connected to a P2P network), creating virtual encrypted vaults, and managing secret files within these vaults. This foundation prepares users for more advanced network functionalities, such as identity claims, discovery of other users' nodes, and secure sharing of secrets and vaults through end-to-end encryption.
38+
1. **[Installation](/docs/tutorials/polykey-cli/installation)** - Install Polykey CLI on your platform.
39+
2. **[Bootstrap Keypair](/docs/tutorials/polykey-cli/bootstrapping)** - Set up your node and connect to the network.
40+
3. **[Managing Vaults](/docs/tutorials/polykey-cli/managing-vaults)** - Securely store secrets within encrypted vaults.
41+
4. **[Managing Secrets](/docs/tutorials/polykey-cli/managing-secrets)** - Organize and handle secrets within your vaults.
42+
5. **[Claiming Digital Identities](/docs/tutorials/polykey-cli/claiming-digital-identities)** - Establish and authenticate your identity within the network.
43+
6. **[Discovering Other User's Identities](/docs/tutorials/polykey-cli/discovering-other-users)** - Find and verify other users to manage permissions.
44+
7. **[Sharing Vaults](/docs/tutorials/polykey-cli/sharing-vaults)** - Share your encrypted vaults securely with peers.
45+
8. **[Managing Multiple Nodes](/docs/tutorials/polykey-cli/managing-multiple-nodes)** - Operate multiple local nodes/agents.
46+
9. **[Using Environment Variables](/docs/tutorials/polykey-cli/using-environment-variables)** - Master `polykey secrets env` for dynamic environment management.
4747

48-
After mastering these basics, you'll be ready to explore intermediate use-cases such as:
48+
Explore advanced scenarios in subsequent sections, including:
4949

5050
- Managing multiple local nodes
51-
- Linking multiple nodes to a single identity
52-
- Using Polykey's `env` command to inject secrets into your development environment
51+
- Integrating multiple nodes with a single identity
52+
- Injecting secrets directly into your development environments using Polykey’s `env` command
5353

54-
These topics will be covered in more detail in the next section of our documentation, providing you with the tools to leverage Polykey's full potential in more complex operational environments.
54+
This will prepare you to fully exploit Polykey’s capabilities in diverse and complex operational settings.
5555

5656
<DocCardList />
Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,152 @@
1-
# Claiming Digital Identities
1+
# Claiming Digital Identities: Establishing Identity Linkages in Polykey
2+
3+
In Polykey, claiming a digital identity is a crucial step that allows users to establish their identity across various platforms and link these identities to their cryptographic keys. This process involves authenticating with external services, such as GitHub, and claiming ownership of an identity by posting a cryptographic link to a publicly verifiable location.
4+
5+
This tutorial will guide you through the steps to authenticate with GitHub and claim an identity using Polykey, enhancing security and streamlining identity verification, making it easier for other users to discover and trust your nodes.
6+
7+
## Step 1: Authenticate with GitHub
8+
9+
Authentication with a service provider like GitHub is the first step toward claiming your digital identity. This process allows Polykey to interact with GitHub on your behalf and access necessary information to claim your identity.
10+
11+
![GitHub Authentication](/images/github-authentication.png)
12+
13+
_This image provides a demo example of the GitHub authentication process._
14+
15+
### Command Usage
16+
17+
:::info
18+
19+
```bash
20+
polykey identities authenticate <providerId>
21+
```
22+
23+
`<providerId>`: The identifier for the digital identity provider, such as "github".
24+
:::
25+
26+
:::note
27+
Since Polykey currently only supports GitHub as an IdP, this is the command that you will use to start the authentication process.
28+
29+
```bash
30+
polykey identities authenticate github
31+
```
32+
33+
:::
34+
35+
This command begins the authentication process with GitHub. Follow the prompts in your terminal to complete the authentication, which may involve logging into your GitHub account and authorizing Polykey to access your GitHub information via a popup window.
36+
37+
:::tip
38+
The code prompted by the browser will be displayed in your terminal as the user code.
39+
:::
40+
41+
### Lists all authenticated identities across all providers
42+
43+
`polykey identities authenticated` command will output the providerID and corresponding identityID of the authenticated IdP. This is a way to check that you completed the authentication process correctly.
44+
45+
#### Example Usage
46+
47+
```bash
48+
polykey identities authenticated
49+
```
50+
51+
##### Example Output
52+
53+
```bash
54+
providerId github.com
55+
identityId maverick
56+
```
57+
58+
### Technical Use of Permissions
59+
60+
During the authentication process, here's what Polykey requests access to and why:
61+
62+
- **Create Gists:** Polykey creates a gist under your GitHub account containing a cryptographic link. This link is a verifiable method that proves the ownership of your GitHub identity to anyone checking your Polykey gestalt graph.
63+
64+
- **Read All User Profile Data:** This enables Polykey to access your profile details, including your username, followers, and public repository data. This information is used to ensure that the identity you claim corresponds accurately to your public digital footprint, enhancing trust and verification.
65+
66+
- **Access User Email Addresses (read-only):** By accessing the email addresses associated with your account, Polykey can better manage notifications related to your secrets operations.
67+
68+
#### Security and Privacy Considerations
69+
70+
Polykey is committed to maintaining the highest standards of security and privacy. All data accessed is used strictly for the operations mentioned and is not shared with any third parties. Our privacy practices are designed to protect your information and ensure its confidentiality. For more details, please refer to our [privacy policy](https://polykey.com/privacy-policy).
71+
72+
## Step 2: Claim Your Identity
73+
74+
After successfully authenticating with GitHub, you can claim your identity. This involves posting a cryptographic link to a publicly verifiable location, such as a GitHub gist. This link serves as proof of ownership of the identity.
75+
76+
<img src="/images/cryptolink.png" alt="Cryptolink" style={{ width: '70%', height: 'auto' }} />
77+
78+
### Command Usage
79+
80+
_This image provides a demo example of the cryptographic link that is generated._
81+
82+
:::info
83+
84+
- `<providerIdentityId>`: The specific identity identifier from the provider you authenticated with, which you will claim.
85+
86+
- `polykey identities claim` argument for `<providerIdentityID>` = `github.com`+ `:` + `GH username`
87+
88+
:::
89+
90+
Replace `my-gh-username` with your actual GitHub username. This command claims your GitHub identity by posting a cryptographic link to a gist under your GitHub profile.
91+
92+
```bash
93+
polykey identities claim github.com:my-gh-username
94+
```
95+
96+
## Step 3: Verify Your Claim
97+
98+
After claiming your identity, Polykey provides a link to a GitHub gist in your terminal. This is your primary method to verify that your identity has been correctly claimed.
99+
100+
![Claim Id](/images/claim-id.png)
101+
102+
_This image shows a demo example of the link to the gist that was created when claiming the identity which forms a gestalt._
103+
104+
### Primary Verification Method
105+
106+
Check your GH gists. Replace `my-github-username` with your actual gh username and navigate to the url.
107+
108+
```bash
109+
https://gist.github.com/my-github-username
110+
```
111+
112+
This gist contains the cryptographic link confirming that your Polykey identity is correctly linked to your GitHub profile. Viewing this gist ensures your claim was successful and publicly verifiable.
113+
114+
## Understanding Gestalt Graphs
115+
116+
In Polykey, claiming identities creates a **gestalt graph**—a dynamic, interconnected network of your digital identities across various platforms. This graph facilitates the federated identity model, allowing for more robust and streamlined identity verification and management.
117+
118+
![gestalts](/images/gestalts.png)
119+
120+
_This image shows a federated gestalt graph example concept map._
121+
122+
### How Gestalt Graphs Work
123+
124+
Each node within the graph represents an identity or a claim, and edges represent trust relationships or cryptographic verifications. As you claim more identities or add nodes, the graph expands, enhancing its utility by making identity verification straightforward and trust relationships more transparent.
125+
126+
### Claiming Multiple Identities
127+
128+
Polykey enables you to manage your digital presence flexibly by supporting the claiming of multiple identities across different scenarios. Specifically, you can:
129+
130+
- Link one node to several identity providers (IdPs), broadening your digital footprint and verification avenues as more IdPs are supported.
131+
132+
- Claim the same identity provider, such as a GitHub username, across multiple unique nodes you control, consolidating your digital identity while expanding your network's reach.
133+
134+
### Future Plans and IdP Support
135+
136+
Currently, Polykey supports GitHub as an identity provider (IdP). However, we are actively working to expand our support to include a wider range of major IdPs. This expansion will enhance Polykey's accessibility and versatility, accommodating a broader user base. Additionally, organizations will have the option to maintain their own IdPs, allowing for even greater customization and control over identity management within Polykey.
137+
138+
### Benefits of Federated Identities
139+
140+
Using a federated identity model through gestalt graphs offers several benefits:
141+
142+
- **Enhanced Security**: By linking various identity proofs, it strengthens the authenticity and credibility of your digital identity.
143+
- **Simplified Management**: Manage multiple identities through a single interface, reducing complexity and improving user experience.
144+
- **Interoperability:** Easily interact across different platforms and services using a unified identity framework.
145+
146+
Understanding and utilizing gestalt graphs in Polykey not only secures your operations but also significantly simplifies the process of digital identity management.
147+
148+
## Conclusion
149+
150+
Claiming your digital identity in Polykey links your cryptographic operations to external accounts like GitHub, securing your operations and facilitating identity verification by others. This guide details the essential steps for authenticating, claiming, and verifying your identity in Polykey.
151+
152+
In the next section, we will explore additional operations related to digital identity management in Polykey, including discovery of other users, trust management and permissions handling.
Lines changed: 165 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,166 @@
1+
# Discovering Users' Nodes and Managing Access Permissions
12

2-
# Discovering Other Users
3+
In the Polykey network, discovering other users' nodes and managing access permissions is crucial for secure and efficient collaboration. This guide will walk you through the process of finding other users' nodes using their claimed digital identities and setting permissions to manage how these nodes interact with your secrets and vaults.
4+
5+
## Introduction to Node Discovery and Permission Management
6+
7+
Discovering nodes in Polykey involves locating other users within the network who have linked their identities, such as GitHub usernames, to their nodes. Once these nodes are discovered, you can manage access permissions to control how these nodes interact with your shared resources.
8+
9+
This functionality enhances the security of your network by ensuring that only trusted nodes can access sensitive information.
10+
11+
## Discovering Nodes
12+
13+
To begin discovering nodes associated with known identities, you can use the `polykey identities discover` command. This command adds a node or identity to your discovery, facilitating further interactions like sharing vaults or secrets.
14+
15+
### Command Usage
16+
17+
```bash
18+
polykey identities discover <gestaltId>
19+
```
20+
21+
- `<gestaltId>`: This can be either a Node ID or a `Provider ID:Identity ID` combination that specifies the digital identity linked to the node you wish to discover.
22+
23+
#### Example
24+
25+
```bash
26+
polykey identities discover github.com:maverick
27+
```
28+
29+
This command adds the node associated with the GitHub username "maverick" to your discovery queue, allowing you to initiate interactions with this user.
30+
:::note
31+
32+
## Troubleshooting Discovery and Connection Issues
33+
34+
When attempting to discover other users' nodes and manage permissions within Polykey, there are specific requirements and common issues you may encounter. Understanding and addressing these can ensure smoother operations within the network.
35+
36+
### Requirements for Successful Discovery
37+
38+
1. **Active Polykey Agents:** Both users involved in the discovery must have their Polykey agents actively running. This ensures that both nodes are reachable and responsive within the network.
39+
40+
2. **Network Connection:** Both nodes need to be connected to the Polykey network. Currently, both users must be online simultaneously for the discovery process to succeed.
41+
42+
### Common Issues and Solutions
43+
44+
1. **Gestalt Creation:** Ensure that the user you are trying to discover has already created their gestalt. A gestalt is necessary for the identity to be discoverable in the network. Without it, the discovery process will fail.
45+
46+
2. **Symmetric NAT or Restrictive Networks:** Connection issues can arise if one or both users are behind symmetric NATs or other restrictive network setups. These environments can block the necessary network communications for successful node discovery.
47+
48+
- **Solution:** Attempt the discovery process from a network with less restrictive settings, such as home Wi-Fi or a less secure public network, to see if the issue persists.
49+
50+
:::
51+
52+
:::info
53+
54+
### Future Enhancements
55+
56+
Polykey is actively working to enhance the discovery process by implementing features that would allow one-sided connectivity. This means that in the future, users may not need to be online simultaneously. One user could initiate a discovery, akin to sending a friend request, and the other could respond at their convenience, simplifying the process and reducing the dependency on simultaneous network presence.
57+
58+
This section helps users understand the prerequisites for successful node discovery and provides solutions to common issues that might impede the process. By following these guidelines, users can more effectively manage their interactions within the Polykey network.
59+
:::
60+
61+
## GestaltId and Permissions Explained
62+
63+
### GestaltId
64+
65+
The `gestaltId` is a unique identifier that directly links to a node or an identity within the Polykey network. It can take the following forms:
66+
67+
- **Node ID:** Directly references a node within the Polykey network.
68+
69+
- **Provider ID:** Utilizes an identity provider (like GitHub) combined with a specific user identity (like a username).
70+
71+
#### Example Format
72+
73+
- Node ID: `v60g23b4b9g5tq2npc3kpikpalqqdpuvocegdd8bsdj28a1hsp0g0`
74+
- Provider ID: `github.com:maverick`
75+
76+
### Permissions
77+
78+
Permissions in Polykey determine what actions a node or an identity can perform within the network. Here’s a general list of potential permissions that can be managed:
79+
80+
- **Read:** Allows viewing but not modifying.
81+
- **Write:** Allows both viewing and modifying.
82+
- **Execute:** Allows performing specific actions.
83+
- **Notify:** Allows sending notifications about changes or updates.
84+
- **Trust:** Allows a node to be trusted, generally affecting how interactions are secured.
85+
86+
#### Example Command to Set Permissions
87+
88+
```bash
89+
polykey identities allow github.com:maverick read write
90+
```
91+
92+
## Managing Permissions
93+
94+
Once a node is discovered, you can manage permissions to control access to your vaults and secrets. Polykey allows you to set or unset permissions for each discovered node or identity.
95+
96+
### Setting Permissions
97+
98+
To grant specific permissions to a node, use the `polykey identities allow` command:
99+
100+
```bash
101+
polykey identities allow <gestaltId> <permissions>
102+
```
103+
104+
- `<gestaltId>:` The Node ID or `Provider ID:Identity ID` of the node.
105+
- `<permissions>:` The type of permission you want to allow, such as `read`, `write`, or `execute`.
106+
107+
#### Example
108+
109+
```bash
110+
polykey identities allow github.com:maverick read
111+
```
112+
113+
This command grants read permissions to the node associated with the GitHub user "maverick."
114+
115+
### Revoking Permissions
116+
117+
If you need to revoke permissions from a node, you can use the `polykey identities disallow` command:
118+
119+
```bash
120+
polykey identities disallow github.com:maverick read
121+
```
122+
123+
#### Example
124+
125+
```bash
126+
polykey identities disallow github.com:maverick read
127+
```
128+
129+
This command revokes read permissions from the node associated with "maverick."
130+
131+
## Additional Management Features
132+
133+
Polykey also supports inviting nodes to your network, listing all discovered nodes and their permissions, and setting trust levels for more granular control.
134+
135+
### Inviting a Node
136+
137+
To invite another node to join your network and potentially share secrets:
138+
139+
```bash
140+
polykey identities invite <nodeId>
141+
```
142+
143+
### Listing Nodes and Permissions
144+
145+
To view all nodes and their permissions within your network:
146+
147+
```bash
148+
polykey identities list
149+
```
150+
151+
### Trusting and Untrusting Nodes
152+
153+
You can explicitly trust or untrust a node to refine how notifications and access controls are handled:
154+
155+
```bash
156+
polykey identities trust <gestaltId>
157+
polykey identities untrust <gestaltId>
158+
```
159+
160+
## Conclusion
161+
162+
Managing node interactions and user discovery in Polykey is vital for maintaining a secure and efficient network. By carefully managing who can access your nodes and how they can interact with your resources, you enhance the overall security and functionality of your network.
163+
164+
This guide has provided the steps and commands necessary to effectively discover nodes and manage permissions within Polykey.
165+
166+
This addition ensures users understand the significance and usage of `gestaltId` and permissions within the context of discovering and managing nodes in Polykey, providing clear and actionable information for efficient network management.

0 commit comments

Comments
 (0)