Files
msa-agent/internal/policy/agent-policy.json
T

42 lines
1.4 KiB
JSON

{
"schemaVersion": 1,
"name": "msa-agent-policy",
"comment": "Authorisation surface for relay-issued commands. Deliberately narrower than the web console proxy policy: this is what the iPhone app can actually ask for, nothing more.",
"egress": {
"mode": "loopback-only",
"portOnly": true,
"comment": "The agent config carries a port, never a host. Outbound connections are dialed to 127.0.0.1/::1 by the transport itself, so there is no host field to misconfigure and no DNS-rebinding path.",
"dialedHosts": ["127.0.0.1", "::1"]
},
"authPaths": {
"pattern": "^/api/(?:auth(?:/|$)|login(?:/|$)|logout(?:/|$))",
"proxied": false,
"comment": "The agent logs into the local SimAdmin itself and holds the credential. Login material never traverses the relay in either direction."
},
"read": [
"/api/health",
"/api/device",
"/api/sim",
"/api/network",
"/api/network/signal-strength",
"/api/stats",
"/api/stats/cpu",
"/api/connectivity",
"/api/sms/list"
],
"write": {
"/api/sms/send": ["POST"],
"/api/sms/batch-delete": ["POST"]
},
"dangerous": ["/api/sms/send", "/api/sms/batch-delete"],
"limits": {
"dangerousWritesPerMinute": 6,
"maxRequestBytes": 262144,
"maxResponseBytes": 262144,
"requestTtlSeconds": 30,
"clockSkewSeconds": 120,
"replayCacheSize": 4096,
"mailboxDepth": 8
}
}