Skip to main content

Instructor-led training

Spring Framework Security Training in North Ridgeville, Ohio

This in-depth course introduces the Java web developer to the Spring Security framework.

What you'll learn

This in-depth course introduces the Java web developer to the Spring Security framework. We start with an overview and practical exercises in basic usage: XML configuration for authentication and URL-based authorization. Then we start to dig into Spring Security as a Java model, and develop advanced techniques including custom user realms, custom authorization constraints, method-based authorization, and instance-based authorization. We then explore two increasingly popular extensions to Spring Security. We consider the Security Assertions Markup Language, or SAML, and the wide range of identity and security features it offers -- but quickly focus on it's support for single sign-on (SSO), and learn how the Spring Security SAML Extension enables applications to interact with SAML identity providers to implement SSO and single logout. And we look at OAuth for Spring Security, which enables third-party authorization scenarios, and learn how to implement both the server and client sides of the OAuth 2.0 flow.

Private Training for Teams

This course is offered as private, instructor-led training for organizations, onsite in North Ridgeville, Ohio or live online. Dates, delivery format, and course content are arranged around your team's requirements.

This course is not currently scheduled as a public class for individual enrollment.

Request Group Training

Prerequisites

Java, in particular Servlet, programming experience is essential.

Course Outline

Chapter 1. Secure Web Applications

  • Threats and Attack Vectors
  • Server, Network, and Browser Vulnerabilities
  • Secure Design Principles
  • GET vs. POST
  • Container Authentication and Authorization
  • HTML Forms
  • Privacy Under /WEB-INF
  • HTTP and HTTPS
  • Other Cryptographic Practices
  • SOA and Web Services
  • The OWASP Top 10

Chapter 2. Authentication and Authorization

  • HTTP BASIC and DIGEST Authentication Schemes
  • Declaring Security Constraints
  • User Accounts
  • Safeguarding Credentials in Transit
  • Replay Attacks
  • Authorization Over URL Patterns
  • Roles
  • FORM Authentication
  • Login Form Design
  • EJB Authorization
  • Programmatic Security
  • Programmatic Security in JSF

Chapter 3. Secure Application Design

  • Single Points of Decision
  • Cross-Site Scripting
  • Validation vs. Output Escaping
  • Forceful Browsing
  • Cross-Site Request Forgery
  • Request Tokens
  • Injection Attacks
  • Protections in JDBC and JPA
  • Session Management
  • Taking Care of Cookies
  • Validating User Input
  • Validation Practices
  • Regular Expressions
  • JSF Validation

Chapter 4. HTTPS and Certificates

  • Digital Cryptography
  • Encryption
  • SSL and Secure Key Exchange
  • Hashing
  • Signature
  • Keystores
  • keytool
  • Why Keys Aren't Enough
  • X.509 Certificates
  • Certificate Authorities
  • Obtaining a Signed Certificate
  • Configuring HTTPS
  • Client-Side Certificates and Two-Way SSL
  • PKCS #12 and Trust Stores
  • CLIENT-CERT Authentication

Chapter 5. Application-Level Cryptography

  • The Java Cryptography Architecture
  • Secure Random Number Generation
  • The KeyStore API
  • The Signature Class
  • The SignedObject Class
  • The MessageDigest Class
  • The Java Cryptography Extensions
  • The SecretKey and KeyGenerator Types
  • The Cipher Class
  • Choosing Algorithms and Key Sizes
  • Dangerous Practices

Chapter 6. Secure Development Practices

  • Secure Development Cycle
  • Error Handling and Information Leakage
  • Failing to a Secure Mode
  • Logging Practices
  • Appropriate Content for Logs
  • Auditing
  • Strategies: Filters, Interceptors, and Command Chains
  • Penetration Testing
  • Back Doors

Appendix A. Learning Resources

What makes Java web security hard to master

Security failures rarely come from missing a feature. They come from small mistakes in code that otherwise works. The syllabus moves from attacks to defenses to cryptography to process, and each layer assumes the one before it.

  • Threats first. Chapter 1 covers attack vectors, secure design principles, GET vs. POST, privacy under /WEB-INF, and the OWASP Top 10. These give you a vocabulary for judging the later chapters.
  • Declarative access control. Chapter 2 covers HTTP BASIC, DIGEST and FORM authentication, security constraints, roles, and authorization over URL patterns. It also covers EJB authorization and programmatic security, including in JSF. The hard part is knowing where a declarative rule stops and code has to take over.
  • Application-level flaws. Chapter 3 covers cross-site scripting, CSRF and request tokens, injection and the protections in JDBC and JPA, forceful browsing, session management and cookies. A common misconception is that input validation and output escaping are interchangeable. They solve different problems, and the syllabus treats them separately.
  • Transport and keys. Chapter 4 covers SSL key exchange, hashing, signatures, keystores and keytool, X.509 certificates, certificate authorities, two-way SSL, PKCS #12, trust stores and CLIENT-CERT authentication. It also asks why keys alone are not enough. Confusing encryption, hashing and signing is the usual stumbling block.
  • Cryptography in code. Chapter 5 covers the Java Cryptography Architecture and Extensions: SecureRandom, KeyStore, Signature, SignedObject, MessageDigest, SecretKey, KeyGenerator and Cipher. It also covers choosing algorithms and key sizes and the dangerous practices to avoid.
  • Process. Chapter 6 covers error handling and information leakage, failing to a secure mode, logging and auditing, filters, interceptors and command chains, penetration testing and back doors.

