From Martin Peřina <mperina(a)redhat.com>:
Martin Peřina has submitted this change and it was merged.
Change subject: core: All hosts are allowed by default from CORSSupportFilter
......................................................................
core: All hosts are allowed by default from CORSSupportFilter
All configured hosts are added as allowed origins from CORSSupportFilter
by default if
- CORSSupport=true
- CORSAllowDefaultOrigins=true
is set by engine-config.
Additionaly, use engine-config to set:
- CORSDefaultOriginSuffixes=[comma-separated list]
If CORSDefaultOriginSuffixes is empty, origins allowed by default will be:
https://[HOST_URL]
For non-empty, one allowed origin per suffix will be provided in form:
https://[HOST_URL][suffix]
This patch is required to allow REST API requests from externally served
JS applications, like Cockpit running on a host.
Change-Id: Ie6fef4df5d1059b542293ad54e2740ac61741cd3
Signed-off-by: Marek Libra <mlibra(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
A
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/aaa/GetDefaultAllowedOriginsQuery.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/ConfigurationValues.java
A
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/GetDefaultAllowedOriginsQueryParameters.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
M backend/manager/modules/enginesso/src/main/webapp/WEB-INF/web.xml
M
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/servlet/CORSSupportFilter.java
M packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
M packaging/etc/engine-config/engine-config.properties
10 files changed, 267 insertions(+), 44 deletions(-)
Approvals:
Martin Peřina: Looks good to me, approved
Ravi Nori: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Marek Libra: Verified
--
To view, visit
https://gerrit.ovirt.org/68529
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6fef4df5d1059b542293ad54e2740ac61741cd3
Gerrit-PatchSet: 20
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Marek Libra <mlibra(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Marek Libra <mlibra(a)redhat.com>
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Oved Ourfali <oourfali(a)redhat.com>
Gerrit-Reviewer: Ravi Nori <rnori(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>