LDAP is the standard TCP/IP stack protocol that is used to store and query information from a hierarchical directory. It is an alternative to X.500 Directory service protocol which is more resource-intensive. LDAP is often used for SSO authentication and storage. By standard LDAP uses TCP port 389 for unencrypted communication and TLS port 636 over an encrypted channel.
LDAP unlike most modern http-based protocols, uses persistent connections which can live for days when communication with a directory server.
Attribute: the data in the LDAP system is stored in key-value pairs known as attributes. You can set an attributes value by separating the name and the value using a colon and a space. e.g.
mail: johndoe@gmail.com
Use an equal's sign to refer to an attribute and its data without setting it. e.g.
mail=johndoe@gmail.com
The most commonly used attributes include:
- ou: Organizational Unit
- _ dn_: distinguished name
- cn: common name
- description
- dc: domain component
- givenName: first name
- mail: e-mail address
- sn: surname
Entries: an entry is a collection of attributes which are associated to or describe something. An entry could be a user in your system. Think of it as a row in a relational database. Each entry consists of:
- a distinguished name (uniquely identifies a specific entry in the DIT hierarchy
- a collection of attributes (they hold the data for the entry)
- a collection of object classes (they indicate what kind of object an entry represents e.g. information about a device or person)
dn: ou=Users,dc=example,dc=com,uid=jd001 objectClass: EntUsers cn: Jane Doe sn: Doe mail: jdoe@example.com uid: jd001
Search Filters: used to define the criteria for identifying entries that contain certain kinds of information.
LDAP URLS: this URL contains different pieces of information that can reference a directory server or a search criteria.
LDAP is used by Microsoft's Active Directory and other directory servers such as OpenLDAP and Red Hat Directory Server. To setup LDAP within an enterprise, you need a directory server, users with different permissions, directory data that can be queried and an LDAP client application.
-
以上がLDAP (軽量ディレクトリ アクセス プロトコル)の詳細内容です。詳細については、PHP 中国語 Web サイトの他の関連記事を参照してください。