<?xml version="1.0" encoding="utf-8"?>
<!-- 
     draft-rfcxml-general-template-standard-00
  
     This template includes examples of the most commonly used features of RFCXML with comments 
     explaining how to customise them. This template can be quickly turned into an I-D by editing 
     the examples provided. Look for [REPLACE], [REPLACE/DELETE], [CHECK] and edit accordingly.
     Note - 'DELETE' means delete the element or attribute, not just the contents.
     
     Documentation is at https://authors.ietf.org/en/templates-and-schemas
-->
<?xml-model href="rfc7991bis.rnc"?>  <!-- Required for schema validation and schema-aware editing -->
<!-- <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?> -->
<!-- This third-party XSLT can be enabled for direct transformations in XML processors, including most browsers -->


<!DOCTYPE rfc [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">
]>
<!-- If further character entities are required then they should be added to the DOCTYPE above.
     Use of an external entity file is not recommended. -->

<rfc
  xmlns:xi="http://www.w3.org/2001/XInclude"
  category="info"
  docName="draft-liu-wimse-secure-service-to-service-traffic-00"  
  ipr="trust200902"
  obsoletes=""
  updates=""
  submissionType="IETF"
  xml:lang="en"
  version="3">
<!-- [REPLACE] 
       * docName with name of your draft
     [CHECK] 
       * category should be one of std, bcp, info, exp, historic
       * ipr should be one of trust200902, noModificationTrust200902, noDerivativesTrust200902, pre5378Trust200902
       * updates can be an RFC number as NNNN
       * obsoletes can be an RFC number as NNNN 
