-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Harden security response headers for serverless offering #150884
Labels
enhancement
New value added to drive a business result
Feature:Hardening
Harding of Kibana from a security perspective
Project:Serverless
Work as part of the Serverless project for its initial release
Team:Security
Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Comments
legrego
added
Team:Security
Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
enhancement
New value added to drive a business result
Feature:Hardening
Harding of Kibana from a security perspective
Project:Serverless
Work as part of the Serverless project for its initial release
labels
Feb 10, 2023
Pinging @elastic/kibana-security (Team:Security) |
Marking as |
@clintandrewhall we are interested in setting different defaults for some of our configuration options within the serverless offering. Is the recommended way to do this via the new |
This was referenced May 1, 2023
jeramysoucy
added a commit
that referenced
this issue
May 18, 2023
Closes #150884 ## Summary Adds both strictTransportSecurity and disableEmbedding to the serverless.yml config file, which sets the defaults for Kibana running in a serverless configuration. Note that the disabling of embedding is for the serverless MVP, with a plan to more strategically and explicitly allow embedding of specific resources in future releases. - `server.securityResponseHeaders.strictTransportSecurity: max-age=31536000; includeSubDomains`: Adds the `strict-transport-security` response header. The browser should remember that a site, including subdomains, is only to be accessed using HTTPS for 1 year. - `server.securityResponseHeaders.disableEmbedding`: true adds the `X-Frame-Options` response header with a avalue of `SAMEORIGIN` and adds `frame-ancestors 'self'` to the `content-security-policy` response header. Note: if you are running without TLS enabled locally, you can disable the `strict-transport-security` response header by overriding the setting in kibana.dev.yml (see Testing step 8 below). ### Testing (locally) 1. Start Elasticearch 3. Start Kibana with `yarn start --serverless` 4. Sign into Kibana and open your browser's dev tools 5. In the network tab, inspect one of the requests for localhost 6. In the Headers tab, verify the above defined headers and values are present 7. Stop Kibana, and restart normally with `yarn start` 8. Repeat the process in steps 4-6 and verify that the above defined headers and values are not present 9. Stop Kibana, edit the Kibana.dev.yml file by adding `server.securityResponseHeaders.strictTransportSecurity: null` 10. Start Kibana with `yarn start --serverless` 11. Repeat the process in steps 4-6 and verify that the headers and values associated with disableEmbedding are present while the `strict-transport-security` response header is not present.
delanni
pushed a commit
to delanni/kibana
that referenced
this issue
May 25, 2023
) Closes elastic#150884 ## Summary Adds both strictTransportSecurity and disableEmbedding to the serverless.yml config file, which sets the defaults for Kibana running in a serverless configuration. Note that the disabling of embedding is for the serverless MVP, with a plan to more strategically and explicitly allow embedding of specific resources in future releases. - `server.securityResponseHeaders.strictTransportSecurity: max-age=31536000; includeSubDomains`: Adds the `strict-transport-security` response header. The browser should remember that a site, including subdomains, is only to be accessed using HTTPS for 1 year. - `server.securityResponseHeaders.disableEmbedding`: true adds the `X-Frame-Options` response header with a avalue of `SAMEORIGIN` and adds `frame-ancestors 'self'` to the `content-security-policy` response header. Note: if you are running without TLS enabled locally, you can disable the `strict-transport-security` response header by overriding the setting in kibana.dev.yml (see Testing step 8 below). ### Testing (locally) 1. Start Elasticearch 3. Start Kibana with `yarn start --serverless` 4. Sign into Kibana and open your browser's dev tools 5. In the network tab, inspect one of the requests for localhost 6. In the Headers tab, verify the above defined headers and values are present 7. Stop Kibana, and restart normally with `yarn start` 8. Repeat the process in steps 4-6 and verify that the above defined headers and values are not present 9. Stop Kibana, edit the Kibana.dev.yml file by adding `server.securityResponseHeaders.strictTransportSecurity: null` 10. Start Kibana with `yarn start --serverless` 11. Repeat the process in steps 4-6 and verify that the headers and values associated with disableEmbedding are present while the `strict-transport-security` response header is not present.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
enhancement
New value added to drive a business result
Feature:Hardening
Harding of Kibana from a security perspective
Project:Serverless
Work as part of the Serverless project for its initial release
Team:Security
Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Relates: #97348
In #52809 (PR: #97158) we introduced configuration properties for security response headers:
server.securityResponseHeaders.strictTransportSecurity
, default:null
(not enabled) ❌server.securityResponseHeaders.xContentTypeOptions
, default:'nosniff'
(enabled) ✅server.securityResponseHeaders.referrerPolicy
, default:'no-referrer-when-downgrade'
(enabled) ✅server.securityResponseHeaders.permissionsPolicy
, default:null
(not enabled) ❔server.securityResponseHeaders.disableEmbedding
, default:false
(not enabled, embedding is allowed) ❌Out of these, it would be good to change the default for
strictTransportSecurity
anddisableEmbedding
. I propose the following:strictTransportSecurity: max-age 31536000; includeSubDomains
disableEmbedding: true
These are notably breaking changes to the existing offering, so these settings should only be applicable in a serverless context. I believe the way to do this is to modify the config settings in
config/serverless.yml
The text was updated successfully, but these errors were encountered: