-
Notifications
You must be signed in to change notification settings - Fork 582
NE-310 Implement route admission support for HSTS header #958
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,6 +54,31 @@ type IngressSpec struct { | |
| // configurable routes. | ||
| // +optional | ||
| ComponentRoutes []ComponentRouteSpec `json:"componentRoutes,omitempty"` | ||
|
|
||
| // requiredHSTSPolicies specifies HSTS policies that are required to be set on newly created or updated routes | ||
| // matching the domainPattern/s and namespaceSelector/s that are specified in the policy. | ||
| // Each requiredHSTSPolicy must have at least a domainPattern and a maxAge to validate a route HSTS Policy route | ||
| // annotation, and affect route admission. | ||
| // | ||
| // A candidate route is checked for HSTS Policies if it has the HSTS Policy route annotation: | ||
| // "haproxy.router.openshift.io/hsts_header" | ||
| // E.g. haproxy.router.openshift.io/hsts_header: max-age=31536000;preload;includeSubDomains | ||
| // | ||
| // - For each candidate route, if it matches a requiredHSTSPolicy domainPattern and optional namespaceSelector, | ||
| // then the maxAge, preloadPolicy, and includeSubdomainsPolicy must be valid to be admitted. Otherwise, the route | ||
| // is rejected. | ||
| // - The first match, by domainPattern and optional namespaceSelector, in the ordering of the RequiredHSTSPolicies | ||
| // determines the route's admission status. | ||
| // - If the candidate route doesn't match any requiredHSTSPolicy domainPattern and optional namespaceSelector, | ||
| // then it may use any HSTS Policy annotation. | ||
| // | ||
| // The HSTS policy configuration may be changed after routes have already been created. An update to a previously | ||
| // admitted route may then fail if the updated route does not conform to the updated HSTS policy configuration. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The admission plugin should only fail on a route update if hsts related values are changing. This statement is accurate if constrained to that case. If you bump into some questions about how to make that ratchet, we can get into it on the admission PR.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you. |
||
| // However, changing the HSTS policy configuration will not cause a route that is already admitted to stop working. | ||
| // | ||
| // Note that if there are no RequiredHSTSPolicies, any HSTS Policy annotation on the route is valid. | ||
| // +optional | ||
| RequiredHSTSPolicies []RequiredHSTSPolicy `json:"requiredHSTSPolicies,omitempty"` | ||
| } | ||
|
|
||
| // ConsumingUser is an alias for string which we add validation to. Currently only service accounts are supported. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.