LDAP Programming with Java™

Book description

Lightweight Directory Access Protocol (LDAP) is now a staple of enterprise and Internet software environments. Anyone involved with Internet development, where Java(TM) technology is prominent, or in enterprise information systems must understand how to use Java technology--especially the Directory SDK for Java--in order to unlock the power of LDAP.

Written by the designer of the Directory SDK for Java and by a leading implementor of directory-based solutions, LDAP Programming with Java(TM) is the first accurate, concise, and complete guide on accessing LDAP from Java applications. Assuming familiarity with Java programming, the book provides a comprehensive discussion of LDAP, from basic directory concepts to the most advanced techniques. It collects in one convenient resource the many innovative and experience-based techniques and approaches programmers have discovered for using the Directory SDK to solve LDAP access challenges.

If you are new to LDAP, you will find helpful background information about the role of directories in today's software systems; LDAP methods of storing, accessing, searching, and updating data; and how the Directory SDK for Java helps applications gain access to an LDAP server. Once you have become proficient with the essential concepts and techniques, you can move on to detailed material about authentication, LDAP and JavaScript(TM), working with JavaBeans(TM) for reusable LDAP components, expressing data relationships in a directory, and other advanced LDAP subjects.

Specific topics covered include:

  • The LDAP naming and information models

  • The command-line tools of the SDK

  • Authentication with a password, SSL, and SASL

  • Configuring access control

  • Writing LDAP applets for a browser

  • Accessing the SDK from JavaScript

  • Storing configuration and preferences in a directory

  • Encapsulating LDAP functionality in a JavaBean

  • Using LDAP in Java servlets

  • LDAP URLs

  • Multiple threads and multiple connections

  • Referrals and replicated systems

  • LDAP controls

  • Synchronous and asynchronous operations

  • Performance tips

  • LDAP Programming with Java(TM) also presents numerous examples, from simple code snippets to complete components and applications.

    Table of contents

    1. Copyright
    2. Preface
    3. Acknowledgments
    4. INTRODUCTION
      1. What Can You Find in a Directory?
        1. What Is a Directory?
        2. What's That Phone Number?
        3. Directory Clients for an Online Phone Book
        4. Is He Really Who He Says He Is?
        5. Working Together
        6. Computers, Printers, Toasters...
      2. The Lingua Franca of Directories Is
        1. A Brief History of Electronic Directories
        2. Future Directions for LDAP
        3. The LDAP Information and Naming Models: How Directories Are Organized
        4. LDAP Spoken Here
        5. Many Roads to Rome
      3. May We Introduce—Directory SDK for Java
        1. What Directory SDK for Java Can Do for You
        2. What Else Can the SDK Do for Me?
        3. Installation and Setup of the SDK
        4. Conclusion
    5. GETTING STARTED
      1. Setting Up Your Own Directory
        1. Downloading and Installing Netscape Directory Server
        2. Using the Command-Line Tools with Your New Directory
        3. Conclusion
      2. Searching with the SDK
        1. Our First Search
        2. Using Search Filters
        3. Handling Results
        4. Attributes in Detail
        5. I Want Only One Record and I Have the DN
        6. Searching and Comparing
        7. More on Filters
        8. Sorting
        9. Authenticating for Searches
        10. Improving Directory Search Performance
        11. Conclusion
      3. Creating and Maintaining Information
        1. Before We Can Update: Authentication Basics
        2. Adding an Entry
        3. Modifying an Existing Entry
        4. Deleting an Entry
        5. Renaming an Entry: Modifying the RDN
        6. Managing Groups
        7. Conclusion
      4. Securing the Data
        1. No Standards for Access Control
        2. Setting Up an Access Control List
        3. Viewing Access Control Lists through LDAP
        4. Modifying Access Control Lists through LDAP
        5. Authenticating to the Directory
        6. Using Password-Based Authentication
        7. Communicating over Secure Sockets Layer
        8. Using Certificate-Based Authentication
        9. Using SASL Authentication
        10. Callbacks in SASL
        11. The SASL Framework Classes
        12. Preparing to Use an Existing Mechanism
        13. Your Own SaslClient and ClientFactory
        14. Conclusion
    6. GETTING DOWN AND DIRTY
      1. More Power to the Browser: An Applet That Speaks LDAP
        1. What's So Different about an Applet?
        2. Certificates and Signed Applets
        3. Writing LDAP Applets for Netscape Navigator
        4. Generating a Test Certificate
        5. Writing LDAP Applets for Microsoft Internet Explorer
        6. Creating a Web Page for the Applet
        7. Writing LDAP Applets for Java Plug-In Software
        8. A Directory Viewer Applet
        9. Conclusion
      2. Scripting LDAP: JavaScript and Java
        1. Accessing Java Applets from JavaScript
        2. Accessing Java Objects from JavaScript
        3. Conclusion
      3. Don't Redo It, Reuse It: LDAP JavaBeans
        1. Invisible LDAP JavaBeans
        2. Graphical LDAP JavaBeans
        3. Conclusion
      4. Make Your Application Location-Independent
        1. The Teex Multicharacter-Set Text Editor
        2. Conclusion
      5. Modeling Relationships
        1. Mirroring an Organizational Structure
        2. Attributes as Pointers
        3. Conclusion
      6. Servlets and LDAP
        1. Overview of Servlets
        2. Uses of LDAP in Servlets
        3. Designing the LDAP Servlet
        4. Our Phone Book Servlet
        5. Setting Up and Using the Servlet
        6. Tips for Servlet Developers
        7. Conclusion
    7. BEYOND THE BASICS
      1. Options and Constraints
        1. How Do They Affect Me?
        2. A View into Options
        3. Constraints for Searching
        4. Conclusion
      2. Odds and Ends
        1. LDAP URLs
        2. A Rose by Any Other Name...
        3. When What You Read Is Not What You Wrote
        4. Sometimes One Thread Is Not Enough
        5. Performance, and How to Get It
        6. Conclusion
      3. Advanced Topics
        1. Information about Information: Managing the Schema
        2. Controls: An Essential Extension
        3. When the Data Lives Elsewhere: Managing Referrals
        4. And Now for Something Completely Different: Extended Operations
        5. Aiming for 24X7: Failover and Reconnecting
        6. Controlling the Result Queue: The Connection Backlog
        7. Down to the Wire: Using the Asynchronous Interface
        8. Conclusion
    8. APPENDICES
      1. More to Learn about LDAP
        1. Going to the Source: Internet Standards
        2. Books about LDAP
        3. LDAP Information on the Internet
        4. Newsgroups Where LDAP Is Spoken
        5. LDAP in Your Inbox
        6. LDAP Servers at Your Disposal
      2. Classes of the LDAP SDK
        1. The netscape.ldap Package
        2. The netscape.ldap.util Package
      3. LDAP Utility Classes on the CD-ROM
        1. The table Package
        2. The util Package
      4. Common LDAP Schema Elements
        1. Object Classes
        2. Attributes
      5. LDAP Error Codes

    Product information

    • Title: LDAP Programming with Java™
    • Author(s): Rob Weltman, Tony Dahbura
    • Release date: February 2000
    • Publisher(s): Addison-Wesley Professional
    • ISBN: 9780201657586