<?xml version="1.0"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd">
<?rfc toc="yes"?>
<?rfc compact="yes" ?>
<?rfc sortrefs="no" ?>
<rfc  category="std" ipr="full2026" docName="draft-jennings-sipping-certs-03" >
<front>
   <title abbrev= "SIP Certificates" > Certificate Management Service for SIP </title>
    <author initials="C." surname="Jennings" fullname="Cullen Jennings">
      <organization>Cisco Systems</organization>
      <address>
        <postal>
	  <street>170 West Tasman Drive</street>
	  <street>MS: SJC-21/2</street>
	  <city>San Jose</city>
	  <region>CA</region>
	  <code>95134</code>
	  <country>USA</country>
        </postal>
        <phone>+1 408 902-3341</phone>
        <email>fluffy@cisco.com</email>
      </address>  
    </author>
    <author initials="J." surname="Peterson" fullname="Jon Peterson">
      <organization>NeuStar, Inc.</organization>
      <address>
        <postal>
	  <street>1800 Sutter St</street>
          <street>Suite 570</street>
          <city>Concord</city>
          <region>CA</region>
          <code>94520</code>
          <country>US</country>
        </postal>
        <phone>+1 925/363-8720</phone>
        <email>jon.peterson@neustar.biz</email>
        <url>http://www.neustar.biz/</url>
      </address>  
    </author>
    <date month="May" day="16" year="2004"/>
    <area>Transport</area>
    <workgroup>SIP</workgroup>
    <keyword>I-D</keyword>
    <keyword>Internet-Draft</keyword>
    <keyword>SIP</keyword>
    <keyword>certificate</keyword>
    <keyword>S/MIME</keyword>
    <keyword>public key</keyword>
    <abstract>
      <t>
This draft defines a Credential Service in SIP that uses a subscribe/notify
mechanism to discover other users' certificates and credentials and be notified
about changes to the certificates. 
      </t><t>
This is a very early draft and is being discussed on the sipping@ietf.org mailing list.
      </t>
   </abstract>
</front>
<middle>

<section title= "Introduction" >
  <t>
SIP provides a mechanism for end to end encryption and integrity using
S/MIME. This document extends that work to provide one specific mechanism for
discovery, retrieval, and management of the certificates. It follows the Sacred
Framework RFC 3760 (ADD REF) for management of the credentials.  </t>
  <t>
The general approach is to provide a new SIP service referred to as a Credential
Server. This service allows UAs to subscribe to some other user's
certificate. The certificate is delivered in a NOTIFY to the UA that subscribed.
The identity of the certificate can be vouched for using the (TODO REF
identity). The Credential Service can manage public certificates as well as
credentials that include the user's private key. The user can install new
credentials to the Credential Server using a PUBLISH. The Credential Server
authenticates UAs that are changing credentials or requesting private keys using
a shared secret that both the UA and Server know. Typically this will be the
same shared secret that is used in Register with the Registrar for the
domain.  </t>
  <t>
The mechanism described in this document works for both self signed certificates
and certificates signed by a well known certificate authority; however, it is
imagined that most UAs using this would only use self signed certificates and would
use an Authentication Service as described in (TODO REF) to provide strong
identity binding to the certificates.
</t>
</section>

<section title= "Conventions" >
  <t>
    The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
    "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
    document are to be interpreted as described in <xref target="RFC2119">RFC
    2119</xref>.
  </t>
  <t> 
    Certificate: An X.509 style certificate containing a public key and a
    list of identities in the SubjectAltName that are bound to this key. The
    certificates discussed in this draft are generally self signed and use the
    mechanisms in the (REF TODO identity) to vouch for their validity.
  </t>
  <t> 
    Credential: For this document, this means the combination of a
    certificate and the associated private key.
  </t>
</section>

<section title= "Goals" >
  <t></t>
  <list style="symbols" >
    <t>
      Allow negotiation of E2E encrypted sessions
    </t>
    <t>
      Allow end to end encryption and integrity of SIP bodies that may be delivered in SIP
      signaling, such as page mode MESSAGEs or NOTIFY bodies in presence.
    </t>
    <t>
      Work for users with multiple UA devices.
    </t>
    <t>
      Provide certificate revocation mechanism
    </t>
  </list>
