[PM-39976] Scaffold PAM lease endpoints#7925
Conversation
Adds the /leases Minimal API group (active, history, mine, revoke, extend) with an intentionally unimplemented handler, following the access-rule and access-request scaffolds. The response models are already on main; the two new request DTOs (revoke, extension) carry the remaining wire contract. Contract tests lock the routes, names, methods, and return types the generated spec is built from.
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE Reviewed the PAM Code Review Details
|
The validation filter only enforces attributed constraints, and only those surface in the generated OpenAPI schema: Range(1, max) on DurationSeconds and Required on Reason, matching how AccessDecisionRequestModel encodes its contract. The rule-specific duration ceiling stays server-side.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #7925 +/- ##
==========================================
- Coverage 61.33% 61.32% -0.01%
==========================================
Files 2242 2246 +4
Lines 98630 98661 +31
Branches 8911 8911
==========================================
+ Hits 60490 60508 +18
- Misses 36004 36017 +13
Partials 2136 2136 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-39976
📔 Objective
Adds the
/leasesMinimal API group (active, history, mine, revoke, extend) with an intentionally unimplemented handler, following the access-rule and access-request scaffolds.The response models are already on main; the two new request DTOs (revoke, extension) carry the remaining wire contract. Contract tests lock the routes, names, methods, and return types the generated spec is built from.