ws-sx specifications · 2 agenda •ws-trust • ws-secureconversation • ws-securitypolicy. 3...

94
1 WS-SX Specifications Martin Gudgin Microsoft Corp.

Upload: others

Post on 17-Jul-2020

24 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

1

WS-SX Specifications

Martin GudginMicrosoft Corp.

Page 2: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

2

Agenda

• WS-Trust• WS-SecureConversation• WS-SecurityPolicy

Page 3: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

3

Agenda

• WS-Trust– Introduction– Requesting and returning tokens– Token Scope– References– Keys and Entropy– Returning Multiple Tokens– Negotiations and Challenges

Page 4: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

4

WS-Trust Requirements

• Uniform semantics for token exchange• Integration of existing negotiation

protocols• Extensible and customizable• Focus point for challenges

Page 5: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

5

WS-Trust• A protocol framework

– Supports different exchange patterns and topologies

• Builds on Web Services Security• Defines mechanisms for brokering trust

– Still need to bootstrap trust• Introduces the Security Token Service

– Anyone can be an STS

Page 6: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

6

WS-Trust• Is token-type agnostic• Client doesn’t need token specific

knowledge– Decouples client from token-type– Implies certain token parameters will need

hoisting• Defines common patterns• Can be extended and customized

Page 7: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

7

Common Patterns• Issuance

– Defines mechanisms for requesting a new token

• Renewal– Defines mechanisms for renewing previously

issued tokens• Validation

– Defines mechanisms for verifying validity of tokens

Page 8: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

8

Common Patterns• Cancellation

– Defines mechanisms for cancelling a previously issued token

– Cancelled tokens can no longer be used• Challenges/Negotiations

– Defines mechanisms for secure multi-leg challenges and negotiations prior to token issuance

Page 9: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

9

Example

11

TrustTrust

22

33

Trust

Trust

SignatureSignatureSecurity TokenSecurity TokenProof tokenProof token

U/P

T#

P#

S#

T1

P1T1 T2

P2

T2

S1

S2

Page 10: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

10

Protocol messages - 1

• Requests sent as RequestSecurityToken(RST) messages

• Always specify operation type– Issue, Validate etc.

• May also specify requested token-type– SAML, X509, Kerberos etc.

Page 11: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

11

Protocol messages - 2

• Responses returned as RequestSecurityTokenResponse (RSTR) messages

• Return the requested token– Or a reference thereto– May also specify token-type returned

• Typically also returns a proof-of-possesiontoken

Page 12: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

12

Protocol Messages

Requestor Issuer

RequestSecurityToken

RequestSecurityTokenResponse

Page 13: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

13

<wst:RequestSecurityToken><wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-

1.1#SAMLV1.1</wst:TokenType><wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType></wst:RequestSecurityToken>

Simple RST Example

Page 14: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

14

<wst:RequestSecurityTokenResponse><wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-

1.1#SAMLV1.1</wst:TokenType><wst:RequestedSecurityToken><saml:Assertion ... >...</saml:Assertion></wst:RequestedSecurityToken><wst:RequestedProofToken><xenc:EncryptedKey>...</xenc:EncryptedKey></wst:RequestedProofToken></wst:RequestSecurityTokenResponse>

Simple RSTR Example

Page 15: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

15

Observations

• Identity of requestor determined per normal authentication mechanisms

• Returned requested token considered opaque to requestor

• Returned proof token NOT opaque to requestor

• Scope of returned token implicit

Page 16: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

16

Making scope explicit

• RST supports wsp:AppliesTo– Allows requestor to specify the required scope

for the requested token• Scope can be any domain expression

– e.g. wsa:EndpointReference• RSTR can also indicate scope of returned

token• Token independent

Page 17: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

17

wsp:AppliesToRequestor wsp:AppliesTo

Issuer wsp:AppliesTo

Results

Absent Absent OK. Implied scope.

Present Absent OK. Issued token has scope specified by requestor.

Absent Present OK. Resulting token has scope specified by issuer.

Present Present and matches Requestor

OK.

Present Present and specifies a scope greater than specified by the requestor

OK.

Page 18: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

18

Requested References

• Token issuer can provide Security Token References for referring to returned token– STRs opaque to requestor

• Requested Attached Reference– For referring to the token when it appears in a

message• Requested Unattached Reference

– For referring to the token when it does not appear in a message

