Skip to content

Commit 8a88b35

Browse files
authored
Merge pull request #326 from ai-agent-assembly/v0.0.1/AAASM-4766/fix/compose_uid
[AAASM-4766] 🐛 (examples): fix compose uid mismatch that fails-closed all calls
2 parents 41a72ec + 4ca1f18 commit 8a88b35

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

  • scenarios/live-core-enforcement/python-agent

scenarios/live-core-enforcement/python-agent/Dockerfile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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
3343
USER appuser
3444

0 commit comments

Comments
 (0)