Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16544 from pecameron/bz1430035
Automatic merge from submit-queue (batch tested with PRs 14558, 16544). Router support for Strict-Transport-Security (hsts) Strict-Transport-Security (hsts) support (RFC 6797) is a way that the host can tell clients to always use https requests to the host. It is controlled by adding the haproxy.router.openshift.io/hsts_header annotation to the route. When the Strict-Transport-Security response is received by a client, it respects the request until: 1) It is updated by the response from the host to another request. 2) the max-age decrements to 0 The max-age is only updated when the client receives a response that contains the Strict-Transport-Security header. Other than that the client just decrements max-age to 0. When hsts is no longer desired for a host set max-age=0 in the annotation rather than deleting the annotation. There is no telling when a client will make a request to the host. In the route add the annotation: metadata: annotations: haproxy.router.openshift.io/hsts_header: max-age=31536000;includeSubDomains Where max-age=<seconds> is required and includeSubDomains and preload are optional. When the annotation is present for a route https responses will include the Strict-Transport-Security header with the annotation's value. The annotation value must contain max-age=<seconds> and it may contain either or both of: includeSubDomains and preload. max-age sets the length of time the client should force requests to the host to be https. max-age=31536000 is one year. includeSubDomains requests all subdomains of the host should observe the max-age of the host. preload tells the client to include this host in its host preload list. Bug: 1430035 https://bugzilla.redhat.com/show_bug.cgi?id=1430035 Trello: https://trello.com/c/H1FhCI1I/452-3-sccfsi-support-hsts-policy
- Loading branch information