Repository navigation
Conversation
submit_batch_job logged the full container overrides, environment included, so any credential passed to a job reached this service's logs in plain text. Values whose names look like credentials (TOKEN, KEY, SECRET, PASSWORD) are now masked in the log line; the overrides sent to AWS Batch are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ig asks A job that calls back into NGS360 as the user who started it -- a pipeline launcher overseeing its own child runs -- outlives any session token that user holds, and until now had to be handed a long-lived credential by hand. An action config can now set aws_batch.user_api_key_hours. On submit, APIServer mints an ngs360_ API key owned by the authenticated submitter, expiring after that many hours, and injects it as NGS360_AUTH_TOKEN with its id as NGS360_AUTH_KEY_ID so the job can retire it on exit. Every call the job makes is then authorized against the submitter's own roles and project memberships. The key is renamed for the Batch job id once there is one, and revoked if AWS Batch refuses the job. The key is minted only from the authenticated user, never from a username string, and the field lives on the action-only batch config so POST /jobs and tool configs cannot ask for one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Some Batch jobs call back into NGS360 as the user who started them. The case driving this is a pipeline launcher running as an AWS Batch job: for up to the job's timeout, it submits and watches child WES runs, looks up the project and uploads its results list. A session token expires long before that, so today the job has to be handed a long-lived credential by hand.
The chat agent's delegated token doesn't fit here either. It is a 5-minute JWT, and it can't be revoked once the job finishes. An
ngs360_API key already has what a job credential needs: an expiry, immediate revocation, and a row that stays auditable after retirement.What changed
aws_batch.user_api_key_hoursis a new optional field on action configs, from 1 to 168 hours. When it is set,POST /projects/{id}/actions/submitdoes the following:ngs360_API key owned by the authenticated submitter, expiring after that many hours;NGS360_AUTH_TOKEN, with its id asNGS360_AUTH_KEY_ID, so the job can retire the key on exit (PAML does this: feat: launcher orchestration support (current-task, ParentRunId tagging, per-launch key retirement) PAML#132);Batch job <job id>once AWS Batch returns an id, so a key in the user's list can be matched to its job;POST /jobstakesuserfrom the request body, so a lookup by name there would mint someone else's key.)AwsBatchConfig, soPOST /jobsand tool configs can't request a key.submit_batch_jobused to log the full container overrides, environment included. Values whose names look like credentials (TOKEN,KEY,SECRET,PASSWORD) are now masked in that log line. This commit comes first, so no commit in the series logs a minted key.Configs that don't set the field behave exactly as before.
Known limits
containerOverrides.environment, so anyone withbatch:DescribeJobscan read it until it is retired or expires. Moving it to a per-job Secrets Manager secret would remove that exposure; it's left as a follow-up.ActionPlatformis still Arvados/SevenBridges only, so this supplies the credential and launch wiring comes separately.Testing
uv run pytest: 1525 passed.flake8 api tests: clean.🤖 Generated with Claude Code