-->

  <front>
    <title abbrev="Abbreviated Title">Securing service-to-service traffic by WIMSE Token</title>
    <!--  [REPLACE/DELETE] abbrev. The abbreviated title is required if the full title is longer than 39 characters -->

    <seriesInfo name="Internet-Draft" value="draft-liu-wimse-secure-service-to-service-traffic-00"/>
   
    <author fullname="Dapeng Liu" initials="D." role="editor" surname="Liu">
      <!-- [CHECK]
             * initials should not include an initial for the surname
             * role="editor" is optional -->
    <!-- Can have more than one author -->
      
    <!-- all of the following elements are optional -->
      <organization>Alibaba Cloud</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <street>Building 9, Block 4, Wangjing East Park</street>
          <city>Beijing</city>
          <region>Bejing</region>
          <code>100102</code>
          <country>China</country>
          <!-- Uses two letter country code -->
        </postal>        
        <phone></phone>
        <email>max.ldp@alibaba-inc.com</email>  
        <!-- Can have more than one <email> element -->
        <uri></uri>
      </address>
    </author>


    <author fullname="Xining Wang" initials="X."  surname="Wang">
      <!-- [CHECK]
             * initials should not include an initial for the surname
             * role="editor" is optional -->
    <!-- Can have more than one author -->
      
    <!-- all of the following elements are optional -->
      <organization>Alibaba Cloud</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <street>Building 9, Block 4, Wangjing East Park</street>
          <city>Beijing</city>
          <region>Bejing</region>
          <code>100102</code>
          <country>China</country>
          <!-- Uses two letter country code -->
        </postal>        
        <phone></phone>
        <email>xining.wxn@alibaba-inc.com</email>  
        <!-- Can have more than one <email> element -->
        <uri></uri>
      </address>
    </author>


    <author fullname="Li Yi" initials="L."  surname="Yi">
      <!-- [CHECK]
             * initials should not include an initial for the surname
             * role="editor" is optional -->
    <!-- Can have more than one author -->
      
    <!-- all of the following elements are optional -->
      <organization>Alibaba Cloud</organization>
      <address>
        <postal>
          <!-- Reorder these if your country does things differently -->
          <street>Building 9, Block 4, Wangjing East Park</street>
          <city>Beijing</city>
          <region>Bejing</region>
          <code>100102</code>
          <country>China</country>
          <!-- Uses two letter country code -->
        </postal>        
        <phone></phone>
        <email>weiyuan.yl@alibaba-inc.com</email>  
        <!-- Can have more than one <email> element -->
        <uri></uri>
      </address>
    </author>


   
    <date year="2024"/>
    <!-- On draft subbmission:
         * If only the current year is specified, the current day and month will be used.
         * If the month and year are both specified and are the current ones, the current day will
           be used
         * If the year is not the current one, it is necessary to specify at least a month and day="1" will be used.
    -->

    <area>art</area>
    <workgroup>WIMSE</workgroup>
    <!-- "Internet Engineering Task Force" is fine for individual submissions.  If this element is 
          not present, the default is "Network Working Group", which is used by the RFC Editor as 
          a nod to the history of the RFC Series. -->

    <keyword>keyword</keyword>
    <!-- [REPLACE/DELETE]. Multiple allowed.  Keywords are incorporated into HTML output files for 
         use by search engines. -->

    <abstract>
      <t>This document specifies the system architecture, related processes, token structures, etc., 
      for secure protection of Service-to-Service traffic using WIMSE tokens.
      </t>
    </abstract>
 
  </front>

  <middle>
    
    <section>
      <name>Introduction</name>
      <t>This document specifies the architecture, token format and related mechanism that uses wimse token for securing service-to-service traffic.</t>
      
      <section>
        <name>Requirements Language</name>
        <t>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL",
          "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT
          RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be
          interpreted as described in BCP 14 <xref target="RFC2119"/>
          <xref target="RFC8174"/> when, and only when, they appear in
          all capitals, as shown here.</t>
      </section>
      <!-- [CHECK] The 'Requirements Language' section is optional -->

    </section>
    
    <section>
      <name>Use Cases and Scenario</name>
      <t>In cloud computing, there exists a type of scenario where one workload invokes another workload, forming a chain of invocation for the workload. In such a scenario, for the next workload, 
      it is necessary to authenticate the identity of the previous invoker workload and the associated software and hardware runtime environment.</t>

      <t>
      A specific example is when an AI-enhanced application invokes a Large Language Model instance deployed on a public cloud, 
      it needs to verify the software and hardware runtime environment of the Large Language Model instance. At the same time, 
      this Large Language Model instance needs to further call and use the industry-specific data running on another workload. 
      It then needs to authenticate the invoked Large Language Model instance and the workload of the AI-enhanced application. 
      This forms an authentication chain with the workload invocation chain. 
      </t>

      <t>
         This document specifies the system architecture, related processes, token structures, etc., for secure protection of 
         Service-to-Service traffic using WIMSE tokens.
      </t>

    

     </section>   


     <section>
       <name>Overview</name>
       <t>
        As shown in Figure 1, the overall architecture is depicted. There are several roles in this scenario.
       </t> 

      <t>* Cloud Service Provider</t>          
        <t>
          The cloud service provider that provides cloud computing services to users, for example, public cloud service provider
        </t>
      
      <t>* Workload</t>
          <t>
            A running instance of software executing for a specific purpose. [reference: draft-salowey-wimse-arch-01]
          </t>
      
      <t>* Workload caller</t>
          <t>
            The entity that invokes a workload, could be another workload.
          </t>
      
      <t>* Attestation Service provider</t>
          <t>
            A provider that provide remote attestation services by executing remote attestation protocols, providing evidence  
            of the hardware and software environment on which the cloud service provider runs workloads.
          </t>
      
      <t>* WIMSE Token</t>
          <t>
            Token that used for the authentication and securing service-to-service traffic in this workload chain invoking scenario.
          </t>
    

     <figure>
        <name>Overview architecture</name>
        <artset>
        <!-- This <artset> includes two <artwork> elements, each of a different type -->
          <artwork type="svg" src="https://www.rfc-editor.org/materials/format/svg/stream.svg" />
          <!-- [REPLACE] src points to either a local file or a URI. -->
          <artwork type="ascii-art" name="stream.txt">
            <!-- [REPLACE/DELETE] name recommends a filename to use if the diagram is extracted -->  
            <![CDATA[

     ┌────────────────────────────────────────────────────┐                                     
     │                                                    │                                     
     │                                                    │                                     
     │                                                    │                                     
───┐ │        ┌────────┐       ┌────────┐          ┌──────┼────►                                
   │ │   Token│        │ Token │        │   Token  │      │                                     
   │ │  ┌─────┴────┐   │  ┌────┴─────┐  │   ┌──────┴───┐  │                                     
   └─┼──► Workload │   └──► Workload │  └───► Workload │  │       ┌────────────────────────────┐
     │  └─────┬────┘      └─────┬────┘      └─────┬────┘  │       │ Remote Attestation Service │
     │        │                 │                 │       │       │          Provider          │
     └────────┼─────────────────┼─────────────────┼───────┘       └──────────────▲─────────────┘
              │                 │                 │                              │              
     ┌────────┼─────────────────┼─────────────────┼───────┐                      │              
     │        │                 │                 │       │                      │              
     │        │                 │                 │       │                      │              
     │        └─────────────────▼─────────────────▼───────┼──────────────────────┘              
     │                                                    │                                     
     │* Platform:Host Operating System/Hardware Software  |
     │(The service-account bound to the Pod, the version/ |
     | source of the container image used by the Pod)     |                                
     └────────────────────────────────────────────────────┘                                     
            
            ]]>
          </artwork>
        </artset>
      </figure>

    </section>  

  <section>
      <name>WIMSE Token Format</name>

          <section>
            <name>Token Format </name>
              <t> 
                The WIMSE token has the following format: 
              </t>
              
              <t>
                It includes several nested JWT structures.  As defined by <xref target="RFC7519"/>, the (Content Type) Header Parameter of a nested JWT should be set to "JWT".
              </t>

              <t>
                In a chained workload invocation scenario, the method for generating the JWT Token of the workload being called is: sign and encrypt the JWT 
              Token of the calling workload and use it as the payload for the JWT Token of the workload that is being called.
              </t>
          </section>

          <section>
            <name>Token Content</name>
              <t> 
                The token includes the following claims:
              </t>

                  <ul>
                    <li>iss (Issuer Claim): The identity of the issuer.</li>
                    <li>sub (Subject Claim): The subject of the token.</li>
                    <li>aud (Audience Claim): The intended recipients of the token, which can be the identifier of the workload.</li>
                    <li>exp (Expiration Time Claim): The expiration time, defining the validity period of the token.</li>
                    <li>nbf (Not Before Claim): The time before which the token is not valid.</li>
                    <li>iat (Issued At Claim): The time at which the token was issued.</li>
                    <li>jti (JWT ID Claim): The unique identifier of the JWT.</li>
                    <li>transaction_id: The transaction identifier, used to bind the token to a specific transaction.</li>
                    <li>context: Context information, which can include user identity, platform attestation information etc. </li> 
                  </ul>

              <t> 
                The context field can contain various types of information, such as:
              </t>

              <ul>
                <li>User Identity: Information about the user performing the current operation, which can be a user ID, username, or other unique identifiers. </li>
                <li>Platform Attestation: Attestation information of the platform or system, such as runtime integrity check results. This may include the information 
                of the Operating System/Hardware Software and also may include the service-account bound to the Pod, the version/source information of the container image used by the Pod.</li>
              </ul>
              
              <t> 
                To achieve interoperability across trust domains, it may be necessary to standardize the context field in different systems so that different service
                providers and consumers can understand and process this information. 
              </t>

              <figure>
                <name>Example of wimse token</name>
                <sourcecode name="wimse token example" type="json" markers="false">
                  <![CDATA[
                        {
                          "alg": "RSA1_5",
                          "enc": "A128CBC-HS256",
                          "cty": "JWT"
                          "payload": {
                            "iss": "https://issuer.example.com",
                            "sub": "caller-identity",
                            "aud": "https://service.example.com",
                            "exp": 1601519424,
                            "nbf": 1601519424,
                            "iat": 1601519424,
                            "jti": "abc123",
                            "transaction_id": "tx123",
                            "context": {
                              "user_identity": "user-id",
                              "platform_attestation": "attestation-data",
                            },
                            "payload":"caller-JWT-Token",
                          },
                          "signature": "TBE5Y3J0VGVzZHBGVbGxpbmc="
                        }
                  ]]>
                </sourcecode>
                <!-- [CHECK] markers="true" means that the rendered file will have <CODE BEGINS> and <CODE ENDS> added -->
              </figure>

          </section>

          <section>
              <name>Support for Cross-Trust Domains</name>

              <t>
                Federation: If working across multiple trust domains is required, SPIFFE federation or similar mechanisms can be implemented to securely share and verify tokens across domains.
              </t>

          </section>

  </section>  


  <section>
    <name>Security Considerations</name>

    <t>
      TBD
    </t>
  </section>
 
    
    <section anchor="IANA">
    <!-- All drafts are required to have an IANA considerations section. See RFC 8126 for a guide.-->
      <name>IANA Considerations</name>
      <t>TBD</t>
    </section>
    
    <section anchor="Security">
      <!-- All drafts are required to have a security considerations section. See RFC 3552 for a guide. -->
      <name>Security Considerations</name>
      <t>TBD</t>
    </section>
    
    <!-- NOTE: The Acknowledgements and Contributors sections are at the end of this template -->
  </middle>

  <back>
    <references>
      <name>References</name>
      <references>
        <name>Normative References</name>
        
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
        <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.7519.xml"/>
        <!-- The recommended and simplest way to include a well known reference -->
        
      </references>
 
      <references>
        <name>Informative References</name>
       
       
    
       
      </references>
    </references>
    
 

    <section anchor="Acknowledgements" numbered="false">
      <!-- [REPLACE/DELETE] an Acknowledgements section is optional -->
      <name>Acknowledgements</name>
      <t>TBD</t>
    </section>
    
    <section anchor="Contributors" numbered="false">
      <!-- [REPLACE/DELETE] a Contributors section is optional -->
      <name>Contributors</name>
      <t>TBD</t>
      <!-- [CHECK] it is optional to add a <contact> record for some or all contributors -->
    </section>
    
 </back>
</rfc>