</section>

<section title= "UA Discovering Certificates" >
  <t>
    UAs discover certificates by sending a SUBSCRIBE with an event type of
    pkix-cert to the AOR that a certificate is desired for. This could be a SIP
    or tel URL. The resulting NOTIFY will contain an application/pkix-cert body
    which contains the certificates. The UA MUST follow the procedures in <xref
    target="section.trust"/> to decide if the received certificate can be
    used. The UA needs to cache this certificate for future use. The certificate
    MUST be removed form the cache if it has expired or if it is updated by a
    subsequent NOTIFY or if the subscription has been terminated. The NOTIFY
    containing a certificate must be signed by an Authentication Service as
    described in REF Identity. If the identity asserted by the Authentication
    Service does not match the identity requests, the certificates in the NOTIFY
    are discarded and MUST NOT be used.
</t>
</section>

<section title= "UA Discovering and Publishing Credentials ">
<t>
UAs discover credentials by subscribing to their AOR with an event type of
credential, which will result in a message containing both an
application/pkix-cert body and an application/pkcs8 body that has the associated
private key information for the certificate. The UA can change the user's
certificate and private key by sending to the server a PUBLISH (TODO ref
draft-ietf-sip-publish ) with an event type of credential that
contains both an application/pkix-cert and application/pkcs8 body.
      </t>
<t>
  The UA needs to authenticate to the Credential Server for these
  operations. The UA MUST use TLS to connect to the server. The UA may be
  configured with a specific name for the Credential Server; otherwise it
  defaults to the name of the domain in the User's AOR. The TLS connection MUST
  present a certificate that matches the expected name for the credential
  server, so that the UA knows it is talking to the correct
  server. If the certificate presented by the server does not match the expected
  server, the UA MUST terminate the connection and notify the User. If the UA
  does not do this, it may end up publishing its private key information to an
  attacker. The Credential Server will authenticate the UA using the usual SIP
  Digest mechanism, so the UA can expect to receive a SIP challenge to the
  SUBSCRIBE or PUBLISH messages.
      </t>
<t>
The application/pkix-cert body is a DER encoded X.509 certificate (TODO RFC
2585). The application/pkcs8 bodies contains a DER encoded PKCS #8 object that
contains the private key. The PKCS #8 objects MUST by of type
PrivateKeyInfo. The integrity and confidentiality of the PKCS #8 objects is
provided by the TLS transport. The transport encoding of all the MIME bodies is
binary.
</t>
</section>

<section title= "Credential Server Behavior" >
  <t>
    The Credential Server receives credentials for users and can then provide
    the credentials or certificates to other user agents. The credential server
    receives and store credentials for users. The credentials are indexed by
    URI. When a UA requests a public certificate with a SUBSCRIBE, the server
    sends it in a NOTIFY and sends a subsequent NOTIFY any time it changes. When
    a credential is requested, the Server digest challenges the requesting UA to
    authenticate it so that the Server can verify that the UA is authorized to
    receive the requested credentials. </t>
  <t>
    When the Credential Server receives a SUBSCRIBE for a certificate, it first
    checks to see if it has credentials for the requested URI. If it does not
    it returns a response indicating the user was not found. Otherwise it sets
    up a subscription and forms a NOTIFY with the certificate in the body and
    the From header field value set to the request URI of the SUBSCRIBE. It MUST
    send this NOTIFY through an Authentication Service (as described in TODO REF
    Identity) or implement an Authentication Service itself. The Server is
    encouraged to keep the subscriptions active indefinitely but MAY unsubscribe
    at any point of time. Anytime the credentials for this URI change, the
    Server MUST send a new NOTIFY to any active subscriptions.
  </t>
  <t>
    When a Credential Server receives a SUBSCRIBE for a credential, the
    Server has to authenticate and authorize the UA and validate that adequate
    transport security is being used. The Server MUST digest challenge the UA to
    authenticate the UA and then decide if it is authorized to receive the
    credentials. 
  </t>
  <t>
    Once the UA has authenticated to the Server, the Server can set up a
    subscription and send a Notify message that MUST contain the
    credentials. This is sent thought an Authorization Service in the same way
    as the certificate subscriptions. If the credential changes, the Server
    MUST terminate any current subscriptions and force the UA to
    re-authenticate. This is so that in the case of a compromised secret to
    retrieve the credentials, the rogue UA does not continue to receive
    credentials after the compromised secret has been changed.
  </t>
  <t>
    When the Credential Server receives a PUBLISH to update credentials, it
    MUST authenticate and authorize this is the same way it does the subscriptions for
    credentials. If this succeeds, the Server updates the credential for this
    URI and processes all the active subscriptions to this URI as described
    above. 
  </t>
