[PM-33980] Only verify UseMyItems when claim exists#7278
[PM-33980] Only verify UseMyItems when claim exists#7278amorask-bitwarden merged 2 commits intomainfrom
UseMyItems when claim exists#7278Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7278 +/- ##
==========================================
+ Coverage 57.74% 57.82% +0.07%
==========================================
Files 2043 2043
Lines 89868 89869 +1
Branches 7991 7991
==========================================
+ Hits 51895 51963 +68
+ Misses 36115 36047 -68
- Partials 1858 1859 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
kdenney
left a comment
There was a problem hiding this comment.
This looks correct, but I have one question about improving documentation.
| // check because self-hosted instances may hold license files generated before | ||
| // this claim existed, where GetValue<T> returns the type's default (false), | ||
| // causing a mismatch that disables the org. Future claims MUST follow this | ||
| // same pattern. See PM-33980. |
There was a problem hiding this comment.
❓ @eliykat worked on this readme file recently with detailed instructions for adding new organization abilities and it contains a detailed section for editing this code for self-host licensing support. I am now wondering if we missed something in those instructions that led to this? Do you think the instructions in that readme file need to also be updated to include these new instructions?
There was a problem hiding this comment.
@kdenney This PR updates the documentation to add the requirement for the conditional check on new licensing properties, but I think we're going to have further, more detailed discussions on the potential deprecation of this validation flow altogether with a stronger focus on the JWT. Those will be part of a separate discussion since this change will be a hotfix.
kdenney
left a comment
There was a problem hiding this comment.
Thanks for adding to the readme!
|
* fix(licensing): skip UseMyItems comparison for pre-2026.3.0 license files * docs(licensing): add backward-compatibility guidance to ability flag README (cherry picked from commit c84ac14)
* fix(licensing): skip UseMyItems comparison for pre-2026.3.0 license files * docs(licensing): add backward-compatibility guidance to ability flag README (cherry picked from commit c84ac14)
* fix(licensing): skip UseMyItems comparison for pre-2026.3.0 license files * docs(licensing): add backward-compatibility guidance to ability flag README (cherry picked from commit c84ac14)




🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-33980
📔 Objective
The
2026.3.0release addedUseMyItemsto the license claims factory andVerifyDatacomparison, but self-hosted instances that updated to2026.3.0still hold license files generated before this claim existed. The database migration setsUseMyItems = truefor orgs withUsePolicies = true, but the stale license has noUseMyItemsclaim (defaulting tofalse). WhenLicensingService.ValidateOrganizationsAsync()callsVerifyData, the mismatch causes it to returnfalse, disabling the organization with "Invalid data."This PR wraps the
UseMyItemscomparison in a conditionalHasClaimcheck so that licenses generated before the claim existed skip the comparison entirely. Once the org syncs a fresh license from cloud2026.3.0+, the claim will be present and validated normally.