-
Notifications
You must be signed in to change notification settings - Fork 315
Open
Labels
Description
Describe the bug
The download/install via URL is not capable to process URLs with user/pass authentication included.
To Reproduce
- Go to Packages tab -> Install/Upgrade package -> URL
- Insert a url with format https://username:[email protected]/packages/package1.dp
- Install fails with
2019-10-23T14:22:30,038 [DeploymentAgent] ERROR o.e.k.d.a.i.DeploymentAgent - Exception installing package at URL https://username:[email protected]/packages/package1.dp
java.io.IOException: Server returned HTTP response code: 401 for URL: https://username:[email protected]/packages/package1.dp
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1900) ~[?:1.8.0_232]
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498) ~[?:1.8.0_232]
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268) ~[?:1.8.0_232]
at org.eclipse.kura.deployment.agent.impl.DeploymentAgent.getFileFromRemote(DeploymentAgent.java:492) ~[?:?]
at org.eclipse.kura.deployment.agent.impl.DeploymentAgent.installDeploymentPackageInternal(DeploymentAgent.java:441) ~[?:?]
at org.eclipse.kura.deployment.agent.impl.DeploymentAgent.installer(DeploymentAgent.java:309) ~[?:?]
at org.eclipse.kura.deployment.agent.impl.DeploymentAgent.lambda$0(DeploymentAgent.java:173) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_232]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
The URL works perfectly when used from curl.
Expected behavior
Authentication is processed and package installed.
Target Environment:
- OS version: Linux -- 4.4.0-cip Fix issues with the build #1 Thu Jan 31 17:58:56 CST 2019 armv7l GNU/Linux
- Additional info: Debian 9