Web Services Security Training
Web services security training teaches developers both web service security implementation and web service security best practices. As part of this, developers learn how to assess the security threats to their services and counter these threats with appropriate security technologies. The class covers the full range of technologies you can use for securing web services, starting with security basics and TLS/SSL secure transports before moving on to the whole gamut of WS-* security standards. Optional modules cover specific technologies in greater depth.
If you're using REST-like web services and not interested in WS-* technologies you can also choose a shorter version of the training that focuses on basic encryption technologies and transport layer security.
Depending on the optional modules chosen for the training, the full course takes 3-4 days. In-class assignments are normally supplied with both Apache Maven build files and Eclipse project files, and Eclipse is used for coding demonstrations. Apache Tomcat is normally used for service deployment. SOAP security assignments are done on the powerful and versatile Apache CXF web services stack, using both JAX-WS standard techniques and CXF-specific extensions (including the latest CXF 3.0 enhancements).
Optimum class size is 6-12 developers, though somewhat larger numbers can be accommodated with pair programming.
Course Objectives
- Understand the principles of modern encryption technologies
- Learn how to create and work with keys and certificates
- Understand how TLS/SSL secure transports work, and how to configure and use them
- Learn how WS-Security works, and how to configure it with WS-SecurityPolicy
- Learn how to use WS-Trust with SAML identity management and WS-Federation
- Learn the performance impact of security, and how WS-SecureConversation can help
- Learn how to combine WS-ReliableMessaging with WS-Security for reliable secure exchanges
- Apply all forms of security through in-class assignments using JAX-WS and Apache CXF
- Understand the range of security threats and the web services security best practices for countering them
Attainment of course objectives is measured by performance on in-class assignments and snap quizes for each module. Certificates of completion are available for attendees who demonstrate their grasp of the material and ability to apply it to practical problems.
Course Prerequisites
- Intermediate Java programming experience
- Basic knowledge of web services (can be covered in class if appropriate)
Course Outline
Part I - Basic principles
- What constitutes a security threat?
- Symmetric and asymmetric encryption:
- Symmetric encryption algorithms
- Stream ciphers and chaining modes
- Asymmetric encryption algorithms
- Signing and certificates:
- Message digests
- Signing digests
- Certificates and chains of trust
- Key exchange algorithms (Diffie-Hellman)
- Working with keystores/truststores
Assignments:
- Symmetric encryption using a secret key
- Generating asymmetric encryption key pairs and self-signed certificates
- Asymmetric encryption for secret key exchange
- Diffie-Hellman key exchange
Part II - Secure transports
- How TLS/SSL transport security works
- Configuring and using basic TLS:
- Controlling certificates and verification
- Troubleshooting TLS connections
- Controlling protocols and algorithms
- TLS with client certificates
- TLS strengths and weaknesses
Assignments:
- Enabling TLS for web browser client
- Using TLS for Java client
- Implementing dual-certificate TLS
- Controlling TLS versions and cipher suites
Part III - Certificate authorities (optional)
- Trusted certificate authorities
- Man-in-the-middle attacks:
- Intermediaries can break security
- Ways and means of getting in
- Blocking falsified certificates
- Running your own certificate authority:
- Best practices for algorithms and key lengths
- Managing certificate creation
- Handling certificate revocations
- EJBCA enterprise certificate authority
Assignments:
- Using shared certificate authority for class
- Configuring certificate revocation handling
Part IV - XML encryption and signing (optional)
- XML encryption standard
- XML signature standard:
- The role of canonicalization
- References and signatures
- Using XML encryption and signature directly
- XML encryption improvements
- XML Key Management Specification (XKMS)
Assignments:
- Encrypting XML content
- Signing and verifying XML content
- Using XKMS public keys
Part V - Introduction to WS-Security
- How WS-Security builds on XML encryption and signature
- Key and certificate handling in WS-Security
- Encryption algorithms
- WS-Security token profiles
- Using WS-Security directly
- WS-I Basic Security Profile
Assignments:
- Encrypting web service messages
- Signing web service messages
Part VI - Introduction to WS-Policy and WS-SecurityPolicy
- Basic WS-Policy structure
- WS-Security policy introduction:
- UsernameToken for identity information
- AsymmetricBinding for asymmetric encryption
- Specifying components to be encrypted and/or signed
- Understanding asymmetric key and certificate usage
- SymmetricBinding for symmetric encryption
- Algorithm suites
- Attaching policies in WSDL:
- Embedding policies in WSDL
- Policy references and scopes
- Sharing policies across an enterprise
Assignments:
- Adding UsernameToken to service
- Adding signing and encryption to service
- Applying different policies to different operations
- Class-wide standard policies
Part VII - WS-Trust and identity management (optional)
- Issues of authentication and authorization
- Using SAML identity management:
- SAML token structure
- Principles of WS-Trust
- WS-Trust client configuration
- Using SAML tokens with WS-Security
- Using WS-Federation for identity management
Assignments:
- Obtaining a SAML token directly
- Securing a web service with SAML tokens
- Using WS-Federation single sign-on
Part VIII - WS-SecureConversation
- Why secure conversation?
- Costs of WS-Security asymmetric encryption
- Authentication and authorization handling
- Building WS-SecureConversation on WS-Trust:
- WS-SecureConversation STS
- Security context usage
- Performance impact of security:
- Comparing different approaches
- Streaming security benefits
- Effect of algorithm choices
Assignments:
- Implement WS-SecureConversation with UsernameToken
- Convert to WS-SecureConversation with SAML token
Part IX - WS-ReliableMessaging and security (optional)
- WS-ReliableMessaging basics:
- Reliable and/or in-order delivery
- Sequences and acknowledgements
- WS-ReliableMessaging protocol messages
- Limitiations of WS-ReliableMessaging
- WS-I Reliable Secure Profile
- WS-ReliableMessaging over WS-SecureConversation
- WS-MakeConnection for restricted clients
Assignments:
- Implement reliable messaging for client and server
- Secure exchanges with WS-SecureConversation
Part X - Web service security best practices
- Understanding the threats:
- Review of threat types
- Application to web services
- Security approaches to counter threats
- Planning a security architecture
- Designing security for your services:
- Controlling transport layer security
- Granular application of WS-Security
- Separate endpoints for different security scenarios
- Handling authentication and authorization
- Security with ESB architectures
Assignments:
- Analyze and discuss supplied scenarios