Bug 1990826
Summary: | New non-secure and secure routes without hsts annotation fail to get created in globally enforced hsts domain resources | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Arvind iyengar <aiyengar> |
Component: | Networking | Assignee: | Candace Holman <cholman> |
Networking sub component: | router | QA Contact: | Arvind iyengar <aiyengar> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | high | ||
Priority: | high | CC: | aos-bugs, cholman, mmasters |
Version: | 4.9 | ||
Target Milestone: | --- | ||
Target Release: | 4.9.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2021-10-18 17:45:05 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Arvind iyengar
2021-08-06 11:00:40 UTC
Verified in "4.9.0-0.ci.test-2021-08-17-062351-ci-ln-5bhh0h2-latest" latest Ci image. With this fix in place, the following are the set of observations made with HSTS enforced domain: - new non-TLS routes can be added with "oc expose" command. - new non-TLS routes can be added via templates with "oc create -f" command. - new TLS route cannot be added via "oc expose" or "oc create route" command due to no hsts annotation options with the command. - new TLS route cannot be added via "oc create -f" without the HSTS annotations defined in the template [behavior as per the proposal] Test excerpts: ------ oc get clusterversion NAME VERSION AVAILABLE PROGRESSING SINCE STATUS version 4.9.0-0.ci.test-2021-08-17-062351-ci-ln-5bhh0h2-latest True False 158m Cluster version is 4.9.0-0.ci.test-2021-08-17-062351-ci-ln-5bhh0h2-latest Hsts configurations set: spec: domain: apps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com requiredHSTSPolicies: - domainPatterns: - '*.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com' includeSubDomainsPolicy: RequireIncludeSubDomains maxAge: largestMaxAge: 31536000 smallestMaxAge: 1 preloadPolicy: RequirePreload Creating a non-tls route in the same domain: oc expose svc service-unsecure --hostname=service-unsecure-hsts-test.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com --name=unsecure-route2 route.route.openshift.io/unsecure-route2 exposed oc get route NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD edge-route edge-route-hsts-test.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com ... 1 more service-unsecure http edge None unsecure-route2 service-unsecure-hsts-test.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com ... 1 more service-unsecure http None curl http://service-unsecure-hsts-test.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com -I HTTP/1.1 200 OK server: nginx/1.18.0 date: Tue, 17 Aug 2021 09:39:02 GMT content-type: text/html content-length: 46 last-modified: Tue, 17 Aug 2021 07:14:56 GMT etag: "611b61f0-2e" accept-ranges: bytes set-cookie: c60d84bf5237065c1fc86b6a6baf745b=72e230a16cbc2cfe687dcfe93baa9f5d; path=/; HttpOnly cache-control: private Creating a non-tls route via template: at unsecure-route-PR240.yaml apiVersion: route.openshift.io/v1 kind: Route metadata: name: unsecure-route3 namespace: hsts-test spec: host: service-unsecure3-hsts-test.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com port: targetPort: http to: kind: Service name: service-unsecure weight: 100 wildcardPolicy: None status: oc create -f unsecure-route-PR240.yaml route.route.openshift.io/unsecure-route3 created oc get route NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD edge-route edge-route-hsts-test.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com ... 1 more service-unsecure http edge None unsecure-route2 service-unsecure-hsts-test.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com ... 1 more service-unsecure http None unsecure-route3 service-unsecure3-hsts-test.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com ... 1 more service-unsecure http None curl -I http://service-unsecure3-hsts-test.internalapps.ci-ln-5bhh0h2-f76d1.origin-ci-int-gce.dev.openshift.com HTTP/1.1 200 OK server: nginx/1.18.0 date: Tue, 17 Aug 2021 09:42:29 GMT content-type: text/html content-length: 46 last-modified: Tue, 17 Aug 2021 07:14:56 GMT etag: "611b61f0-2e" accept-ranges: bytes set-cookie: b228a2f71026e1b0c795276730fbdd2c=72e230a16cbc2cfe687dcfe93baa9f5d; path=/; HttpOnly cache-control: private ------ Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: OpenShift Container Platform 4.9.0 bug fix and security update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:3759 |