Skip to content
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

fix(security_response_headers): update Permissions-Policy default val… #205039

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/setup/settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ experimental[] Controls whether the https://developer.mozilla.org/en-US/docs/Web
is used in all responses to the client from the {kib} server, and specifies what value is used. Allowed values are any text value or `null`.
Refer to the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy[`Permissions-Policy` documentation] for defined
directives, values, and text format. To disable, set to `null`.
*Default:* `camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()`
*Default:* `camera=(), display-capture=(), fullscreen=(self "https://*.vidyard.com" "http://*.vidyard.com"), geolocation=(), microphone=(), web-share=()`

[[server-securityResponseHeaders-permissionsPolicyReportOnly]] `server.securityResponseHeaders.permissionsPolicyReportOnly`::
experimental[] Controls whether the https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy[`Permissions-Policy-Report-Only`] header
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe('parseRawSecurityResponseHeadersConfig', () => {
expect(result.securityResponseHeaders).toMatchInlineSnapshot(`
Object {
"Cross-Origin-Opener-Policy": "same-origin",
"Permissions-Policy": "camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()",
"Permissions-Policy": "camera=(), display-capture=(), fullscreen=(self 'https://*.vidyard.com' 'http://*.vidyard.com'), geolocation=(), microphone=(), web-share=()",
"Referrer-Policy": "strict-origin-when-cross-origin",
"X-Content-Type-Options": "nosniff",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export const securityResponseHeadersSchema = schema.object({
// See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy
// Note: this currently lists all non-experimental permissions, as of May 2023
defaultValue:
'camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=()',
'camera=(), display-capture=(), fullscreen=(self "https://*.vidyard.com" "http://*.vidyard.com"), geolocation=(), microphone=(), web-share=()',
}),
permissionsPolicyReportOnly: schema.maybe(schema.oneOf([schema.string(), schema.literal(null)])),
disableEmbedding: schema.boolean({ defaultValue: false }), // is used to control X-Frame-Options and CSP headers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function ({ getService }: FtrProviderContext) {
const baseCSP = `script-src 'report-sample' 'self'; worker-src 'report-sample' 'self' blob:; style-src 'report-sample' 'self' 'unsafe-inline'; frame-ancestors 'self'`;
const defaultCOOP = 'same-origin';
const defaultPermissionsPolicy =
'camera=(), display-capture=(), fullscreen=(self), geolocation=(), microphone=(), web-share=();report-to=violations-endpoint';
'camera=(), display-capture=(), fullscreen=(self "https://*.vidyard.com" "http://*.vidyard.com"), geolocation=(), microphone=(), web-share=();report-to=violations-endpoint';
const defaultStrictTransportSecurity = 'max-age=31536000; includeSubDomains';
const defaultReferrerPolicy = 'strict-origin-when-cross-origin';
const defaultXContentTypeOptions = 'nosniff';
Expand Down