57
ICTA Technology Meetup 03 ICTA Technology Meetup 03 Enterprise Security (Part 01) By Crishantha Nanayakkara

ICTA Technology Meetup 03 - SOA Security

Embed Size (px)

DESCRIPTION

SOA Security

Citation preview

Page 1: ICTA Technology Meetup 03 - SOA Security

ICTA Technology Meetup 03ICTA Technology Meetup 03

Enterprise Security(Part 01)

By Crishantha Nanayakkara

Page 2: ICTA Technology Meetup 03 - SOA Security

2

Agenda● Functional Aspects of Security● An Introduction to PKI● An Introduction to SOA Security● Securing SOAP Web Services● An Introduction to Apache Rampart● Security Patterns with Apache Rampart● Mediating SOAP Web Services via ESB

Page 3: ICTA Technology Meetup 03 - SOA Security

3

Functional Aspects Functional Aspects of Securityof Security

Page 4: ICTA Technology Meetup 03 - SOA Security

4

Authentication

Confidentiality

Integrity

Non­Repudiation

Page 5: ICTA Technology Meetup 03 - SOA Security

5

An Introduction to An Introduction to PKIPKI

Page 6: ICTA Technology Meetup 03 - SOA Security

6

PKI enables parties to an e­commerce transaction to identify one another by providing authentication with digital 

certificates, and allows reliable business communications by providing confidentiality 

through the use of encryption, and authentication, data integrity and a 

reasonable basis for nonrepudiation through the use of digital signatures.

(Resource ­ WebTrust)

Page 7: ICTA Technology Meetup 03 - SOA Security

7

EnsuringEnsuringAuthenticationAuthentication

Page 8: ICTA Technology Meetup 03 - SOA Security

8

– Transport Layer  ● SSL certificates

– HTTP Layer / Message Layer – ● HTTP Basic Authentication● UserNameTokens

– Application Layer – ● Form based Authentication 

Page 9: ICTA Technology Meetup 03 - SOA Security

9

EnsuringEnsuringConfidentialityConfidentiality

Page 10: ICTA Technology Meetup 03 - SOA Security

10

Public Key Encryption

Page 11: ICTA Technology Meetup 03 - SOA Security

11

EnsuringEnsuringNon RepudiationNon Repudiation

Page 12: ICTA Technology Meetup 03 - SOA Security

12

By maintaing key pairs at both ends with 2­way authentication can ensure non­repudiation

Page 13: ICTA Technology Meetup 03 - SOA Security

13

EnsuringEnsuringIntegrityIntegrity

Page 14: ICTA Technology Meetup 03 - SOA Security

14

Digital Signatures(Signing Process)

Page 15: ICTA Technology Meetup 03 - SOA Security

15

Digital Signatures(Verification Process)

Step 1

Step 2

Page 16: ICTA Technology Meetup 03 - SOA Security

16

Digital Certificates

A digital certificate is basically a wrapper around a public key, which includes identifying information for the party owning that key. This wrapped body is 

then signed by a trusted third party, and the signature is included in the certificate. The trusted 

third party vouches for the public key and identifying information by issuing the certificate with 

its signature.

Page 17: ICTA Technology Meetup 03 - SOA Security

17

Creating Digital Certificates● Step 1: Creating the “public­private” key­pair

keytool  ­genkey  ­keyalg  RSA  ­keysize  2048  ­keystore crish_keystore.jks ­alias certificatekey

At this stage your certificate is owned and issued by you. However, a certificate issued by you will not be trusted by 

other organizations that does business with you electronically. Therefore your certificate would need to be “signed” by a recognized

certification authority.

Page 18: ICTA Technology Meetup 03 - SOA Security

18

Creating SSL Digital Certificates

crishantha@crishantha-laptop$ keytool -list -v -keystore crish_keystore.jks -storepass password Keystore type: JKSKeystore provider: SUN

Your keystore contains 1 entry

Alias name: certificatekeyCreation date: Mar 10, 2012Entry type: PrivateKeyEntryCertificate chain length: 1Certificate[1]:Owner: CN=Crishantha Nanayakkara, OU=ICTA, O=ICTA, L=Colombo, ST=Western, C=SLIssuer: CN=Crishantha Nanayakkara, OU=ICTA, O=ICTA, L=Colombo, ST=Western, C=SLSerial number: 4f5b98a6Valid from: Sat Mar 10 23:38:38 IST 2012 until: Fri Jun 08 23:38:38 IST 2012Certificate fingerprints:

MD5: D0:56:A2:FE:EF:B0:CE:08:A6:28:FF:2C:2C:33:D7:4D SHA1: 1D:77:C2:42:FD:AC:FA:32:7C:2B:D1:FF:70:95:0A:A2:66:4C:CE:27 Signature algorithm name: SHA1withRSA Version: 3

