Skip to content

Add user-focused permissions documentation under "Using Wassette"#333

Merged
Mossaka merged 6 commits into
mainfrom
copilot/update-permission-system-docs
Oct 8, 2025
Merged

Add user-focused permissions documentation under "Using Wassette"#333
Mossaka merged 6 commits into
mainfrom
copilot/update-permission-system-docs

Conversation

Copilot AI commented Oct 3, 2025

Copy link
Copy Markdown
Contributor
  • Analyze current permission system documentation structure
  • Create new user-focused "Using Wassette" section directory structure
  • Create new docs/using/permissions.md with user-focused how-to content
  • Update docs/SUMMARY.md to add "Using Wassette" section with permissions page
  • Build and verify documentation with mdbook
  • Review content for consistency and clarity
  • Update CHANGELOG with documentation changes
  • Reorder "Granting Permissions" section to prioritize MCP built-in tools
  • Add environment variable visibility note
  • Add policy file management clarification
  • Final review and validation

Summary

This PR addresses the issue about improving the permissions documentation by creating a new user-focused "Permissions" page under a "Using Wassette" section.

Changes Made

  1. New Documentation Structure: Created docs/using/ directory for user-focused guides
  2. User-Focused Permissions Guide: Created comprehensive docs/using/permissions.md with practical how-to content
  3. Updated Documentation Index: Modified docs/SUMMARY.md to add "Using Wassette" section
  4. CHANGELOG Update: Documented the new permissions documentation
  5. Prioritized MCP Built-in Tools: Reordered to recommend using AI agents first
  6. Added Important Notes:
    • Environment variable visibility requirement (wassette secret set or env vars)
    • Policy files are typically auto-managed by Wassette tools

Key Improvements

  • MCP-First Approach: The recommended approach is now to use MCP built-in tools through natural language with AI agents
  • Clear Prioritization:
    1. Using MCP Built-in Tools (Recommended) - Natural language permission requests
    2. Using CLI Commands - For direct management and scripting
    3. Using Policy Files - Auto-managed by Wassette, not typically manual
  • Environment variable note explains how to provide env vars to the server
  • Policy files section clarifies these are managed by Wassette automatically
  • User-centric focus on practical tasks
  • Clear examples for all three approaches
  • Security best practices with good/bad examples
  • Complete troubleshooting guide

The permissions documentation is now clearly separated:

  • User Docs (docs/using/permissions.md): Practical how-to guide
  • Design Docs (docs/design/permission-system.md): Technical architecture details

Screenshots

Environment Variable Note:

Environment Variable Note

Policy Files Clarification:

Policy Files Note

Original prompt

This section details on the original issue you should resolve

<issue_title>Docs: The permission system doc needs some work</issue_title>
<issue_description>It currently reads like a design document, instead of user-side docs.

We should add a new “Permissions” under “Using Wassette.” The user page should avoid internals and focus on tasks and provides How-to topics:. </issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #332

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits October 3, 2025 21:59
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Update permission system documentation for user clarity Add user-focused permissions documentation under "Using Wassette" Oct 3, 2025
Copilot AI requested a review from Mossaka October 3, 2025 22:06
@Mossaka Mossaka marked this pull request as ready for review October 3, 2025 22:19

@Mossaka Mossaka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread docs/using/permissions.md Outdated
Comment on lines +54 to +122
You can grant permissions in two ways:

### Using Policy Files

Create a `policy.yaml` file alongside your component:

```yaml
version: "1.0"
description: "Weather tool permissions"
permissions:
storage:
allow:
- uri: "fs://workspace/**"
access: ["read", "write"]
- uri: "fs://config/app.yaml"
access: ["read"]
network:
allow:
- host: "api.weather.com"
- host: "api.openweathermap.org"
environment:
allow:
- key: "API_KEY"
- key: "WEATHER_API_TOKEN"
```

**Policy file structure:**
- `version`: Policy format version (currently "1.0")
- `description`: Human-readable description
- `permissions`: Permission declarations organized by type
- `storage.allow`: List of file system URIs and access types
- `network.allow`: List of allowed hosts
- `environment.allow`: List of environment variable keys

### Using CLI Commands

Grant permissions at runtime using the `wassette permission grant` command:

**Grant storage access:**
```bash
# Read-only access to a directory
wassette permission grant storage weather-tool fs://workspace/ --access read

# Read and write access
wassette permission grant storage weather-tool fs://workspace/ --access read,write

# Access to a specific file
wassette permission grant storage weather-tool fs://config/app.yaml --access read
```

**Grant network access:**
```bash
# Allow access to a specific host
wassette permission grant network weather-tool api.weather.com

# Allow localhost access
wassette permission grant network weather-tool localhost:8080
```

**Grant environment variable access:**
```bash
# Grant access to an environment variable
wassette permission grant environment-variable weather-tool API_KEY

# Grant access to multiple variables
wassette permission grant environment-variable weather-tool HOME
wassette permission grant environment-variable weather-tool PATH
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the policy file is not a recommended way for granting. You should modify it to use built-in tools and the agent will figure out how to grant permissions. The CLI experience is secondary to that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reordered the "Granting Permissions" section to prioritize MCP built-in tools as the recommended approach. The section now leads with using the AI agent through natural language, followed by CLI commands, then policy files. Added clear "(Recommended)" label and explanation that policy files are secondary to agent-based permission granting.

Changes in commit 004006a3.

…rmissions

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI requested a review from Mossaka October 3, 2025 22:52

@Mossaka Mossaka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot added more comments

Comment thread docs/using/permissions.md
**Available MCP tools:**
- `grant-storage-permission`: Grant file system access
- `grant-network-permission`: Grant network access
- `grant-environment-variable-permission`: Grant environment variable access

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a note that the even after the env var permissions are granted, the server still needs to be able to see those env vars.

One way of doind that is to run wassette secret set to inject secrets into this. Another way is to run the server with the necessasry env vars

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a note after the environment variable permissions section explaining that the server must be able to see those environment variables. The note provides two methods: using wassette secret set <component-id> <key> <value> to inject secrets, or running the server with the necessary environment variables already set.

Changes in commit [SHA will be added after commit].

Comment thread docs/using/permissions.md
Comment on lines +122 to +141
```yaml
version: "1.0"
description: "Weather tool permissions"
permissions:
storage:
allow:
- uri: "fs://workspace/**"
access: ["read", "write"]
- uri: "fs://config/app.yaml"
access: ["read"]
network:
allow:
- host: "api.weather.com"
- host: "api.openweathermap.org"
environment:
allow:
- key: "API_KEY"
- key: "WEATHER_API_TOKEN"
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is not meant to be manually write. It's a file that wassette can manipulate using the grant-* built in tools or CLI.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the "Using Policy Files" section to clarify that policy files are typically managed automatically by Wassette when using the built-in tools or CLI commands, rather than being manually written. The section now states: "Policy files store permissions for components in YAML format. These files are typically managed automatically by Wassette when you use the built-in tools or CLI commands rather than being manually written."

Changes in commit [SHA will be added after commit].

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI requested a review from Mossaka October 3, 2025 23:14
Signed-off-by: Jiaxiao Zhou <duibao55328@gmail.com>
@Mossaka Mossaka merged commit 9821d41 into main Oct 8, 2025
7 checks passed
@Mossaka Mossaka deleted the copilot/update-permission-system-docs branch October 8, 2025 22:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: The permission system doc needs some work

2 participants