metro web services security usage scenarios...metro web services security usage scenarios harold...

49
Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security Architect

Upload: others

Post on 11-Apr-2020

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

Metro Web Services Security Usage ScenariosHarold CarrSun MicrosystemsMetro Architect

Jiandong GuoSun MicrosystemsMetro Security Architect

Page 2: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

2

Metro Security Profiles> Username Authentication with Symmetric Keys> Mutual Certificates Security> Symmetric Binding with Kerberos Tokens

> Transport Security (SSL)

> Message Authentication over SSL> SAML Authorization over SSL

> Endorsing Certificate

> SAML Sender Vouches with Certificates

> SAML Holder of Key

> STS Issued Token> STS Issued Token with Service Certificate

> STS Issued Endorsing Token

> STS Issued Supporting Token

Page 3: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

3

Metro Security Profiles - Guarantees

✓ ✓ ✓ ✓ ✓

Mutual Certificates Security ✓ ✓ ✓ ✓ ✓

✓ ✓ ✓ ✓ ✓Transport Security (SSL) ✓ ✓ ✓Message Authentication Over SSL ✓ ✓ ✓

SAML Authorization Over SSL ✓ ✓ ✓Endorsing Certificates ✓ ✓ ✓ ✓ ✓SAML Sender Vouches With Certificates ✓ ✓ ✓ ✓SAML Holder Of Key ✓ ✓ ✓ ✓ ✓STS Issued Token ✓ ✓ ✓ ✓ ✓STS Issued Token With Service Certificates ✓ ✓ ✓ ✓ ✓STS Issued Endorsing Token ✓ ✓ ✓ ✓ ✓STS Issued Supporting Token ✓ ✓ ✓ ✓

Peer Authentication

Message Origin Authentication

Message Integrity

Message Confidentiality

End-To-End Security

Username Authentication With Symmetric Key

Symmetric Binding With Kerberos Tokens

Page 4: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

4

Selected Metro Security Profiles

> Message Authentication over SSL● Use: client has username/password or X.509

relationship with service● Point-to-point

> Username Authentication With Symmetric Keys● Use: client has username/password

relationship with service● End-to-end

Page 5: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

5

Selected Metro Security Profiles

> Mutual Certificates● Use: interaction with known partners● Certificates exchanged out-of-band in advance● End-to-end

> STS Issued Token● Use: role-based access control● 3rd party handles authentication --- not service● End-to-end

Page 6: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

6

PatternConfidentiality

Page 7: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

7

PatternIntegrity,Authentication,Nonrepudiation

Page 8: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

8

Message Authentication over SSLUse case: client/service ID/Auth token relationship

> Use token to plug into service's ID/Authentication infrastructure

> Options: Username/Password,X.509, (& SAML)> Client dynamically obtain service's certificate;

verifies with trusted CA> Point-to-point; (SSL only use case:

client with no relationship with service)

Page 9: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

9

Message Authentication over SSL

Page 10: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

10

Message Authentication over SSL

> Token:● Username● X.509: better security than username● SAML: get user credentials from 3rd party; attributes

> WSS: 1.1 enables signature confirmation> Sig confirmation: avoid man-in-the-middle attack

Page 11: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

11

Message Authentication over SSLAdvanced> Certificate Revocation:

● Use: do not accept certs on reject list (CRL)

● Click: use container mechanism

● No click & no cert validator:● Always accept

● No click & cert validator:● Custom revocation

Page 12: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

12

Message Authentication over SSLSummary> Use:

● Client authentication at message level● Auth can be propagated further after initial wire exchange

● When you can't exchange certs in advance● Reuse existing web SSL infrastructure

> PROS:● Transport level Performance; little setup● Message level authentication

> CONS:● Point-to-point (confidentiality)

Page 13: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

13

End-to-end Message Level SecurityOptions for message-level profiles

Firewall Service ProvidersFirewall

Clients

Firewall load-balancer

Page 14: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

14

End-to-end security options

128 bit default: built into JDK; larger needs JCE adjustment

Page 15: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

15

End-to-end security optionsAlgorithm Suite (applies to most security profiles)> Algorithm and key lengths used for crypto ops> Decisions:

● Security versus performance● What is supported on both ends (e.g. Legacy)

