Access project set from URL that requires authentication [message #1461365] |
Tue, 04 November 2014 13:36 |
|
We have stored a project set into the source repository and want to consume it from there. Accessing this file requires authentication. I tried to encode user/pwd into the URL like "http://<uid>:<pwd>@host/path/myProjectSet.psf".
Unfortunately this does not work. I am getting the error below. In ProjectSetImportTaskImpl I see that in getXMLContent() no options are passed to the URI converter. Does this mean anything? How does the AuthorizationHandler kick in to get the auth data?
What must be done to take the basic authentication challenge?
[11:48:47] Performing setup task Project Set Import http://karsten.thoms:jE59TDkhuXzYdLxiPDZ3Vg==@path/projectset.psf
[11:48:47] org.eclipse.oomph.util.IOExceptionWithCause: Unauthorized
at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:548)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl$Helper.getXMLContent(ProjectSetImportTaskImpl.java:291)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl$Helper.perform(ProjectSetImportTaskImpl.java:272)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl.perform(ProjectSetImportTaskImpl.java:219)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2563)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2534)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3550)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3544)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3542)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2525)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2509)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2439)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:501)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:581)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
ERROR: org.eclipse.ecf.identity code=0 Unauthorized
at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.openStreams(HttpClientRetrieveFileTransfer.java:652)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:885)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:576)
at org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter.sendRetrieveRequest(MultiProtocolRetrieveAdapter.java:106)
at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:482)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl$Helper.getXMLContent(ProjectSetImportTaskImpl.java:291)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl$Helper.perform(ProjectSetImportTaskImpl.java:272)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl.perform(ProjectSetImportTaskImpl.java:219)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2563)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2534)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3550)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3544)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3542)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2525)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2509)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2439)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:501)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:581)
... 1 more
[11:48:47] ERROR: org.eclipse.oomph.setup.core code=0 Unauthorized
org.eclipse.oomph.util.IOExceptionWithCause: Unauthorized
at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:548)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl$Helper.getXMLContent(ProjectSetImportTaskImpl.java:291)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl$Helper.perform(ProjectSetImportTaskImpl.java:272)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl.perform(ProjectSetImportTaskImpl.java:219)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2563)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2534)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3550)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3544)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3542)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2525)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2509)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2439)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:501)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:581)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
ERROR: org.eclipse.ecf.identity code=0 Unauthorized
at org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.openStreams(HttpClientRetrieveFileTransfer.java:652)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:885)
at org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:576)
at org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter.sendRetrieveRequest(MultiProtocolRetrieveAdapter.java:106)
at org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:482)
at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl$Helper.getXMLContent(ProjectSetImportTaskImpl.java:291)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl$Helper.perform(ProjectSetImportTaskImpl.java:272)
at org.eclipse.oomph.setup.projectset.impl.ProjectSetImportTaskImpl.perform(ProjectSetImportTaskImpl.java:219)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:2563)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.access$1(SetupTaskPerformer.java:2534)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil$1.run(SetupTaskPerformer.java:3550)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2313)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.performNeededSetupTasks(SetupTaskPerformer.java:3544)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer$WorkspaceUtil.access$0(SetupTaskPerformer.java:3542)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:2525)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:2509)
at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:2439)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:501)
at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:581)
... 1 more
Need professional support for Xtext, EMF, Eclipse IDE?
Go to: http://devhub.karakun.com
Twitter : @kthoms
Blog : www.karsten-thoms.de
|
|
|
|
|
|
|
|
Re: Access project set from URL that requires authentication [message #1702692 is a reply to message #1702686] |
Fri, 24 July 2015 07:16 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Matthias,
Without being able to reproduce it, it's hard to comment on what might
be wrong...
The current support was implemented to authenticate a setup hosted at
bitbucket, so you see there is prompting of the username and password,
but perhaps there are different authentication styles. Currently we only
use "Basic" as in this implementation:
org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.AuthorizationHandler.Authorization.getAuthorization()
public String getAuthorization()
{
return "Basic " + obscure(user.length() == 0 ? getPassword() :
user + ":" + getPassword());
}
On 24/07/2015 8:58 AM, Matthias Nicklisch wrote:
> Hey there,
> hope this problem here is not too off topic, I think it's kind of
> related.
>
> I am trying to get my oomph setups from a git repository.
>
> I edited the eclipse-inst.ini and added -Doomph.redirection.setups=...
> (the forum won't let me post any links here, but the URLs are correct)
>
> When starting the installer, I get a prompt for username and password.
> Unfortunately no login works. I tried it with my standard user which
> authenticates via LDAP. That didn't work. I also tried a dummy user we
> created which athenticates not via LDAP (a normal user created in our
> GitLab) but both doesn't work. Of course they have access to our
> project in which the setups are located. There is no obvious error
> message, the prompt just opens again and after a few attempts he says
> he could not connect.
> Here is what I found in my logs:
>
>
> !SESSION 2015-07-24 08:49:42.588
> -----------------------------------------------
> eclipse.buildId=unknown
> java.version=1.8.0_45
> java.vendor=Oracle Corporation
> BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_DE
> Command-line arguments: -os win32 -ws win32 -arch x86_64 -data @none
>
> !ENTRY org.eclipse.oomph.setup.ui 4 0 2015-07-24 08:49:59.026
> !MESSAGE org.eclipse.oomph.util.IOExceptionWithCause: !STACK 0
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException:
> org.eclipse.oomph.util.IOExceptionWithCause: at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
> at
> org.eclipse.oomph.setup.internal.core.util.ResourceMirror$LoadJob$1.handleDemandLoadException(ResourceMirror.java:219)
> at
> org.eclipse.oomph.setup.internal.core.util.ResourceMirror$LoadJob.perform(ResourceMirror.java:226)
> at org.eclipse.oomph.util.WorkerPool$Worker.run(WorkerPool.java:416)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: org.eclipse.oomph.util.IOExceptionWithCause: at
> org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:266)
> at
> org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
> at
> org.eclipse.oomph.setup.internal.core.util.ResourceMirror$LoadJob.perform(ResourceMirror.java:208)
> ... 2 more
> Caused by: org.eclipse.ecf.filetransfer.IncomingFileTransferException:
> at
> org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl$FileTransferListener.handleTransferEvent(ECFURIHandlerImpl.java:772)
>
> at
> org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.fireReceiveStartEvent(AbstractRetrieveFileTransfer.java:671)
> at
> org.eclipse.ecf.provider.filetransfer.httpclient4.HttpClientRetrieveFileTransfer.openStreams(HttpClientRetrieveFileTransfer.java:646)
> at
> org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:885)
> at
> org.eclipse.ecf.provider.filetransfer.retrieve.AbstractRetrieveFileTransfer.sendRetrieveRequest(AbstractRetrieveFileTransfer.java:576)
> at
> org.eclipse.ecf.provider.filetransfer.retrieve.MultiProtocolRetrieveAdapter.sendRetrieveRequest(MultiProtocolRetrieveAdapter.java:106)
> at
> org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.createInputStream(ECFURIHandlerImpl.java:201)
> ... 5 more
>
>
> Do you have any idea what could be the problem?
>
> Thanks in advance
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Re: Access project set from URL that requires authentication [message #1702736 is a reply to message #1702692] |
Fri, 24 July 2015 11:47 |
Matthias Nicklisch Messages: 20 Registered: July 2015 |
Junior Member |
|
|
Hmm, that's unfortunate...
However, we have a method in GitLab to access a repository without the usual authentication. You can add a private token (https://[URL]?private_token=someCrypticKey) to access the repository, unfortunately, if I add this token, the redirection isn't recognized anymore. Do you have an idea how I can use this token? Is there another entry I could add to the ini file?
[EDIT] I set my project to public access and the installer still want's an authentication
[Updated on: Fri, 24 July 2015 13:06] Report message to a moderator
|
|
|
Re: Access project set from URL that requires authentication [message #1702786 is a reply to message #1702736] |
Fri, 24 July 2015 14:36 |
Ed Merks Messages: 33264 Registered: July 2009 |
Senior Member |
|
|
Matthias,
Please open a bugzilla and I'll test/determine how this can be made to
work for a private github repository. Github also uses this token
approach, and indeed that doesn't play well with redirection because the
query string isn't part of what will be redirected. So perhaps if I can
get authentication to work with Github, it will also work for your case.
On 24/07/2015 1:47 PM, Matthias Nicklisch wrote:
> Hmm, that's unfortunate...
> However, we have a method in GitLab to access a repository without the
> usual authentication. You can add a private token
> (https://[URL]?private_token=someCrypticKey) to access the repository,
> unfortunately, if I add this token, the redirection isn't recognized
> anymore. Do you have an idea how I can use this token? Is there
> another entry I could add to the ini file?
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04470 seconds