1
0
mirror of https://github.com/Tecnativa/docker-socket-proxy synced 2024-12-21 14:18:07 +00:00

Add support for /grpc api

This commit is contained in:
Ruben Gees 2021-10-09 13:13:52 +02:00 committed by João Marques
parent f48305fe92
commit 08910fecaa
4 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,7 @@ ENV ALLOW_RESTARTS=0 \
DISTRIBUTION=0 \
EVENTS=1 \
EXEC=0 \
GRPC=0 \
IMAGES=0 \
INFO=0 \
LOG_LEVEL=info \

View File

@ -127,6 +127,7 @@ extremely critical but can expose some information that your service does not ne
- `CONTAINERS`
- `DISTRIBUTION`
- `EXEC`
- `GRPC`
- `IMAGES`
- `INFO`
- `NETWORKS`

View File

@ -51,6 +51,7 @@ frontend dockerfrontend
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/distribution } { env(DISTRIBUTION) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/events } { env(EVENTS) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/exec } { env(EXEC) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/grpc } { env(GRPC) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/images } { env(IMAGES) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/info } { env(INFO) -m bool }
http-request allow if { path,url_dec -m reg -i ^(/v[\d\.]+)?/networks } { env(NETWORKS) -m bool }

View File

@ -34,6 +34,7 @@ def test_default_permissions(proxy_factory):
("info",),
("system", "info"),
("build", "."),
("buildx build", "."),
("swarm", "init"),
)
_check_permissions(allowed_calls, forbidden_calls)