> Best: AES + RSA OEAP: ● Basic256SHA256, Basic192SHA256,

Basic128SHA256, Basic256, Basic192, *Basic 128bit

> Legacy: TripleDES, Basic256RSA15, Basic192RSA15, Basic128RSA15, TripleDESRSA15, TripleDESSHA256, Basic256SHA256RSA15, Basic192SHA256RSA15, Basic128SHA256RSA15, TripleDESSHA256RSA15

Page 16: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

16

End-to-end security optionsSecurity header layout (applies to all profiles)> Rules for adding items

to security header> Recommended:

● Strict (default):declare before use

> Legacy:● Lax: any order

conforming to Oasis WSS

● Lax (Timestamp First/Last):● Same as Lax but timestamp placed first/last

Page 17: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

17

Mutual Certificates SecurityUse case: service to service (e.g., known partners)

> Use case: end-to-end security> Certificates exchanged in advance

Firewall Service Providers

Service Providers acting as Clients

Firewall load-balancer

Page 18: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

18

Mutual Certificates Security

Firewall

Page 19: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

19

Mutual Certificates Security

> Derived Keys:● No need● Key only used

once> Encrypt Sig:

● Avoid dictionary attack

● CON: performance> Encrypt before signing:

● Reject msg with bad sig before decrypting (potentially large) msg

● Better performance (needs measurement)

Page 20: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

20

Option: Encrypt SignatureUse: avoid dictionary attack

encrypted

notencrypted

Page 21: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

21

Mutual Certificates Security

> Keystore:● Alias: static● Selector class:

● Runtime> Certificate validator:

● Signature, identity,CA, revoked, …

● Plug into otherframeworks

● Ex: OCSP● Company specific CAs

Page 22: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

22

Mutual Certificates SecuritySummary> Use: server to server (i.e., partner to partner)> Certificates exchanged OOB in advance> PROS:

● End-to-end security (e.g., through load-balancers)> CONS:

● Secure response does same as request● Generate and encrypt a NEW ephemeral key● Use that NEW key to encrypt and sign the response

● See “Endorsing Certificate” profile for optimization● (note: endorsing is for 3rd party endorsing signature)

Page 23: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

23

Username Auth with Symmetric KeysUse case: client/service ID/Auth token relationship

> Use token to plug into service's ID/Authentication infrastructure; no client certificate required

Firewall

Service Providers

U/P

Page 24: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

24

Username Authentication with Sym Keys

Firewall

Page 25: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

25

Username Auth with Symmetric KeysOptions: Derived Keys and Secure Conversation

> Derived Keys● Key reused in this

profile: therefore recommend using derived keys for increased security

> Secure Conversation● Better performance

for multiple message exchange

Page 26: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

26

Option: Derived KeysUse case: increase security when reusing keys

derivednon derived

Page 27: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

27

Option: Secure ConversationUse: increase performance/security on multiple msgs

Page 28: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

28

Option: Secure ConversationUse: increase performance/security on multiple msgs

Note: 2 derived keys (one for encryption, one for signing) forIncreased security

Page 29: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

29

Option: Secure ConversationUse: increase performance/security on multiple msgs

1 2 5 100

2000

4000

6000

8000WSS vs WSSC vs TLS

WSSWSSC(with KD)WSSC(without KD)TLS

number of messages

time

in m

illise

cond

s

KD = Key Derivation

Page 30: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

30

Option: Secure ConversationUse: increase performance/security on multiple msgs

1 2 5 10 50 100 200 300 400 500 600-20000

10000

40000

70000

100000

130000

160000

190000

0250005000075000100000125000150000175000200000225000250000

WSS vs WSSC vs TLS

WSSWSSC(with KD)WSSC(without KD)TLS

number of messages

time

in m

illise

cond

s

(note: baseline is plain text)

KD = Key Derivation

Page 31: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

31

STS Issued TokenUse: Client gets auth/protection token from 3rd party

Firewall

STS

Client service

(e.g., OpenSSO)

Page 32: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

32

STS Issued Token

Firewall

Page 33: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

33

STS Issued Token : C → S

Firewall

detail

Page 34: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

34

STS : SAML Validation

Firewall

Page 35: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

35

