Apacheds Basic User Guide V1.5.8-SNAPSHOT Draft Draft
Total Page:16
File Type:pdf, Size:1020Kb
ApacheDS Basic User Guide v1.5.8-SNAPSHOT Draft Draft ApacheDS Basic User Guide v1.5.8-SNAPSHOT Copyright © 2003-2010 The Apache Software Foundation Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Draft Draft Table of Contents Work in progress ......................................................................................................... ix 1. Basic User's Guide .................................................................................................... 1 1.1. About this guide ............................................................................................. 1 1.2. Audience ....................................................................................................... 1 1.3. Feedback welcome! ......................................................................................... 1 2. How to begin ........................................................................................................... 2 2.1. What Apache Directory Server is ....................................................................... 2 2.1.1. System vision ...................................................................................... 2 2.1.1.1. Architectural overview ................................................................ 3 2.1.2. Origin and Motives ............................................................................... 4 2.1.3. Resources ............................................................................................ 4 2.2. Some Background. Directories, directory services and LDAP .................................. 4 2.2.1. Directories and directory services ............................................................ 4 2.2.2. LDAP – the Lightweight Directory Access Protocol .................................... 5 2.2.2.1. What is it? Some history ............................................................. 5 2.2.2.2. Information model primer ............................................................ 6 2.2.2.3. Common applications of LDAP based directories ............................. 6 2.2.2.4. Examples of software components which support LDAP .................... 7 2.2.3. LDAP resources ................................................................................... 7 2.2.3.1. Books ...................................................................................... 7 2.2.3.2. Articles, forums, blogs and other online resources ............................ 8 2.2.3.2.1. Blogs ............................................................................ 8 2.2.3.2.2. Articles and other online resources ...................................... 8 2.3. Installing and starting the server ........................................................................ 9 2.3.1. Prerequisites ........................................................................................ 9 2.3.2. Download a server installer .................................................................... 9 2.3.3. Installation on Windows ....................................................................... 10 2.3.3.1. Starting and stopping the server .................................................. 10 2.3.4. Installation on Mac OS X ..................................................................... 11 2.3.4.1. Starting and stopping the server .................................................. 11 2.3.5. Installation on Linux and Solaris ........................................................... 12 2.4. Basic configuration tasks ................................................................................ 12 2.4.1. Changing the server port for LDAP ........................................................ 12 2.4.1.1. The task and how to accomplish it ............................................... 12 2.4.1.2. Resources ............................................................................... 12 2.4.2. Changing the admin password ............................................................... 12 2.4.2.1. Step one: Changing the value in the system partition ....................... 13 2.4.2.2. Step two: Verification ............................................................... 16 2.4.2.3. Resources ............................................................................... 16 2.4.3. Adding your own partition resp. suffix .................................................... 16 2.4.3.1. What are partitions? .................................................................. 16 2.4.3.2. Minimal partition definition ........................................................ 17 2.4.3.3. Loading the context entry automatically on startup .......................... 18 2.4.3.4. Adding a partition programmatically ............................................ 19 2.4.3.5. More configuration options for a JDBM partition ............................ 20 2.4.4. Configure logging ............................................................................... 20 2.4.4.1. ApacheDS and logging .............................................................. 21 2.4.4.2. Default behavior after installation ................................................ 21 2.4.4.3. Adjusting logging to your needs .................................................. 22 2.4.4.3.1. Log file location (where the log files are placed) .................. 22 2.4.4.3.2. Log level (how detailed the logs are) ................................. 22 2.4.4.3.3. Format for log messages ................................................. 23 2.4.4.3.4. Advanced log4j configuration ........................................... 24 2.4.4.4. Example configurations ............................................................. 24 2.4.4.5. Log settings of the Windows daemon process ................................ 25 iii Draft ApacheDS Basic User Draft Guide v1.5.8-SNAPSHOT 2.4.4.6. Resources ............................................................................... 25 2.4.5. Enable and disable anonymous access ..................................................... 26 2.5. About the sample configurations and sample directory data ................................... 26 2.5.1. Basic server parameters ....................................................................... 26 2.5.2. LDAP Clients .................................................................................... 27 2.5.3. The sample data (Sailors of the seven seas) ............................................. 27 2.5.4. Resources .......................................................................................... 29 3. Handling of data within your directory ....................................................................... 30 4. Basic Security ......................................................................................................... 31 4.1. Authentication options ................................................................................... 31 4.1.1. What is authentication? ........................................................................ 31 4.1.2. Simple binds ...................................................................................... 31 4.1.2.1. Using command line tools .......................................................... 31 4.1.2.2. Binds from Java components using JNDI ...................................... 32 4.1.3. Passwords stored one-way encrypted ...................................................... 34 4.1.3.1. Passwords not stored in clear text ................................................ 34 4.1.3.2. But how to obtain the hash value for a password? ........................... 34 4.1.3.3. From an LDAP client point of view ............................................. 36 4.1.4. Anonymous binds ............................................................................... 37 4.1.4.1. Enable/disable anonymous binds ................................................. 37 4.1.4.2. Example: Server behavior with anonymous binds disabled ................ 37 4.1.4.3. Other clients ............................................................................ 38 4.1.5. How to authenticate a user by uid and password? ...................................... 39 4.1.5.1. An algorithm ........................................................................... 39 4.1.5.2. Arguments .............................................................................. 40 4.1.5.3. Steps ...................................................................................... 40 4.1.5.4. Sample code with JNDI ............................................................. 40 4.1.6. Resources .......................................................................................... 42 4.2. Basic authorization ........................................................................................ 42 4.2.1. What is authorization? ........................................................................