Title: 650'412 Java Security
1650.412 Java Security
Week 13
2Tonights Agenda
- Standards Overview
- WSDL
- XML Encryption
- SAML
- XACML
- WS Security
- XKMS
- JWSDP
3Web Services Standards
4Too much of a good thing?
http//roadmap.cbdiforum.com/reports/protocols/sum
mary.php
5Web Services Security Standards
Source http//www.nwfusion.com/buzz/2002/websec.h
tmlchart
6Web Services Description Language
7WSDL
- A way of describing a Web Service
- Expressed in XML (of course)
- WSDL Core Language 2.0 W3C Working Draft, Aug.
2004 - Analogous to Java Reflection API
- Allows dynamic discovery
- For a given web service
- What methods are available?
- For each method --
- Arguments and their types
- Return type
8WSDL (Cont.)
- WSDL doesn't convey
- What the methods "do"
- Proper sequencing of calls
- See W3C choreography working group
- WSDL not a security standard per se
- However, WSDL describes legal calls
- Shows how to call a service "safely"
- This forms part of the WS integrity story
- However, WSDL documents not normally signed
- But neither are Schema / DTD documents
9WSDL Hello World
Consider the following RMI interface
public interface Hello extends Remote String
sayHello() throws RemoteException
- A common model for java developers
- Describe web service via a simple java interface
- Use tools provided to generate WSDL, stubs,
ties - Server-side often implemented as a servlet in J2EE
Source http//www.novell.com/documentation/lg/wor
kbench4/docs/jbroker-web/docs/tutorial
10Hello World WSDL Version
lt?xml version"1.0" encoding"UTF-8"?gt ltdefinition
s name"HelloService" targetNamespace"http//www.
helloWSDL" xmlns"http//schemas.xmlsoap.org/wsdl/
" xmlnssoap"http//schemas.xmlsoap.org/wsdl/soap
/" xmlnssoapenc"http//schemas.xmlsoap.org/soap/
encoding/" xmlnstns"http//www.helloWSDL"
xmlnsxsd"http//www.w3.org/2001/XMLSchema"gt lttyp
es/gt ltmessage name"sayHelloRequest"/gt ltmessage
name"sayHelloResponse"gt ltpart name"arg0"
type"xsdstring"/gt lt/messagegt ltportType
name"Hello"gt ltoperation name"sayHello"gt ltinput
message"tnssayHelloRequest"/gt ltoutput
message"tnssayHelloResponse"/gt lt/operationgt lt/po
rtTypegt ltbinding name"HelloBinding"
type"tnsHello"gt ltsoapbinding style"rpc"
transport"http//schemas.xmlsoap.org/soap/http"/gt
ltoperation name"sayHello"gt ltsoapoperation
soapAction"http//www.helloWSDL/sayHello"/gt ltinp
utgt ltsoapbody encodingStylehttp//schemas.xmlsoa
p.org/soap/encoding/ namespace"http//www.hello
WSDL" use"encoded"/gt lt/inputgt ltoutputgt
ltsoapbody encodingStylehttp//schemas.xmlsoap.or
g/soap/encoding/ namespace"http//www.helloWSDL
" use"encoded"/gt lt/outputgt lt/operationgt lt/bindi
nggt ltservice name"HelloService"gt ltport
binding"tnsHelloBinding" name"HelloPort"gt ltso
apaddress location"http//localhost9090/helloWS
DL"/gt lt/portgt lt/servicegt lt/definitionsgt
Not something you'd normally want to write by
hand
11XML Encryption
12XML Encryption
- Quick History
- Jan 2001 W3C formed XML Encryption WG
- Oct 2002 Spec published
- Dec 2002 Spec approved as a Recommendation
- What service does it provide?
- Confidentiality
- Why not just use SSL?
- SSL privacy of data "in transit" over network
links - SSL doesnt help with "data-at-rest" (DAR)
- XML Encryption is one answer
- FileSec is another ?
13Authors, Spec, Namespace
- The Spec
- Primary Authors IBM, Microsoft, XMLSec
- See http//www.w3.org/TR/xmlenc-core
- Version identified by namespace
- xmlnsxenc'http//www.w3.org/2001/04/xmlenc'
- NOTE for brevity in examples in this section,
I'll often make the following shorthand
substitution
c xmlnsxenc'http//www.w3.org/2001/04/xmlenc'
14XML Encryption
- Why is it needed?
- Could encrypt using existing approaches
- Rationale similar to XML Signature
ltMyDocumentgt lt/MyDocumentgt
Portion Encrypted by Ann
Portion Encrypted by Fred
Provides a standard XML-based approach
ltSomePlaintextgt lt/SomePlaintextgt
Portion Encrypted by Ann
15What can be encrypted?
Encrypt entirely
Original Document
ltMyDocgt ltE1gtval1lt/E1gt ltE2gtval2lt/E2gt lt/MyDocgt
ltMyDocgt ltE1gtval1lt/E1gt ltE2gtval2lt/E2gt lt/MyDocgt
Encrypt element
Encrypt element content
ltMyDocgt ltE1gtval1lt/E1gt ltE2gtval2lt/E2gt lt/MyDocgt
ltMyDocgt ltE1gtval1lt/E1gt ltE2gtval2lt/E2gt lt/MyDocgt
- Also, can encrypt non-XML data (e.g., external
files)
16ltEncryptedDatagt
? zero or one occurences
- ltEncryptedDatagt
- Replaces element or element value that it
encrypts - Can be either the root of document or a child of
another document
ltEncryptedData Id? Type? MimeType? Encoding?gt
ltEncryptionMethod/gt? ltdsKeyInfogt ltEncryptedKe
ygt? ltAgreementMethodgt? ltdsKeyNamegt? ltdsRet
rievalMethodgt? lt/dsKeyInfogt? ltCipherDatagt ltCi
pherValuegt? ltCipherReference URI?gt? lt/CipherDat
agt ltEncryptionPropertiesgt? lt/EncryptedDatagt
ltCipherDatagt is the only required element
17Example Encrypt an Element
ltExample1gt ltElementgt data lt/Elementgt lt/Example
1gt
Serialize to UTF-8
Encryption Algorithm
Base64 encode
ciphertext
Key
Package in XML
Compare to original
ltExample1gt ltEncryptedDatagt ltCipherDatagt ltCi
pherValuegt a6b28c4 lt/CipherValuegt lt/Ciph
erDatagt lt/EncryptedDatagt lt/Example1gt
ltEncryptedData gt ltCipherDatagt ltCipherValuegt a6
b28c4 lt/CipherValuegt lt/CipherDatagt lt/EncryptedDa
tagt
Replace Element with cipher text
18Example Encrypt Entire Document
lt?xml version"1.0"gt ltPaymentInfo
xmlns'http//example.org/paymentv2'gt ltNamegtJohn
Smithlt/Namegt ltCreditCard Limit'5,000'
Currency'USD'gt ltNumbergt4019 2445 0277
5567lt/Numbergt ltExpirationgt05/03lt/Expirationgt
lt/CreditCardgt lt/PaymentInfogt
lt?xml version"1.0"gt ltEncryptedData
xmlnsxenc'http//www.w3.org/2001/04/xmlenc'
MimeType"text/xml"gt ltCipherDatagt ltCipherValu
egtA23B45C56lt/CipherValuegt lt/CipherDatagt lt/Encryp
tedDatagt
19Example Encrypt Element Contents
original
element
element contents
20Referenced External Data
- Suppose we have an external file (say cc.jpg)
that we reference from our XML document - How to deal with this?
- Option 1 Don't use XML encryption
- Use an ordinary ltImagegt tag to refer to image
- Encrypt cc.jpg separately. Call result
cc.jpg.enc. - Rename to cc.jpg.enc in reference above
- Con encryption outside of XML encryption
standard
ltPaymentInfo xmlns"http//example.org/paymentv2"'
gt ltNamegtJohn Smithlt/Namegt ltCreditCardImage
id"JohnSmithCreditCardImage"gt ltImage
type"front" ref"http//www.xyz.com/cc/images/
JohnSmithCreditCard/cc.jpg"/gt lt/CreditCardgt lt/Pay
mentInfogt
21External Data (cont.)
- Option 2 encrypt the element that references
the image
ltPaymentInfo xmlns"http//example.org/paymentv2"gt
ltNamegtJohn Smithlt/Namegt ltCreditCardImage
id"JohnSmithCreditCardImage"gt ltEncryptedData
xmlns"c" Type"cElement"gt ltCipherDatagtltCipher
ValuegtA23B45C56lt/CipherValuegtlt/CipherDatagt lt/Enc
ryptedDatagt lt/CreditCardgt lt/PaymentInfogt
This example assumes the image is "safe" already
here we just encrypt the reference to the file.
22External Data (cont.)
- Option 3 use ltCipherReferencegt
ltPaymentInfo xmlns'http//example.org/paymentv2'gt
ltNamegtJohn Smithlt/Namegt ltCreditCardImage
id'JohnSmithCreditCardImage'gt ltEncryptedData
xmlns"c" Type"cElement" MimeType"image/jpeg"
ID"JohnSmithEncryptedCreditCardImagegt ltCiph
erDatagt ltCipherReferencegt URI"http//www.xyz.co
m/cc/images/JohnSmithCreditCard/cc.jpg" lt/Cipher
Referencegt lt/CipherDatagt lt/EncryptedDatagt lt/Cr
editCardgt lt/PaymentInfogt
CipherReference means data is encrypted elsewhere.
23Crypto Details Implicit vs. Explicit
- In examples thus far
- Encryption algorithm key have been implicit
- Sender/Receiver must agree in advance
- Specifying the encryption algorithm
- Use ltEncryptionMethodgt element
- Child of ltEncryptedDatagt
- Example
- What about the key information?
- Next slide
ltEncryptionMethod Algorithm"ctripledes-cbc"/gt
24ltdsKeyInfogt element
- Conveys information about keys used for
encryption - An optional child of ltEncryptedDatagt
- If we do public key encryption, could include the
certificate in ltdsKeyInfogt - Knowing this, the recipient would know which
private key to use. Useful for decrypting a
session key. - Or, if not using a PKI, can use a shared
key/password to encrypt the session key. Use
ltEncryptedKeygt for this(next slide)
25ltEncryptedKeygt
ltEncryptedKey ID'EK' xmlns'c'gt ltEncryptionMeth
od Algorithm"crsa-1_5"/gt ltdsKeyInfo
xmlnsds'c'gt ltdsKeyNamegtPublishKey1lt/dsKeyNa
megt lt/dsKeyInfogt ltCipherDatagt ltCipherValuegtd1
za5clt/CipherValuegt lt/CipherDatagt ltReferenceListgt
ltDataReference URI'ED'/gt lt/ReferenceListgt lt/
EncryptedKeygt
How we refer to the key
The encrypted key
Identifies the data we encrypted with this key
26More on Encryption Algorithms
- XML Encryption does not define any new algorithms
- That would be foolish
- Implementations must support
- Triple DES, AES-128, and AES-256
- But can choose any supported algorithm
- e.g., RC4, IDEA, DES, Skipjack, AES-192
27XML Encryption and Java
28XML Encryption and Java
- JSR 106
- http//www.jcp.org/en/jsr/detail?id106
- Implementations
- VeriSign
- IBM
- Phaos
- IAIK
- Apache
Proprietary APIs
29Example VeriSign
- Trust Services Integration Kit
- http//www.verisign.com/products-services/security
-services/pki/xml-trust-services/index.html - I downloaded to C\java\tsik
- Version 1.1
- See http//www.verisign.com/developer/xml
30Let's Encrypt ltCreditCardgt Element
File "Order.xml"
ltOrdergt ltOrderIdgt04212003001lt/OrderIdgt ltCustomer
gtFred Smithlt/Customergt ltProductgt42" Flat Screen
TVlt/Productgt ltCreditCardgt ltNumbergt1234-4321-567
8-9876lt/Numbergt ltExpirationgtMay-2009lt/Expiration
gt lt/CreditCardgt lt/Ordergt
31Example Encryption - VeriSign
import com.verisign.xmlenc. import
com.verisign.xpath.XPath import
javax.xml.parsers. import org.apache.xml.seriali
ze. import org.w3c.dom. import
javax.crypto. import java.io.File class
XMLEncryptionDemo public static void
main(String args)throws Exception new
XMLEncryptionDemo().test() public void
test() throws Exception // Read XML document
from a file into a DOM document DocumentBuilderF
actory dbf DocumentBuilderFactory.newInstance()
dbf.setNamespaceAware(true) DocumentBuilder
db dbf.newDocumentBuilder() File file new
File("Order.xml") Document doc
db.parse(file) // In-memory DOM tree from file
32Example Encryption VeriSign (Cont.)
// Generate a triple DES key to use in
encrypting the XML document KeyGenerator
keyGenerator KeyGenerator.getInstance("DESede")
keyGenerator.init(168) SecretKey secretKey
keyGenerator.generateKey() // Create an
encryptor for this document then encrypt and
output Encryptor e new Encryptor(doc,
secretKey, AlgorithmType.TRIPLEDES) Document
encryptedDoc e.encrypt(new XPath("/Order/CreditC
ard")) output(encryptedDoc, "ENCRYPTED
VERSION") // Decrypt and output the document
using the same key String ns "xenc",
"http//www.w3.org/2001/04/xmlenc" XPath
xpath new XPath(".//xencEncryptedData", ns)
Decryptor d new Decryptor(encryptedDoc,
secretKey, xpath) output(d.decrypt(),
"DECRYPTED VERSION")
Find the ciphertext
33Example Encryption VeriSign (Cont.)
/ Output a document to standard output
/ private void output(Document d, String title)
throws Exception System.out.println("\n---"ti
tle"---") OutputFormat format new
OutputFormat(d) format.setIndent(3)
XMLSerializer output new XMLSerializer(System.
out, format) output.serialize(d)
Note Did not use ltEncryptedKeygt in this example,
so key must already be known to decryptor.
34Output
Decrypt of encryption
35SAML
36SAML
- Security Assertions Markup Language
- An OASIS standard
- http//www.oasis-open.org/committees/tc_home.php?w
g_abbrevsecurity - SAML is part of foundation of Liberty Alliance
- Federated network identity on the Internet
- Contrast with Microsoft's Passport
37http//www.projectliberty.org
38Meanwhile in Redmond
39The Problem and Its Implications
- The Problem
- No standard way to share security attributes
(e.g., authentication authorization data)
between organizations engaged in distributed
interactions. - The Frequent Result?
- Proprietary, tightly-coupled systems
- Multiple logins
- Higher costs
- Many see XML as a basis for a solution
- Thus, SAML
40Use Cases
- Major use cases motivating SAML
- Single Sign on (SSO)
- Backoffice
- Authorization service
41Single Sign On
Ideally, Employee logs in just once in spite of
multiple domains
Security Domain 1
1. Authenticate
Web Site 1
Employer
Employee
Security Domain 2
Web Site 2
2. Order parts
Parts Supplier
42Backoffice Transaction
Parts Supplier
Security Domain 1
Web Site 1
2. Order parts
Employee
Security Domain 2
Web Site 2
- Authenticate, Place order
Employer
43Authorization
Policy Enforcement Point
Access resource
Employee
OK?
Yes (or No)
Policy Decision Point
Security Domain
44Assertions
- The Assertion
- An optionally signed statement / declaration
concerning some aspect of a subject - A fundamental abstraction in SAML
- Types of "statements" appearing in assertions
- Authentication
- Attribute
- Authorization
- Can extend to create own assertion types
45Assertion Contents
- Timestamp
- Assertion ID
- Subject name security domain
- Validity conditions
- Validity period
- Audience and target restrictions
- Set of Assertion Statements
46Authentication Statement
- States that a subject was authenticated via a
given means at a given date/time. - SAML does not do the authentication
- Instead, one can use SAML to record that it
happened in a standard way
47Attribute Statement
- An issuing authority asserts that
- subject S
- is associated with attributes X, Y, Z
- with values a, b, c(XML fragments)
- Typical source is LDAP
- john.doe in example.com
- is associated with attribute Department
- with value Human Resources
Source Netegrity
48Example Assertion (has 2 stmts)
- John Doe logged in at 9AM at example.com. He is
a manager with spending limit of 10K. - ltsamlassertion Issuerexample.comgt
ltsamlConditions NotBefore NotAfter/gt
ltsamlAuthenticationStatement
AuthenticationMethod
AuthenticationInstant gt ltsamlsubject
gtJohn Doelt/samlsubjectgt lt/samlAuthenticatio
nStatementgt - ltsamlAttributeStatementgt ltsamlsubject
gtJohn Doelt/samlsubjectgt ltsamlAttribute
AttributeNameTitle gt
ltsamlAttributeValuegtManagerlt/AttributeValuegt
lt/samlAttributegt ltsamlAttribute
AttributeNameSpendLimit gt
ltsamlAttributeValuegt10,000lt/AttributeValuegt
lt/samlAttributegt lt/samlAttributeStatementgt
lt/samlAssertiongt
Source Netegrity
49Authorization Statement
- An issuing authority decides whether to grant the
request - by subject S
- to perform action A
- on resource R
- given evidence E (other assertions)
- The subject could be a human or a program
- The resource could be a web page or a web
service, for example
Source Netegrity
50Example Authorization Decision Assertion
- ltsamlAssertion gt ltsamlConditions
/gt ltsamlAuthorizationDecisionStatement Decis
ionPermit - Resourcehttp//jonesco.com/rpt_12345.htmgt
- ltsamlActiongtREADlt/samlActiongt ltsamlEvidence
gtlt/samlEvidencegt ltsamlSubjectgt ltsamlNameI
dentifier SecurityDomainsmithco.com Nam
ejoeuser /gt lt/samlSubjectgt lt/samlAuthoriza
tionDecisionStatementgtlt/samlAssertiongt
Source Netegrity
51SAML and Java
- JSR-155 Java API standard and Reference
Implementation - http//www.jcp.org/en/jsr/detail?id155
- Mission
- To provide a set of APIs, exchange patterns
implementation to securely (integrity and
confidentiality) exchange assertions between web
services based on OASIS SAML - Originally submitted by CISCO
- Seems dead (10/2001 last activity)
52Other Sources of SAML java toolkits
- Open SAML
- http//www.opensaml.org
- java and C versions of SAML
- SourceId SAML 1.1 Java Toolkit
- 11-14-2005
- http//www.sourceid.org/projects/saml_1.1_toolkit
53Vendors Who are "SAML-Enabled"
- IBM ? Tivoli Access Manager
- Oblix ? NetPoint
- SunONE ? Identity Server
- Baltimore ? SelectAccess
- Entegrity ? Solutions AssureAccess
- Netegrity ? SiteMinder
- Sigaba ? Secure Messaging Solutions
- RSA Security ? ClearTrust
- VeriSign ? Trust Integration Toolkit
- Entrust ? GetAccess
54XACML
55XACML
- eXtensible Access Control Markup Language
- An XML-based language designed for creating
policies and automating their use to control
access. - Started Summer 2001 to consolidate efforts from
IBM, University of Milan, and others - From OASIS
- Organization for the Advancement of Structured
Information Standards - www.oasis-open.org
- Compatible with OASIS' SAML
- Security Assertions Markup Language
- XACML can provide SAML Authorization Assertion
56XACML
- Both a policy language and access conrol Request
/ Response language in one - The requester for a resource contacts a PEP to
attempt access to some resource. PEP obtains
decision from a PDP.
Policy Enforcement Point (PEP) Where policy is
actually enforced
request
response
Policy Decision Point (PDP) Where policy is
evaluated and a decision rendered
57(No Transcript)
58Simplified Overview
Decision Request (XML)
Policy Decision Point (PDP)
Policy Enforcement Point (PEP)
Subject
Response (XML)
Policy Info. Point (PIP)
- Response returns one of
- Permit
- Deny
- Indeterminate
- Not Applicable
Policy Admin. Point (PAP)
59Lots of "Points"
- Policy Decision Point (PDP)
- Where a decision is made
- Policy Enforcement Point( PEP)
- Where a decision is enforced
- Policy Information Point (PIP)
- Source of attribute values
- Policy Administration Point (PAP)
- Maintainer of policies, policy sets, rules
- Can co-locate points or distribute them
- Can have multipe of each
60XACML Some Details
- PolicySet Policies, PolicySets
- Policy Rules
- Rule Target Condition Effect
- Target where this rule applies
- Condition predicate to evaluate
- Effect effect to enforce if condition is true
(permit/deny) - Each rule results in a decision
- Use combining algorithms to combine decisions
61Available Combining Algorithms
- Policies, Policy Sets, or Rules
- Deny-Overrides
- Permit-Overrides
- First Applicable
- Policies Only
- Only-One-Applicable
- Only one policy should be applicable if gt1, then
error.
62Basic Structure of a Request
- ltRequestgt
- ltSubjectgt
- ltAttribute AttributeID"" Datatype""gt
- ltAttributeValuegtlt/AttributeValuegt
- lt/Attributegt
-
- lt/Subjectgt
- ltResourcegt
- ltAttributegtlt/Attributegt
- lt/Resourcegt
- ltActiongt
- ltAttributegtlt/Attributegt
- lt/Actiongt
- lt/Requestgt
63Simplified UML
0..
PolicySet "standard means for combining
separate policies into a single combined policy."
PolicySet -policyCombiningAlgorithm -obligations
(optional)
1
0..
1
0..
Target -subject -resource -action -environment
Policy -ruleCombiningAlgorithm -obligations
(optional)
Basis of an authorization decision
0..1
0..
0..1
0..
Rule -condition (condition) -effect (permit/deny)
64Rule Target
- Defines set of resources, subjects, actions,
environment to which rule is intended to apply - Leave any of these blank, and rule applies to all
entities in that category - Blank rule target implies that XACML should use
target of parent policy
65Relationship to SAML
- SAML Security Associations Markup Language
- Also an OASIS XML-based standard
- Represents assertions
- An optionally signed statement / declaration
concerning some aspect of a subject - A fundamental abstraction in SAML
- Types of "statements" appearing in assertions
- Authentication
- Attribute
- Authorization
Could create and pass around the network a SAML
assertion based on an XACML decision
66Preliminary XACML Impressions
- A maturing specification
- Version 2.0 approved Feb. 2005
- Some formal eval work recently done
- Polar Humenn's paper, 30 Oct. 2003
- The Formal Semantics of XACML
- http//lists.oasis-open.org/archives/xacml/200310/
msg00094.html
67Known Implementations
- Sun
- Implements XACML 1.x
- Up to version 1.2
- http//sunxacml.sourceforge.net
- Not a lot of activity (last update June 2006)
- Parthenon Computing
- Implements XACML 1.1 written in C
- http//www.parthenoncomputing.com
- Lagash Systems
- Implements XACML 1.0 written in C (.NET)
- http//mvpos.sourceforge.net
- Jericho Systems
- http//www.jerichosystems.com
- EnterSpace Security Suite XACML-like
68WS-Security
69WS-Security
- What is it?
- Extensions to SOAP to add security
- Main Goal secure SOAP message exchanges
- Describes how to attach signature and encryption
headers to SOAP messages. In addition, describes
how to attach security tokens, including binary
security tokens such as X.509 certificates and
Kerberos tickets, to messages. - Why is it needed?
- Major web services protocols have lacked security
- Use of transport level security (e.g., SSL)
insufficient - Want security services closer to the application
layer - Want to be transport-independent
70Players and Standards
- Authors Microsoft, IBM, VeriSign
- Also key authors of
- SOAP request/response protocol for XML messages
- UDDI directory for web services
- WSDL describes web service programmatic
interface - OASIS is finally involved
- http//www.oasis-open.org/committees/tc_home.php?w
g_abbrevwss
71Bigger Picture Web Services Specs
- WS-Security the first of several security
specifications - Examples of future specs
- WS-Policy capabilities and constraints of the
security policies on intermediaries and endpoints
(e.g. required security tokens, supported crypto
algorithms, privacy rules). - WS-Trust framework for trust models that
enables Web services to securely interoperate. - WS-Privacy model for how Web services and
requesters state privacy preferences and
organizational privacy practice statements - Web services security white paper
http//msdn.microsoft.com/library/default.asp?url
/library/en-us/dnwssecur/html/securitywhitepaper.a
sp
?
72Web Services Security Specs
WS-Secure Conversation
WS-Authorization
WS-Federation
Future?
WS-Policy
WS-Trust
WS-Privacy
WS-Security
XML Signature
XML Encryption
WS-SOAP (3/2004 Soap Message Security 1.0)
73WS-Security Overview
- Goal is to support a variety of security models
- PKI, Kerberos, SSL
- And to support multiple
- Security tokens, encryption technologies
- Trust domains, signature formats
- Non Goals
- Establish security or authentication mechanisms
requiring multiple exchanges - Key exchange and derived keys
- Manner is which trust is arrived at
74WS-Security Details (Cont.)
- Spec depends on
- XML Signature
- XML Encryption
- A soap message consists of an envelope, which
contains a - Header (WS-Security elements go here)
- Body
- WS-Security has own namespace
- http//schemas.xmlsoap.org/ws/2002/04/secext
ltSEnvelopegt ltSHeadergtlt/SHeadergt ltSBodygtlt/SB
odygt lt/SEnvelopegt
75Basic WS-Security Mechanisms
- Security Token Propagation
- Message integrity
- Confidentiality
76Security Token Propagation
- Can add any of 3 new elements to a SOAP header
- Username / password (see below)
- Binary security token, tag ltBinarySecurityTokengt.
- Useful for
- X.509 cert (ValueTypewssex509v3)
- Kerberos (ValueTypewsseKerberosv5TGT)
- EncodingType Base64Binary or HexBinary
- External token via a URI, tag ltSecurityTokenRefer
encegt - Username / password - XML
- Password types defined
- PasswordText (default)
- PasswordDigest
- Password tag is optional.
ltUsernameToken Idgt ltUsernamegtlt/usernamegt ltP
assword typegtlt/Passwordgt lt/UsernameTokengt
77Message Integrity
- Accomplished by signing SOAP message
- e.g., add two tags to the envelope header
- ltBinarySecurityTokengt - just discussed
- ltdsSignaturegt - see XML Signature spec
- Signature refers back to the token
- Signature is over message envelope
78Confidentiality
- Could just rely on SSL
- But that would not be end-to-end
- Plus might not be necessary to encrypt the entire
envelope, just part of it - New header added inside of ltwsseSecuritygtlt/wsseS
ecuritygt - ltxencReferenceListgt
- ltencDataReference URImyID1/gt
- lt/xencReferenceListgt
- Refers to the encrypted parts of the message
- Uses XML Encryption to create encrypted tags
- Can encrypt session key with public key of
recipient do this with ltxencEncryptedKeygt tag
in the header
79XML Key Management System(XKMS)
80Background
- XML Encryption and XML Signature assume PKI
- We've side-stepped question of how key PKI was
setup - PKI setup is hard Why?
- PKI Complexity
- Enrollment multiple approaches
- No standard discovery approach CAs, Certs, Keys
- Cert standardization interpretation
- Trust management
- Chain-building logic
- Cross certification cert hierarchies
- Client handling of complex ASN.1 and PKCS data
structures - Revocation/Validation
Adapted from Microsoft
81Objectives of XKMS
- Make PKI-based security easier to use
- Address multi-vendor, cross-platform issues
- Support multiple Trust/PKI infrastructures
- Allow clients to offload complex, and difficult,
trust assessment - Integrate key validity checks
- Keep the interfaces simple
- Keep interactions simple
Adapted from Microsoft
82XKMS
- http//www.w3.org/TR/xkms
- Specifies protocols for distributing and
registering public keys, suitable for use in
conjunction with for XML Signature and XML
encryption. - Two parts
- XML Key Information Service Spec. (X-KISS)
- XML Key Registration Service Spec. (X-KRSS)
83XKMS Operations
- Register your public key
- Locate other public keys (optional)
- Example find key so you can send encrypted data
to others - Check validity/trustworthiness of public keys
- Authentication, Signed documents,
- Possibly before sending encrypted data
- Manage your keys
- Revoke
- Update associated attributes
- Recover/roam your private key
Adapted from Microsoft
84Overview
http//www.nwfusion.com/news/tech/2003/0908techupd
ate.html
85Who has XKMS?
- VeriSign part of TrustCenter
- http//www.xmltrustcenter.org/xkms/index.htm
- Entrust has an old reference implementation
may be defunct now.
86Java Web Services Developer Pack
87Main Contents of JWSDP
- WSDL
- SOAP
- UDDI
- JAX-RPC
- Web Services Security (XWS-Security)
- SOAP Message Security (WS-Security)
- Apache XML-DSig
- Apache XML-Enc
- Not JSR 105/106 compliant