● Step 2: Retrieve the contents of the keystorekeytool ­list ­v ­keystore crish_keystore.jks ­storepass password

Page 19: ICTA Technology Meetup 03 - SOA Security

19

Creating Digital Certificates

● Step  3:  Generating  the  Certification  Service Request (CSR)keytool  ­certreq  ­alias  certificatekey  ­keystore  crish_keystore.jks ­file certificate_request.csr

crishantha@crishantha-laptop:~/test$ cat certificate_request.csr

-----BEGIN NEW CERTIFICATE REQUEST-----MIICtTCCAZ0CAQAwcDELMAkGA1UEBhMCU0wxEDAOBgNVBAgTB1dlc3Rlcm4xEDAOBgNVBAcTB0NvbG9tYm8xDTALBgNVBAoTBElDVEExDTALBgNVBAsTBElDVEExHzAdBgNVBAMTFkNyaXNoYW50aGEgTmFuYXlha2thcmEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQChSHnDxgNLna8PBG6j7c3+Id6q38BRmyGarLHtuvhTMxPV3r/ad49makBCPE9yeKrr1MiRMkuPYGasXunfo4Tqehcivc7nox0MjC5rqi1sVTrxtVlfRozSNa3bVp83b/Iz5f7A8QS0YaoZo+RAHSKi6V2gC/OLMHABe/WQ/6DvtmZ7ojY00H/nIPVZXUScNjwNGLLYohVYH9+Pd4NKG7GfqE4bnhnTVQfrpglsWcENioeSmlJ6pWLj04PkpfqBN06YIvKZB5aZu+GsnmUHUI0po3vWBr+8JcLTAF3LBkFnTkzt2YWZZ17Tdybo7lHGLlzDUR6rTmKSQ0qztTmIMIpzAgMBAAGgADANBgkqhkiG9w0BAQUFAAOCAQEAlMP4SfcCasFktKDH+fLj1F3xSfEUZIj1AvbVM1qHorTlBZPFPjpQkpZJtfSFnBdWScJoEH5RdqdROzXxgwcCLH10wRCAxARPEg7YEAegQXhquyqCMGQ5q8SvtV9WHI5GH/UgCOcRLxF07pxjEii3YT9GRYXZwNRGDfJAZjOkd+Hri9ywhFBzLy4D5x9kcW43WYCXnIXFcL0vDXMD/5qkdgXUdgXWzhl7r3F4B1l1HFcwzzgomeGAWGHuplrPEpFMPm0bwbmpu2rEA3SoiSmOVKc8c5C8jPM2r/dpKMqpvx/focMoRLneJpCHfx0iVmlNKHuqQNc1yis0rXRfMFCWeQ==-----END NEW CERTIFICATE REQUEST-----

Page 20: ICTA Technology Meetup 03 - SOA Security

20

Creating Digital Certificates

● Step  4:  Send  the  generated  CSR  to  the Certification Authority (CA)

● Step 5: CA will send you two things

– CA root certificate– CA signed certificate

Both of these need to be imported to the keystore of yours

Page 21: ICTA Technology Meetup 03 - SOA Security

21

Creating Digital Certificates

● Step 6: Importing the CA root certificatekeytool  ­import  ­alias  root­ca  ­v  ­trustcacerts    ­keystore crish_keystore.jks ­file ca.der

● Step 7: Importing the CA signed certificatekeytool ­import ­alias certificatekey ­file signed_ca.der  ­keystore crish_keystore.jks

● Step 8: Retrieve the contents of the keystorekeytool ­list ­v ­keystore crish_keystore.jks ­storepass password

Page 22: ICTA Technology Meetup 03 - SOA Security

22

Keystore and Truststore

Page 23: ICTA Technology Meetup 03 - SOA Security

23

PKIPKITrust ModelsTrust Models

Page 24: ICTA Technology Meetup 03 - SOA Security

24

PKI Trust Models(Rooted Heirarchy Model)

Page 25: ICTA Technology Meetup 03 - SOA Security

25

PKI Trust Models(Rooted Heirarchy Model)

The subordinate CAs (intermediate CAs and Issuing CAs) are certified by the parent CAs. The parent CAs are usually an intermediate 

CA or a Root CA.

Page 26: ICTA Technology Meetup 03 - SOA Security

26

PKI Trust Models(Network/ Cross Certification Model)

Page 27: ICTA Technology Meetup 03 - SOA Security

27

PKI Trust Models(Network/ Cross Certification Model)

Root CA can cross certify the other Root CA by just importing the public key certificate of the 

other Root CA. This relationship can be unidirectional or bidirectional

Page 28: ICTA Technology Meetup 03 - SOA Security

28

So what is National So what is National CA?CA?

Page 29: ICTA Technology Meetup 03 - SOA Security

29

