Bug 35456 - ini should support WebInterfacePort
ini should support WebInterfacePort
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-1-errata
Assigned To: Dirk Wiesenthal
Florian Best
:
: 37348 37944 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-07-24 01:24 CEST by Dirk Wiesenthal
Modified: 2015-03-11 15:10 CET (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments
patch (1.60 KB, patch)
2015-02-11 13:21 CET, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2014-07-24 01:24:11 CEST
Some apps install web interfaces at some non-standard port. The App Center does not support this, so the ISVs are bound to do some workarounds to register these web interfaces in the ucs-overview.

Workarounds: Write a postinst/postrm to set UCR variables by hand or add a redirect in Apache.

It would be nice to have WebInterfacePort so that this is not needed anymore.

One may argue that the port must be something else than 80/443. Alternatively, one allows these ports and sets the protocol explicitly if these values are given.
Comment 1 Nico Gulden univentionstaff 2014-07-31 11:36:47 CEST
It think it is good to add the possibility to define a port for the App's web interface. 

The problem with ports is the Amazon EC2 environment or any other virtualization that blocks access to instances for non-whitelisted ports. Each Amazon instance is secured by a security group that e.g. allows ports 22, 80 and 443. In such an environment other ports will not work and therefore the app's web interface cannot be reached. It is not possible to add other ports to an existing security group. A new security group has to be defined and assigned to the instance when switched off.

A better approach would be to create a reverse proxy from <fqdn>/<app name> → localhost:port/. 

Would it be possible to add a feature that automatically creates such a reverse proxy setting automatically by the App Center, as soon as such a port is defined? I rate this feature as quite usefull for the ISVs. But, does it work generically for all apps providing the web interface via an own port?
Comment 2 Felix Botner univentionstaff 2014-12-15 15:15:32 CET
*** Bug 37348 has been marked as a duplicate of this bug. ***
Comment 3 Felix Botner univentionstaff 2014-12-15 15:16:49 CET
again, Ticket #2014121521000054
Comment 4 Florian Best univentionstaff 2015-02-11 12:55:20 CET
Alex and me discussed that the directive WebInterface should support URL's like ":8090/myserver" instead of a new variable WebInterfacePort.
I am adjusting this in the appcenter and UCS-overview.
Comment 5 Florian Best univentionstaff 2015-02-11 13:21:04 CET
Created attachment 6664 [details]
patch
Comment 6 Florian Best univentionstaff 2015-02-11 13:22:46 CET
Attached is a patch which would do this. As Dirk and I discussed it's better to also add WebInterfacePort in the ini file. The hunk for the ucs-overview can be taken from the patch. The appcenter hunk would have to be adapted.
Comment 7 Dirk Wiesenthal univentionstaff 2015-03-04 03:24:00 CET
Supporting needs changes in umc-appcenter and univention-apache. The latter package has another pending patch (Bug #37566) so we cannot release it now.

But as it is a new UCR variable, ucs-overview may just ignore it for the time being. umc-appcenter is patched and built.

With this patch, the Dev Guide and the App Tutorial need to be adjusted.
Comment 8 Florian Best univentionstaff 2015-03-04 13:15:56 CET
Setting to assigned as you committed already.
Comment 9 Florian Best univentionstaff 2015-03-05 12:20:52 CET
*** Bug 37944 has been marked as a duplicate of this bug. ***
Comment 10 Florian Best univentionstaff 2015-03-05 12:21:22 CET
(In reply to Florian Best from comment #9)
> *** Bug 37944 has been marked as a duplicate of this bug. ***
→ Bug was introduced here.
Comment 11 Florian Best univentionstaff 2015-03-06 11:14:10 CET
Can you also have a look at the URI of andiga groupware migration? If it is installed it has a link ("open") which has broken URlencoding in its URL ('&amp;' instead of &)
Comment 12 Dirk Wiesenthal univentionstaff 2015-03-09 10:09:51 CET
(In reply to Florian Best from comment #11)
> Can you also have a look at the URI of andiga groupware migration? If it is
> installed it has a link ("open") which has broken URlencoding in its URL
> ('&amp;' instead of &)

Done
Comment 13 Dirk Wiesenthal univentionstaff 2015-03-10 10:58:55 CET
/ucs-overview fixed in
  univention-apache 7.0.16-7.229.201503040309
Comment 14 Florian Best univentionstaff 2015-03-10 11:57:50 CET
As discussed: We also need to specify the protocol scheme (http/https) belonging to that port.
What about web interfaces which support http on port 81 and https on port 444?
Comment 15 Dirk Wiesenthal univentionstaff 2015-03-10 14:16:29 CET
Added WebInterfacePortHTTP and WebInterfacePortHTTPS and ucs/web/.../port_http and .../port_https resp.
Comment 16 Florian Best univentionstaff 2015-03-11 09:30:48 CET
 set_registry_var('ucs/web/overview/entries/service/webweaver/port_http', '81') ERROR 'int' object has no attribute 'decode'
Comment 17 Dirk Wiesenthal univentionstaff 2015-03-11 09:40:14 CET
Fixed in
  univention-management-console-module-appcenter 4.1.20-14.323.201503110933
Comment 18 Florian Best univentionstaff 2015-03-11 11:48:28 CET
" Uncaught SyntaxError: Unexpected token }" when opening the link to the UMC module
Comment 19 Dirk Wiesenthal univentionstaff 2015-03-11 12:44:35 CET
Fixed
Comment 20 Florian Best univentionstaff 2015-03-11 13:05:10 CET
OK: HTTPS
OK: HTTP
OK: UCS-overview
OK: appcenter-link
OK: all other appcenter functionality
OK: YAML
Comment 21 Moritz Muehlenhoff univentionstaff 2015-03-11 15:07:40 CET
http://errata.univention.de/ucs/4.0/103.html
Comment 22 Moritz Muehlenhoff univentionstaff 2015-03-11 15:10:03 CET
http://errata.univention.de/ucs/4.0/96.html