fix(security): replace direct Docker socket with socket proxy and add…#129
Open
A831ARD0 wants to merge 1 commit into
Open
fix(security): replace direct Docker socket with socket proxy and add…#129A831ARD0 wants to merge 1 commit into
A831ARD0 wants to merge 1 commit into
Conversation
… Bull Board auth
Three critical security fixes:
1. Docker socket proxy (tecnativa/docker-socket-proxy)
- Add docker-proxy service that is the only container with access to
/var/run/docker.sock
- openwa-api connects via DOCKER_HOST=tcp://docker-proxy:2375 (TCP)
- Proxy exposes only the required Docker API operations (CONTAINERS,
IMAGES, VOLUMES, INFO, PING, POST, DELETE)
- Eliminates the Docker daemon escape vector from openwa-api
2. Non-root container execution
- Install gosu for safe privilege dropping
- Add docker-entrypoint.sh: fixes named-volume ownership as root,
then exec's to openwa user via gosu before starting Node.js
- Process no longer runs as root inside the container
3. Bull Board dashboard authentication
- Add BullBoardAuthMiddleware that validates X-API-Key / Bearer token
before allowing access to /admin/queues
- Requires ADMIN role; returns 401/403 otherwise
- Applied globally via AppModule.configure()
Also fix dashboard nginx upstream name: openwa -> openwa-api to match
the Docker Compose service name (fixes dashboard crash-loop on startup).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… Bull Board auth
Three critical security fixes:
Docker socket proxy (tecnativa/docker-socket-proxy)
Non-root container execution
Bull Board dashboard authentication
Also fix dashboard nginx upstream name: openwa -> openwa-api to match the Docker Compose service name (fixes dashboard crash-loop on startup).
Description
Brief description of changes
Type of Change
Checklist
Screenshots (if applicable)
Related Issues
Closes #