Bug 1404753 - /api/model requires external access to https://fonts.googleapis.com
Summary: /api/model requires external access to https://fonts.googleapis.com
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: RestAPI
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Juan Hernández
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-14 14:51 UTC by Yaniv Kaul
Modified: 2017-12-20 10:59 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-20 10:59:56 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: planning_ack+
juan.hernandez: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 82103 0 master MERGED Bundle JavaScript libraries 2017-09-27 08:29:43 UTC
oVirt gerrit 82111 0 master MERGED Bundle styles and images 2017-09-27 08:29:46 UTC
oVirt gerrit 82401 0 master MERGED restapi: Integrate API explorer 2017-10-13 10:58:14 UTC
oVirt gerrit 82402 0 master MERGED Require ovirt-js-dependencies 2017-10-13 10:50:09 UTC
oVirt gerrit 82768 0 master MERGED restapi: Don't load JAX-RS annotations in apidoc 2017-10-13 13:55:47 UTC

Description Yaniv Kaul 2016-12-14 14:51:45 UTC
Description of problem:
It has an HREF to a stylesheet @ https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700

Steps to Reproduce:
1. Look at the source code of the /api/model page.

Comment 1 Yaniv Kaul 2016-12-14 14:55:28 UTC
and /apidocs seems to have also https://cdnjs.cloudflare.com/ajax/libs/highlight.js/8.9.1/styles/github.min.css

Comment 2 Juan Hernández 2016-12-20 13:24:40 UTC
Do we need/want a completely independent HTML? With no external references?

Comment 3 Yaniv Kaul 2016-12-20 13:33:59 UTC
(In reply to Juan Hernández from comment #2)
> Do we need/want a completely independent HTML? With no external references?

Yes, for more than one reason:
1. In internal networks without Internet, how will it look like?
2. Performance - it takes quite some time, for some reason, to bring those.
3. Reliability - what if they change something? Remove something? inaccessible? have been infected with some malicious JS code? etc....

Comment 4 Juan Hernández 2016-12-20 13:37:58 UTC
OK

Comment 5 Juan Hernández 2017-09-22 12:59:37 UTC
The following changes modify the 'ovirt-engine-api-explorer' application so that it doesn't require access to external resources:

  Bundle JavaScript libraries
  https://gerrit.ovirt.org/82103

  Bundle styles and images
  https://gerrit.ovirt.org/82111

A preview of the modified application is available here:

  https://jhernand.fedorapeople.org/ovirt-api-explorer

The next step is, in my opinion, to modify the engine so that it includes this application in the /ovirt-engine/apidoc URL, instead of the current static document.

Comment 6 Juan Hernández 2017-09-27 09:21:47 UTC
The fix for this issue isn't complete, we still need to modify the engine so that it uses the API explorer instead of the plain HTML documentation.

Comment 7 Juan Hernández 2017-09-30 23:52:42 UTC
The following two patches complete the integration of the API explorer into the engine:

  restapi: Integrate API explorer
  https://gerrit.ovirt.org/82401

  Require ovirt-js-dependencies
  https://gerrit.ovirt.org/82402

The API explorer doesn't use external fonts, or styles. It only uses what it bundles and what the "ovirt-js-dependencies" package provides.

The existing "model.html" file, which requires external fonts, styles and scripts, is still available, but only if explicitly requested. The default page shown when accessing /ovirt-engine/apidoc will be the API explorer.

If we consider it convenient that "model.html" can be removed.

Comment 8 Petr Matyáš 2017-10-16 11:51:23 UTC
Verified on 4.2.0-0.0.master.20171013142622.git15e767c.el7.centos

Comment 9 Sandro Bonazzola 2017-12-20 10:59:56 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.