Enforced intake and API keys¶
The release after v0.2.0 removes the safe release's two warn switches (KAN-74, #223). This page is for the operator who upgrades a running hangar: what breaks, what to do before you deploy, and how to check it.
What changes¶
HANGAR_INTAKE_POSTURE=warnandoffare gone. Jobs from GitHub, GitHub Projects, Jira, Slack and inbound webhooks always need the git gateway. Their sandboxes always get at leastallowlistegress (intake posture).HANGAR_SUBSCRIPTION_LOGINS=anyis gone. Jobs, schedules, webhooks, experiments, replays and intake jobs never run on a subscription login. They need an API key (subscription logins).- People's own sessions don't change. A person's
new_session,create_sandboxorrun_agentstill uses their own Claude Pro or Max, ChatGPT or Google login, with a warning.
What breaks on deploy¶
A removed value in the server's environment (the hangar-site config map, .env, Compose) stops hangar from
starting. hangar serve exits and logs one line per switch, with the fix:
hangar can't start: HANGAR_SUBSCRIPTION_LOGINS=any was removed after v0.2.0 (#223): jobs, schedules, webhooks, ...
A removed value stored with hangar config set doesn't stop it. hangar ignores the value and enforces. hangar doctor
fails with the same words until you unset it.
Either way, work that relied on a switch is refused. A Codex job on a ChatGPT login fails before a sandbox starts:
job needs an API-key credential for codex; subscription logins are interactive-only (docs/team.md#subscription-logins). add an OpenAI API key: hangar cred add codex-api --harness codex --kind api_key --file openai-key.txt (your own; an admin adds --team for work no person owns)
An intake job without the gateway is refused at submit, with a message on its issue, ticket or thread.
Before you upgrade¶
Do these on the running v0.2.0, in order.
-
Find where a switch is set.
hangar config listshows each value's source; the config map may hold one too.hangar config list | grep -E 'INTAKE_POSTURE|SUBSCRIPTION_LOGINS' kubectl -n hangar get configmap hangar-site -o yaml | grep -E 'INTAKE_POSTURE|SUBSCRIPTION_LOGINS' -
Store an API key for each harness your jobs use, as the person whose jobs they are. An admin adds
--teamfor work no person owns. Put a spend cap on each key in the vendor's console.hangar cred add codex-api --harness codex --kind api_key --file openai-key.txt # an OpenAI API key hangar cred add claude-api --harness claude-code --kind api_key --file anthropic-key.txt -
Turn on the git gateway and the egress proxy where
HANGAR_INTAKE_POSTURE=warnis set (turning it on). On GKE,deploy/k8s/config.yamlsets both. -
Remove the switches wherever step 1 found them.
hangar config unset HANGAR_SUBSCRIPTION_LOGINS hangar config unset HANGAR_INTAKE_POSTURE kubectl -n hangar edit configmap hangar-site # delete either key, then: kubectl -n hangar rollout restart deploy/hangar -
Run
hangar doctor. Thesubscription loginscheck must be ok: a warning that names people with only subscription logins means their jobs will be refused. Theintake posture: gatewaycheck must be ok too. - Deploy as upgrading.md says, then run
hangar doctoragain.
Local Docker¶
off is gone as well: it was never the documented setting for local work. Jobs you submit yourself over MCP, REST or
the CLI aren't intake jobs, so a laptop without an intake front door sees no change.
With one, run hangar on a Linux Docker host with the gateway, or on GKE. Docker Desktop can't run the proxied sandboxes intake jobs need.
Rolling back¶
Roll the image back to v0.2.0 (upgrading.md). v0.2.0 still reads both switches. Set one again only if a team must run without the gateway or the API keys for a while.