Comments (1)
@insonifi I'm taking a look into this now.
Many web-login mechanisms require that you post to a login url to retrieve a session cookie then maintain and provide that session cookie in subsequent requests to prove that you are logged in. Adding this type of login functionality would likely be a very large change, but is possible.
Without migrating to powershell 3.0 mechanisms (and abandoning old platforms) we may be able to utilize the WebClient UploadString
method to push login credentials to a login url, prior to using DownloadFile
to actually retrieve the resource.
The above assumes that this is a traditional web login with session cookies mechanism, as this is common for build servers. An easier solution is available if the server you're authenticating with is able to accept basic authentication (Here is a test page to show you what basic authentication looks like) then what I can use the WebClient Headers.add
method to put an "authentication" header with a value of "Basic <%= @authkey %>"
and set @authkey
to be `Stdlib::Base64("${username}:${password}").
I'm currently working on making puppet-download_file a bit more powerful and more platform agnostic (by possibly leveraging wget and curl for OSX/Linux). I'll keep you up to date on my efforts if you're still looking for a solution. I know March to November is a long wait, so this might not even be relevant.
from puppet-download_file.
Related Issues (19)
- Dependency on c:\temp causes collision/failure to apply catalog HOT 1
- puppetlabs-powershell got updated in january to 3.0.1 HOT 4
- Be able to specify destination file-name HOT 5
- Command timeout for big files HOT 5
- SSL Error
- Temp resource created without being used
- Use Windows temp dir
- Webclient doesn't support downloading URLs with query-strings HOT 2
- Error when the filename in the URL has spaces HOT 1
- Delete powershell file after download complete HOT 1
- Windows Nano Server support HOT 1
- Name the PowerShell script after destination file if set HOT 1
- Download to windows Folder
- Download works but throws an error
- Use ruby api to download file instead of powershell. HOT 3
- Download from github.com returns WebException The request was aborted: Could not create SSL/TLS secure channel. HOT 7
- Fails to download when the destination_directory has space character
- puppetlabs/stdlib version below 6.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from puppet-download_file.