Page 19: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

19

Requested References Example

<wst:RequestSecurityTokenResponse><wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType><wst:RequestedSecurityToken><saml:Assertion ... >...</saml:Assertion></wst:RequestedSecurityToken><wst:RequestedProofToken><xenc:EncryptedKey>...</xenc:EncryptedKey></wst:RequestedProofToken><wst:RequestedAttachedReference><wsse:SecurityTokenReference>...</wsse:SecurityTokenReference></wst:RequestedAttachedReference>

</wst:RequestSecurityTokenResponse>

Page 20: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

20

Entropy and Keys

• Often proof token directly specifies key material

• WS-Trust also allows one or both parties to provide key material

• Proof token then specifies algorithm for computing resulting key

Page 21: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

21

Entropy and KeysRequestor Issuer Results

Uses requestor entropy as key No proof-of-possession token is returned.

Provides entropy

No keys returned, key(s) derived using entropy from both sides according to method identified in response

Issues own key (rejects requestor's entropy)

Proof-of-possession token contains issuer's key(s)

Issues own key Proof-of-possession token contains issuer's key(s)

Does not issue key No proof-of-possession token

No Entropy provided

Provide Entropy

Page 22: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

22

Requestor Provided Entropy Example

<wst:RequestSecurityToken><wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType><wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType><wst:Entropy><wst:BinarySecret>WmPjJkStecgGm0SlT7ORuQ==</wst:BinarySecret></wst:Entropy></wst:RequestSecurityToken>

Page 23: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

23

Issuer Provided Entropy Example<wst:RequestSecurityTokenResponse><wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</wst:TokenType><wst:RequestedSecurityToken><saml:Assertion ... >...</saml:Assertion></wst:RequestedSecurityToken><wst:RequestedProofToken><wst:ComputedKey>http://schemas.xmlsoap.org/ws/2005/02/trust/CK/PSHA1</wst:ComputedKey></wst:RequestedProofToken><wst:Entropy><wst:BinarySecret>Q98y+DzgED9KvWF/QOVaQA==</wst:BinarySecret> </wst:Entropy></wst:RequestSecurityTokenResponse>

Page 24: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

24

Token lifetime

• Requestor can specify a desired token lifetime

• Issuer can denote actual lifetime in response– No need for requestor to parse token

Page 25: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

25

Requesting Lifetime Example<wst:RequestSecurityToken><wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-

1.1#SAMLV1.1</wst:TokenType><wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/Issue</wst:RequestType><wst:Lifetime><wsu:Created>2005-11-28T11:00:00Z</wsu:Created><wsu:Expires>2005-11-28T23:00:00Z</wsu:Expires></wst:Lifetime></wst:RequestSecurityToken>

Page 26: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

26

Issuing Lifetime Example<wst:RequestSecurityTokenResponse><wst:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-

1.1#SAMLV1.1</wst:TokenType><wst:RequestedSecurityToken><saml:Assertion ... >...</saml:Assertion></wst:RequestedSecurityToken><wst:RequestedProofToken>...</wst:RequestedProofToken><wst:Lifetime><wsu:Created>2005-11-28T11:00:00Z</wsu:Created><wsu:Expires>2005-11-28T17:00:00Z</wsu:Expires></wst:Lifetime></wst:RequestSecurityTokenResponse>

Page 27: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

27

Returning multiple tokens

• Issuer may return multiple tokens– RequestSecurityTokenResponseCollection

• Can also pass tokens out-of-band– IssuedTokens header

Page 28: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

28

Protocol Messages

Requestor Issuer

RequestSecurityToken

RequestSecurityTokenResponseCollection

Page 29: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

29

RSTRC Example<wst:RequestSecurityTokenResponseCollection><wst:RequestSecurityTokenResponse>...</wst:RequestSecurityTokenResponse><wst:RequestSecurityTokenResponse>...</wst:RequestSecurityTokenResponse>...</wst:RequestSecurityTokenResponseCollection>

Page 30: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

30

IssuedTokens Header

• Allows issuance of tokens outside of RST/RSTR– Typically as part of some other protocol

• Carries same content as RSTRC

Page 31: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

31

IssuedTokens Example<soap:Envelope><soap:Header>...<wst:IssuedTokens><wst:RequestSecurityTokenResponse>...</wst:RequestSecurityTokenResponse><wst:RequestSecurityTokenResponse>...</wst:RequestSecurityTokenResponse>...</wst:IssuedTokens>...</soap:Header><soap:Body>...</soap:Body></soap:Envelope>

Page 32: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

32

Negotiations and Challenges

• Framework supports multi-leg protocols– Challenges– Binary protocols– Key exchange tokens

• Intermediate legs are RSTR messages• Final message contains issued token,

tokens or token references

Page 33: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

33

Protocol Messages

Requestor Issuer

RequestSecurityToken

RequestSecurityTokenResponse

RequestSecurityTokenResponse

RequestSecurityTokenResponse

Page 34: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

34

Protocol Messages

Requestor Issuer

RequestSecurityToken

RequestSecurityTokenResponseCollection

RequestSecurityTokenResponse

RequestSecurityTokenResponse

Page 35: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

35

Protecting Exchanges

• Exchanges can be protected by using keys cryptographically bound to the exchange

• Algorithm defined for deriving key from hash of all exchanged message bodies

Page 36: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

36

Protecting Exchanges

• Signature confirmation can be used in leg n to confirm legs 1 to n-1

• STS can include an authenticator in the RSTRC to the requestor– proves the key computed for the issuance

• Requestor can validate exchange without having to transmit data using the key

Page 37: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

37

Authenticator Example<wst:RequestSecurityTokenResponseCollection><wst:RequestSecurityTokenResponse Context=‘Ctx1’ >...</wst:RequestSecurityTokenResponse><wst:RequestSecurityTokenResponse Context=‘Ctx1’><wst:Authenticator><wst:CombinedHash>HHR70SK/Ps/WqOyJ69+6cw==</wst:CombinedHash></wst:Authenticator></wst:RequestSecurityTokenResponse>

</wst:RequestSecurityTokenResponse>

Page 38: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

38

Bindings and profiles• Issuance, Renewal et.al are bindings

– General usage pattern• Profiles constrain an existing binding

– Specific token type– Challenge protocol

Page 39: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

39

Customization• Additional parameters

– Many defined• E.g., Key type, size, etc.

– Open model allows custom parameters• Responses can contain custom data

– May indicate anything it thinks important

Page 40: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

40

Agenda

• WS-SecureConversation– Security Contexts and Sessions– Security Context Tokens– Derived Key Tokens

Page 41: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

41

WS-SecureConversation• Establishes a shared security

context/session– Context contains keys/secrets and other

information (e.g. claims )• Context established using WS-Trust

– Defines a separate profile of issuance, amendment, renewal, cancellation

Page 42: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

42

WS-SecureConversation• Defines two new token types• SecurityContextToken

– Light-weight token, carries an identifier– Associated with key material– Content unconstrained but no defined semantics– Can support farm scenarios

• DerivedKeyToken– Allows specification of derived keys

Page 43: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

43

<soap:Envelope><soap:Header>...</soap:Header><soap:Body><wst:RequestSecurityToken><wst:TokenType>http://schemas.xmlsoap.org/ws/2005/02/sc/sct</wst:TokenType><wst:RequestType>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</wst:RequestType></wst:RequestSecurityToken></soap:Body></soap:Envelope>

Requesting SCT Example

Page 44: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

44

<soap:Envelope><soap:Header>...</soap:Header><soap:Body><wst:RequestSecurityTokenResponse><wst:RequestedSecurityToken><wsc:SecurityContextToken><wsc:Identifier>uuid:ed5ef37f-5822-4436-ad37-2e7c23d19b4c</wsc:Identifier></wsc:SecurityContextToken></wst:RequestedSecurityToken><wst:RequestedProofToken>...</wst:RequestedProofToken>

</wst:RequestSecurityTokenResponse></soap:Body></soap:Envelope>

Returning SCT Example

Page 45: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

45

Using SCT Example<soap:Envelope><soap:Header><wsse:Security><wsc:SecurityContextToken><wsc:Identifier>uuid:ed5ef37f-5822-4436-ad37-2e7c23d19b4c</wsc:Identifier></wsc:SecurityContextToken>

</wsse:Security></soap:Header><soap:Body><xenc:EncryptedData>...<wsse:SecurityTokenReference><wsse:Reference URI=‘uuid:ed5ef37f-5822-4436-ad37-2e7c23d19b4c’ /></wsse:SecurityTokenReference>...</xenc:EncryptedData></soap:Body></soap:Envelope>

Page 46: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

46

Persisted Context

SCT

Page 47: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

47

Farm Context

SCT

Page 48: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

48

Derived Keys• Exchanging keys and re-using them has security

vulnerabilities– More secure to exchange a secret and derive keys

from it• Spec defines derived key usage• Derived key tokens reference secret associated

with some other token– Not restricted to referring to SCT

Page 49: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

49

Derived Keys

SCT

DK1 DK2

Page 50: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

50

<wsc:DerivedKeyToken wsu:Id=‘dk1’ ><wsse:SecurityTokenReference>...</wsse:SecurityTokenReference><wsc:Nonce>zIjS+kFH9p6iRF+W342wlw==</wsc:Nonce>

</wsc:DerivedKeyToken>

DerivedKeyToken Example

Page 51: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

51

Trust and SC Interop Scenario

• Obtain token from STS using WS-Trust– Username->SAML

• Establish secure session with target service– SAML->SCT

• Send secure application dialogue• Terminate dialogue

Page 52: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

52

Interop Scenario

Client

STS

Service

Establish HTTPS connection

RST (UsernameToken)

RSTR (SAML/Service)

RST (SAML/Service)

RSTR (SCT)

App Data (SCT/DK)

App Data (SCT/DK)

Connect HTTPS

App messages over HTTP

Token exchange over HTTPS

Token exchange over HTTP

Page 53: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

53

Scenario Variations• Different initial token types used:

– Username Token– X509 Certificate– Binary token (using SPnego blobs)

• With or without secure transport connection (SSL/TLS)

• Piggybacking (RSTR is included with the first application message)

• 3-way testing (Different companies provide client, STS and target service)

Page 54: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

54

Agenda

• WS-SecurityPolicy– Introduction– Assertion types– Token assertions– Binding assertions– Protocol assertions

Page 55: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

55

WS-Policy

• General framework for endpoints to express requirements

• Provides various operators– wsp:All, wsp:ExactlyOne

• Defines intersection– Based on matching of assertion names

• Domain Assertions are just XML elements

Page 56: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

56

WS-Policy Example<wsp:Policy><wsp:ExactlyOne><wsp:All><A/><B/></wsp:All><wsp:All><A/><C/></wsp:All></wsp:ExactlyOne></wsp:Policy>

Page 57: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

57

WS-SecurityPolicy

• Builds on WS-Policy– Uses nested policy to provide scope

• Defines various groups of policy assertions

• Expressed in WSDL per WS-PolicyAttachment

Page 58: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

58

WS-SecurityPolicy

• Designed for expressing security requirements– What needs to be protected– What tokens to use– Algorithms, reference types, etc.

• Constrains content and layout of wsse:Security header

Page 59: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

59

WS-SecurityPolicy

• Uses assertions to define exchange pattern in use

• A given pattern has fixed and variable aspects

• Variable aspects modelled as properties– Policy assertions populate properties

Page 60: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

60

Assertion types

• Protection assertions• Token assertions• Binding assertions• Supporting Token assertions• Protocol assertions

Page 61: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

61

Protection Assertions

• Specify what needs to be protected– Integrity protection– Confidentiality

• Part and element based assertions defined

Page 62: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

62

Protection Assertion Examples<sp:SignedParts><sp:Body /><sp:HeaderNamespace=‘http://schemas.xmlsoap.org/ws/2004/09/addressing’ />

</sp:SignedParts>

<sp:SignedElements><sp:XPath>/soap:Envelope/soap:Body</sp:XPath><sp:XPath>/soap:Envelope/soap:Header/*[namespace-uri()=

‘http://schemas.xmlsoap.org/ws/2004/09/addressing’]</sp:XPath></sp:SignedElements>

Page 63: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

63

Token Assertions

• Specify the type of token to be used• Take the form of token type and nested

version assertion– Other nested assertions also allowed

• Carry an inclusion attribute– Specifies which messages token appears in

Page 64: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

64

Token Assertion Examples<sp:X509Token sp:IncludeToken=‘.../IncludeToken/AlwaysToRecipient’ ><wsp:Policy><sp:WssX509V3Token10 /></wsp:Policy></sp:X509Token>

<sp:SamlTokensp:IncludeToken=‘.../IncludeToken/Always’ ><wsp:Policy><sp:WssSamlV11Token11 /></wsp:Policy></sp:SamlToken>

Page 65: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

65

Security Bindings

• Collections of properties– Tokens– Algorithms– Processing order et.al.

• Properties populated by assertions– Some have default values

• Spec defines three broad types

Page 66: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

66

Security Binding Properties

• [AlgorithmSuite]– Populated by sp:AlgorithmSuite and nested

assertions• [Timestamp]

– Defaults to false– sp:IncludeTimestamp sets property to true

• [Protection Order]– Defaults to SignBeforeEncrypting– sp:EncryptBeforeSigning sets property to

EncryptBeforeSigning

Page 67: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

67

Security Binding Properties• [Signature Protection]

– Defaults to false– sp:EncryptSignature sets property to true

• [Token Protection]– Defaults to false– sp:ProtectTokens sets property to true

• [Entire Header and Body Signatures]– Defaults to false– sp:OnlySignEntireHeadersAndBody sets property to

true.

Page 68: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

68

Security Binding Properties

• [Security Header Layout]– Populated by sp:Layout assertion and nested

assertions– Defaults to ‘Lax’

Page 69: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

69

Transport Binding

• Indicates that the transport layer is used to satisfy the security requirements

• Allows specification of such things as– Security header layout– Timestamp presence– Supporting tokens

Page 70: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

70

Transport Binding Example<sp:TransportBinding><wsp:Policy><sp:TransportToken><wsp:Policy><sp:HttpsToken /> </wsp:Policy></sp:TransportToken><sp:AlgorithmSuite><sp:Basic256Rsa15 /></sp:AlgorithmSuite><sp:IncludeTimestamp /></wsp:Policy></sp:TransportBinding>

Page 71: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

71

Symmetric Binding

• Indicates that the message layer is used to satisfy the security requirements

• Defines [Encryption Token] and [Signature Token] properties

• Where multiple messages are exchanged the tokens perform the same functions for all messages

Page 72: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

72

Symmetric Binding Example<sp:SymmetricBinding><wsp:Policy><sp:ProtectionToken><wsp:Policy><wsp:KerberosToken sp:IncludeToken=‘.../IncludeToken/Once’ /></wsp:Policy></sp:ProtectionToken><sp:AlgorithmSuite><sp:Basic128Rsa15/></sp:AlgorithmSuite><sp:EncryptBeforeSigning /></wsp:Policy></sp:SymmetricBinding>

Page 73: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

73

Asymmetric Binding

• Indicates that the message layer is used to satisfy the security requirements

• Defines [Initiator Token] and [Recipient Token] properties

• Where multiple messages are exchanged the tokens perform different functions

Page 74: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

74

Asymmetric Binding Example<sp:AsymmetricBinding><wsp:Policy><sp:InitiatorToken><wsp:Policy><wsp:X509Token

sp:IncludeToken=‘.../IncludeToken/AlwaysToRecipient’ /></wsp:Policy></sp:InitiatorToken><sp:RecipientToken><wsp:Policy><wsp:X509Token

sp:IncludeToken=‘.../IncludeToken/Never’ /></wsp:Policy></sp:RecipientToken><sp:AlgorithmSuite><sp:Basic128Rsa15/></sp:AlgorithmSuite><sp:EncryptBeforeSigning /></wsp:Policy></sp:AsymmetricBinding>

Page 75: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

75

Supporting Tokens

• Services may require multiple sets of claims to be presented

• Corresponds to additional tokens in a message

Page 76: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

76

Supporting Token types

Type Sign main signature?

Signed by main token?

Supporting No No

Endorsing Yes No

Signed No Yes

Signed Endorsing

Yes Yes

Page 77: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

77

Supporting Tokens Example<sp:TransportBinding><wsp:Policy><sp:TransportToken><wsp:Policy><sp:HttpsToken /> </wsp:Policy></sp:TransportToken><sp:AlgorithmSuite><sp:Basic256Rsa15 /></sp:AlgorithmSuite><sp:IncludeTimestamp /><sp:SupportingTokens><wsp:Policy><sp:UsernameToken sp:IncludeToken=‘.../IncludeToken/Once’ /></wsp:Policy></sp:SupportingTokens></wsp:Policy></sp:TransportBinding>

Page 78: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

78

WSS Assertions

• Specify supported version of WSS– sp:Wss10– sp:Wss11

• Specify supported token reference mechanisms via boolean properties

• Specify Signature Confirmation requirements for WSS 1.1

Page 79: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

79

WSS10 PropertiesProperty Name Default

ValueAssertion

[Direct References]

True None

[Key Identifier References]

False sp:MustSupportKeyIdentifierReferences

[Issuer Serial References]

False sp:MustSupportIssuerSerialReferences

[External URI References]

False sp:MustSupportExternalURIReferences

[Embedded Token References]

False sp:MustSupportEmbeddedTokenReferences

Page 80: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

80

WSS11 PropertiesProperty Name Default

ValueAssertion

[Thumbprint References]

False sp:MustSupportThumbprintReferences

[Encrypted Key References]

False sp:MustSupportEncryptedKeyReferences

[Signature Confirmation]

False sp:MustSupportExternalURIReferences

[Embedded Token References]

False sp:RequireSignatureConfirmation

Page 81: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

81

WSS Assertion Examples<sp:Wss10><wsp:Policy><sp:MustSupportRefKeyIdentifier /><sp:MustSupportRefExternalURI /></wsp:Policy></sp:Wss10>

<sp:Wss11><wsp:Policy><sp:MustSupportRefExternalURI /><sp:MustSupportRefThumbprint /><sp:RequireSignatureConfirmation /></wsp:Policy></sp:Wss11>

Page 82: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

82

Trust Assertions

• Specify supported version of WS-Trust and associated properties– sp:Trust10

Page 83: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

83

Trust PropertiesProperty Name Default

ValueAssertion

[Client Challenge] False sp:MustSupportClientChallenge

[Server Challenge] False sp:MustSupportServerChallenge

[Client Entropy] False sp:RequireClientEntropy

[Server Entropy] False sp:RequireServerEntropy

[Issued Tokens] False sp:MustSupportIssuedTokens

Page 84: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

84

Trust Assertion Example<sp:Trust10><wsp:Policy><sp:RequireClientEntropy /><sp:RequireServerEntropy /></wsp:Policy></sp:Trust10>

Page 85: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

85

Where are we?

• WS-Trust provides flexible framework for building token processing protocols

• WS-SecureConversation provides secure sessions

• WS-SecurityPolicy describes security configuration– WSS, WS-Trust, WS-SecureConvesation

Page 86: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

86

Backup

Page 87: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

87

Token Assertions

• UsernameToken– WssUsernameToken10– WssUsernameToken11

• IssuedToken

Page 88: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

88

Token Assertions

• X509Token– WssX509V3Token10– WssX509Pkcs7Token10– WssX509PkiPathV1Token10– WssX509V1Token11– WssX509V3Token11– WssX509Pkcs7Token11– WssX509PkiPathV1Token11

Page 89: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

89

Token Assertions

• KerberosToken– WssKerberosV5ApReqToken11– WssGssKerberosV5ApReqToken11

• SpnegoContextToken• SecurityContextToken

– SC200502SecurityContextToken• SecureConversationToken

– SC200502SecurityContextToken

Page 90: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

90

Token Assertions• SamlToken

– WssSamlv11Token10– WssSamlv11Token11– WssSamlv20Token11

• RelToken– WssRel10Token10– WssRel20Token10– WssRel10Token11– WssRel20Token11

• HttpsToken

Page 91: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

91

Transport Binding Properties

• [Transport Token]

Page 92: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

92

Symmetric Binding Properties

• [Encryption Token]• [Signature Token]• [Protection Order]• [Signature Protection]• [Token Protection]• [Entire Header and Body Signatures]

Page 93: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

93

Asymmetric Binding Properties

• [Initiator Token]• [Recipient Token]• [Protection Order]• [Signature Protection]• [Token Protection]• [Entire Header and Body Signatures]

Page 94: WS-SX Specifications · 2 Agenda •WS-Trust • WS-SecureConversation • WS-SecurityPolicy. 3 Agenda •WS-Trust – Introduction – Requesting and returning tokens – Token Scope

94

*Binding Properties

• [Algorithm Suite]– Has sub-properties

• [Security Header Layout]• [Timestamp]• [Supporting Tokens]• [Signed Supporting Tokens]• [Endorsing Supporting Tokens]• [Signed Endorsing Supporting Tokens]