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

pass Headers in Nomad Artifacts stanza #9306

Closed
Settler opened this issue Nov 10, 2020 · 2 comments · Fixed by #9352
Closed

pass Headers in Nomad Artifacts stanza #9306

Settler opened this issue Nov 10, 2020 · 2 comments · Fixed by #9352
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/artifact type/enhancement

Comments

@Settler
Copy link

Settler commented Nov 10, 2020

Hello.
Is there any possibility to specify Headers in Artifacts stanza? I'm searching way to add Authorization header to allow Nomad to download artifacts from our secured backend server.

I saw this issue in go-getter repository hashicorp/go-getter#71. So they added this possibility, but Nomad, as I understand, still doesn't allow that in Artifacts.

@tgross
Copy link
Member

tgross commented Nov 11, 2020

Hi @Settler! It looks like that was implemented in go-getter as an option on HttpGetter. But there's not currently a way to get those headers added from a Nomad option. That seems like a reasonable thing to do though, so I'll mark this as an enhancement for future work.

@tgross tgross added theme/artifact type/enhancement stage/accepted Confirmed, and intend to work on. No timeline committment though. labels Nov 11, 2020
@tgross tgross changed the title [Question] Possibility to pass Headers in Nomad Artifacts stanza pass Headers in Nomad Artifacts stanza Nov 11, 2020
@shoenig shoenig self-assigned this Nov 12, 2020
shoenig added a commit that referenced this issue Nov 13, 2020
This PR adds the ability to set HTTP headers when downloading
an artifact from an `http` or `https` resource.

The implementation in `go-getter` is such that a new `HTTPGetter`
must be created for each artifact that sets headers (as opposed
to conveniently setting headers per-request). This PR maintains
the memoization of the default Getter objects, creating new ones
only for artifacts where headers are set.

Closes #9306
shoenig added a commit that referenced this issue Nov 13, 2020
This PR adds the ability to set HTTP headers when downloading
an artifact from an `http` or `https` resource.

The implementation in `go-getter` is such that a new `HTTPGetter`
must be created for each artifact that sets headers (as opposed
to conveniently setting headers per-request). This PR maintains
the memoization of the default Getter objects, creating new ones
only for artifacts where headers are set.

Closes #9306
shoenig added a commit that referenced this issue Nov 13, 2020
This PR adds the ability to set HTTP headers when downloading
an artifact from an `http` or `https` resource.

The implementation in `go-getter` is such that a new `HTTPGetter`
must be created for each artifact that sets headers (as opposed
to conveniently setting headers per-request). This PR maintains
the memoization of the default Getter objects, creating new ones
only for artifacts where headers are set.

Closes #9306
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/artifact type/enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants