<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY rfc2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY rfc7340 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7340.xml">
<!ENTITY rfc7515 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7515.xml">
<!ENTITY rfc7518 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7518.xml">
<!ENTITY rfc7519 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7519.xml">
<!ENTITY rfc7638 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.7638.xml">
<!ENTITY I-D.ietf-acme-acme SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-acme-acme.xml">
<!ENTITY I-D.ietf-stir-rfc4474bis SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-stir-rfc4474bis.xml">
<!ENTITY I-D.ietf-stir-certificates SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-stir-certificates.xml">
<!ENTITY I-D.ietf-stir-passport SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-stir-passport.xml">
<!ENTITY I-D.ietf-acme-telephone SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-acme-telephone.xml">
]>


<?rfc toc="yes"?>
<?rfc tocompact="yes"?>
<?rfc tocdepth="3"?>
<?rfc tocindent="yes"?>
<?rfc symrefs="yes"?>
<?rfc sortrefs="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc compact="yes"?>
<?rfc subcompact="no"?>
<rfc category="info"
     docName="draft-ietf-acme-service-provider-01"
     ipr="trust200902"
>
  <front>
    <title abbrev="Service Provider Identifier and Challenges">ACME Identifiers and Challenges
    for VoIP Service Providers</title>
    
    <author fullname="Mary Barnes" initials="M." surname="Barnes">
      <organization>MLB@Realtime Communications</organization>

      <address>


        <email>mary.ietf.barnes@gmail.com</email>
      </address>
    </author>

    <author fullname="Chris Wendt" initials="C" surname="Wendt">
      <organization>Comcast</organization>
      <address>
      <postal>
        <street>One Comcast Center</street>

        <city>Philadelphia</city>

        <region>PA</region>

        <code>19103</code>

        <country>US</country>
      </postal>


       <email>chris-ietf@chriswendt.net</email>
      </address>
    </author>


    <date day="18" month="July" year="2017"/>

    <keyword>STIR</keyword>
    <keyword>Service Provider</keyword>
    <keyword>Service Provider Code</keyword>
    <keyword>ACME</keyword>

    <abstract>
      <t>This document specifies identifiers and challenges required to enable
      the Automated Certificate Management Environment (ACME) to issue
      certificates for VoIP service providers to support Secure Telephony Identity (STI).</t>
    </abstract>
  </front>

  <middle>
  <section title="Introduction">

      <t> <xref target="I-D.ietf-acme-acme"/> is a mechanism for automating certificate
         management on the Internet.  It enables administrative entities to
         prove effective control over resources like domain names, and
         automates the process of generating and issuing certificates.</t>
      <t>
         The STIR problem statement <xref target="RFC7340"/> identifies the need for Internet
         credentials that can attest authority for the originator of VoIP calls in order
         to detect impersonation, which is currently an enabler for common
         attacks associated with illegal robocalling, voicemail hacking, and
         swatting.  These credentials are used to sign PASSporTs
         <xref target="I-D.ietf-stir-passport"/>, which can be carried in using protocols
         such as SIP <xref target="I-D.ietf-stir-rfc4474bis"/>.
         Currently, the only defined credentials for this purpose are the
         certificates specified in <xref target="I-D.ietf-stir-certificates"/>.</t>

      <t> <xref target="I-D.ietf-stir-certificates"/> describes certificate extensions
         suitable for associating telephone numbers and service provider codes
         with certificates. <xref target="I-D.ietf-acme-telephone"/> specifies
         the ACME extensions to enable certification authorities to issue
         certificates based on telephone numbers.  
         This specification defines extensions to ACME to
         enable certification authorities to issue certificates based on
         service provider codes. </t>

 </section>
 
 <section title="Overview">
              
     <t> The document <xref target="ATIS-1000080"/> provides 
         a framework and model for using certificates based on service provider codes.  In this model, 
         each service provider requires only a few certificates, which are used in conjunction with 
         a PASSporT that contains additional information attesting to a service provider's 
         knowledge of the originator of the call. Further details on the PASSporT extensions for this model
         are provided in the SHAKEN Framework <xref target="ATIS-1000074"/>.</t>
         
      <t> In the SHAKEN Certificate Management framework <xref target="ATIS-1000080"/>, there is an administrative entity that
         is responsible for allocating service provider codes. This is referred to as the STI Policy
         Administrator (STI-PA). This allows a certification authority to validate
         that the entity requesting issuance of a certificate is authorized to
         request certificates on behalf of the entity that has been assigned a
         specific service provider code. A single VoIP service provider can be allocated multiple service provider 
         codes. A service provider can choose to use the same certificate for multiple service providers 
         as reflected by the structure of the TN Authorization List certificate extension defined in
         <xref target="I-D.ietf-stir-certificates"/>. </t>     
   
      <t> The intent of the challenges in this document is not to establish that an entity 
      is a valid service provider but rather to provide evidence that an established governance 
      entity has authorized the entity to provide VoIP services in the network and thus to request 
      credentials on behalf of the VoIP users in the network. </t>
   
  </section>

  <section title="Identifier for Service Provider Codes">  
  
    <t> In order to issue certificates for service providers based on service provider code values, a new
    ACME identifier type is required for use in ACME authorization objects.  The baseline ACME specification defines 
    one type of identifier, for a fully-qualified domain name
     ("dns").  The document <xref target="I-D.ietf-acme-telephone"/> defines an ACME identifier type for
     telephone numbers ("tn").   This document defines a new ACME identifier type for service provider codes ("TNAuthList").    
     The "TNAuthList" identifier is the same type that is specified in the TN
     Authorization List certificate extension 
     <xref target="I-D.ietf-stir-certificates"/> for service provider codes.  
    </t>
   
   </section>
   
   <section title="Challenges for Service Providers">
   
     <t> The new "TNAuthList" identifier introduces a slightly different authorization process.
      A mechanism is required to allow the service provider to prove it has the authority to request certificates on 
      behalf of the entities for whom it is providing VoIP services. 
      This document defines a new ACME challenge type of "spc-token-01" to support the authorization of service provider code tokens.   
      </t>
           
     <t> The following is the response that the ACME client receives when it sends a GET for the challenges in the case of a "TNAuthList"
     identifer: </t> 