STS Issued Token – Options> Token Type: 1.0, 1.1*, 2.0

● 1.1 : most widely adopted> Key Type: Symmetric*, Public

● Symmetric: best perf;but STS masqueradeas client

● Public: no masq., problem> Size: 256*, 192, 128

● Security viz performance> Derived X509/Issued:

● Security viz performance

Firewall

Page 36: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

36

STS Issued TokenSummary> No service certificate required at client> Service directs client to 3rd party token issuers (STS)> Issued token for authentication & protection> Can use symmetric (better performance) or

public (better user privacy) proof key

Firewall

Page 37: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

37

RecapPatterns, profiles, use cases

Firewall

Page 38: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

38

PatternConfidentiality

Page 39: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

39

PatternIntegrity,Authentication,Nonrepudiation

Page 40: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

40

Selected Metro Security Profiles

> Message Authentication over SSL● Use: client has username/password or X.509

relationship with service● Point-to-point

> Username Authentication With Symmetric Keys● Use: client has username/password or X.509

relationship with service● End-to-end

Page 41: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

41

Selected Metro Security Profiles> Mutual Certificates

● Use: interaction with known partners● Certificates exchanged out-of-band in advance● End-to-end

> SAML Holder of Key● Use: role-based access control● Plug into existing SAML infrastructure; e2e

> STS Issued Token● Use: role-based access control● 3rd party handles authentication --- not service; e2e

Page 42: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

42

Upcoming Security Features in Metro

> Convenience/control of use of issued tokens● Token cache & sharing among services● Token renewal & cancellation● Access different services with same credential

> Manage/exchange credentials at run-time● SSL/TLS Handshake for Web Services● SPNego● WS-Addressing Endpoint References & Identity

Page 43: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

43

Upcoming Security Features in Metro

> Password derived keys● No certificates required● But not as strong as PKI or symmetric

> Support for @RolesAllowed● Servlet Web Services● (109/EJB Web Services already supported)

Page 44: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

44

● GlassFish v3 Preview Available now!● Java EE 6 reference implementation● Modular OSGi architecture – easy to develop & deploy● Runs in-process and easy to extend● Support for Ruby-on-Rails, Groovy and Grails,

Python and Django● GlassFish v2 – Production Ready● Best price/performance open source App server with

Clustering, High Availability, Load Balancing ● Secure, Reliable, Transactional, .NET-interop Web svcs● Support for Ajax and Comet

● GlassFish ESB● SOA and Business Integration platform

● GlassFish Communications App Server● SIP servlet technology for converged services

glassfish.org

• 24x7 Enterprise and Mission Critical Support

•sun.com/appserver

• Tools Integration•NetBeans and Eclipse

● Pavilion booth numbers: 550, 566, 567

● Meet Java EE spec leads and experts at Ancillary Event & Booth

Metro and GlassFishOpen Source and Enterprise Ready

metro.dev.sun.net

Page 45: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

Harold Carrweblogs.java.net/blog/haroldcarr

Jiandong Guoblogs.sun.com/trustjdg

metro.dev.java.net

Page 46: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

46

EXTRA SLIDES> Please do NOT remove

Page 47: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

47

Endorsing Certificate optimization of mutual certificates

Firewall

request

> Mutual: generates/encrypts another ephemeral key for response

> Endorsing reuses key> (Use derived key since

reusing key)> Endorsing Signature to

prove sender has private key

> Response: no endorsing sig because service has decrypted ephemeral key using its private key

Page 48: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

48

Endorsing Certificate optimization of mutual certificates

Firewall

response

> Mutual: generates/encrypts another ephemeral key for response

> Endorsing reuses key> (Use derived key since

reusing key)> Endorsing Signature to prove

sender has private key> Response: no endorsing sig

because service has decrypted ephemeral key using its private key

Page 49: Metro Web Services Security Usage Scenarios...Metro Web Services Security Usage Scenarios Harold Carr Sun Microsystems Metro Architect Jiandong Guo Sun Microsystems Metro Security

49

Slide Heading: 36ptSubhead: 28pt> All text is Arial> Level One bullet point: 28pt

● Level Two bullet: 26pt● Level Three: 22pt

● Level Four and subsequent: 18pt> Text block is aligned to the left