Skip to content

Expose the temporary tc credentials to the script - #798

Merged
jcristau merged 2 commits into
mozilla-releng:mainfrom
jcristau:temp-credentials-in-env
May 26, 2026
Merged

Expose the temporary tc credentials to the script#798
jcristau merged 2 commits into
mozilla-releng:mainfrom
jcristau:temp-credentials-in-env

Conversation

@jcristau

Copy link
Copy Markdown
Contributor

Historically scriptworker scripts have used static credentials and scopes to perform their task. For builddecisionscript however I'd like to use the scopes from the task itself to create the downstream decision task, which means the script needs access to the temporary credentials returned by claimWork or reclaimTask.

@jcristau
jcristau force-pushed the temp-credentials-in-env branch from e0156f4 to a950601 Compare May 19, 2026 14:41
@jcristau
jcristau marked this pull request as ready for review May 19, 2026 14:55
@jcristau
jcristau requested a review from a team as a code owner May 19, 2026 14:55
Comment thread src/scriptworker/context.py Outdated
@jcristau
jcristau force-pushed the temp-credentials-in-env branch from a950601 to de37854 Compare May 19, 2026 16:46
@jcristau jcristau changed the title Expose the temporary tc credentials in the environment Expose the temporary tc credentials to the script May 19, 2026
@jcristau
jcristau force-pushed the temp-credentials-in-env branch from de37854 to 82d1e28 Compare May 19, 2026 16:55
Historically scriptworker scripts have used static credentials and
scopes to perform their task.  For builddecisionscript however I'd like
to use the scopes from the task itself to create the downstream decision
task, which means the script needs access to the temporary credentials
returned by claimWork or reclaimTask.  Scriptworker now keeps a memfd
with the updated temporary credentials, and passes the corresponding fd
in the task's environment.
@jcristau
jcristau force-pushed the temp-credentials-in-env branch from 82d1e28 to 4831db5 Compare May 26, 2026 09:57
@jcristau

Copy link
Copy Markdown
Contributor Author

Updated to add tests.

@jcristau
jcristau merged commit 876d622 into mozilla-releng:main May 26, 2026
12 checks passed
@jcristau
jcristau deleted the temp-credentials-in-env branch May 26, 2026 13:32
jcristau added a commit that referenced this pull request Jun 12, 2026
#800)

In #798 I completely overlooked the fact that this code needs to run on
mac not just linux, so this reverts to a non-linux-specific mechanism.
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.

2 participants