<t>
<figure><artwork><![CDATA[
HTTP/1.1 200 OK
Content-Type: application/json
Link: <https://example.com/acme/some-directory>;rel="directory"

{
  "status": "pending",
 
  "identifier": {
     "type": "TNAuthList",
     "value": ["1234-0111"]
   },
 
   "challenges": [
   {
     "type": "spc-token-01",
     "url": "https://sti-ca.com/authz/asdf/0"
     "token": "DGyRejmCefe7v4NfDGDKfA" }
   ],
}    
]]></artwork> </figure>
</t>
      
      <t> A client responds to this challenge by providing a service provider code token.
      In the SHAKEN Certificate Management framework, the Service Provider has a secure exchange
      with the STI-PA to obtain a service provider code token that 
      can be used for authorization by the CA when requesting a certificate. 
      The service provider code token is a standard JWT token <xref target="RFC7519"/> 
      using a JWS defined signature string <xref target="RFC7515"/>. </t> 
      
      <t> The service provider code token JWT Protected Header MUST include the following:</t>   
      
      <t> <list style="empty">
      <t> <list style="hanging">
      <t hangText='alg:'> Defines the algorithm used in the signature of the token. For Service Provider Code tokens, the algorithm MUST be "ES256".</t>      <t hangText='typ:'> Set to standard "JWT" value.</t>      <t hangText='x5u:'> Defines the URL of the certificate of the STI-PA validating the Service Provider Code.</t>
      </list>
      </t>
      </list>
       </t>
      
      <t> The service provide code token JWT Payload MUST include the following: </t>
       <t> <list style="empty">       
       <t><list style="hanging">  
        <t hangText='sub:'> Service Provider Code value being validated in the form of a JSON array of ASCII strings.</t>
        <t hangText='iat:'>  DateTime value of the time and date the token was issued.</t>        <t hangText='nbf:'> DateTime value of the starting time and date that the token is valid.</t>        <t hangText='exp:'> DateTime value of the ending time and date that the token expires.</t>        <t hangText='fingerprint:'>: Fingerprint of the ACME credentials the Service Provider 
            used to create an account with the CA. The fingerprint is of the form: base64url(JWK_Thumbprint(accountKey)). </t>           
           <t> The "JWK_Thumbprint" step indicates the computation specified in            <xref target="RFC7638"/>, using the SHA-256 digest <xref target="FIPS180-4"/>. As noted in JWA            <xref target="RFC7518"/> any prepended zero octets in the JWK object MUST be            stripped before doing the computation.</t>
      </list>
      </t>
      </list>      
      </t>  
      
      <t> To respond to a service provider code token challenge, the ACME client constructs a service provider code 
      authorization ("spc-authz") using 
      the "token" value provided in the challenge and the service provider code token ("spcAuthzToken") 
      that has been previously obtained from the STI-PA.
      These two values are concatenated and separated by a "." character as 
      follows: </t>
      <t> spcAuthorization = token || '.' || spcAuthzToken </t>
      
      <t> The token for a challenge is a string comprised entirely of characters in the URL-       safe base64 alphabet.  The "||" operator indicates concatenation of       strings.</t>         
      <t> An example of the use of the "spc-token-01" in a challenge response sent by the ACME client is provided below: </t>
      
      <t>
      <figure>
         <artwork> <![CDATA[
              
        POST /acme/authz/asdf/0 HTTP/1.1
        Host: sti-ca.com
        Content-Type: application/jose+json
 
        {
         "protected": base64url({
         "alg": "ES256",
         "kid": "https://sti-ca.com/acme/reg/asdf",
         "nonce": "Q_s3MWoqT05TrdkM2MTDcw",
         "url": "https://sti-ca.com/acme/authz/asdf/0"
        }),
         "payload": base64url({
         "spcAuthorization": "DGyRejmCefe7v4N...vb29HhjjLPSggwiE"
        }),
         "signature": "9cbg5JO1Gf5YLjjz...SpkUfcdPai9uVYYQ"
        }       
        
        ]]>
      </artwork>
     </figure>
      </t>
      
      <t> Upon receiving a response to the challenge, the ACME server determines the validity of the response.
      The ACME server MUST verify that the "token" in the response matches the "token"
      in the original challenge.
      To determine if the "spcAuthzToken" is valid, 
      the server MUST use the URL in the JWT header in the "spcAuthzToken" to obtain the certificate associated with the JWT payload.
      The server MUST validate the signature and verify the claims. 
      The "sub" field MUST be a value that is included in the values
       for the "TN-Auth-List" in the original challenge. 
      The server MUST verify that the "fingerprint" field matches the ACME credentials for the ACME client that created the 
      account with the CA. If the validation is successful, the "status" in the challenge object is set to "valid".
       If any step of the validation process fails, the "status" in the challenge object MUST be set to "invalid".  
       [Editor's Note: Likely we should describe specific error responses for the above.]
       </t>
                               
   </section>
    

  
    <section title="IANA Considerations">
     <t> This document defines a new ACME Identifier type and ACME Challenge type to be registered.</t>
     <t>  [[ RFC EDITOR: Please replace XXXX above with the RFC number assigned to this document ]] </t>   
     
     <section title="ACME TNAuthList Identifier">
     
     <t> This document defines the "TNAuthList" ACME Challenge type in the ACME Identifier Type registry as follows:
     </t>       
      <figure>
          <artwork> <![CDATA[ 
                    +-----------------------+-----------+ 
               | Identifier Type       | Reference | 
               +-----------------------+-----------+ 
               | TNAuthList            | RFC XXXX  | 
               +-----------------------+-----------+
     
          ]]>          
          </artwork>
         </figure>
         
     </section>
    
   
     <section title="ACME Service Provider Challenge">
     
     <t> This document defines the "spc-token-01" ACME Challenge type in the ACME Challenge Types registry as follows:      
     </t>
      <figure>
          <artwork>  <![CDATA[                    +--------------+--------------------+-----------+ 
               | Label        | Identifier Type    | Reference | 
               +--------------+--------------------+-----------+ 
               | spc-token-01 | TNAuthList         | RFC XXXX  | 
               +--------------+--------------------+-----------+
     
          ]]>
           </artwork>
         </figure>
      </section>   
      
    </section>
    

    <section title="Security Considerations">
    
      <t> This document relies on the security considerations established for the ACME protocol per <xref target="I-D.ietf-acme-acme"/>.
      The new "TNAuthList" identifier and "spc-token-01" validation challenges introduce a slightly different authorization process.
      Although, the challenges still have a binding between the account      private key and the validation query made by the server since the fingerprint of the account key is contained in the service provider
      code token used for authorization.</t>
      
      <t> The service provider code token is initially obtained through a secure exchange between the service provider and the entity in the network 
      that is responsible for determining what entities can operate as VoIP service providers (the STI Policy Administrator). 
      Further details on this are provided in <xref target="ATIS-1000080"/>.     
      </t> 
   </section>
 
    
  </middle>

  <back>
    <references title="Informative References">
      
      &rfc2119;
      &rfc7340;
      &rfc7515;
      &rfc7518;
      &rfc7519;
      &rfc7638;
      &I-D.ietf-acme-acme;
      &I-D.ietf-stir-rfc4474bis;
      &I-D.ietf-stir-certificates;
      &I-D.ietf-stir-passport;
      &I-D.ietf-acme-telephone;
      
      <reference anchor="FIPS180-4">
        <front>              <title> NIST FIPS 180-4,              Secure Hash Standard </title>
              <author> 
               <organization>Department of Commerce, National </organization>
              </author> 
              <date month="March" year="2012" />
        </front>
     </reference>                            
      <reference anchor="ATIS-1000080">
        <front>
          <title>Signature-based Handling of Asserted information using toKENs (SHAKEN): Governance Model and Certificate Management</title>

          <author>
            <organization>ATIS/SIP Forum NNI Task Group</organization>
          </author>

          <date month="May" year="2017"/>
        </front>
      </reference>
      
      <reference anchor="ATIS-1000074">
        <front>
          <title>Signature-based Handling of Asserted information using toKENs (SHAKEN)</title>

          <author>
            <organization>ATIS/SIP Forum NNI Task Group</organization>
          </author>

          <date month="January" year="2017"/>
        </front>
      </reference>
      
      
    </references>
  </back>
</rfc>
