Skip to content

Terraform: generate and deliver the session-binding key to the backend pods - #41

Merged
odinwang merged 1 commit into
mainfrom
feat/session-binding-secret
Sep 19, 2026
Merged

odinwang merged 1 commit into
mainfrom
feat/session-binding-secret

Conversation

@odinwang

Copy link
Copy Markdown
Contributor

Summary

#39 keys the caller-binding of AgentCore session ids with PLATFORM_SESSION_BINDING_SECRET, and falls back to deployment identifiers when it is unset. This gives the Terraform path a real key.

  • random_password.session_binding in the portal module, same shape as origin_verify (rotation = taint the resource, then apply).
  • Delivered to the backend and entry releases through the chart's Kubernetes Secret via set_sensitive, so every replica binds identically and the value never lands in the rendered values. The chart already supports secretEnv (Keycloak and the team services use it).
  • docs/deployment.md: a paragraph next to the portal-admin secret on what the key does, that nothing needs creating by hand, and that rotating it ends continuity for open Debug/channel conversations.

Ordering

Merge after #39. Without #39 the env var is simply unread; with #39 and without this, the backend runs on the derived fallback key, which is fine for a laptop and not for a shared deployment.

Verified

terraform fmt -check, terraform validate, and a terraform plan against the live stack: 1 to add, 2 to change, 0 to destroy — the new random_password, and the two portal releases picking up set_sensitive alongside the image bump they were already getting.

deploy-cli is not changed here; that path's backend values file has no secretEnv yet and gets the fallback key. Follow-up.

🤖 Generated with Claude Code

PR #39 binds caller-supplied AgentCore session ids to the authenticated
tenant with an HMAC under PLATFORM_SESSION_BINDING_SECRET and falls back to
deployment identifiers when it is unset. Generate the key in the portal
module (random_password, same shape as origin_verify) and deliver it to the
backend and entry pods through the chart's Secret via set_sensitive, so
every replica binds identically and the value never appears in the rendered
values. Document it next to the portal-admin secret, including that
rotation ends continuity for open sessions.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@odinwang
odinwang merged commit 2a6c101 into main Sep 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant