Skip to content

Commit 2e30bca

Browse files
docs: enhance node discovery and permissions management
- Detailed explanations of gestaltId and permissions within the 'Discovering Users' Nodes and Managing Access Permissions' section. - Added a conclusion section to the discovery tutorial. - Included a troubleshooting section for node discovery issues.
1 parent 2b3b359 commit 2e30bca

File tree

1 file changed

+165
-0
lines changed

1 file changed

+165
-0
lines changed
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,166 @@
11
# Discovering Users' Nodes and Managing Access Permissions
2+
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)