An Introduction toAn Introduction toSOA SecuritySOA Security

Page 30: ICTA Technology Meetup 03 - SOA Security

30

SOA Security

● SOAP Web Services– Transport Level and Message Level (Using 

WS­Security)● REST Web Services

– Transport Level and OAuth

Page 31: ICTA Technology Meetup 03 - SOA Security

31

Securing SOAP Securing SOAP Web ServicesWeb Services

Page 32: ICTA Technology Meetup 03 - SOA Security

32

Web ServiceWeb ServiceClientClientSecured using

HTTPS

Server CertificateServer Public Key

Securing a SOAP web servicewith HTTPS

Page 33: ICTA Technology Meetup 03 - SOA Security

33

Securing a SOAP Securing a SOAP web serviceweb service

with WS­Securitywith WS­Security

Page 34: ICTA Technology Meetup 03 - SOA Security

34

WS­Security An Introduction

The standard framework for including XML­formatted security data into SOAP messages 

is WS­Security

Page 35: ICTA Technology Meetup 03 - SOA Security

35

WS­Security An Introduction

It basically provides a XML based Abstraction Layer for the above established cryptography 

techniques.

Page 36: ICTA Technology Meetup 03 - SOA Security

36

WS­Security An Introduction

Page 37: ICTA Technology Meetup 03 - SOA Security

37

WS­Security SOAP

Page 38: ICTA Technology Meetup 03 - SOA Security

38

Apache Rampart An Introduction

● Apache Rampart is the security module of Apache Axis2

● It provides the WS­Security functionality to Axis2 web services and their clients

● Mainly has 3 components– Rampart core– Rampart policy– Rampart trust

Page 39: ICTA Technology Meetup 03 - SOA Security

39

Apache Rampart An Introduction

● Rampart Core: This drives security enforcement and validation on SOAP messages. Implements WS­Security and WS­SecureConversation.

● Rampart Policy: This implements WS­SecurityPolicy specification, which is an extension to WS­Policy, Apache Neethi implements the WS­Policy specification.

● Rampart Trust: This implements the WS­Trust specification. Basically this provides a framework to issue, cancel, renew and validate security tokens. For example STS (Security Token Service) tokens.

Page 40: ICTA Technology Meetup 03 - SOA Security

40

Apache Rampart An Introduction

Page 41: ICTA Technology Meetup 03 - SOA Security

41

Web ServiceWeb ServiceClientClientSecured using

HTTPS

Server Key PairServer Public Key

Securing a SOAP web serviceTransport level with HTTPS

Page 42: ICTA Technology Meetup 03 - SOA Security

42

Web ServiceWeb ServiceClientClient

Secured usingHTTPS

+ Authenticated withUserNameToken

Securing a SOAP web serviceUserNameToken with Transport level HTTPS

Server Key PairServer Public Key

Call back HandlerUsernameToken

Page 43: ICTA Technology Meetup 03 - SOA Security

43

The Callback Handler

Page 44: ICTA Technology Meetup 03 - SOA Security

44

The Service Policy

Page 45: ICTA Technology Meetup 03 - SOA Security

45

Web ServiceWeb ServiceClientClient Message isSigned

Securing a SOAP web serviceMessage Level Security – Asymmetric (Sign)

Server Key PairClient Key Pair

Call back HandlerCallback Handler

Page 46: ICTA Technology Meetup 03 - SOA Security

46

Service Policy (Sign only)

Page 47: ICTA Technology Meetup 03 - SOA Security

47

Service Policy (Sign) cont..

Page 48: ICTA Technology Meetup 03 - SOA Security

48

The Callback Handler

\

Page 49: ICTA Technology Meetup 03 - SOA Security

49

Securing a SOAP web serviceMessage Level Security ­ Asymmetric

Page 50: ICTA Technology Meetup 03 - SOA Security

50

Web ServiceWeb ServiceClientClient Message isSigned and Encrypted

Securing a SOAP web serviceMessage Level Security – Asymmetric 

(SignEncrypt)

Server Key PairClient Key Pair

Call back HandlerCallback Handler

Page 51: ICTA Technology Meetup 03 - SOA Security

51

Service Policy (SignEncrypt)

Page 52: ICTA Technology Meetup 03 - SOA Security

52

The Callback Handler

Page 53: ICTA Technology Meetup 03 - SOA Security

53

Ensuring Interoperablity

Page 54: ICTA Technology Meetup 03 - SOA Security

54

Mediating Secure Mediating Secure Web Services viaWeb Services via

ESBESB

Page 55: ICTA Technology Meetup 03 - SOA Security

55

End to End Securitywith a ”Pass Through Proxy”

Page 56: ICTA Technology Meetup 03 - SOA Security

56

End to End Security with a ”Secure Proxy”

Page 57: ICTA Technology Meetup 03 - SOA Security

57