fix: Prevent attr update when external pdp is down#39978
fix: Prevent attr update when external pdp is down#39978KevLehman merged 1 commit intofeat/externalpdpfrom
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThe changes implement fail-closed behavior for PDP (Policy Decision Point) unavailability when updating room ABAC attributes. A new error class and availability check method were added to the ABAC service, ensuring room attribute mutation operations verify PDP health before proceeding. The VirtruPDP implementation was updated to remove a redundant pre-check that conflicted with this behavior. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant ABAC as ABAC Service
participant PDP as PDP Health Check
participant Response
Client->>ABAC: POST /api/v1/abac/rooms/:roomId/attributes/:attrKey
activate ABAC
ABAC->>PDP: isAvailable()
activate PDP
PDP-->>ABAC: false (unavailable)
deactivate PDP
ABAC->>ABAC: throw PdpUnavailableError
deactivate ABAC
ABAC->>Response: 400 Bad Request
activate Response
Response-->>Client: { success: false, error: 'error-pdp-unavailable' }
deactivate Response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Suggested labels
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. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feat/externalpdp #39978 +/- ##
====================================================
- Coverage 70.34% 70.31% -0.03%
====================================================
Files 3247 3247
Lines 115559 115568 +9
Branches 21064 20994 -70
====================================================
- Hits 81286 81261 -25
- Misses 32207 32244 +37
+ Partials 2066 2063 -3
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Proposed changes (including videos or screenshots)
Issue(s)
https://rocketchat.atlassian.net/browse/CORE-2021
Steps to test or reproduce
Further comments
Summary by CodeRabbit
Bug Fixes
Tests