[PM-42473] Use SSRF protected HttpClient in Teams service - #8334
[PM-42473] Use SSRF protected HttpClient in Teams service#8334lastbestdev wants to merge 6 commits into
Conversation
🤖 Bitwarden Claude Code ReviewOverall Assessment: APPROVE This PR routes Code Review Details
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8334 +/- ##
==========================================
- Coverage 64.03% 63.98% -0.05%
==========================================
Files 2473 2471 -2
Lines 106017 105809 -208
Branches 9613 9595 -18
==========================================
- Hits 67886 67703 -183
+ Misses 35771 35756 -15
+ Partials 2360 2350 -10 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| [HttpPost("")] | ||
| public async Task<ActionResult<OrganizationIntegrationResponseModel>> CreateAsync(Guid organizationId, [FromBody] OrganizationIntegrationRequestModel model) | ||
| { | ||
| if (!ModelState.IsValid) |
There was a problem hiding this comment.
This check is removed because it is redundant. .NET web API projects automatically run model validation logic when implemented (i.e. model implements IValidatableObject)
Therefore, the UpdateAsync method is actually running the validation logic as we expect, as well.
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-42473
📔 Objective
The TeamsService internally creates a ConnectorClient that it uses to send messages to MS Teams channels. This ConnectorClient uses its own HttpClient when one is not provided, which did not use the SSRF protections that are applied to our server's custom HttpClient. This updates the TeamsService to provide the correct HttpClient with SSRF protections.
📸 Screenshots
N/A