Advanced Security Processing for Atom and APP Documents
IBM1 Rogers StreetCambridgeMA02142USA+1 617-693-6313chenfr@us.ibm.comhttp://www.ibm.comIBM1 Rogers StreetCambridgeMA02142USA+1 617-693-1236mhondo@us.ibm.comhttp://www.ibm.comIBM1 Rogers StreetCambridgeMA02142USA+1 617-693-3808rsalz@us.ibm.comhttps://www.ibm.com/developerworks/mydeveloperworks/blogs/soma/
Applications
atompubatomappsecuritytrustThe Atom and APP specifications specify simple
uses of cryptography to sign and encrypt their documents.
Each document is processed completely, and in isolation.
This document specifies additional uses that enable selective
protection or encryption of content, and allow a "trust path" to
be created across "atom:link" elements.The Atom and APP specifications define how to use
XML Digital Signature,
and
XML Encryption
to prevent the contents of a document from being modified or
inadvertently disclosed.
This specification profiles how to use
WS-Security to provide selective protection and
encryption of a document and allow a single document to be encrypted
for multiple recipients.Linking is a key point of Atom and APP, and this document defines
a new element that can be used to establish a chain of trust, from
the document with the "atom:link" to the content being
referred-to.The conventions and terminology of both The
Atom Syndication Format and The Atom
Publishing Protocol, known as Atom and APP respectively,
are incorporated here by reference. Within this document, the
phrase "Atom document" is used to refer to any document defined by
either RFC.The following namespace prefixes are used in this document:
PrefixNamespace URIatomhttp://www.w3.org/2005/Atomapphttp://www.w3.org/2007/appatomsechttp://www.ibm.com/xmlns/stdwip/atomext/securitydsighttp://www.w3.org/2000/09/xmldsig#xenchttp://www.w3.org/2001/04/xmlenc#wssehttp://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsdwsu"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsdThe "wsse:Security" element is part of a specification informally
known as WS-Security. The element is defined as a container for
security information, including security tokens, XML encryption keys,
and/or XML digital signatures for SOAP message security. This
specification uses the semantics of WS-Security processing to achieve
the goals described above.
An Atom or APP dcoument MUST NOT have more than one "wsse:Security"
child element. While compatible with processing, the schema for the
"wsse:Security" element is taken from .
One feature of the WS-Security header is that it should be possible
to process in a forward-streaming manner. That is, security tokens
appear before they are used (such as in signatures), and encipherment
keys appear before the encrypted data. Therefore, if present, the
"wsse:Security" element SHOULD be the first child of the Atom
document.The "wsse:SecurityTokenReference" element can be used to help
enable streaming processing, and to reduce multiple occurrences of
the same credentials. To do this, each credential is made the child
of a "wsse:BinarySecurityToken" element, which in turn is a child of
the "wsse:Security" element. For example:Note that specifies
many ways to identify key material, including Distinguished Name,
Issuer/SerialNumber, etc. Any method other than embedding the
entire certificate SHOULD NOT be used.In this document, anywhere a certificate is referenced, the content
may instead be a "wsse:SecurityTokenReference" to a token in the
"wsse:Security" element. For example, the following two document
fragments are semantically equivalent:A reference other than a direct reference using the "wsse:Reference"
element MUST NOT be used.The "atomsec:credentials" element is a child element of an
"atom:link" element.
It specifies one or more security tokens that may be used to
validate the provenance of the data being linked-to. The "use"
attribute specifies how the credentials are to be used. Two values
are specified, "content" and "transport". If the attribute is not
present, it is equivalent to providing it with the value
"content".The "transport" value specifies that the credentials can be used to
validate the SSL certificate of the server containing the linked-to
data. The "content" value specifies that the credentials can be used
to validate any digital signatures on the linked-to data.An "atom:link" element can have no more than two "atom:credentials"
elements, one for each of content and transport credentials.The child elements of the "atomsec:credentials" element SHOULD be
"dsig:KeyInfo" elmenents used to locate X.509 certificate data.
These certificates can be used by the relying party to verify the
specified trust chain.A party that has out of band knowledge MAY ignore this element.Here is an example of an Atom document pointing to signed content:Here is another example, one that specifies the CA that issued the
SSL/TLS certificate used by the server for the host
www.example.com:A "dsig:Signature" element in the "wsse:Security" element may
be used to sign one or more elements of an Atom document. The
signature should be detached, with one "dsig:Reference" for each item
being signed.The processing rules are defined by sections 8.2 and 8.4 of
with the following additions:
The SOAP message envelope is not used and the "wsse:Security"
element MUST be the first element of the root document.Each element being signed MUST have a unique "xml:id"
attribute if not already present.The enveloped-signature transform as defined by SHOULD be used to sign
the root document. If there are additional signed elements, they
MUST be signed first so that the root signature will include its
descendant's signatures.Here is an example:The processing rules for encrypting parts of an Atom document are
defined by sections 9.4.1 and 9.4.2 of
with the following additions:
The SOAP message envelope is not used and the "wsse:Security"
element MUST be the first element of the root document.Use WS-Security processing to encrypt the full document.
If the encrypted result does not have to be valid according to the
Atom schema's, then the
standard SHOULD be used.Here is an example:None.This entire document is about securing Atom documents.
Authentication and authorization (e.g., to delete a update or delete
a posting via APP) are not discussed here.Web Services Security: SOAP Message Security 1.0IBMMicrosoftVeriSignSunWeb Services Security: SOAP Message Security 1.1IBMMicrosoftVeriSignSunThis section provides a very brief overview of common cryptographic
techniques and how they are used. It is intended only to provide the
smallest amount of information so that the rest of this document is
understandable. It is not normative.
Public-key cryptography is done using two numbers that are related to
each other. One of these numbers is public and can be known or used
by anyone, while the other is private and should only be known by its
"owner." The numbers have two very important properties. First,
anything encrypted with the public key can only be decrypted with the
private key. This means that anyone can generate text that is only
legible to the key's owner. The second is that anything that is
encrypted with the private key can be decrypted by anyone who has the
public key. This allows anyone receiving such an encrypted item to
know that it came from the key holder. The most common public-key
algorithms are RSA and Elliptic-Curve.A message digest, or hash takes an arbitrary sequence of bytes and
returns a fixed-size identifier. The most important property is that
it is statistically unlikely for two different streams to result in
the same hash. The most useful hash algorithms are SHA-1 and SHA-256.A message digest encrypted with a private key is a signature. Anyone
with the original document can generate their own digest, decrypt the
received one, and compare them. If the values do not match, then the
document has been modified. The most common signature method is
RSA/SHA-n.In symmetric cryptography, the same key is used for encryption and
decryption. This means that both sender and receiver have to have the
same key. Common symmetric (or shared-secret) algorithms are AES and
triple-DES.A common technique is to "wrap" a symmetric key by encyrpting it
with the recipient's public key. The bulk of the data is then
encrypted using the symmetric key. This allows multiple recipients to
see the data by only encrypting the symmetric key multiple times,
rather than the entire data.An X.509 certificate is a datum that contains a name and other
identifying information, and a public key that can be associated with
that name. The certificate also contains information such as its
validity period, the ways in which the keys are to be used, and so
on. For details see the IETF PKI Profile, RFC XXX. A certificate is
signed by a CA, and common practice is for the entity receiving a
certificate to be configured to trust everything signed by the CA, or
perhaps the CA's CA, or further up the chain.