<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.4 (Ruby 3.0.2) -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft-bouaram-ethernet-over-https-00" category="info" consensus="true" tocInclude="true" sortRefs="true" symRefs="true" version="3">
  <!-- xml2rfc v2v3 conversion 3.19.0 -->
  <front>
    <title abbrev="EOH">Ethernet over HTTPS Protocol</title>
    <seriesInfo name="Internet-Draft" value="draft-bouaram-ethernet-over-https-00"/>
    <author fullname="Salim-Amine BOU ARAM">
      <organization>SKELDUS</organization>
      <address>
        <email>salim@mycio.io</email>
      </address>
    </author>
    <date year="2023" month="December" day="27"/>
    <workgroup>INTAREA (Internet Area Working Group)</workgroup>
    <keyword>Ethernet</keyword>
    <keyword>HTTPS</keyword>
    <keyword>API Key</keyword>
    <keyword>TLS</keyword>
    <abstract>
      <?line 35?>
<t>This document defines a protocol for encapsulating Ethernet frames over HTTPS, allowing secure communication between a client and internal web servers. The protocol includes authentication using strong API keys encrypted with the server's public key. The communication is secured using TLS for privacy and integrity.</t>
    </abstract>
  </front>
  <middle>
    <?line 37?>

<section anchor="introduction">
      <name>Introduction</name>
      <t>Ethernet over HTTPS (EOH) extends traditional networking by allowing communication between a web client and internal resources over the HTTPS protocol. This document outlines the procedures for authentication, encapsulation of Ethernet frames, and communication between the client and internal web servers. TLS is employed to secure the communication channel and ensure privacy and integrity.</t>
      <section anchor="tls-considerations">
        <name>TLS Considerations</name>
        <t>To ensure the security of the Ethernet-over-HTTPS communication, TLS must be used to encrypt and authenticate the data exchanged between the client and server. Implementations MUST follow best practices for TLS configuration, including the use of strong cipher suites, secure protocols, and proper certificate validation.</t>
      </section>
      <section anchor="flow-and-scenarios">
        <name>Flow and Scenarios</name>
        <section anchor="client-authentication">
          <name>Client Authentication</name>
          <t>If the client specifies an internal URL (e.g., internal.url), the browser recognizes that Ethernet over HTTPS should be used for the communication.
The client browser, pre-configured with the IP address and port of the HTTP Server acting as the gateway to the LAN, automatically recognizes the internal URL (e.g., internal.url). It then initiates the Ethernet-over-HTTPS protocol and sends an authentication request.</t>
          <ul spacing="normal">
            <li>
              <t>The client initiates the connection by sending an authentication request to the server.</t>
            </li>
          </ul>
          <artwork><![CDATA[
plaintext
POST /authenticate HTTP/1.1
Host: server.example.com
Content-Type: application/json

{
"api_key": "encrypted_api_key"
}
]]></artwork>
          <t>### Server Authentication and LAN Information
The server decrypts the API key, authenticates the client, and responds with the MAC address or IP address (or both) based on the LAN layer specified by the client</t>
          <artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/json

{
  "mac_address": "xx:xx:xx:xx:xx:xx",
  "ip_address": "192.168.1.2"
}
]]></artwork>
        </section>
        <section anchor="internal-webpage-request">
          <name>Internal Webpage Request</name>
          <t>The client, now authenticated, sends an Ethernet frame encapsulated within an HTTPS request for an internal webpage</t>
        </section>
        <section anchor="server-side-processing">
          <name>Server-Side Processing</name>
          <t>The server decapsulates the Ethernet frame, extracts the original HTTP request, and routes it to the internal web server.</t>
        </section>
        <section anchor="response-to-the-client">
          <name>Response to the Client</name>
          <t>The server encapsulates the response from the internal web server</t>
          <artwork><![CDATA[
POST /ethernet-over-https HTTP/1.1
Host: server.example.com
Content-Type: application/octet-stream
Content-Length: length_of_payload_in_bytes

{
  "http_response": "HTTP/1.1 200 OK\r\nContent-Type: text/html\r\n\r\n<html>Internal Webpage</html>"
}
]]></artwork>
        </section>
      </section>
    </section>
    <section anchor="flow-summary">
      <name>FLow summary</name>
      <artwork><![CDATA[
  +----------------------+       +----------------------+       
  |                      |       |                      |       
  |      Web Client      |       |        EOH Server     |       
  |                      |       |                      |       
  +----------------------+       +----------------------+       
           |                             |                          
           | 1. Browser Recognizes       |                             
           |    Internal URL             |                             
           | --------------------------> |                             
           |                             |                             
           | 2. Authentication Request   |                             
           | --------------------------> |                            
           |                             |                             
           |                             |                             
           | 3. Browser Initiates        |                             
           |    Ethernet over HTTPS      |                             
           |                             |                             
           |                             |                             
           | 4. Server Authenticates     |                             
           |    and Responds             |                             
           | <-------------------------- |                             
           |                             |                             
           | 5. Internal Webpage Request |                             
           |    as Encapsulated Frame    |                             
           | --------------------------> |                             
           |                             |                             
           | 6. Server Decapsulation     |                             
           |    and Routing              |                             
           | <-------------------------- |                             
           |                             |                             
           | 7. Response to Client       |                             
           |    as Encapsulated Frame    |                             
           | --------------------------> |                             
           |                             |

]]></artwork>
      <t># Security Considerations
The security of the Ethernet-over-HTTPS protocol relies on the implementation of TLS. It ensures the confidentiality, integrity, and authenticity of the communication between the client and server. Implementers should adhere to best practices for TLS configuration, including the use of strong cipher suites, secure protocols, and proper certificate validation.</t>
    </section>
    <section anchor="iana-considerations">
      <name>IANA Considerations</name>
      <t>This document has no IANA actions.</t>
    </section>
  </middle>
  <back>






  </back>
  <!-- ##markdown-source:
H4sIAAAAAAAAA91YbW/bNhD+zl9xSD4sQS3lpVu7GUUxt01Xo2kTxA76pUBA
S7TNVRI1koqjretv3x1J2VJir0naocWEBLYs8u655547UoyiiG1vb7NtGBZW
6ELY6IXmU9uHIzv39+pS6OjVeHw6YjTOPYaC56IPKX2PalVpuo9EZ8rc2tJE
+/txnrqJ47k0fgakYioLYYBDqZVVicpgqjSIIuGlqTJuZTFbAoCpRuMGyCg4
HD20xrNMLWiYEUmlBSQqz6tCJjhXFTARdiFEgQ6STIrCAi9SkC5CnsFCTHCa
RnsmXkGzIi/RtYDKoLcP6DRViyLS06QPLpb+3t5M2nk1idHZXsInaq89iiwh
k8xKmyE3W0v8K+BwGsLdYnwy0eKShp282mIIW8yUrvsIcqpYogojClOZPlhd
CYbjHrKF0h9mWlVlH4Zvx4OzowHsNEmDgRYc3uEIouQ3GrXLUpW00zRRFUe4
G7L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