[PM-32608] docs: document licensing system design choices and constraints#7811
[PM-32608] docs: document licensing system design choices and constraints#7811cyprain-okeke wants to merge 3 commits into
Conversation
Add a Licensing system README beside the licensing code documenting the "why" and the constraints behind self-hosted licensing: the cloud-signs / self-host-verifies-offline model, the coexisting legacy property-based and modern JWT claims-based formats, the backwards-compatibility constraints (version-gating, one-behind file version, the PM-33980 HasClaim trap), and the known design tensions for the licensing refactor (PM-32220). Cross-link bidirectionally with the Organization Ability guide so the "how-to" (its Self-host licensing section) and the "why" (this README) are discoverable from each other. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bitwarden Claude Code ReviewOverall Assessment: APPROVE Documentation-only change adding Code Review DetailsNo findings. The document is well-grounded in code, intentionally avoids restating drift-prone constants ( |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7811 +/- ##
==========================================
- Coverage 61.20% 61.19% -0.02%
==========================================
Files 2182 2182
Lines 97109 97109
Branches 8763 8763
==========================================
- Hits 59432 59421 -11
- Misses 35564 35575 +11
Partials 2113 2113 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



🎟️ Tracking
Resolves PM-32608 (spike under PM-32220, Organization and User License Refactor Effort).
📔 Objective
PR #6970 documented the "how" of adding a plan-gated organization ability, including the license step. This spike fills the gap it left: the "why" and the constraints the licensing system must operate within.
Adds
src/Core/Billing/Licenses/README.md— a design/constraints reference covering:CurrentLicenseFileVersionis held one behind the max accepted version, the PM-33980HasClaimtrap for new claims, offline/time-boxed validation with no revocation, and the many coordinated edits a single new field requires.#nullable disable).Discoverability: the two docs now cross-link bidirectionally — the how-to's "Self-host licensing" section points to this doc for the rationale, and this doc points back for the step-by-step.
Note on the file move: the OrganizationAbility how-to README added in PR #6970 (previously at
src/Core/AdminConsole/OrganizationFeatures/OrganizationAbility/README.md) has been relocated tosrc/Core/Billing/Licenses/OrganizationAbility-README.mdso the "how" and the "why" sit beside each other and beside the licensing code. Verified no remaining references to the old path. Flagging for AdminConsole reviewers since this moves a doc out of their tree.📸 Screenshots
N/A — documentation only.