Skip to content

[Blog] Add post on permission key migration and PermissionShield integration - #2850

Open
rishiraj38 wants to merge 4 commits into
meshery:masterfrom
rishiraj38:blog/permission-key-migration
Open

rishiraj38 wants to merge 4 commits into
meshery:masterfrom
rishiraj38:blog/permission-key-migration

Conversation

@rishiraj38

@rishiraj38 rishiraj38 commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds a new blog post titled "From 110 Hardcoded UUIDs to Zero: How Meshery's Permission System Became Self-Updating" to collections/_posts/2026/08/02/.

This post details the end-to-end refactoring of Meshery's UI authorization system across three key areas:

  1. Eliminating Hardcoded UUIDs: Moving from a 449-line file containing 110 hardcoded permission UUIDs to auto-generated, compile-time validated keys from @meshery/schemas.
  2. PermissionShield & User Context: Solving the disabled-feature UX gap by integrating Sistent's PermissionProvider and PermissionShield, providing users with clear tooltips showing missing permissions, role context, and organizational guidance.
  3. Automated Pipeline: Connecting the UI directly to the existing Google Spreadsheet → GitHub Actions workflow → keys.csv → @meshery/schemas pipeline for zero-manual-maintenance permission updates.

Changes Included

  • Added blog post at collections/_posts/2026/08/02/2026-08-02-refactoring-authorization-at-scale-permission-key-migration.md
  • Categorized under security, architecture, extensibility
  • Included author metadata, redirect path, and inline references/links to relevant documentation and repositories

Verification

  • Verified post frontmatter adheres to meshery.io Jekyll post structure
  • Validated markdown formatting and hyperlink structure

Signed commits

  • Yes, I signed my commits.

Summary by CodeRabbit

  • Documentation
    • Added an article detailing the migration from manually maintained permission identifiers to generated schema keys.
    • Documents declarative permission checks, contextual disabled-state guidance, runtime permission hooks, and permission-aware navigation.
    • Includes authorization testing practices, migration metrics, and lessons learned from scaling permission management.

@netlify

netlify Bot commented Aug 2, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for mesheryio-preview ready!

Name Link
🔨 Latest commit 24ba8de
🔍 Latest deploy log https://app.netlify.com/projects/mesheryio-preview/deploys/6a6eeda7b9d26000086af67d
😎 Deploy Preview https://deploy-preview-2850--mesheryio-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@rishiraj38, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 32 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 83834e6d-022c-40c1-a73f-fbfdce1f4091

📥 Commits

Reviewing files that changed from the base of the PR and between df1252a and 24ba8de.

📒 Files selected for processing (1)
  • collections/_posts/2026/08/02/2026-08-02-refactoring-authorization-at-scale-permission-key-migration.md
📝 Walkthrough

Walkthrough

The pull request adds a technical article about Meshery’s migration from handwritten permission UUIDs to generated schema keys. It documents provider integration, declarative UI permission handling, contextual feedback, migration workflows, tests, metrics, and conclusions.

Changes

Authorization migration documentation

Layer / File(s) Summary
Legacy authorization model
collections/_posts/2026/08/02/2026-08-02-refactoring-authorization-at-scale-permission-key-migration.md
Documents handwritten UUIDs, duplicated permission data, silent failures, and limited disabled-control feedback.
Schema-driven authorization integration
collections/_posts/2026/08/02/2026-08/02/2026-08-02-refactoring-authorization-at-scale-permission-key-migration.md
Describes generated permission keys, PermissionProvider, PermissionInfo, useKindPermission, permission-aware components, and navigator integration.
Migration workflow and validation
collections/_posts/2026/08/02/2026-08-02-refactoring-authorization-at-scale-permission-key-migration.md
Covers schema generation, compile-time validation, authorization tests, migration metrics, and conclusions.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the blog post and its two main topics: permission key migration and PermissionShield integration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 2, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for PR #2850 removed.

This PR preview was automatically pruned because we keep only the 6 most recently updated previews on GitHub Pages to stay within deployment size limits.

If needed, push a new commit to this PR to generate a fresh preview.

@coderabbitai coderabbitai 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.

Actionable comments posted: 7

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@collections/_posts/2026/08/02/2026-08-02-refactoring-authorization-at-scale-permission-key-migration.md`:
- Line 332: Update the author metadata sentence beginning “Rishi Raj is” to
hyphenate the compound modifier as “open-source contributor.”
- Around line 143-153: Update the before-and-after example so both snippets use
the same corresponding workspace edit permission: align the CAN check in the
“Before” snippet with Keys.WorkspaceManagementEditEnvironment used by the
“After” snippet, preserving the migration comparison.
- Around line 287-296: Declare and assign the popup button element to btn using
the existing screen.getByTestId lookup before asserting or calling
user.click(btn) in the “respects the permissionKey prop” test.
- Around line 250-267: Update the pipeline diagram’s opening code fence in the
authorization documentation to specify the text language, changing the bare
fence to a text-labeled fence while leaving the diagram content unchanged.
- Around line 122-126: Update the userName construction in permissionUserContext
to filter out missing firstName and lastName values before joining them, then
fall back to loggedInUser?.email when no profile name is present; keep the
existing orgName, roleNames, and memo dependencies unchanged.
- Around line 113-115: Revise the compile-time validation claim to state that
TypeScript verifies only the existence and shape of each Keys.* reference, not
the correctness of manually mapped permission IDs, actions, or scopes. Do not
claim full mapping validation unless an executable check against generated
permission metadata is added.
- Around line 246-271: Update the “Pipeline, End-to-End” section to reflect that
the workflow commits only server/permissions/keys.csv, while schema publication
and the versioned `@meshery/schemas` dependency update occur separately before the
UI rebuild consumes new permission keys. Either document those release and
rebuild steps explicitly or revise the claims about immediate imports and
TypeScript compile errors to match the actual propagation process.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e98646aa-ac2f-47e7-96a2-8ca92ba6f68a

📥 Commits

Reviewing files that changed from the base of the PR and between 6d33849 and 5f30552.

📒 Files selected for processing (1)
  • collections/_posts/2026/08/02/2026-08-02-refactoring-authorization-at-scale-permission-key-migration.md

@rishiraj38
rishiraj38 force-pushed the blog/permission-key-migration branch from df1252a to 24ba8de Compare August 2, 2026 07:11
@rishiraj38

Copy link
Copy Markdown
Contributor Author

Here's a good starting point, @Maanvi212006. Thanks for showing interest!

Please read this blog once, and if you have any questions, feel free to ask me. I think you already have a bit of context on permission keys since we have spoken about this topic before.

@rishiraj38
rishiraj38 requested a review from aabidsofi19 August 2, 2026 09:23
@miacycle

Copy link
Copy Markdown
Member

This is a good item to add to the weekly Websites meeting agenda (https://meet.meshery.io/websites-minutes). You can add this item in the doc, attend, and present it. Meeting details can be found at https://meshery.io/calendar.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants