Skip to main content

glovebox-egress-gateway

The host-side policy engine behind glovebox's Kata egress boundary: a request's method and path decide it, not only the host it goes to.

A packet filter can say "this sandbox may reach github.com". It cannot say "this sandbox may git clone but may not git push", because both are TCP to port 443 of the same address. This package reads the request and rules on it: a host tagged ro serves GET, HEAD and OPTIONS, and refuses everything else unless the policy names a capability for it. A refused request gets a 403 whose body says the operator restricted it, so an agent reading the answer does not mistake the refusal for an outage.

The policy file is either the JSON object a table is rendered from, or a table a launcher rendered, one host<TAB>tier<TAB>capabilities row per host, whose # policy-identity header still names its rows. A hand-written or edited table is refused: write the JSON object instead. The JSON object has capabilities, domains and policy keys, and policy.forbidden_hosts must be present: the service renders the object into the same table and refuses any entry that reaches a forbidden host. domains maps a host to ro or rw. A host entry covers that host alone, and *.example.com covers every name below example.com. A JSON object names no sign-in host the way the shipped allowlist does, so a POST to /v1/oauth/token or /v1/oauth/token/revoke at any rw host is treated as a sign-in. Without --sign-in-secret the service refuses it. A real token a sign-in kept goes back only to the host whose reply carried it.

The package is published to PyPI and has no console script. Run the verdict service as python -m egress_gateway.authz_service. The package holds the verdict service Envoy asks before it forwards a request out of a Kata sandbox — the guest holds no network interface at all, so Envoy on the host carries every byte and asks this service one question per decrypted request.

Answering a proxy's verdict question

Envoy asks over gRPC ext_authz, sending the client's method, request target and Host as it parsed them, plus a channel value (plain, bump, connect or setup) the route set in the check's context.

pip install 'glovebox-egress-gateway[verdict-service]'
python -m egress_gateway.authz_service --socket /run/egress/authz.sock \
  --policy /policy.json --evidence /var/log/egress/egress.jsonl

Before it answers, the service appends each verdict to the --evidence log through glovebox-monitor's chained audit writer. Each record carries a sequence number and the hash of the record before it. The log never rotates. At 1024 MB the write fails, and the service answers no further question. python -m egress_gateway.egress_evidence LOG prints the hosts the log admitted and refused.

The service listens on a Unix socket at mode 0600, never a port, and answers each question with an OK verdict carrying the resolved address as x-envoy-original-dst-host dynamic metadata, or with the same 403 document a refused request gets. A host the policy admits but the resolver cannot answer for gets a bodiless 503, which a client retries. Envoy's status_on_error also turns any failure to reach the service into a 503. The x-envoy-original-dst-host metadata names an address the service resolved and screened itself, and Envoy dials it without resolving anything, so no second DNS answer can arrive between the check and the connection.

Metadata

Release files for glovebox-egress-gateway 0.4.30

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glovebox-egress-gateway 0.4.30
File Size Uploaded Provenance Actions
glovebox_egress_gateway-0.4.30.tar.gz 175.0 kB Without provenance Details for glovebox_egress_gateway-0.4.30.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glovebox-egress-gateway 0.4.30
File Interpreter ABI Platform Actions
glovebox_egress_gateway-0.4.30-py3-none-any.whl Python 3 none any Details for glovebox_egress_gateway-0.4.30-py3-none-any.whl

Total release size: 312.5 kB

Release files / glovebox_egress_gateway-0.4.30.tar.gz

Download URL glovebox_egress_gateway-0.4.30.tar.gz
Size 175.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fba82c681fa6cad3d342996817c8d0abbb5ae7b534213284cbdd6a5fbb3bc896
BLAKE2b-256 checksum
How to use checksums
00c19c1b469c40c0cf3b6f55eedde3be6efb44c3ba6ef35d457c3aa57170a493
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / glovebox_egress_gateway-0.4.30-py3-none-any.whl

Download URL glovebox_egress_gateway-0.4.30-py3-none-any.whl
Size 137.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b566c046144ade79e589c1ff8b0ba6c202af9830b86fb680e2f8d1ea4c2505a4
BLAKE2b-256 checksum
How to use checksums
1dcc5fa9fccd37ea79ff14a6c8205b8eb1faad2872a8c27eb747e4a4db5cfe82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for glovebox-egress-gateway 0.4.30

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.30 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page