Skip to content

test(server): cover service endpoint plaintext security#1352

Open
drew wants to merge 1 commit into
mainfrom
test/service-endpoint-security
Open

test(server): cover service endpoint plaintext security#1352
drew wants to merge 1 commit into
mainfrom
test/service-endpoint-security

Conversation

@drew
Copy link
Copy Markdown
Collaborator

@drew drew commented May 13, 2026

Summary

Add listener-level coverage for TLS gateways that allow loopback plaintext service HTTP. The tests exercise real TCP connections through the gateway listener to verify plaintext service endpoints stay loopback-only, reject cross-origin browser contexts, and do not expose the gRPC gateway surface.

Related Issue

None.

Changes

  • Added gateway listener tests for non-loopback plaintext service HTTP rejection.
  • Added CSRF-oriented service endpoint tests for Sec-Fetch-Site, Origin, and Referer rejection behavior.
  • Added a regression test proving plaintext service HTTP does not allow successful gateway gRPC calls.

Testing

  • mise run pre-commit passes
  • Unit tests added/updated
  • E2E tests added/updated

Additional targeted runs:

  • cargo test -p openshell-server plaintext_service_http -- --nocapture
  • cargo test -p openshell-server --lib
  • cargo test -p openshell-server

Checklist

  • Follows Conventional Commits
  • Commits are signed off (DCO)

@drew drew requested review from a team, derekwaynecarr, maxamillion and mrunalp as code owners May 13, 2026 01:57
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