Summary
ClientConfig.proxy_mode already defines all four proxy policy modes but there is no CLI command to read or set it. Users must hand-edit ~/.authsome/config.json today. This issue tracks adding a proper CLI surface.
Context
ProxyMode is a Literal in src/authsome/cli/client_config.py:
ProxyMode = Literal[
"connected_allow",
"connected_deny",
"configured_allow",
"configured_deny",
]
The mode encodes two orthogonal axes as {scope}_{policy}:
| Mode |
Scope |
Policy |
Behaviour |
connected_allow |
connected |
allow |
Inject headers for connected providers; let unmatched requests through (default) |
connected_deny |
connected |
deny |
Inject headers for connected providers; block unmatched requests with 403 |
configured_allow |
configured |
allow |
Inject headers for all configured providers (including disconnected); let unmatched through |
configured_deny |
configured |
deny |
Inject headers for all configured providers; block unmatched requests with 403 |
The mode is caller-local — it lives in ClientConfig, not in daemon-owned storage, and controls how the mitmproxy addon (AuthProxyAddon) behaves per authsome run invocation.
Proposed CLI surface
# Read current mode
authsome config get proxy-mode
# Set mode
authsome config set proxy-mode connected_deny
Acceptance criteria
Out of scope
- Per-invocation
--proxy-mode override on authsome run (follow-up if needed).
- Daemon-side proxy config (the daemon intentionally never sees the mode).
Summary
ClientConfig.proxy_modealready defines all four proxy policy modes but there is no CLI command to read or set it. Users must hand-edit~/.authsome/config.jsontoday. This issue tracks adding a proper CLI surface.Context
ProxyModeis aLiteralinsrc/authsome/cli/client_config.py:The mode encodes two orthogonal axes as
{scope}_{policy}:connected_allowconnected_denyconfigured_allowconfigured_denyThe mode is caller-local — it lives in
ClientConfig, not in daemon-owned storage, and controls how the mitmproxy addon (AuthProxyAddon) behaves perauthsome runinvocation.Proposed CLI surface
Acceptance criteria
authsome config get proxy-modeprints the currentproxy_modefromClientConfig.authsome config set proxy-mode <mode>validates against the four allowed values and persists toClientConfig.--jsonflag on both commands produces machine-readable output consistent with the rest of the CLI.README.mdupdated with a proxy policy configuration section.Out of scope
--proxy-modeoverride onauthsome run(follow-up if needed).