Practical Spring LDAP: Enterprise Java LDAP Development Made Easy

Book description

Practical Spring LDAP is your guide to developing Java-based enterprise applications using the Spring LDAP Framework. This book explains the purpose and fundamental concepts of LDAP before giving a comprehensive tour of the latest version, Spring LDAP 1.3.2. It provides a detailed treatment of LDAP controls and the new features of Spring LDAP 1.3.2 such as Object Directory Mapping and LDIF parsing.

Additionally, the book focuses on the practical aspects of unit and integration testing LDAP code. Filled with real-world code examples, this book is a must for any Java developer working with LDAP.

LDAP has become the de-facto standard for storing and accessing information in enterprises. Despite its widespread adoption, developers often struggle when it comes to using this technology effectively. The traditional JNDI approach has proven to be painful and has resulted in complex, less modular applications. The Spring LDAP Framework provides an ideal alternative.

What you'll learn

  • A simpler approach to developing enterprise applications with Spring LDAP

  • Clear, working code samples with unit/integration tests

  • Advanced features such as transactions and connection pooling

  • A deeper look at LDAP search and out of the box filters supplied by the framework

  • New features such as Object Directory Mapping and LDIF parsing

  • Detailed treatment of search controls and paged result implementation

  • Helpful tips that can save time and frustration

  • Who this book is for

    This book is ideal for anyone with Java and Spring development experience who wants to master the intricacies of Spring LDAP.

    Table of contents

    1. Title Page
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. About the Author
    6. About the Technical Reviewer
    7. Acknowledgements
    8. Introduction
    9. CHAPTER 1: Introduction to LDAP
      1. LDAP Overview
      2. Information Model
      3. Naming Model
      4. Functional Model
      5. Security Model
      6. LDAP Vendors
      7. LDIF Format
      8. Sample Application
      9. Summary
    10. CHAPTER 2: Java Support for LDAP
      1. LDAP Using JNDI
      2. Creating a New Entry
      3. Updating an Entry
      4. Removing an Entry
      5. Searching Entries
      6. JNDI Drawbacks
    11. CHAPTER 3: Introducing Spring LDAP
      1. Motivation
      2. Obtaining Spring LDAP
      3. Installing Spring LDAP Using Maven
      4. LDAP Server Setup
      5. Spring LDAP Hello World
      6. Spring LdapTemplate Operations
      7. Summary
    12. CHAPTER 4: Testing LDAP Code
      1. Unit Testing
      2. Mock Testing
      3. Integration Testing
      4. JUnit
      5. Testing Using Embedded LDAP Server
      6. Setting Up Embedded ApacheDS
      7. Mocking LDAP Using EasyMock
      8. Test Data Generation
      9. Summary
    13. CHAPTER 5: Advanced Spring LDAP
      1. JNDI Object Factories
      2. Spring and Object Factories
      3. DAO Implementation Using Object Factory
      4. Summary
    14. CHAPTER 6: Searching LDAP
      1. LDAP Search Criteria
      2. Spring LDAP Filters
      3. Creating Custom Filters
      4. Handling Special Characters
      5. Summary
    15. CHAPTER 7: Sorting and Paging Results
      1. LDAP Controls
      2. Identifying Supported Controls
      3. JNDI and Controls
      4. Spring LDAP and Controls
      5. Sort Control
      6. Implementing Custom DirContextProcessor
      7. Paged Search Controls
      8. Summary
    16. CHAPTER 8: Object-Directory Mapping
      1. Spring ODM Basics
      2. ODM Metadata
      3. ODM Service Class
      4. Configuration Simplifications
      5. Creating Custom Converter
      6. Summary
    17. CHAPTER 9: LDAP Transactions
      1. Transaction Basics
      2. Local vs. Global Transactions
      3. Programmatic vs. Declarative Transactions
      4. Spring Transaction Abstraction
      5. Declarative Transactions Using Spring
      6. LDAP Transaction Support
      7. Spring LDAP Transaction Support
      8. Compensating Transactions
      9. Summary
    18. CHAPTER 10: Odds and Ends
      1. Authentication Using Spring LDAP
      2. Handling Authentication Exceptions
      3. Parsing LDIF Data
      4. LDAP Connection Pooling
      5. Built In Connection Pooling
      6. Spring LDAP Connection Pooling
      7. Pool Validation
      8. Conclusion
    19. Index

    Product information

    • Title: Practical Spring LDAP: Enterprise Java LDAP Development Made Easy
    • Author(s):
    • Release date: October 2013
    • Publisher(s): Apress
    • ISBN: 9781430263975