File tree Expand file tree Collapse file tree
scenarios/live-core-enforcement/python-agent Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,17 @@ COPY agent.py /app/agent.py
2828
2929# Run as a non-root user. The agent only needs to read/write the runtime socket
3030# on the shared volume; it never needs root.
31- RUN useradd --create-home --uid 10001 appuser \
31+ #
32+ # The uid MUST be 65532 to match the aa-runtime image (distroless `nonroot`,
33+ # uid 65532). The runtime creates its SDK IPC socket
34+ # /tmp/aa-runtime-<agent_id>.sock as mode 0600 owned by 65532 AND rejects any
35+ # connecting peer whose uid != 65532 (peer-uid gating — a deliberate security
36+ # control, not a bug). A mismatched uid can never complete the handshake, so
37+ # every governed call falls back to "runtime unreachable; failing closed under
38+ # enforce" and NO allow path is reachable. Aligning the agent's uid to the
39+ # runtime's is what makes the documented compose enforce out of the box; we do
40+ # NOT loosen the socket to 0666, which would defeat the peer-uid gate.
41+ RUN useradd --create-home --uid 65532 appuser \
3242 && chown -R appuser:appuser /app
3343USER appuser
3444
You can’t perform that action at this time.
0 commit comments