Skip to content

feat: configure gRPC UNIX socket attributes - #154

Merged
rustatian merged 4 commits into
masterfrom
feat/unix-socket-permissions
Sep 7, 2026
Merged

rustatian merged 4 commits into
masterfrom
feat/unix-socket-permissions

Conversation

@rustatian

@rustatian rustatian commented Sep 6, 2026 •

Copy link
Copy Markdown
Member

Part of roadrunner-server/roadrunner#1789.

  • Add grpc.unix_socket settings for mode, UID, and GID.
  • Use tcplisten v1.6.0 and its shared schema. Omitted settings keep the current defaults.
  • Validate typed socket options after configuration decoding.
  • Pass socket attributes to the gRPC listener without changing TLS or worker credentials.

Explicit socket attributes require a filesystem UNIX listener.

Copilot AI lite review requested due to automatic review settings September 6, 2026 21:53
@codecov

codecov Bot commented Sep 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.47%. Comparing base (4965bf6) to head (682eef9).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #154      +/-   ##
==========================================
+ Coverage   84.81%   85.47%   +0.65%     
==========================================
  Files          10       10              
  Lines         652      654       +2     
==========================================
+ Hits          553      559       +6     
+ Misses         99       95       -4     

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The new UID/GID string validation is architecture-dependent (32-bit vs 64-bit) and can incorrectly reject valid IDs due to strconv.IntSize parsing.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds configurable UNIX socket attributes (mode/UID/GID) for the gRPC listener by upgrading to tcplisten v1.6.0, wiring the options into listener creation, and extending the JSON schema and tests to cover validation and serving behavior.

Changes:

  • Add grpc.unix_socket to config/schema and pass options into tcplisten.CreateListenerWithOptions.
  • Add strict validation for uid/gid inputs to reject weak/ambiguous decodings.
  • Add a new OS-gated test suite validating config decoding, ID validation, and actual socket attributes during Serve.
File summaries
File Description
tests/unix_socket_test.go Adds coverage for unix_socket config decoding, UID/GID validation edge cases, and runtime socket attribute application.
config.go Introduces UnixSocket config field, validates unix_socket against the listen address, and adds strict UID/GID validation helper.
plugin.go Validates unix_socket ID inputs (when present) and passes unix socket options into listener creation.
schema.json Exposes unix_socket settings by referencing the shared tcplisten schema.
go.mod Bumps github.com/roadrunner-server/tcplisten to v1.6.0.
go.sum Updates checksums for tcplisten v1.6.0.
tests/go.mod Bumps test module’s tcplisten dependency to v1.6.0.
tests/go.sum Updates test module checksums for tcplisten v1.6.0.
Review details
  • Files reviewed: 6/8 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread config.go Outdated
@rustatian rustatian self-assigned this Sep 7, 2026
@rustatian
rustatian merged commit 1ce79e8 into master Sep 7, 2026
9 checks passed
@rustatian
rustatian deleted the feat/unix-socket-permissions branch September 7, 2026 17:21
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