</section>

<section title= "Negotiation of Secure Session" >
<t>
SIP uses an offer/answer negotiation mechanism (REF 3264) that describes
sessions using SDP that may contain keying material (ref
draft-ietf-mmusic-sdescriptions) for media protocols such as SRTP (Ref
3711). This keying material needs to be protected, and SIP does this by
encrypting the SDP bodies using S/MIME.
      </t><t>
If a UA receives both an unencrypted and an encrypted SDP body in an offer, it
MUST consider all the SDP received as potential offers, and any encrypted SDP
SHOULD be preferred to unencrypted SDP. Answers to any encrypted SDP MUST also
be sent in encrypted SDP, and unencrypted SDP MUST be sent in unencrypted
SDP. This is necessary so that the device receiving the answer can correctly match
m lines in the SDP. If the UA that receives an encrypted offer cannot send the
answer back encrypted, then it may not use these encrypted offers.
      </t><t>
In a typical call from Alice to Bob, Alice would first subscribe to Bob's
certificate. If this worked, then Alice would send an Invite to Bob that
contained an RTP session in unencrypted SDP and an SRTP session in encrypted
SDP. Bob would select the SRTP session and send an answer with encrypted SDP
selecting the SRTP session. Both Alice's and Bob's UAs would indicate to the
user that a secure call had been negotiated. Alice and Bob could note this and
adjust their conversation accordingly.
      </t>
</section>

<section title= "Encrypting Bodies of SIP messages" >
<t>
Applications such as presence and 911 location information result in information
with significant privacy requirements being sent in SIP. Particular mime types
may define special meanings when both an encrypted and unencrypted body are
received but, unless otherwise specified, the UA SHOULD use the encrypted
version if it can decrypt it, and ignore the unencrypted version. There is no
requirement for the two versions to have the same information. For example, a
page mode message could have an unencrypted version that said "I'm in the Middle
East visiting people" while the encrypted version had much more sensitive
information like "I'm over at Osama's house at 21.25'24&quot;N
39.49'24&quot;E". Depending whether the receiving device can decrypt this or
not, a different message gets displayed to the receiving user. 
</t>
</section>

<section title= "Signing Bodies of SIP message" >
<t>
In general, signing messages with self-signed certificates is not that useful
unless some other means is used to vouch that the certificate has some
meaning. If the Authentication Service is used to do this, then the
Authentication Service is providing integrity across all the bodies and binding
them with an identity. In this case, the additional signature becomes
redundant. Because of this, it is recommended that signing bodies SHOULD NOT be
done if the certificate is a self signed certificate.
</t>
</section>

<section title= "Examples" >
<t>
</t>

<section title= "Get Credential for UA">
<t>
</t>
</section>

<section title= "Encrypted Page Mode IM Message ">
<t>
</t>
</section>

<section title= "SRTP Phone Call" >
<t>
</t>
</section>

</section>

