feat: Follow-ups after the 1.3.0 delivery: Phase B credential scoping, a stranded uncertain row, and the prod client-env sessi - #82
Conversation
…, a stranded uncertain row, and the prod client-env sessi
|
Triaged this against current State of this PR
The change itself is good. Dropping the unscoped One correction was needed. This PR rewrote two boundary guards in !strcontains(upper(entry.name), "ACCESS_KEY")to That converts a pattern into a name allowlist, on exactly the worker/migration task definitions whose SES-blind task roles are the reason inbound mail keeps working. It also wasn't necessary: after the scoping change those tasks carry only Two things #85 flags for the coordinator rather than deciding:
Recommend closing this in favour of #85. |
…-key guards main already carries this branch's SES credential scoping (landed as #85, 0c54ce3) and then corrected the test guards in c96b196. This merge resolves both conflicts in favour of main: - deploy/aws/tests/dormant.tftest.hcl: restores !strcontains(upper(entry.name), "ACCESS_KEY") in the worker/migration guard of ses_credentials_injected_by_arn_reference_only and in the API guard of no_ses_credentials_leaves_the_task_role_alone. The 4-name allowlist this branch carried let any future credential secret under a different access-key name pass, on exactly the task definitions whose SES-blind task roles keep inbound mail working. - CHANGELOG.md: main's entry is a strict superset; no branch content is lost. The resulting tree is byte-identical to origin/main, so this branch can no longer regress the default branch.
Objective
Follow-ups after the 1.3.0 delivery: Phase B credential scoping, a stranded uncertain row, and the prod client-env session token
Resolve GitHub issue #61 and open a PR against hasna/emails.
Issue URL: #61
Target repo checkout: /home/hasna/workspace/hasna/opensource/open-emails
--- Issue body ---
Three loose ends from the 2026-07-25 delivery of
@hasna/emails1.3.0 (merged #55, #54, #56, #57, #58, #59; deployed asemails-prod:28). None of them blocks the release; all three were found while verifying it.1. Phase B — drop the unscoped
AWS_*credential pair fromemails-prodemails-prod:28injects both name pairs from Secrets Manager:AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY— repoints the container's whole SDK default credential chain at638389534677EMAILS_SES_ACCESS_KEY_ID/EMAILS_SES_SECRET_ACCESS_KEY— the scoped names 1.3.0's sender readsThe unscoped pair existed to make the 1.2.7 image send without a code change. 1.3.0 is now live and its boot log confirms
credentials=environment, so the unscoped pair is redundant and should go — leaving the default chain back on the API task role.It is safe today only because
emails-prodruns["src/server/index.ts"]and makes no S3/SQS calls. That is a property of the current entrypoint, not a guarantee, so it should not be relied on indefinitely.Change is in
hasna/hasna-xyz-infra,apps/emails/prod/taskdefs/emails-prod.json. Keep it offemails-prod-ingest-workereither way — the alumia principal has no SQS or inbound-bucket access.2. One send intent is legitimately still
uncertainand needs SES-log-level evidence16bb4fa4-0458-4ceb-ab23-f7373ac14b98— 2026-07-24T18:40:54Z,andrei@hasna.com, subject "CAPS PROBE 1x 64KiB (sub limita)".Thirteen of the fourteen uncertain rows were reconciled on evidence. This one cannot be, and it is worth understanding rather than closing:
789877399345, 1-minute buckets, showsSend=1in the 18:40Z minute — the exact minute this intent was created — and that datapoint is **not claimed by any[...body truncated; see issue URL for full text...]
Verification
Run
run_a50ad6238563· backendcodewith· taskb16075b8-ae32-4671-a3b0-f930480ed9a5🏭 Generated by @hasnaxyz/factory
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.