Skip to content

docs: refresh permission key form and drop removed app.admin.users config - #1901

Merged
rohilsurana merged 3 commits into
mainfrom
docs/refresh-permission-key-and-boot-config
Aug 24, 2026
Merged

docs: refresh permission key form and drop removed app.admin.users config#1901
rohilsurana merged 3 commits into
mainfrom
docs/refresh-permission-key-and-boot-config

Conversation

@rohilsurana

Copy link
Copy Markdown
Member

What

Refresh the docs that fell behind recent changes to permissions and the boot config. Two themes, one commit each.

Permission key form and reconcile kinds

  • authz/permission.mdx: the "Custom Permissions" section taught the old name + namespace create model, which is no longer accepted. Rewrote it around the key (service.resource.verb), replaced the name/namespace sample table with a key table, swapped the link to the removed resource-config testdata for a kind: Permission desired-state example, and reframed the slug note (dots become underscores).
  • authz/policy.mdx: removed the description of the boot-time custom-permission loader and its config.yaml rule-set link. Custom permissions are now created through reconcile or the admin API.
  • reference/cli.mdx: the export and reconcile "supported kinds" lists showed only 5 kinds. Added MetaSchema, BillingProduct, and BillingPlan, and noted that a billing product or plan cannot be deleted through the API. This now matches the CLI help in cmd/reconcile.go.
  • rfcs/0001-declarative-reconcile.md: the summary sentence listed 5 kinds; added the other three. Added MetaSchema to the value node in the diagram. Removed "Billing plans as a kind" from Future work since it shipped.

Removed app.admin.users config

The server no longer reads app.admin.users (superuser promotion from a config list is gone; the bootstrap service account replaced it). Updated the sample config and the config reference to use admin.bootstrap (client_id / client_secret) instead:

  • configurations.mdx and reference/configurations.mdx: replaced the admin.users block with the admin.bootstrap block, updated the config-reference table row, and dropped a stale "resource config cache refreshed" line from the sample startup log.
  • basics.mdx: same block replacement, and the field summary line.

Docs only. No code change.

@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Summary by CodeRabbit

  • Documentation
    • Updated custom permission guidance to use service.resource.verb keys and supported creation workflows.
    • Documented service-account administrator bootstrapping, credential rotation, and disabling configuration.
    • Added CLI guidance for exporting and reconciling billing products, billing plans, and metadata schemas.
    • Expanded billing reconciliation behavior, lifecycle rules, and constraints.
    • Updated policy and desired-state examples to reflect current workflows.

Walkthrough

The documentation updates revise custom permission management, replace email-based admin promotion with service account bootstrapping, and document MetaSchema, BillingProduct, and BillingPlan support in export, reconcile, and the declarative reconciliation RFC.

Changes

Custom permission documentation

Layer / File(s) Summary
Custom permission workflow
docs/content/docs/authz/permission.mdx, docs/content/docs/authz/policy.mdx
Custom permissions use service.resource.verb keys. Documentation now describes desired-state reconciliation or the CreatePermission admin API instead of server configuration.

Admin bootstrap configuration

Layer / File(s) Summary
Bootstrap service account configuration
docs/content/docs/basics.mdx, docs/content/docs/configurations.mdx, docs/content/docs/reference/configurations.mdx
The admin.users promotion list is replaced by admin.bootstrap.client_id and client_secret. The documentation covers startup promotion, secret rotation, Basic authentication, and disabling bootstrap with empty values. An obsolete log entry was removed.

Declarative reconciliation kinds

Layer / File(s) Summary
Reconciliation kind contracts
docs/rfcs/0001-declarative-reconcile.md
The RFC adds MetaSchema, BillingProduct, and BillingPlan, including billing lifecycle and deletion behavior.
CLI reconciliation support
docs/content/docs/reference/cli.mdx
CLI documentation adds the new kinds to export and reconcile, documents metadata schema reset behavior, and states that billing products and plans cannot be deleted through the API.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🟡 Moderate · up to 73158

The updated documentation still omits required admin.bootstrap validation and contains two smaller inaccuracies about custom permissions and MetaSchema resets, which could mislead users into invalid configuration or incorrect reconciliation expectations. Merge should wait until these documentation contracts are corrected or explicitly accepted.

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
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.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@vercel

vercel Bot commented Aug 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview Aug 24, 2026 7:35am

@coveralls

coveralls commented Aug 21, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 32702111414

Warning

Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes.
Quick fix: rebase this PR. Learn more →

Coverage increased (+0.08%) to 48.886%

Details

  • Coverage increased (+0.08%) from the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 40034
Covered Lines: 19571
Line Coverage: 48.89%
Coverage Strength: 15.76 hits per line

💛 - Coveralls

@rohilsurana
rohilsurana marked this pull request as ready for review August 24, 2026 07:34