<section title= "Security Considerations" >
  <t>
    This whole scheme is highly dependent on trusting the operators of the
    credential server and trusting that the Credential Server will not be
    compromised. The complete security of all the users will be compromised if
    the Credential Server is compromised. 
  </t>
  <t>
    This work requires the TLS session to be used for communications to the
    Credential Server. Failing to use TLS or selecting a poor cipher suite
    (such as NULL encryption) will result in credentials being sent
    unencrypted over the network and render the whole system
    useless. Implementation really must use TLS or there is no point in
    implementing any of this. In addition, the correct checking of chained
    certificates as specified in the TLS RFC (TODO REF) is critical for the
    client to authenticate the server.
  </t>
  <t>
    If a particular credential needs to be revoked, the new
    credential is simply published to the Credential Server. Every device keeping
    this current in its cache will have a subscription to the credential and will
    rapidly (order of seconds) be notified and replace its cache. Clients that
    are not subscribed will subscribe and get the new certificate and do not end
    up using the old invalid certificate.  
  </t>
  <section title= "Trusting the Identity of a Certificate"
    anchor= "section.trust" >
    <t>
      When a UA wishes to discover the certificate for
      sip:alice@example.com, the UA subscribes to the certificate for
      alice@example.com and receives a certificate in the body of a SIP Notify
      message. The term original URI is used to describe the original URI
      that was subscribed to.
    </t>
    <t>
      If the certificate is signed by a trusted CA, and one of the names in the
      SubjectAltName matches the original URI, then this certificate MAY
      be used but only for exactly the Original URI and not for other
      identities found in the SubjectAltName. Otherwise, there are several
      steps the UA MUST perform before using this certificate.
      <list style = "symbols" >
        <t>
          The From header in the NOTIFY message MUST match the original URI.
        </t>
        <t>
          The UA MUST check the Identity header as described in the REF TODO
          Identity draft to validate that bodies have not been tampered with and
          that an Authentication Service has validated this From header.
        </t>
        <t>
          The UA MUST check the validity time of the certificate and stop using
          the certificate once it is invalid.
        </t>
        <t>
          The certificate MAY have several names in the SubjectAltName but the
          UA MUST only use this certificate when it needs the certificate for
          the identity in the Original URI. This means that the certificate
          should only be indexed in the certificate cache by the value of the
          original URI, not by the value of all the identities found in the
          SubjectAltName.
        </t>
      </list>
      These steps result in a chain of bindings that result in a trusted binding
      between the original URI and a public key. The Original URI is forced to
      match the From. The Authentication Service validates that this message did
      come from the identity claimed in the From and that bodies and From have
      not been tampered with. The certificate in the body contains the public key
      for the identity. Only the UA that can authenticate as this user can
      tamper with this body so the owner of the identity can provide a false
      public key but other users cannot. This chain of assertion from original
      URI, to From, to body, to public key is critical to the security of this
      document. If any of the steps above are not followed, this chain of
      security will be broken and the system will not work.
    </t>
  </section>
  <section title= "Conformity to the SACRED Framework" >
  <t>
    This work uses the security design outlined in the SACRED (REF TODO)
    Framework. Specifically it follows the cTLS architecture described in
    section 4.2.2 of RFC 3760. The client authenticates the server using the
    server's TLS certificate. The server authenticates the client using a SIP
    digest transaction inside of the TLS session. The TLS sessions form a strong
    session key used to protect the credentials being exchanged.  
  </t>
  </section>
  <t>
    Credential Servers SHOULD implement the server name indication extensions
    in RFC 3546 TODO REF and they MUST support a TLS profile of
    TLS_RSA_WITH_AES_128_CBC_SHA as described in <xref target="RFC3268">RFC
    3268</xref> and a profile of TLS_RSA_WITH_3DES_CBC_SHA.
  </t>
</section>

<section title= "IANA">
<t>
</t>

<section title= "Certificate Event Package" >
<t>
<figure><artwork>
To: ietf-sip-events@iana.org
Subject: Registration of new SIP event package

Package Name: certificate

Is this registration for a Template Package: No

Published Specification(s): draft- TODO 

Person &amp; email address to contact for further information:
  Cullen Jennings &lt;fluffy@cisco.com&gt;
</artwork></figure>
</t>
</section>

