You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[FEATURE REQUEST] file.managed / cp.cache_file - support for headers for http(s) urls #61052
Is your feature request related to a problem? Please describe.
It would be extremely useful to be able to pass headers / auth information when using file.managed states. Certain file downloads are secured behind rest apis or basic auth.
Describe the solution you'd like
Similar to what was proposed here: #40537 (comment). Having the ability to pass additional args to the http(s) servers when using the source variable.
arg options should include the ability to set request type (GET), headers including content types, auth params (user/password)
Seconding this; surprised this isn't implemented already. This is also a necessity for e.g. using token auth to Vault to fetch an internal CA chain (which cannot be done via the quite limited Vault module).
Activity
johnnybubonic commentedon Jan 27, 2022
Seconding this; surprised this isn't implemented already. This is also a necessity for e.g. using token auth to Vault to fetch an internal CA chain (which cannot be done via the quite limited Vault module).
goapunk commentedon Apr 6, 2022
Same, this would be very useful
rfilgas-apex commentedon Oct 17, 2022
This would be useful for using nexus as well.
Gulluth commentedon Feb 15, 2023
+1 I stumbled upon this feature request while researching how to auth to https servers using file.managed.
dithmer commentedon Aug 30, 2023
Would love to use this as well.
If someone hints me a bit in the direction where I can find the important pieces in the code, I'd be pleased to implement it.
jdelic commentedon May 7, 2024
I also want to +1 this. I'm here because I have a server that won't let
file.manageddownload a file unless it provides anAcceptheader 🙃work around saltstack/salt#61052 and the fact that build.opensuse.org…