Skip to content

fix(llm): isolate tenant endpoint credentials#55

Merged
CryptoJones merged 1 commit into
mainfrom
fix/47-llm-key-origin
Jul 9, 2026
Merged

fix(llm): isolate tenant endpoint credentials#55
CryptoJones merged 1 commit into
mainfrom
fix/47-llm-key-origin

Conversation

@CryptoJones

Copy link
Copy Markdown
Owner

Summary

  • Prevent tenant-controlled LLM base URLs from inheriting the operator instance API key.
  • Mark resolved configs whose base URL came from tenant settings and route those requests through a public-IP connect guard.
  • Reject tenant LLM base URLs that are invalid, localhost, private IP literals, or common internal hostnames while still allowing operator instance defaults to point at local models.
  • Add regression tests for mixed override cases and endpoint policy behavior.
  • Bump version to 1.7.8.

Closes #47

Verification

  • dotnet test api/ApplyTrack.slnx --filter FullyQualifiedName~LlmConfigTests --no-restore
  • dotnet build api/ApplyTrack.slnx --no-restore
  • dotnet format api/ApplyTrack.slnx --verify-no-changes --no-restore --include api/ApplyTrack.Api/Llm/LlmConfig.cs api/ApplyTrack.Api/Llm/LlmEndpointPolicy.cs api/ApplyTrack.Api/Llm/OpenAiCompatibleLlmClient.cs api/ApplyTrack.Api.Tests/LlmConfigTests.cs api/ApplyTrack.Api/Endpoints/MaterialsEndpoints.cs api/ApplyTrack.Api.Tests/MaterialsEndpointTests.cs
  • uv run --extra dev pytest -q
  • git diff --check

Full .NET integration tests require the Podman/Testcontainers socket and should run in CI or via ./scripts/test-dotnet-podman.sh on a Podman-enabled host.

@CryptoJones CryptoJones merged commit f2019c4 into main Jul 9, 2026
2 checks passed
@CryptoJones CryptoJones deleted the fix/47-llm-key-origin branch July 9, 2026 07:37
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.

Security: prevent tenant LLM endpoint overrides from inheriting instance API keys

1 participant