<section title= "Credential Event Package" >
<t>
<figure><artwork>
To: ietf-sip-events@iana.org
Subject: Registration of new SIP event package

Package Name: credential

Is this registration for a Template Package: No

Published Specification(s): draft- TODO 

Person &amp; email address to contact for further information:
  Cullen Jennings &lt;fluffy@cisco.com&gt;
</artwork></figure>
</t>
</section>

<section title= "PKCS #8">
<t>

<figure><artwork>
To: ietf-types@iana.org
Subject: Registration of MIME media type application/pkcs8

MIME media type name: application

MIME subtype name: pkcs8

Required parameters: None

Optional parameters: None 

Encoding considerations: will be binary for 8-bit transports 

Security considerations: Carries a cryptographic private key 

Interoperability considerations: None

Published specification: TODO 

Applications which use this media type: Any MIME-complaint transport

Additional information:
  Magic number(s): None
  File extension(s): .p8 
  Macintosh File Type Code(s): none

Person &amp; email address to contact for further information:
  Cullen Jennings &lt;fluffy@cisco.com&gt;

Intended usage: COMMON

Author/Change controller:
  Cullen Jennings &lt;fluffy@cisco.com&gt;
</artwork></figure>
</t>
</section>

</section>

<section title= "Acknowledgments" >
<!--
<t>
Many thanks to ...
</t>
-->
</section>

</middle>
<back>
  <references title="Normative References" >


<reference anchor="PKCS.8.1993">
<front>
<title>Private-Key Information Syntax Standard, Version 1.2</title>
<author>
<organization>RSA Laboratories</organization>
</author>
<date month="November" year="1993" />
</front>
<seriesInfo name="PKCS" value="8" />
</reference>


<reference anchor='I-D.ietf-sip-identity'>
<front>
<title>Enhancements for Authenticated Identity Management in the Session Initiation Protocol (SIP)</title>

<author initials='J' surname='Peterson' fullname='Jon Peterson'>
    <organization />
</author>

<date month='May' year='2004' />
</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-sip-identity-02' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-sip-identity-02.txt' />
</reference>



<reference anchor='I-D.ietf-sip-publish'>
<front>
<title>Session Initiation Protocol (SIP) Extension for Event State Publication</title>

<author initials='A' surname='Niemi' fullname='Aki Niemi'>
    <organization />
</author>

<date month='Febuary' day='14' year='2004' />
</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-sip-publish-03' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-sip-publish-02.txt' />
</reference>




<reference anchor='RFC3265'>

<front>
<title>Session Initiation Protocol (SIP)-Specific Event Notification</title>
<author initials='A.B.' surname='Roach' fullname='A.B. Roach'>
<organization /></author>
<date month='June' year='2002' /></front>

<seriesInfo name='RFC' value='3265' />
<format type='TXT' octets='89005' target='ftp://ftp.isi.edu/in-notes/rfc3265.txt' />
</reference>


<reference anchor='RFC2119'>

<front>
<title abbrev='RFC Key Words'>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='Scott Bradner'>
<organization>Harvard University</organization>
<address>
<postal>
<street>1350 Mass. Ave.</street>
<street>Cambridge</street>
<street>MA 02138</street></postal>
<phone>- +1 617 495 3864</phone>
<email>sob@harvard.edu</email></address></author>
<date month='March' year='1997' />
<area>General</area>
<keyword>keyword</keyword>
<abstract>
<t>
   In many standards track documents several words are used to signify
   the requirements in the specification.  These words are often
   capitalized.  This document defines these words as they should be
   interpreted in IETF documents.  Authors who follow these guidelines
   should incorporate this phrase near the beginning of their document:

<list>
<t>
      The key words &quot;MUST&quot;, &quot;MUST NOT&quot;, &quot;REQUIRED&quot;, &quot;SHALL&quot;, &quot;SHALL
      NOT&quot;, &quot;SHOULD&quot;, &quot;SHOULD NOT&quot;, &quot;RECOMMENDED&quot;,  &quot;MAY&quot;, and
      &quot;OPTIONAL&quot; in this document are to be interpreted as described in
      RFC 2119.