Who it suits and what to take around it

The course is general-level. The stated prerequisite is Java programming experience, in particular Servlet programming. It suits Java web developers, and technical leads who review their code, who need to move from using a framework's security settings to understanding what those settings protect against.

If your applications are built on Spring, the container concepts in Introduction to Spring Framework make it easier to place these security controls inside a real application. The security syllabus itself is built on Servlet, JSF, EJB, JDBC and JPA examples. For a wider view of the Java track, see the Java Programming courses and learning guide.

Organizations that want the material aligned to the Java and framework versions they run can ask about customized private training through a training proposal.

Illustrative scenarios

The scenarios below are illustrations of how the course material can be applied. They are not descriptions of specific organizations or of the course's lab exercises.

  • Hardening a form-based web application. A team might review a JSF application against the OWASP Top 10. Chapter 3 topics apply directly: escaping output to stop cross-site scripting, adding request tokens against CSRF, and checking that JDBC and JPA queries are protected against injection.
  • Mutual authentication between internal services. A team might need to restrict a service to known client programs. The Chapter 4 material on keystores, trust stores, PKCS #12, two-way SSL and CLIENT-CERT authentication covers how that is configured and where it tends to go wrong.
  • Protecting sensitive fields in application code. A team might need to encrypt stored values and verify the integrity of exchanged data. The Chapter 5 classes apply: KeyGenerator and Cipher for encryption, MessageDigest for hashing, Signature for signing, and SecureRandom for secure randomness. The same chapter's guidance on algorithms, key sizes and dangerous practices helps in reviewing the result.

AI coding assistants and security code

AI coding assistants can draft boilerplate such as login forms, security constraint declarations, input-validation helpers and regular expressions, and can explain unfamiliar keytool options. Security is also where plausible-looking output does the most damage.

  • Cryptography. Assistants may suggest weak or outdated algorithms, undersized keys, unsafe Cipher modes, hard-coded keys, or a non-secure random source. Check each choice against the Chapter 5 guidance on algorithms, key sizes and dangerous practices.
  • Validation and escaping. Generated code often validates input but skips context-specific output escaping, or builds SQL by string concatenation. Review it against the Chapter 3 injection and XSS material.
  • Regular expressions. A generated pattern may accept input it should reject. Test it with hostile inputs, not just valid ones.
  • Error handling and logging. Generated code may print stack traces to users or log credentials. Compare it with the Chapter 6 topics on information leakage, failing securely, and appropriate log content.

To verify, write tests that attack the code, review it against the OWASP Top 10, and run penetration testing. Treat generated security code as untrusted until a person who understands the threat has reviewed it.

Frequently asked questions

What level is this course, and what do I need beforehand?

It is a general-level, three-day course. Java programming experience is essential, in particular Servlet programming.

What does the syllabus cover?

It has six chapters: secure web applications and the OWASP Top 10; authentication and authorization; secure application design (XSS, CSRF, injection, sessions, validation); HTTPS and certificates; application-level cryptography with the Java Cryptography Architecture and Extensions; and secure development practices including logging, auditing and penetration testing.

Can the course be delivered privately for our team?

Yes. HSG delivers private training for organizations, either onsite at your location or live online.

Can the content be customized?

Private courses can be tailored to the technology versions an organization uses, including current releases, and content can be customized. Use the training proposal request to describe your environment and goals.

Training locations

Spring Framework Security training across the U.S. and beyond.

We provide private Spring Framework Security training for organizations, onsite at your location or live online, throughout the United States and internationally.

View all Spring Framework Security training locations

Train your team with HSG

Private, instructor-led training customized for your organization.

  • Onsite or live online delivery
  • Customized curriculum
  • For a single employee or an entire team
  • Flexible scheduling
  • Experienced instructors
Request Group Training

Questions? Call us at 303.377.6176
or email info@hartmannsoftware.com

Ready to train your team?

Let's customize this training for your organization.

Tell us about your employees, your goals, and your preferred schedule. We'll prepare a training proposal covering scope, delivery format, and pricing.