@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: 3


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 9b037ce0-5807-4494-a740-f682a67928d2

📥 Commits

Reviewing files that changed from the base of the PR and between 670a8fe and 7315873.

📒 Files selected for processing (7)
  • docs/content/docs/authz/permission.mdx
  • docs/content/docs/authz/policy.mdx
  • docs/content/docs/basics.mdx
  • docs/content/docs/configurations.mdx
  • docs/content/docs/reference/cli.mdx
  • docs/content/docs/reference/configurations.mdx
  • docs/rfcs/0001-declarative-reconcile.md

Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review.

can be configured in the [config.yaml](https://github.com/raystack/frontier/blob/7fca56ef567791bf4ea1280aa3f9b4ae997b1bf5/config/sample.config.yaml#L29)
file. Same is also exposed in the [Frontier API](../apis/admin-service-create-permission.api.mdx) to create
custom permissions on a project resource.
hardcoded in the schema, but Frontier allows custom permission set on Project resources. Custom permissions are managed through the [reconcile flow](../reconcile.md) (a `kind: Permission` desired-state file) or the [CreatePermission admin API](../apis/admin-service-create-permission). Creating one merges it into the SpiceDB schema, so the permission is ready to use in roles right away. The older way of declaring them in the server config file has been removed.

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Correct the documented scope of custom permissions.

This sentence limits custom permissions to Project resources. docs/content/docs/authz/permission.mdx documents potato.cart.*, and internal/reconcile/permission_reconciler_test.go reconciles compute.order.get. Replace the Project-specific wording with a scope-neutral statement.

Proposed wording
- hardcoded in the schema, but Frontier allows custom permission set on Project resources.
+ hardcoded in the schema, and Frontier also supports custom permissions.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
hardcoded in the schema, but Frontier allows custom permission set on Project resources. Custom permissions are managed through the [reconcile flow](../reconcile.md) (a `kind: Permission` desired-state file) or the [CreatePermission admin API](../apis/admin-service-create-permission). Creating one merges it into the SpiceDB schema, so the permission is ready to use in roles right away. The older way of declaring them in the server config file has been removed.
hardcoded in the schema, and Frontier also supports custom permissions. Custom permissions are managed through the [reconcile flow](../reconcile.md) (a `kind: Permission` desired-state file) or the [CreatePermission admin API](../apis/admin-service-create-permission). Creating one merges it into the SpiceDB schema, so the permission is ready to use in roles right away. The older way of declaring them in the server config file has been removed.

Comment on lines +53 to +59
# bootstrap seeds a superuser service account from config. Automation such as
# the GitOps reconcile flow logs in as it, so there is always a superuser
# without needing an existing one. Log in with:
# Authorization: Basic base64(client_id:client_secret).
bootstrap:
client_id: ""
client_secret: ""

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.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Document the complete admin.bootstrap contract.

The bootstrap implementation disables the feature only when both fields are empty. Otherwise, it requires both fields and validates client_id as a UUID. The documentation omits these constraints, and the reference table marks the fields independently optional.

  • docs/content/docs/basics.mdx#L53-L59: document the UUID and paired-field requirements.
  • docs/content/docs/configurations.mdx#L150-L158: document the UUID and paired-field requirements.
  • docs/content/docs/reference/configurations.mdx#L123-L131: document the UUID and paired-field requirements.
  • docs/content/docs/reference/configurations.mdx#L277-L278: mark the fields as jointly required when bootstrap is enabled.
📍 Affects 3 files
  • docs/content/docs/basics.mdx#L53-L59 (this comment)
  • docs/content/docs/configurations.mdx#L150-L158
  • docs/content/docs/reference/configurations.mdx#L123-L131
  • docs/content/docs/reference/configurations.mdx#L277-L278

Comment on lines +255 to +256
plans and the products they bundle), and `MetaSchema` (metadata validation
schemas, where a schema left out resets to its shipped default).

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.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Clarify which MetaSchema omission resets the schema.

The phrase “a schema left out” suggests that omitting the schema field from an entry resets it. internal/reconcile/metaschema.go, Lines 104-126, rejects such an entry because schema is required. The reset applies when the built-in MetaSchema entry is omitted entirely, as documented in docs/rfcs/0001-declarative-reconcile.md, Lines 235-239.

Rewrite this as “a built-in MetaSchema entry left out resets to its shipped default.”

🧰 Tools
🪛 LanguageTool

[style] ~256-~256: To strengthen your wording, consider replacing the phrasal verb “leave out”.
Context: ...data validation schemas, where a schema left out resets to its shipped default). Deletin...

(OMIT_EXCLUDE)

@rohilsurana
rohilsurana merged commit 45631e7 into main Aug 24, 2026
8 checks passed
@rohilsurana
rohilsurana deleted the docs/refresh-permission-key-and-boot-config branch August 24, 2026 08:34
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.

3 participants