Audit entries for API-key writes recorded the agent's container address (172.17.0.6 on stage), because the registry stores the peer of its own request. With this change they carry the caller's address.
The API host's proxy puts the caller's address in X-BP-Client-IP, overwriting anything the client sent. That proxy change is a separate orca-platform PR on pruefwerk-stage/api-proxy.conf.
audit_delegated_writes reads the header for API-key requests only and keeps it only if it parses as an IP address, because the registry stores it as Postgres inet and garbage would sink the whole entry.
AuditEntry.source_ip is sent as source_ip and skipped when empty.
The registry ignores the field until tenant-registry accepts it (separate PR), so the deploy order doesn't matter.
The address is informational: nothing decides on it.
Support writes via the dashboard still show the dashboard's address.
Tests: unit test for the header parse (v4, v6, a list, junk, missing); tests/api_key_access.rs checks source_ip in the posted audit entry. Not run locally (RAM); CI runs them.
Audit entries for API-key writes recorded the agent's container address (172.17.0.6 on stage), because the registry stores the peer of its own request. With this change they carry the caller's address.
- The API host's proxy puts the caller's address in `X-BP-Client-IP`, overwriting anything the client sent. That proxy change is a separate orca-platform PR on `pruefwerk-stage/api-proxy.conf`.
- `audit_delegated_writes` reads the header for **API-key requests only** and keeps it only if it parses as an IP address, because the registry stores it as Postgres `inet` and garbage would sink the whole entry.
- `AuditEntry.source_ip` is sent as `source_ip` and skipped when empty.
- The registry ignores the field until tenant-registry accepts it (separate PR), so the deploy order doesn't matter.
- The address is informational: nothing decides on it.
- Support writes via the dashboard still show the dashboard's address.
Tests: unit test for the header parse (v4, v6, a list, junk, missing); `tests/api_key_access.rs` checks `source_ip` in the posted audit entry. Not run locally (RAM); CI runs them.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Audit entries for API-key writes showed the agent's container address,
because the registry records the peer of its own request. The API host's
proxy now puts the caller's address in X-BP-Client-IP (orca-platform), and
the agent sends it as source_ip for key writes only, when it parses as an
IP address. It is informational; nothing decides on it.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang
merged commit 5ce496303d into main2026-10-14 09:33:25 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Audit entries for API-key writes recorded the agent's container address (172.17.0.6 on stage), because the registry stores the peer of its own request. With this change they carry the caller's address.
X-BP-Client-IP, overwriting anything the client sent. That proxy change is a separate orca-platform PR onpruefwerk-stage/api-proxy.conf.audit_delegated_writesreads the header for API-key requests only and keeps it only if it parses as an IP address, because the registry stores it as Postgresinetand garbage would sink the whole entry.AuditEntry.source_ipis sent assource_ipand skipped when empty.Tests: unit test for the header parse (v4, v6, a list, junk, missing);
tests/api_key_access.rscheckssource_ipin the posted audit entry. Not run locally (RAM); CI runs them.🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p