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

Disable http2 for indexServer #191

Merged
merged 10 commits into from
Nov 28, 2023
Merged

Conversation

thepetk
Copy link
Contributor

@thepetk thepetk commented Nov 22, 2023

Please specify the area for this PR

/server

What does does this PR do / why we need it:

This PR disables the HTTP2 protocol from the index server, following the instructions from here: https://pkg.go.dev/net/http#hdr-HTTP_2

This task is related to the mitigation of the Rapid Reset CVE. More info can be found in the related issue: devfile/api#1342

Which issue(s) this PR fixes:

Fixes devfile/api#1342

PR acceptance criteria:

  • Test Coverage
    • Are your changes sufficiently tested, and are any applicable test cases added or updated to cover your changes?

Documentation (WIP)

How to test changes / Special notes to the reviewer:

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 22, 2023
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Attention: 13 lines in your changes are missing coverage. Please review.

Comparison is base (055e74c) 35.93% compared to head (c0fe759) 35.58%.

Files Patch % Lines
index/server/pkg/server/index.go 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #191      +/-   ##
==========================================
- Coverage   35.93%   35.58%   -0.35%     
==========================================
  Files           7        7              
  Lines        1347     1360      +13     
==========================================
  Hits          484      484              
- Misses        816      829      +13     
  Partials       47       47              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* Disable http2 in server

Signed-off-by: thepetk <thepetk@gmail.com>

* Add env var for http2 enablement

Signed-off-by: thepetk <thepetk@gmail.com>

* Fix typo for env var

Signed-off-by: thepetk <thepetk@gmail.com>

---------

Signed-off-by: thepetk <thepetk@gmail.com>
* Disable http2 in server

Signed-off-by: thepetk <thepetk@gmail.com>

* Add env var for http2 enablement

Signed-off-by: thepetk <thepetk@gmail.com>

* Fix typo for env var

Signed-off-by: thepetk <thepetk@gmail.com>

* Add env var to dockerfile

Signed-off-by: thepetk <thepetk@gmail.com>

* Fix ci.yaml workflow

Signed-off-by: thepetk <thepetk@gmail.com>

* Fix typo in the workflows

Signed-off-by: thepetk <thepetk@gmail.com>

---------

Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
* Disable http2 in server

Signed-off-by: thepetk <thepetk@gmail.com>

* Add env var for http2 enablement

Signed-off-by: thepetk <thepetk@gmail.com>

* Fix typo for env var

Signed-off-by: thepetk <thepetk@gmail.com>

---------

Signed-off-by: thepetk <thepetk@gmail.com>
Signed-off-by: thepetk <thepetk@gmail.com>
build_registry.sh Outdated Show resolved Hide resolved
Signed-off-by: thepetk <thepetk@gmail.com>
@thepetk
Copy link
Contributor Author

thepetk commented Nov 27, 2023

As the current issue is related to security, I'd suggest to create a separate issue in order to improve the coverage on index.go (having in mind that the coverage diff is ~0,3%)

@thepetk
Copy link
Contributor Author

thepetk commented Nov 27, 2023

As the current issue is related to security, I'd suggest to create a separate issue in order to improve the coverage on index.go (having in mind that the coverage diff is ~0,3%)

I've created issue devfile/api#1361 in order to keep track of the new test cases implementation

Copy link
Member

@michael-valdron michael-valdron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Nov 27, 2023
Copy link

openshift-ci bot commented Nov 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: michael-valdron, thepetk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [michael-valdron,thepetk]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@thepetk thepetk merged commit 7ad160f into devfile:main Nov 28, 2023
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
2 participants