Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove escape from TOWER_ACCESS_TOKEN env var #27

Merged
merged 1 commit into from
May 28, 2024

Conversation

ejseqera
Copy link
Member

@ejseqera ejseqera commented May 1, 2024

Fixes the following error when running on GCP:

Command error:
  /mnt/disks/nf-tower-test-eu-1/scratch/2CqabFbg1cVUxD/14/2844a1e3d4392d478f740b92d2f367/.command.sh: line 4: TOWER_ACCESS_TOKEN: unbound variable

When we escape the TOWER_ACCESS_TOKEN variable with \, Google Batch interprets that as a literal string instead of performing variable substitution and craps out. Removal of this results in a successful run as we are able to authenticate, but Batch performs variable expansion during script execution before logging occurs so the token is shown in the logs.

Probably not the best practice but I am not sure of how to workaround this. Any ideas?

@drpatelh drpatelh merged commit 3e517b2 into dev May 28, 2024
22 checks passed
@drpatelh drpatelh changed the title fix: remove escape from tower env var fix: remove escape from TOWER_ACCESS_TOKEN env var May 28, 2024
@ejseqera
Copy link
Member Author

After some testing, it is fine to merge this in to allow nf-aggregate to be run on GCP without being concerned about the access token being exposed in the logs or elsewhere.

The expectation is that users will not have to explicitly specify an access token but instead use the ephemeral access token available on the head node when running through the Platform. This access token expires after about 1hr after so even if it is exposed in the logs, it is not valid thereafter nor is it tied to any specific user.

@ejseqera ejseqera deleted the tower-var-fix-gcp branch May 28, 2024 17:15
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.

None yet

2 participants