Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow listening on unix sockets for http_server sources #22158

Open
mtorromeo opened this issue Jan 10, 2025 · 1 comment
Open

Allow listening on unix sockets for http_server sources #22158

mtorromeo opened this issue Jan 10, 2025 · 1 comment
Labels
source: http_server Anything `http_server` source related type: feature A value-adding code addition that introduce new functionality.

Comments

@mtorromeo
Copy link

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

Unix sockets allow restricting access to the HTTP server using UNIX directory/file permissions and/or SELinux or other security frameworks.

In contrast, it is harder to properly limit access to the server to local users that should not be capable of sending data to vector on a system where they have shell access, or from other locally running processes that may have been compromised.

The actual use case is to receive modsecurity audit log entries, by using SecAuditLogType HTTPS. Given the security implications of the logs, local users of the system should not be able to tamper the content of the logs.

Also, given that UNIX sockets are already supported in other parts of the codebase, it makes sense that they would be supported in every source that has a configurable listening socket.

Attempted Solutions

The only alternative is to configure the firewall to allow connections only from specific users, but this is usually more complex.

Proposal

Maybe a library like https://docs.rs/crate/multisock/latest could be used to abstract every instance of SocketAddr to automatically accept both Inet and Unix sockets.

References

No response

Version

vector 0.43.1 (x86_64-unknown-linux-gnu)

@mtorromeo mtorromeo added the type: feature A value-adding code addition that introduce new functionality. label Jan 10, 2025
@jszwedko
Copy link
Member

Related: #17050

@jszwedko jszwedko added the source: http_server Anything `http_server` source related label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: http_server Anything `http_server` source related type: feature A value-adding code addition that introduce new functionality.
Projects
None yet
Development

No branches or pull requests

2 participants