LNK-4709: Update Launch Settings and .env file - #1375
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughConfiguration and launch settings for multiple .NET services are updated to align with docker-compose specifications. Changes include: new or modified launch profiles with updated environment variables (Kafka, Redis, database connections, telemetry endpoints), Docker profile restructuring, removal of IISExpress profiles, and addition of blob storage container name mappings in .env. Cache configuration in appsettings.Docker.json shifts from a boolean toggle to an explicit type selection. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@DotNet/Account/appsettings.Docker.json`:
- Around line 18-20: Update documentation to reflect the config change from the
boolean Cache:Enabled to the string Cache:Type used by the application (see
Program.cs validation around cache handling); in docs/docs/config/dotnet.mdx
replace the old Cache__Enabled entry with a Cache__Type entry that documents
supported values ("Redis", "InMemory") and that the default is "InMemory", and
in docs/domains/Compliance/services/AccountService/index.mdx replace any
Redis:Enabled references with the new Cache:Type description and examples
showing how to set "Redis" and "InMemory".
🧹 Nitpick comments (2)
DotNet/Audit/Properties/launchSettings.json (1)
13-25: Remove the/apisuffix for consistency with other services.The
TenantServiceURLat line 22 includes an/apisuffix, but this is inconsistent with most other services in this PR (Census, Account, Report, Normalization, DataAcquisition, Admin.BFF). QueryDispatch follows the same pattern as Audit with the/apisuffix included.While the
ServiceRegistry.cscode automatically appends/apiif not already present, having the suffix in some configs and not others creates unnecessary confusion. For clarity and maintainability, recommend aligning Audit and QueryDispatch with the rest of the services by removing the/apisuffix from the configuration and letting the ServiceRegistry handle it consistently:"ServiceRegistry__TenantService__TenantServiceURL": "http://localhost:8074"DotNet/Submission/Properties/launchSettings.json (1)
20-22: Static analysis false positive: These are well-known Azurite emulator credentials.The flagged
AccountKeyvalues are the publicly documented default credentials for the Azure Storage Emulator (Azurite). This key (Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==) is intentionally hardcoded for local development and is not a security risk.However, based on learnings, even development configuration files can trigger security scans. Consider one of these approaches to reduce scan noise:
- Move these connection strings to a
.env.localfile (git-ignored), or- Add a
.gitleaks.tomlallowlist entry for this known emulator key, or- Accept the scan alerts as known false positives
This is not a blocker—the current approach is valid for local docker development.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Jira integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (13)
.envDotNet/Account/Properties/launchSettings.jsonDotNet/Account/appsettings.Docker.jsonDotNet/Admin.BFF/Properties/launchSettings.jsonDotNet/Audit/Properties/launchSettings.jsonDotNet/Census/Properties/launchSettings.jsonDotNet/DataAcquisition.AcquisitionWorker/Properties/launchSettings.jsonDotNet/DataAcquisition/Properties/launchSettings.jsonDotNet/Normalization/Properties/launchSettings.jsonDotNet/QueryDispatch/Properties/launchSettings.jsonDotNet/Report/Properties/launchSettings.jsonDotNet/Submission/Properties/launchSettings.jsonDotNet/Tenant/Properties/launchSettings.json
🧰 Additional context used
📓 Path-based instructions (1)
**
⚙️ CodeRabbit configuration file
**: Pull requests that have "TECH_DEBT" in the title should only contain changes related to typos, unused code, linter/IDE suggestions, swagger specification updates,
and logging improvements. These TECH_DEBT PRs must not affect core functionality. All PRs that are not considered technical debt must include information on what
testing was performed in the description of the PR. If it does not, ask the author to provide details on what testing was performed.
When reviewing code, suggest unit tests using XUnit in the following scenarios:
- If/Else or Switch/Case blocks are introduced or modified — ensure each branch has a corresponding unit test.
- Logic that depends on service or interface configuration — suggest tests to validate different implementations are correctly resolved.
- No network activity (HTTP calls, sockets, etc.) should appear in unit tests. Recommend using mocks (via Moq) for any external communication.
Large unit tests should be avoided; keeping unit tests small and focused on targeted business logic (i.e. string sanitization)
**: Pull requests that have DOCS in the title should only contain changes related to documentation within the /docs folder or in .md files through-out the code-base. The description
of the PR should specify what documentation was updated. Documentation updates should use EventCatalog.dev structure, where service-specific functionality should be described
in the service's index.mdx (i.e. /services/XXX/index.mdx or /domains/XXX/services/YYY/index.mdx). Configurations that are shared by multiple services should be
reflected in the /docs/docs/config files.
Files:
DotNet/Normalization/Properties/launchSettings.jsonDotNet/Census/Properties/launchSettings.jsonDotNet/Account/Properties/launchSettings.jsonDotNet/Submission/Properties/launchSettings.jsonDotNet/Account/appsettings.Docker.jsonDotNet/Audit/Properties/launchSettings.jsonDotNet/Report/Properties/launchSettings.jsonDotNet/Tenant/Properties/launchSettings.jsonDotNet/QueryDispatch/Properties/launchSettings.jsonDotNet/DataAcquisition/Properties/launchSettings.jsonDotNet/DataAcquisition.AcquisitionWorker/Properties/launchSettings.jsonDotNet/Admin.BFF/Properties/launchSettings.json
🧠 Learnings (4)
📓 Common learnings
Learnt from: sdmcgeown
Repo: lantanagroup/link-cloud PR: 0
File: :0-0
Timestamp: 2025-06-26T00:27:26.876Z
Learning: The user has configured path-based instructions requiring documentation updates for any appsettings.json and appconfig.yml file changes, and expects the author and review team to be reminded of its importance for DevOps teams and project maintainability.
Learnt from: seanmcilvenna
Repo: lantanagroup/link-cloud PR: 593
File: docs/service_specs/submission.md:21-21
Timestamp: 2024-12-27T20:05:54.249Z
Learning: The Submission service uses MongoDB (configured via `builder.Services.Configure<MongoConnection>`). The `DatabaseProvider` property from `appsettings.json` has been removed, and documentation references to SQL Server have been replaced with MongoDB.
📚 Learning: 2025-03-05T21:52:03.373Z
Learnt from: amphillipsLGC
Repo: lantanagroup/link-cloud PR: 697
File: DotNet/Admin.BFF/appsettings.Development.json:0-0
Timestamp: 2025-03-05T21:52:03.373Z
Learning: Even in development configuration files, hardcoded credentials can trigger security scans. For ASP.NET Core applications, sensitive values should be stored either in appsettings.Local.json (which should be git-ignored) or in user secrets (secrets.json) for development environments.
Applied to files:
DotNet/Census/Properties/launchSettings.jsonDotNet/Account/Properties/launchSettings.jsonDotNet/Submission/Properties/launchSettings.jsonDotNet/Report/Properties/launchSettings.jsonDotNet/Admin.BFF/Properties/launchSettings.json
📚 Learning: 2025-06-26T00:27:26.876Z
Learnt from: sdmcgeown
Repo: lantanagroup/link-cloud PR: 0
File: :0-0
Timestamp: 2025-06-26T00:27:26.876Z
Learning: The user has configured path-based instructions requiring documentation updates for any appsettings.json and appconfig.yml file changes, and expects the author and review team to be reminded of its importance for DevOps teams and project maintainability.
Applied to files:
DotNet/Account/Properties/launchSettings.jsonDotNet/Submission/Properties/launchSettings.jsonDotNet/Report/Properties/launchSettings.jsonDotNet/Admin.BFF/Properties/launchSettings.json
📚 Learning: 2025-03-05T21:45:38.042Z
Learnt from: edward-miller-lcg
Repo: lantanagroup/link-cloud PR: 697
File: DotNet/Admin.BFF/appsettings.Development.json:24-24
Timestamp: 2025-03-05T21:45:38.042Z
Learning: In the Link Cloud project, local development configuration for TenantServiceUrl intentionally uses HTTP rather than HTTPS. This is an acceptable configuration for the local/development environment per the team's preferences.
Applied to files:
DotNet/Submission/Properties/launchSettings.jsonDotNet/Admin.BFF/Properties/launchSettings.json
🪛 Checkov (3.2.334)
DotNet/Submission/Properties/launchSettings.json
[high] 21-22: Azure Storage Account access key
(CKV_SECRET_3)
🪛 dotenv-linter (4.0.0)
.env
[warning] 15-15: [LowercaseKey] The Redis__Password key should be in uppercase
(LowercaseKey)
[warning] 16-16: [LowercaseKey] The InternalBlobStorage__BlobContainerName key should be in uppercase
(LowercaseKey)
[warning] 16-16: [UnorderedKey] The InternalBlobStorage__BlobContainerName key should go before the KafkaConnection__SaslPassword key
(UnorderedKey)
[warning] 17-17: [LowercaseKey] The ExternalBlobStorage__BlobContainerName key should be in uppercase
(LowercaseKey)
[warning] 17-17: [UnorderedKey] The ExternalBlobStorage__BlobContainerName key should go before the InternalBlobStorage__BlobContainerName key
(UnorderedKey)
🪛 Gitleaks (8.30.0)
DotNet/Submission/Properties/launchSettings.json
[high] 21-21: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
[high] 22-22: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
DotNet/Report/Properties/launchSettings.json
[high] 19-19: Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
(generic-api-key)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
- GitHub Check: Unit Tests for DotNet
- GitHub Check: Integration Tests
- GitHub Check: Smoke Test with Docker Compose
- GitHub Check: Build Documentation
- GitHub Check: Analyze (csharp)
- GitHub Check: Analyze (java-kotlin)
🔇 Additional comments (13)
DotNet/QueryDispatch/Properties/launchSettings.json (1)
3-10: LGTM!The new "QueryDispatch" profile is correctly configured with Development environment, appropriate application URLs, and follows the pattern established across other services in this PR.
DotNet/DataAcquisition.AcquisitionWorker/Properties/launchSettings.json (1)
3-11: Verify Swagger availability for worker service.The
launchUrl: "swagger"setting suggests this worker service exposes an HTTP API with Swagger documentation. Please confirm this service actually has Swagger configured, as worker services typically don't expose Swagger UI unless they have HTTP endpoints.DotNet/Admin.BFF/Properties/launchSettings.json (1)
40-51: LGTM!The port change for
http-docker(8065 → 8063) and the newhttpprofile addition are correctly configured. The port change resolves what appears to be a conflict with DataAcquisitionService (which uses port 8065 as shown in line 17).DotNet/Report/Properties/launchSettings.json (2)
3-10: LGTM!The new "ConsoleApp" profile is correctly configured with Development environment and appropriate application URLs.
17-19: No issues found — configuration is correct.The Azurite
AccountKeyis the well-known development default and poses no security risk. The MongoDB port mapping to 17017 is intentional and explicitly configured in docker-compose.yml (maps host port 17017 to container port 27017), matching the launchSettings.json configuration. All concerns have been verified.DotNet/Tenant/Properties/launchSettings.json (1)
3-10: LGTM - New ConsoleApp profile for local development.The new profile provides a clean local development option with minimal configuration, while the existing
http-dockerprofile handles Docker-integrated runs. This aligns with the PR objective to standardize launch settings..env (1)
15-17: LGTM - New blob storage container name mappings.The new environment variable mappings for
InternalBlobStorage__BlobContainerNameandExternalBlobStorage__BlobContainerNamealign with the expanded blob storage configuration across multiple services in this PR.Regarding the static analysis warnings about lowercase keys: these are false positives. The double-underscore naming convention (e.g.,
Redis__Password) is the standard .NET configuration binding pattern that maps to hierarchical settings likeRedis:Passwordinappsettings.json. This convention must be preserved for the configuration system to work correctly.DotNet/Normalization/Properties/launchSettings.json (1)
3-12: LGTM - New Normalization profile for local development.The profile follows the same pattern as other services in this PR, providing a simplified local development option with the Development environment. The port assignments (5038/7038) are distinct from the Docker profile port (8068).
DotNet/DataAcquisition/Properties/launchSettings.json (1)
3-10: LGTM - New Query profile for local development.The profile follows the established pattern across the PR, providing a Development environment option for the DataAcquisition service. The service-specific name "Query" appropriately reflects the service's purpose.
DotNet/Account/Properties/launchSettings.json (1)
3-16: Configuration looks good for docker alignment.The
http-dockerprofile is well-structured with appropriate environment variables for Kafka, Redis, database, Serilog, telemetry, and tenant service. Using${LINK_DB_PASS}placeholder for the database password is a good security practice.Based on learnings, ensure that any related documentation is updated to reflect these new environment variable requirements for DevOps teams. The PR description indicates documentation may need updates—please confirm the relevant sections are addressed.
DotNet/Submission/Properties/launchSettings.json (1)
3-10: New ConsoleApp profile added for Development environment.The profile configuration is appropriate with both HTTPS and HTTP endpoints. This provides flexibility for local development scenarios.
DotNet/Census/Properties/launchSettings.json (2)
3-15: Configuration aligns with docker-compose and is consistent with other services.The
http-dockerprofile follows the same pattern as the Account service with appropriate environment variables. The database password placeholder${LINK_DB_PASS}maintains security best practices.
17-25: Minor inconsistency:launchUrluses HTTPS butapplicationUrlstarts with HTTPS.The
launchUrlon line 19 points tohttps://localhost:7245/swagger, which is consistent with the HTTPS endpoint inapplicationUrl. This is fine.Note that the ConsoleApp profile in the Account service doesn't include a
launchUrl, while this one does. This minor inconsistency across services isn't a problem, but you may want to standardize the profiles for easier maintenance.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
🛠️ Description of Changes
Update Launch settings and .env file
🧪 Testing Performed
Tested locally
🧑🔬 Unit Testing
📓 Documentation Updated
Please update any relevant sections in the project documentation that were impacted by the changes in the PR.
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.