Skip to content

LEGLINK-567: expose the vendor's signing key secret id on the facility response - #1793

Merged
arianamihailescu merged 1 commit into
devfrom
LEGLINK-567-facility-vendor-authentication
Aug 5, 2026
Merged

LEGLINK-567: expose the vendor's signing key secret id on the facility response#1793
arianamihailescu merged 1 commit into
devfrom
LEGLINK-567-facility-vendor-authentication

Conversation

@arianamihailescu

@arianamihailescu arianamihailescu commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🛠️ Description of Changes

Expose the vendor's signing key secret id on the facility response - This makes it retrievable by the services that will need it, and stops there.

🧪 Testing Performed

Tested locally

🧑‍🔬 Unit Testing

  • I have written or updated unit tests to cover my changes
  • Coverage: 50.0%

📓 Documentation Updated

Please update any relevant sections in the project documentation that were impacted by the changes in the PR.

Summary by CodeRabbit

  • New Features

    • Facility information now includes a vendor’s signing-key secret ID when configured.
    • Facilities without vendor authentication return no signing-key information.
  • Tests

    • Added integration coverage for configured and missing vendor signing-key scenarios.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The tenant API now retrieves vendor signing-key secret IDs from facility configuration. Facility queries include vendor authentication data. Integration tests cover configured and absent signing-key values.

Changes

Vendor signing-key exposure

Layer / File(s) Summary
Tenant signing-key lookup
DotNet/Shared/Application/Services/ITenantApiService.cs, DotNet/Shared/Application/Services/TenantApiService.cs, DotNet/ServiceTests/IntegrationTests/Census/CensusIntegrationTestFixture.cs
Adds the nullable GetVendorSigningKeySecretId contract, implementation, and null-service test substitute.
Facility vendor projection
DotNet/Tenant/Business/Queries/FacilityQueries.cs
Maps vendor authentication data into facility vendor projections.
Authentication integration coverage
DotNet/ServiceTests/IntegrationTests/Tenant/FacilityVendorAuthenticationTests.cs
Adds integration tests for configured and absent vendor signing-key secret IDs.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: exposing the vendor signing key secret ID on the facility response.
Description check ✅ Passed The description includes all required sections and summarizes the change and local testing, but it leaves unit-test coverage and documentation updates incomplete.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch LEGLINK-567-facility-vendor-authentication

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
DotNet/Shared/Application/Services/TenantApiService.cs (1)

84-89: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add focused tests for GetVendorSigningKeySecretId.

The new public method must return the configured identifier and null when the vendor, authentication settings, or signing key is absent. The supplied integration tests call IFacilityQueries.GetAsync; they do not exercise this TenantApiService method or the no-vendor case. Add small xUnit tests with a mocked HTTP handler through Moq. Do not use live HTTP calls.

As per path instructions, use focused xUnit tests and mocks for external communication.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@DotNet/Shared/Application/Services/TenantApiService.cs` around lines 84 - 89,
Add focused xUnit tests for TenantApiService.GetVendorSigningKeySecretId using a
Moq-backed mocked HTTP handler, without live HTTP calls. Cover returning the
configured SigningKeySecretId and returning null when Vendor, Authentication, or
SigningKeySecretId is absent; ensure the tests exercise TenantApiService rather
than only IFacilityQueries.GetAsync.

Source: Path instructions

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@DotNet/Shared/Application/Services/TenantApiService.cs`:
- Around line 84-89: Add focused xUnit tests for
TenantApiService.GetVendorSigningKeySecretId using a Moq-backed mocked HTTP
handler, without live HTTP calls. Cover returning the configured
SigningKeySecretId and returning null when Vendor, Authentication, or
SigningKeySecretId is absent; ensure the tests exercise TenantApiService rather
than only IFacilityQueries.GetAsync.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 43041242-4234-4d6f-88c1-1cc8180df18c

📥 Commits

Reviewing files that changed from the base of the PR and between 642558b and 3f2f53e.

📒 Files selected for processing (5)
  • DotNet/ServiceTests/IntegrationTests/Census/CensusIntegrationTestFixture.cs
  • DotNet/ServiceTests/IntegrationTests/Tenant/FacilityVendorAuthenticationTests.cs
  • DotNet/Shared/Application/Services/ITenantApiService.cs
  • DotNet/Shared/Application/Services/TenantApiService.cs
  • DotNet/Tenant/Business/Queries/FacilityQueries.cs

@arianamihailescu
arianamihailescu merged commit 1aac4ad into dev Aug 5, 2026
20 checks passed
@arianamihailescu
arianamihailescu deleted the LEGLINK-567-facility-vendor-authentication branch August 5, 2026 21:42
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.

2 participants