Repository navigation
Docs add permission key guide - #19620
Conversation
There was a problem hiding this comment.
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.
|
|
Great docs addition. Consider including a minimal working example showing the permission key in context so contributors can quickly see it in action. |
|
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. |
|
@aabidsofi19 Please take a look when you get a chance. |
|
|
||
| Each permission key requires a globally unique UUID v4: | ||
|
|
||
| {{< code code=`uuidgen | tr '[:upper:]' '[:lower:]'` >}} |
There was a problem hiding this comment.
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.
|
❌ Docs preview build failed for |
Signed-off-by: Rishi Raj <[email protected]>
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]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Rishi Raj <[email protected]>
Signed-off-by: Rishi Raj <[email protected]>
Signed-off-by: Rishi Raj <[email protected]>
Signed-off-by: Rishi Raj <[email protected]>
Signed-off-by: Rishi Raj <[email protected]>
64f5f25 to
ae654d6
Compare
Signed-off-by: Rishi Raj <[email protected]>
Signed-off-by: Rishi Raj <[email protected]>
Signed-off-by: Rishi Raj <[email protected]>
| * **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). |
| 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. |
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?
generate-artifacts-from-schemas.ymlworkflow which automates importing from the spreadsheet, updatingpermissions.csv, and generating Go and TypeScript files.permission_constants.tsmappings. Instructed developers to directly importKeysfrom@meshery/schemas/permissionsin components and perform checks using the overloadedCAN(Keys.SomeKey)signature.This PR fixes #19568
Signed commits