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

[Do Not Merge] Add support for HTTP Boot through Proxy Server #6146

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

SaloniKasbekar
Copy link
Contributor

@SaloniKasbekar SaloniKasbekar commented Aug 31, 2024

Description

[Do not merge]
Adds new feature to support HTTP Boot through Proxy Server. Adds HTTP CONNECT flow to connect through Proxy Server to then use HTTP GET/HEAD to retrieve Endpoint Server boot file.

  • Breaking change?

  • Impacts security?

  • Includes tests?

How This Was Tested

Verified as part of Edk2-staging branch. Also tested on CI.

Integration Instructions

N/A

@SaloniKasbekar
Copy link
Contributor Author

SaloniKasbekar commented Aug 31, 2024

This draft PR tests the changes from https://github.com/tianocore/edk2-staging/commits/HttpProxy/ to support HTTP Boot using Proxy Server on top of the latest Edk2 stack.

@SaloniKasbekar SaloniKasbekar changed the title Add support for HTTP Boot through Proxy Server [Do Not Merge] Add support for HTTP Boot through Proxy Server Sep 9, 2024
@SaloniKasbekar SaloniKasbekar force-pushed the B3951_Http_Proxy branch 2 times, most recently from ba6afd3 to 7b07c08 Compare September 10, 2024 19:59
Copy link

mergify bot commented Sep 13, 2024

PR can not be merged due to conflict. Please rebase and resubmit

Introduce EFI_HTTP_CONNECT_REQUEST_DATA structure to handle HTTP
CONNECT requests

Signed-off-by: Saloni Kasbekar <[email protected]>
1. Store information  in HttpInstance.
a) Proxy URL from last HTTP CONNECT request (ProxyUrl) and its length
(ProxyUrlLen).
b) State of connection to proxy server (ProxyConnected) - TRUE after
HTTP CONNECT success.
c) Host name extracted from endpoint URL (EndPointHostName).

2. Modified EfiHttpRequest() flow to handle HTTP CONNECT request.
a) Treating request's URL as "endpoint URL". In case of HTTP CONNECT
request, directing it to Proxy URL with Host set to "endpoint URL".

3. Added PrintLib instance to cover AsciiSPrint() call.

Signed-off-by: Saloni Kasbekar <[email protected]>
1. In EfiHttpRequest():
a) Decision to use HTTPS in HTTP CONNECT is based on Proxy URL.
b) Support PUT/POST with no headers when connected to proxy.

2. In HttpConnectTcp4/6():
a) Add new argument to provide new TLS session establishment indication
(TlsConfigure).
a) Create HTTP connection only when not connected to proxy.
b) Do not create new HTTP connection when client is connected to proxy.

3. In HttpInitSession(), pass TlsConfigure to HttpConnectTcp4 calls.

4. In TlsConfigureSession(), when connected to proxy, use recorded
endpoint's host name for TLS VerifyHost.

Signed-off-by: Saloni Kasbekar <[email protected]>
Add Proxy URI field to HTTP Boot HII

Signed-off-by: Saloni Kasbekar <[email protected]>
Build boot option with HII provided ProxyUri by utilizing URI
validation path in HII callback for ProxyUri.

Signed-off-by: Saloni Kasbekar <[email protected]>
Update library to handle HTTP Boot device paths with Proxy URI

Signed-off-by: Saloni Kasbekar <[email protected]>
Update HTTP_BOOT_PRIVATE_DATA structure to include ProxyUri

Signed-off-by: Saloni Kasbekar <[email protected]>
Update device path parser to detect device path with Proxy URI

Signed-off-by: Saloni Kasbekar <[email protected]>
Update HTTP Boot Start/Stop to handle ProxyUri

Signed-off-by: Saloni Kasbekar <[email protected]>
- Add HTTP CONNECT flow to connect to Proxy Server
- Provide Proxy URL to HTTP GET/HEAD Requests

Signed-off-by: Saloni Kasbekar <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant