Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » redirection setups
redirection setups [message #1822729] Thu, 12 March 2020 10:08 Go to next message
Christian Renner is currently offline Christian RennerFriend
Messages: 3
Registered: March 2020
Junior Member
Hi,

I'm trying to redirect the index to a Self-hosted GitLab server that requires authentication.

I followed the instructions at https://wiki.eclipse.org/Eclipse_Oomph_Authoring#Accessing_Setups_that_Require_Authentication
I added the ?oomph_form=b%27users/sign_in%27#/ parameter.

But when I launch the installer I'm not prompted for credentials and the standard setup is loaded

Any hint, why this is not working?

- Chrisitan


Re: redirection setups [message #1822746 is a reply to message #1822729] Thu, 12 March 2020 17:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
The best I can do is suggest that you set up an Oomph development environment and then debug launch the installer to investigate what's happening in the ECFURIHandlerImpl:

https://www.eclipse.org/setups/installer/?url=http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/configurations/OomphConfiguration.setup&show=true

Of course the issue could be just exactly you specified the redirections, but you've not provided any details about that...



Ed Merks
Professional Support: https://www.macromodeling.com/
Re: redirection setups [message #1822803 is a reply to message #1822746] Fri, 13 March 2020 15:50 Go to previous messageGo to next message
Christian Renner is currently offline Christian RennerFriend
Messages: 3
Registered: March 2020
Junior Member
Hi Ed,

I have done some debugging, but I don't come any further.

I have configured the redirection the following way:

-Doomph.redirection.setups=index:/->https://10.71.156.1/cvb_is_mom/mom_tools/eclipse-installer/tree/master/setups/?oomph_form=b'users/sign_in'#/

with this setting, ECFURIHandlerImpl.ConnectionHandler.ConnectionHandler(URI, Map<?, ?>) is initialized with the uri: index:/org.eclipse.setup
so there is no reference to my server

when I remove the oomph_form parameter
-Doomph.redirection.setups=index:/->https://10.71.156.1/cvb_is_mom/mom_tools/eclipse-installer/tree/master/setups/

then ConnectionHandler is initialized with the uri https://10.71.156.1/cvb_is_mom/mom_tools/eclipse-installer/tree/master/setups/org.eclipse.setup

So the complete server and path information is stripped when I add the oomph_form parameter.

What is wrong with my -Doomph.redirection.setups configuration?

- Christian

Re: redirection setups [message #1822804 is a reply to message #1822803] Fri, 13 March 2020 16:00 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
Note that the #/ is there in the wiki examples when the reference is used as an href to reference the root object in the resource. But if you're using this URI as a URI redirection of a folder to a folder, you'd not use #/ at the end of the URI because there the URI is being used to denote a resource (or a folder), not an EObject within a resource.

If you have an IDE setup, then you can set a breakpoint in org.eclipse.oomph.setup.internal.core.util.ECFURIHandlerImpl.Main.transform(URI, Map<Object, Object>) to see that it's returning the correct "stripped" URI and the correct URI for the form login.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: redirection setups [message #1822811 is a reply to message #1822804] Fri, 13 March 2020 19:30 Go to previous messageGo to next message
Christian Renner is currently offline Christian RennerFriend
Messages: 3
Registered: March 2020
Junior Member
Hi Ed,

it makes no difference when I remove the #/

running with
-Doomph.redirection.setups=index:/->https://10.71.156.1/cvb_is_mom/mom_tools/eclipse-installer/tree/master/setups/?oomph_form=b'users/sign_in'

In ECFURIHandlerImpl.Main.transform(URI, Map<Object, Object>)
uri is
index:/org.eclipse.setup
Re: redirection setups [message #1828599 is a reply to message #1822811] Sun, 14 June 2020 11:32 Go to previous messageGo to next message
Michalis Adamidis is currently offline Michalis AdamidisFriend
Messages: 5
Registered: June 2020
Junior Member
Christian: your approach probably doesn't work, because the URL you are providing isn't actually serving the repositories content but rather gitlabs UI (so html). The actual repository content can be found at <repositoryurl>/-/raw/<branchname>/pathtofile (you can get the actual path by navigating to the respective file in the browser and hit the "raw" button on top of the files overview).

With GitLab and Oomph the setup is even a bit more complicated, as GitLab seemingly doesn't serve raw directories, only files. What I've deduced up until now is, that Oomph will try to query the provided directory URL and try to search for the files (like org.eclipse.setup) within the stuff returned. If you provide a path to the directory, all oomph will receive is a 404 from GitLab.

I've had success with the following approach in the installers ini file (all referenced files are actually in the root of the repository):
-Doomph.redirection.setups=index:/org.eclipse.setup->protocol://my.gitlab.tld/path/to/project/-/raw/master/org.eclipse.setup?oomph_form=b'users/sign_in'#/
-Doomph.redirection.setups2=index:/my.products.setup->protocol://my.gitlab.tld/path/to/project/-/raw/master/my.products.setup?oomph_form=b'users/sign_in'#/
-Doomph.redirection.setups3=index:/my.projects.setup->protocol://my.gitlab.tld/path/to/project/-/raw/master/my.projects.setup?oomph_form=b'users/sign_in'#/


While that works it has of course the big downside that you would have to do that for every file in the repository. It would be easier if Oomph would just use the provided redirection path as a prefix to the filenames or provide other ways to work with repositories on that level (the last part is a bit out of scope though).

(PS: the URLs further up are a bit scrambled as the forum identified them as links and didn't let me post them, being a new forum member...)
Re: redirection setups [message #1828607 is a reply to message #1828599] Mon, 15 June 2020 04:44 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33136
Registered: July 2009
Senior Member
I wonder if the following wouldn't also work:
-Doomph.redirection.setups=index:/org.eclipse.setup->protocol://my.gitlab.tld/path/to/project/-/raw/master/org.eclipse.setup?oomph_form=b'users/sign_in'#/
-Doomph.redirection.setups2=index:/->protocol://my.gitlab.tld/path/to/project/-/raw/master/
The redirections do support folder mappings. In general the longest mapping (most specific) is applied first and the index is accessed first, so that should do the login to acquire the session cookie. For all the other resources, the folder mapping (prefix mapping), would redirect any other index:/ URIs to the corresponding resource under protocol://my.gitlab.tld/path/to/project/-/raw/master/. So in principle that should work because generally references are either relative or absolute via the index:/org.eclipse.setup, so the index should resolved first.

I still wonder that a URI with a fragment actually works....


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: redirection setups [message #1837390 is a reply to message #1828607] Fri, 29 January 2021 08:01 Go to previous message
Chris Lake is currently offline Chris LakeFriend
Messages: 25
Registered: November 2015
Junior Member
I just ran in to this problem and this post helped me with a locally hosted Bitbucket.

What I ended up with is:

-Doomph.redirection.myid=http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/->http://bitbucket/projects/PROJ/repos/gitrepo/raw/my/setups/oomph/
-Doomph.redirection.myid1=index:/org.eclipse.setup->http://bitbucket/projects/PROJ/repos/gitrepo/raw/my/setups/oomph/org.eclipse.setup?oomph_form=b'login'#/

This appears to have set the index correctly, substituting git.eclipse.org with my own location and downloaded all the relatively pathed setup files.
Previous Topic:Filter Targlet Repository Contents
Next Topic:Is there a way to set a default Installation Folder?
Goto Forum:
  


Current Time: Thu Apr 18 17:29:34 GMT 2024

Powered by FUDForum. Page generated in 0.02799 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top