</t></list></t>
<t>
   Note that the force of these words is modified by the requirement
   level of the document in which they are used.
</t></abstract></front>

<seriesInfo name='BCP' value='14' />
<seriesInfo name='RFC' value='2119' />
<format type='HTML' octets='14486' target='http://xml.resource.org/public/rfc/html/rfc2119.html' />
<format type='XML' octets='5661' target='http://xml.resource.org/public/rfc/xml/rfc2119.xml' />
</reference>




<reference anchor='RFC3261'>

<front>
<title>SIP: Session Initiation Protocol</title>
<author initials='J.' surname='Rosenberg' fullname='J. Rosenberg'>
<organization /></author>
<author initials='H.' surname='Schulzrinne' fullname='H. Schulzrinne'>
<organization /></author>
<author initials='G.' surname='Camarillo' fullname='G. Camarillo'>
<organization /></author>
<author initials='A.' surname='Johnston' fullname='A. Johnston'>
<organization /></author>
<author initials='J.' surname='Peterson' fullname='J. Peterson'>
<organization /></author>
<author initials='R.' surname='Sparks' fullname='R. Sparks'>
<organization /></author>
<author initials='M.' surname='Handley' fullname='M. Handley'>
<organization /></author>
<author initials='E.' surname='Schooler' fullname='E. Schooler'>
<organization /></author>
<date month='June' year='2002' /></front>

<seriesInfo name='RFC' value='3261' />
<format type='TXT' octets='647976' target='ftp://ftp.isi.edu/in-notes/rfc3261.txt' />
</reference>

<reference anchor='RFC3760'>

<front>
<title>Securely Available Credentials (SACRED) - Credential Server Framework</title>
<author initials='D.' surname='Gustafson' fullname='D. Gustafson'>
<organization /></author>
<author initials='M.' surname='Just' fullname='M. Just'>
<organization /></author>
<author initials='M.' surname='Nystrom' fullname='M. Nystrom'>
<organization /></author>
<date year='2004' month='April' /></front>

<seriesInfo name='RFC' value='3760' />
<format type='TXT' octets='49910' target='ftp://ftp.isi.edu/in-notes/rfc3760.txt' />
</reference>

<reference anchor='RFC3546'>

<front>
<title>Transport Layer Security (TLS) Extensions</title>
<author initials='S.' surname='Blake-Wilson' fullname='S. Blake-Wilson'>
<organization /></author>
<author initials='M.' surname='Nystrom' fullname='M. Nystrom'>
<organization /></author>
<author initials='D.' surname='Hopwood' fullname='D. Hopwood'>
<organization /></author>
<author initials='J.' surname='Mikkelsen' fullname='J. Mikkelsen'>
<organization /></author>
<author initials='T.' surname='Wright' fullname='T. Wright'>
<organization /></author>
<date month='June' year='2003' /></front>

<seriesInfo name='RFC' value='3546' />
<format type='TXT' octets='63437' target='ftp://ftp.isi.edu/in-notes/rfc3546.txt' />
</reference>


<reference anchor='RFC3268'>

<front>
<title>Advanced Encryption Standard (AES) Ciphersuites for Transport Layer Security (TLS)</title>
<author initials='P.' surname='Chown' fullname='P. Chown'>
<organization /></author>
<date month='June' year='2002' /></front>

<seriesInfo name='RFC' value='3268' />
<format type='TXT' octets='13530' target='ftp://ftp.isi.edu/in-notes/rfc3268.txt' />
</reference>

  </references>
  <references title="Informational References">


<reference anchor='I-D.ietf-pkix-certstore-http'>
<front>
<title>Internet X.509 Public Key Infrastructure Operational Protocols: Certificate  Store Access via HTTP</title>

<author initials='P' surname='Gutmann' fullname='Peter Gutmann'>
    <organization />
</author>

<date month='April'  year='2004' />
</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-pkix-certstore-http-06' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-pkix-certstore-http-6.txt' />
</reference>


  </references>
</back>
</rfc>



