Skip to content

Conversation

@dereknance
Copy link
Contributor

@dereknance dereknance commented Jan 23, 2026

🎟️ Tracking

PM-29144

📔 Objective

This PR adds the new config from #6880 to the /api/config endpoint so clients may learn if the server requires extra work to establish a connection.

endpoint payload comparison

Without ssoCookieVendor

The communication property is present, but null.

{
  "version": "2026.1.0",
  "gitHash": "f9c0cec8",
  "server": null,
  "environment": {
    "cloudRegion": null,
    "vault": "https://localhost:8080",
    "api": "http://localhost:4000",
    "identity": "http://localhost:33656",
    "notifications": "http://localhost:61840",
    "sso": "http://localhost:51822"
  },
  "featureStates": {
    "web-push": false
  },
  "push": {
    "pushTechnology": 0,
    "vapidPublicKey": null
  },
  "communication": null,
  "settings": {
    "disableUserRegistration": false
  },
  "object": "config"
}

With ssoCookieVendor

The communication property is present and includes the additional required properties for that type.

{
  "version": "2026.1.0",
  "gitHash": "f9c0cec8",
  "server": null,
  "environment": {
    "cloudRegion": null,
    "vault": "https://localhost:8080",
    "api": "http://localhost:4000",
    "identity": "http://localhost:33656",
    "notifications": "http://localhost:61840",
    "sso": "http://localhost:51822"
  },
  "featureStates": {
    "web-push": false
  },
  "push": {
    "pushTechnology": 0,
    "vapidPublicKey": null
  },
  "communication": {
    "type": "ssoCookieVendor",
    "idpLoginUrl": "",
    "cookieName": "",
    "cookieDomain": ""
  },
  "settings": {
    "disableUserRegistration": false
  },
  "object": "config"
}

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • ❓ (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • ❌ (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

@dereknance dereknance added the ai-review Request a Claude code review label Jan 23, 2026
@claude
Copy link
Contributor

claude bot commented Jan 23, 2026

Claude finished @dereknance's task in 1m 21s —— View job


Code Review: PM-29144 Add server communication config to /api/config

Status: Reviewed

Summary

This PR exposes server communication configuration through the /api/config endpoint, allowing clients to discover if additional bootstrapping (such as SSO cookie vending) is required. The implementation correctly builds upon the settings infrastructure introduced in PR #6880.

Findings

Severity Finding Location
⚠️ IMPORTANT Missing unit tests for CommunicationSettings.Build() logic ConfigResponseModel.cs

Analysis

What this PR does well:

  • Clean integration with existing ConfigResponseModel structure
  • Proper null safety with null-conditional operators
  • Case-insensitive bootstrap type matching
  • Graceful handling of unknown/unconfigured bootstrap types (returns null)
  • Configuration exposed is non-sensitive (URLs, cookie names/domains for client bootstrapping)

Security Assessment:
The configuration values exposed (IdpLoginUrl, CookieName, CookieDomain) are appropriate for an unauthenticated endpoint as they contain no secrets and are required for clients to properly bootstrap their connection.


Reviewed by Claude via Bitwarden Code Review

@github-actions
Copy link
Contributor

github-actions bot commented Jan 23, 2026

Logo
Checkmarx One – Scan Summary & Details1539f2e9-7013-466a-a33a-3ffe56971c03

New Issues (4)

Checkmarx found the following issues in this Pull Request

# Severity Issue Source File / Package Checkmarx Insight
1 MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1178
detailsMethod at line 1178 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector
2 MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1062
detailsMethod at line 1062 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector
3 MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1527
detailsMethod at line 1527 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector
4 MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 1403
detailsMethod at line 1403 of /src/Api/Vault/Controllers/CiphersController.cs gets a parameter from a user request from id. This parameter value flows ...
Attack Vector
Fixed Issues (1)

Great job! The following issues were fixed in this Pull Request

Severity Issue Source File / Package
MEDIUM CSRF /src/Api/Vault/Controllers/CiphersController.cs: 293

@dereknance dereknance removed the ai-review Request a Claude code review label Jan 23, 2026
@codecov
Copy link

codecov bot commented Jan 23, 2026

Codecov Report

❌ Patch coverage is 41.66667% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.10%. Comparing base (866ba66) to head (8fa323b).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
src/Api/Models/Response/ConfigResponseModel.cs 41.66% 12 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6892      +/-   ##
==========================================
+ Coverage   56.07%   56.10%   +0.02%     
==========================================
  Files        1968     1968              
  Lines       86927    87027     +100     
  Branches     7742     7753      +11     
==========================================
+ Hits        48744    48825      +81     
- Misses      36383    36392       +9     
- Partials     1800     1810      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dereknance dereknance force-pushed the pm-29144-communication-in-config-api branch from 8c8e2b0 to d0398e4 Compare January 23, 2026 22:37
@dereknance dereknance requested review from a team and addisonbeck January 23, 2026 22:44
@dereknance dereknance marked this pull request as ready for review January 23, 2026 22:44
addisonbeck
addisonbeck previously approved these changes Jan 26, 2026
@dereknance
Copy link
Contributor Author

While writing up tests for QA, I realized the shape of the config response was wrong. So now the response contains communication.bootstrap like it's supposed to.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants