Skip to content

Docs add permission key guide - #19620

Merged
leecalcote merged 15 commits into
meshery:masterfrom
rishiraj38:docs-add-permission-key-guide
Jul 8, 2026
Merged

leecalcote merged 15 commits into
meshery:masterfrom
rishiraj38:docs-add-permission-key-guide

Conversation

@rishiraj38

@rishiraj38 rishiraj38 commented May 22, 2026 •

Copy link
Copy Markdown
Contributor

Description

This PR updates the Adding a New Permission Key documentation section to align with the new schema-driven dynamic authorization workflow.

What is changing?

  • Authoritative Spreadsheet: Documented that the Google Spreadsheet serves as the single source of truth for all permission keys.
  • Schemas Automation Workflow: Linked the generate-artifacts-from-schemas.yml workflow which automates importing from the spreadsheet, updating permissions.csv, and generating Go and TypeScript files.
  • Direct UI Consumption: Replaced the guide on manual permission_constants.ts mappings. Instructed developers to directly import Keys from @meshery/schemas/permissions in components and perform checks using the overloaded CAN(Keys.SomeKey) signature.
  • Pre-verified Build: Validated formatting via local Hugo build.

This PR fixes #19568

Signed commits

  • Yes, I signed my commits.

@rishiraj38
rishiraj38 marked this pull request as draft May 22, 2026 17:31
@github-actions github-actions Bot added the area/docs Documentation update needed label May 22, 2026

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces a comprehensive guide for adding new permission keys to the extensible authorization system, covering the entire workflow from UUID generation to integration in Go and TypeScript. The review feedback identifies a semantic inconsistency in the Go code examples, suggesting that "Forbidden" be used instead of "Unauthorized" when paired with the 403 status code.

@github-actions

github-actions Bot commented May 22, 2026 •

Copy link
Copy Markdown
Contributor
PR Preview Action v1.6.3
Preview removed because the pull request was closed.
2026-07-08 22:42 UTC

@hamza-mohd

Copy link
Copy Markdown
Member

Great docs addition. Consider including a minimal working example showing the permission key in context so contributors can quickly see it in action.

@hamza-mohd

Copy link
Copy Markdown
Member

Helpful addition. Could you include a short manifest example so readers see the full format end-to-end?

@rishiraj38

Copy link
Copy Markdown
Contributor Author

Helpful addition. Could you include a short manifest example so readers see the full format end-to-end?

Thanks for the suggestion! I’ve added a short manifest example to show the complete format end-to-end.

@rishiraj38

Copy link
Copy Markdown
Contributor Author

@aabidsofi19 Please take a look when you get a chance.

@rishiraj38
rishiraj38 marked this pull request as ready for review May 23, 2026 18:35

Each permission key requires a globally unique UUID v4:

{{< code code=`uuidgen | tr '[:upper:]' '[:lower:]'` >}}

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.

Do we have a Make command for generating this UUID? I searched around but couldn't find one. If we do have a dedicated command, it might be better to reference that instead of using the shell command directly.

@github-actions

Copy link
Copy Markdown
Contributor

❌ Docs preview build failed for Build and Preview Docs.
Please review the workflow logs for remediation details.

rishiraj38 and others added 8 commits June 12, 2026 18:09
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Rishi Raj <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Rishi Raj <[email protected]>
@rishiraj38
rishiraj38 force-pushed the docs-add-permission-key-guide branch from 64f5f25 to ae654d6 Compare June 12, 2026 12:41
Copilot AI review requested due to automatic review settings June 24, 2026 12:39

This comment was marked as outdated.

@rishiraj38
rishiraj38 marked this pull request as draft June 29, 2026 14:36
@rishiraj38
rishiraj38 marked this pull request as ready for review July 3, 2026 17:03
Copilot AI review requested due to automatic review settings July 3, 2026 17:03

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

Signed-off-by: Rishi Raj <[email protected]>
@rishiraj38
rishiraj38 requested a review from YASHMAHAKAL July 4, 2026 13:29
Copilot AI review requested due to automatic review settings July 8, 2026 18:23

Copilot AI 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.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

* **Local Provider**: Set to `TRUE` if this key should be seeded for the Local Provider database.

##### Step 3: Run the Schema Sync & Generation Workflow
Once added to the spreadsheet, the GitHub Actions workflow [`generate-artifacts-from-schemas.yml`](https://github.com/meshery/schemas/blob/master/.github/workflows/generate-artifacts-from-schemas.yml) in `meshery/schemas` runs automatically on a daily schedule (and can also be triggered manually) to sync the spreadsheet keys to the local [`build/permissions.csv`](https://github.com/meshery/schemas/blob/master/build/permissions.csv).
Comment on lines +104 to +106
1. Run `make ui-lint` to verify that there are no formatting or typescript errors.
2. Restart Meshery Server (or reset database settings) to seed the local provider with the new key.
3. Login and verify that your UI component gates correctly.
@leecalcote
leecalcote merged commit 67fb480 into meshery:master Jul 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Documentation update needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs] Missing documentation on how to create a new permission key

6 participants