Network Working Group                                             G. Good
Request for Comments: 2849                   iPlanet e-commerce Solutions
Category: Standards Track                                       June 2000
        
Network Working Group                                             G. Good
Request for Comments: 2849                   iPlanet e-commerce Solutions
Category: Standards Track                                       June 2000
        

The LDAP Data Interchange Format (LDIF) - Technical Specification

LDAP数据交换格式(LDIF).技术规范

Status of this Memo

本备忘录的状况

This document specifies an Internet standards track protocol for the Internet community, and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

本文件规定了互联网社区的互联网标准跟踪协议,并要求进行讨论和提出改进建议。有关本协议的标准化状态和状态,请参考当前版本的“互联网官方协议标准”(STD 1)。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2000). All Rights Reserved.

版权所有(C)互联网协会(2000年)。版权所有。

Abstract

摘要

This document describes a file format suitable for describing directory information or modifications made to directory information. The file format, known as LDIF, for LDAP Data Interchange Format, is typically used to import and export directory information between LDAP-based directory servers, or to describe a set of changes which are to be applied to a directory.

本文档描述了一种适用于描述目录信息或目录信息修改的文件格式。LDAP数据交换格式的文件格式(称为LDIF)通常用于在基于LDAP的目录服务器之间导入和导出目录信息,或描述要应用于目录的一组更改。

Background and Intended Usage

背景和预期用途

There are a number of situations where a common interchange format is desirable. For example, one might wish to export a copy of the contents of a directory server to a file, move that file to a different machine, and import the contents into a second directory server.

在许多情况下,需要使用通用交换格式。例如,您可能希望将目录服务器内容的副本导出到一个文件,将该文件移动到另一台计算机,然后将内容导入第二个目录服务器。

Additionally, by using a well-defined interchange format, development of data import tools from legacy systems is facilitated. A fairly simple set of tools written in awk or perl can, for example, convert a database of personnel information into an LDIF file. This file can then be imported into a directory server, regardless of the internal database representation the target directory server uses.

此外,通过使用定义良好的交换格式,可以方便地从遗留系统开发数据导入工具。例如,用awk或perl编写的一组相当简单的工具可以将人员信息数据库转换为LDIF文件。然后,无论目标目录服务器使用何种内部数据库表示形式,都可以将该文件导入目录服务器。

The LDIF format was originally developed and used in the University of Michigan LDAP implementation. The first use of LDIF was in describing directory entries. Later, the format was expanded to allow representation of changes to directory entries.

LDIF格式最初是在密歇根大学LDAP实现中开发和使用的。LDIF的第一个用途是描述目录条目。后来,对格式进行了扩展,以允许表示对目录项的更改。

Relationship to the application/directory MIME content-type:

与应用程序/目录MIME内容类型的关系:

The application/directory MIME content-type [1] is a general framework and format for conveying directory information, and is independent of any particular directory service. The LDIF format is a simpler format which is perhaps easier to create, and may also be used, as noted, to describe a set of changes to be applied to a directory.

应用程序/目录MIME内容类型[1]是用于传输目录信息的通用框架和格式,独立于任何特定的目录服务。LDIF格式是一种更简单的格式,可能更容易创建,并且如前所述,也可用于描述要应用于目录的一组更改。

The key words "MUST", "MUST NOT", "MAY", "SHOULD", and "SHOULD NOT" used in this document are to be interpreted as described in [7].

本文件中使用的关键词“必须”、“不得”、“可能”、“应该”和“不应该”应按照[7]中所述进行解释。

Definition of the LDAP Data Interchange Format

LDAP数据交换格式的定义

The LDIF format is used to convey directory information, or a description of a set of changes made to directory entries. An LDIF file consists of a series of records separated by line separators. A record consists of a sequence of lines describing a directory entry, or a sequence of lines describing a set of changes to a directory entry. An LDIF file specifies a set of directory entries, or a set of changes to be applied to directory entries, but not both.

LDIF格式用于传递目录信息,或描述对目录项所做的一组更改。LDIF文件由一系列由行分隔符分隔的记录组成。记录由描述目录项的一系列行组成,或由描述目录项的一组更改的一系列行组成。LDIF文件指定一组目录项或一组要应用于目录项的更改,但不能同时指定这两种更改。

There is a one-to-one correlation between LDAP operations that modify the directory (add, delete, modify, and modrdn), and the types of changerecords described below ("add", "delete", "modify", and "modrdn" or "moddn"). This correspondence is intentional, and permits a straightforward translation from LDIF changerecords to protocol operations.

修改目录的LDAP操作(添加、删除、修改和modrdn)与下面描述的变更记录类型(“添加”、“删除”、“修改”和“modrdn”或“moddn”)之间存在一对一的关联。这种通信是有意的,允许直接从LDIF变更记录转换为协议操作。

Formal Syntax Definition of LDIF

LDIF的形式语法定义

The following definition uses the augmented Backus-Naur Form specified in RFC 2234 [2].

以下定义使用RFC 2234[2]中规定的扩展巴科斯诺尔形式。

ldif-file                = ldif-content / ldif-changes
        
ldif-file                = ldif-content / ldif-changes
        
ldif-content             = version-spec 1*(1*SEP ldif-attrval-record)
        
ldif-content             = version-spec 1*(1*SEP ldif-attrval-record)
        
ldif-changes             = version-spec 1*(1*SEP ldif-change-record)
        
ldif-changes             = version-spec 1*(1*SEP ldif-change-record)
        

ldif-attrval-record = dn-spec SEP 1*attrval-spec

ldif attrval记录=dn spec SEP 1*attrval spec

ldif-change-record = dn-spec SEP *control changerecord

ldif变更记录=dn规范SEP*控制变更记录

version-spec = "version:" FILL version-number

version spec=“version:”填写版本号

version-number           = 1*DIGIT
                           ; version-number MUST be "1" for the
                           ; LDIF format described in this document.
        
version-number           = 1*DIGIT
                           ; version-number MUST be "1" for the
                           ; LDIF format described in this document.
        
dn-spec                  = "dn:" (FILL distinguishedName /
                                  ":" FILL base64-distinguishedName)
        
dn-spec                  = "dn:" (FILL distinguishedName /
                                  ":" FILL base64-distinguishedName)
        

distinguishedName = SAFE-STRING ; a distinguished name, as defined in [3]

DifferentizedName=安全字符串;[3]中定义的可分辨名称

base64-distinguishedName = BASE64-UTF8-STRING ; a distinguishedName which has been base64 ; encoded (see note 10, below)

base64 DifferentizedName=base64-UTF8-STRING;已被base64识别的名称;编码(见下文注10)

rdn                      = SAFE-STRING
                           ; a relative distinguished name, defined as
                           ; <name-component> in [3]
        
rdn                      = SAFE-STRING
                           ; a relative distinguished name, defined as
                           ; <name-component> in [3]
        

base64-rdn = BASE64-UTF8-STRING ; an rdn which has been base64 encoded (see ; note 10, below)

base64 rdn=base64-UTF8-STRING;已进行base64编码的rdn(见下文注释10)

control                  = "control:" FILL ldap-oid        ; controlType
                           0*1(1*SPACE ("true" / "false")) ; criticality
                           0*1(value-spec)                ; controlValue
                           SEP
                           ; (See note 9, below)
        
control                  = "control:" FILL ldap-oid        ; controlType
                           0*1(1*SPACE ("true" / "false")) ; criticality
                           0*1(value-spec)                ; controlValue
                           SEP
                           ; (See note 9, below)
        
ldap-oid                 = 1*DIGIT 0*1("." 1*DIGIT)
                           ; An LDAPOID, as defined in [4]
        
ldap-oid                 = 1*DIGIT 0*1("." 1*DIGIT)
                           ; An LDAPOID, as defined in [4]
        
attrval-spec             = AttributeDescription value-spec SEP
        
attrval-spec             = AttributeDescription value-spec SEP
        
value-spec               = ":" (    FILL 0*1(SAFE-STRING) /
                                ":" FILL (BASE64-STRING) /
                                "<" FILL url)
                           ; See notes 7 and 8, below
        
value-spec               = ":" (    FILL 0*1(SAFE-STRING) /
                                ":" FILL (BASE64-STRING) /
                                "<" FILL url)
                           ; See notes 7 and 8, below
        
url                      = <a Uniform Resource Locator,
                            as defined in [6]>
                                   ; (See Note 6, below)
        
url                      = <a Uniform Resource Locator,
                            as defined in [6]>
                                   ; (See Note 6, below)
        

AttributeDescription = AttributeType [";" options] ; Definition taken from [4]

AttributeDescription=AttributeType[“;”选项];定义取自[4]

AttributeType            = ldap-oid / (ALPHA *(attr-type-chars))
        
AttributeType            = ldap-oid / (ALPHA *(attr-type-chars))
        
options                  = option / (option ";" options)
        
options                  = option / (option ";" options)
        
option                   = 1*opt-char
        
option                   = 1*opt-char
        
attr-type-chars          = ALPHA / DIGIT / "-"
        
attr-type-chars          = ALPHA / DIGIT / "-"
        
opt-char                 = attr-type-chars
        
opt-char                 = attr-type-chars
        
changerecord             = "changetype:" FILL
                           (change-add / change-delete /
                            change-modify / change-moddn)
        
changerecord             = "changetype:" FILL
                           (change-add / change-delete /
                            change-modify / change-moddn)
        

change-add = "add" SEP 1*attrval-spec

更改add=“add”9月1日*属性规范

change-delete = "delete" SEP

更改delete=“delete”SEP

change-moddn             = ("modrdn" / "moddn") SEP
                            "newrdn:" (    FILL rdn /
                                       ":" FILL base64-rdn) SEP
                            "deleteoldrdn:" FILL ("0" / "1")  SEP
                            0*1("newsuperior:"
                            (    FILL distinguishedName /
                             ":" FILL base64-distinguishedName) SEP)
        
change-moddn             = ("modrdn" / "moddn") SEP
                            "newrdn:" (    FILL rdn /
                                       ":" FILL base64-rdn) SEP
                            "deleteoldrdn:" FILL ("0" / "1")  SEP
                            0*1("newsuperior:"
                            (    FILL distinguishedName /
                             ":" FILL base64-distinguishedName) SEP)
        

change-modify = "modify" SEP *mod-spec

change modify=“modify”SEP*mod spec

mod-spec                 = ("add:" / "delete:" / "replace:")
                           FILL AttributeDescription SEP
                           *attrval-spec
                           "-" SEP
        
mod-spec                 = ("add:" / "delete:" / "replace:")
                           FILL AttributeDescription SEP
                           *attrval-spec
                           "-" SEP
        
SPACE                    = %x20
                           ; ASCII SP, space
        
SPACE                    = %x20
                           ; ASCII SP, space
        
FILL                     = *SPACE
        
FILL                     = *SPACE
        
SEP                      = (CR LF / LF)
        
SEP                      = (CR LF / LF)
        
CR                       = %x0D
                           ; ASCII CR, carriage return
        
CR                       = %x0D
                           ; ASCII CR, carriage return
        
LF                       = %x0A
                           ; ASCII LF, line feed
        
LF                       = %x0A
                           ; ASCII LF, line feed
        
ALPHA                    = %x41-5A / %x61-7A
                           ; A-Z / a-z
        
ALPHA                    = %x41-5A / %x61-7A
                           ; A-Z / a-z
        
DIGIT                    = %x30-39
                           ; 0-9
        
DIGIT                    = %x30-39
                           ; 0-9
        
UTF8-1                   = %x80-BF
        
UTF8-1                   = %x80-BF
        
UTF8-2                   = %xC0-DF UTF8-1
        
UTF8-2                   = %xC0-DF UTF8-1
        
UTF8-3                   = %xE0-EF 2UTF8-1
        
UTF8-3                   = %xE0-EF 2UTF8-1
        
UTF8-4                   = %xF0-F7 3UTF8-1
        
UTF8-4                   = %xF0-F7 3UTF8-1
        
UTF8-5                   = %xF8-FB 4UTF8-1
        
UTF8-5                   = %xF8-FB 4UTF8-1
        
UTF8-6                   = %xFC-FD 5UTF8-1
        
UTF8-6                   = %xFC-FD 5UTF8-1
        
SAFE-CHAR                = %x01-09 / %x0B-0C / %x0E-7F
                           ; any value <= 127 decimal except NUL, LF,
                           ; and CR
        
SAFE-CHAR                = %x01-09 / %x0B-0C / %x0E-7F
                           ; any value <= 127 decimal except NUL, LF,
                           ; and CR
        
SAFE-INIT-CHAR           = %x01-09 / %x0B-0C / %x0E-1F /
                           %x21-39 / %x3B / %x3D-7F
                           ; any value <= 127 except NUL, LF, CR,
                           ; SPACE, colon (":", ASCII 58 decimal)
                           ; and less-than ("<" , ASCII 60 decimal)
        
SAFE-INIT-CHAR           = %x01-09 / %x0B-0C / %x0E-1F /
                           %x21-39 / %x3B / %x3D-7F
                           ; any value <= 127 except NUL, LF, CR,
                           ; SPACE, colon (":", ASCII 58 decimal)
                           ; and less-than ("<" , ASCII 60 decimal)
        
SAFE-STRING              = [SAFE-INIT-CHAR *SAFE-CHAR]
        
SAFE-STRING              = [SAFE-INIT-CHAR *SAFE-CHAR]
        
UTF8-CHAR                = SAFE-CHAR / UTF8-2 / UTF8-3 /
                           UTF8-4 / UTF8-5 / UTF8-6
        
UTF8-CHAR                = SAFE-CHAR / UTF8-2 / UTF8-3 /
                           UTF8-4 / UTF8-5 / UTF8-6
        
UTF8-STRING              = *UTF8-CHAR
        
UTF8-STRING              = *UTF8-CHAR
        

BASE64-UTF8-STRING = BASE64-STRING ; MUST be the base64 encoding of a ; UTF8-STRING

BASE64-UTF8-STRING=BASE64-STRING;必须是的base64编码;UTF8字符串

BASE64-CHAR              = %x2B / %x2F / %x30-39 / %x3D / %x41-5A /
                           %x61-7A
                           ; +, /, 0-9, =, A-Z, and a-z
                           ; as specified in [5]
        
BASE64-CHAR              = %x2B / %x2F / %x30-39 / %x3D / %x41-5A /
                           %x61-7A
                           ; +, /, 0-9, =, A-Z, and a-z
                           ; as specified in [5]
        
BASE64-STRING            = [*(BASE64-CHAR)]
        
BASE64-STRING            = [*(BASE64-CHAR)]
        

Notes on LDIF Syntax

关于LDIF语法的注记

1) For the LDIF format described in this document, the version number MUST be "1". If the version number is absent, implementations MAY choose to interpret the contents as an older LDIF file format, supported by the University of Michigan ldap-3.3 implementation [8].

1) 对于本文件中描述的LDIF格式,版本号必须为“1”。如果版本号不存在,实现可以选择解释为旧的LDIF文件格式的内容,由密歇根大学LDAP-3.3实现(8)支持。

2) Any non-empty line, including comment lines, in an LDIF file MAY be folded by inserting a line separator (SEP) and a SPACE. Folding MUST NOT occur before the first character of the line. In other words, folding a line into two lines, the first of which is empty, is not permitted. Any line that begins with a single space MUST be treated as a continuation of the previous (non-empty) line. When joining folded lines, exactly one space character at the beginning of each continued line must be discarded. Implementations SHOULD NOT fold lines in the middle of a multi-byte UTF-8 character.

2) 可以通过插入行分隔符(SEP)和空格折叠LDIF文件中的任何非空行(包括注释行)。折叠不得发生在行的第一个字符之前。换句话说,不允许将一行折叠成两行,第一行为空。任何以单个空格开头的行都必须视为上一行(非空)的延续。当连接折叠行时,必须在每一连续行的开始处丢弃一个空格字符。实现不应该在多字节UTF-8字符的中间折叠行。

3) Any line that begins with a pound-sign ("#", ASCII 35) is a comment line, and MUST be ignored when parsing an LDIF file.

3) 任何以磅符号(“#”,ASCII 35)开头的行都是注释行,在解析LDIF文件时必须忽略。

4) Any dn or rdn that contains characters other than those defined as "SAFE-UTF8-CHAR", or begins with a character other than those defined as "SAFE-INIT-UTF8-CHAR", above, MUST be base-64 encoded. Other values MAY be base-64 encoded. Any value that contains characters other than those defined as "SAFE-CHAR", or begins with a character other than those defined as "SAFE-INIT-CHAR", above, MUST be base-64 encoded. Other values MAY be base-64 encoded.

4) 任何包含除上述定义为“SAFE-INIT-UTF8-CHAR”字符以外的字符或以除上述定义为“SAFE-INIT-UTF8-CHAR”字符以外的字符开头的dn或rdn都必须进行base-64编码。其他值可以是base-64编码的。任何包含除上述定义为“SAFE-CHAR”的字符以外的字符或以除上述定义为“SAFE-INIT-CHAR”的字符以外的字符开头的值都必须进行base-64编码。其他值可以是base-64编码的。

5) When a zero-length attribute value is to be included directly in an LDIF file, it MUST be represented as AttributeDescription ":" FILL SEP. For example, "seeAlso:" followed by a newline represents a zero-length "seeAlso" attribute value. It is also permissible for the value referred to by a URL to be of zero length.

5) 当零长度属性值直接包含在LDIF文件中时,它必须表示为AttributeDescription:“例如,填充SEP”,请参见:“后跟换行符表示零长度”请参见“属性值”。URL引用的值长度为零也是允许的。

6) When a URL is specified in an attrval-spec, the following conventions apply:

6) 在attrval规范中指定URL时,以下约定适用:

a) Implementations SHOULD support the file:// URL format. The contents of the referenced file are to be included verbatim in the interpreted output of the LDIF file. b) Implementations MAY support other URL formats. The semantics associated with each supported URL will be documented in an associated Applicability Statement.

a) 实现应该支持file://URL格式。参考文件的内容应逐字包含在LDIF文件的解释输出中。b) 实现可能支持其他URL格式。与每个受支持URL相关的语义将记录在相关的适用性声明中。

7) Distinguished names, relative distinguished names, and attribute values of DirectoryString syntax MUST be valid UTF-8 strings. Implementations that read LDIF MAY interpret files in which these entities are stored in some other character set encoding, but implementations MUST NOT generate LDIF content which does not contain valid UTF-8 data.

7) DirectoryString语法的可分辨名称、相对可分辨名称和属性值必须是有效的UTF-8字符串。读取LDIF的实现可以解释这些实体存储在其他字符集编码中的文件,但实现不能生成不包含有效UTF-8数据的LDIF内容。

8) Values or distinguished names that end with SPACE SHOULD be base-64 encoded.

8) 以空格结尾的值或可分辨名称应采用base-64编码。

9) When controls are included in an LDIF file, implementations MAY choose to ignore some or all of them. This may be necessary if the changes described in the LDIF file are being sent on an LDAPv2 connection (LDAPv2 does not support controls), or the particular controls are not supported by the remote server. If the criticality of a control is "true", then the implementation MUST either include the control, or MUST NOT send the operation to a remote server.

9) 当控件包含在LDIF文件中时,实现可能会选择忽略部分或全部控件。如果LDIF文件中描述的更改是通过LDAPv2连接发送的(LDAPv2不支持控件),或者远程服务器不支持特定控件,则可能需要执行此操作。如果控件的关键性为“true”,则实现必须包含该控件,或者不得将操作发送到远程服务器。

10) When an attrval-spec, distinguishedName, or rdn is base64- encoded, the encoding rules specified in [5] are used with the following exceptions: a) The requirement that base64 output streams must be represented as lines of no more than 76 characters is removed. Lines in LDIF files may only be folded according to the folding rules described in note 2, above. b) Base64 strings in [5] may contain characters other than those defined in BASE64-CHAR, and are ignored. LDIF does not permit any extraneous characters, other than those used for line folding.

10) 当attrval spec、DifferentizedName或rdn采用base64编码时,将使用[5]中指定的编码规则,但以下例外情况除外:a)删除base64输出流必须表示为不超过76个字符的行的要求。LDIF文件中的行只能根据上述注释2中所述的折叠规则进行折叠。b) [5]中的Base64字符串可能包含Base64-CHAR中定义的字符以外的字符,因此会被忽略。LDIF不允许任何外来字符,用于折线的字符除外。

Examples of LDAP Data Interchange Format

LDAP数据交换格式示例

Example 1: An simple LDAP file with two entries

示例1:包含两个条目的简单LDAP文件

version: 1 dn: cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com objectclass: top objectclass: person objectclass: organizationalPerson cn: Barbara Jensen cn: Barbara J Jensen cn: Babs Jensen sn: Jensen uid: bjensen telephonenumber: +1 408 555 1212 description: A big sailing fan.

版本:1 dn:cn=Barbara Jensen,ou=Product Development,dc=airius,dc=com对象类:top对象类:person对象类:Organization个人cn:Barbara Jensen cn:Barbara J Jensen cn:Babs Jensen sn:Jensen uid:bjensen电话号码:+1 408 555 1212描述:一个大帆船迷。

dn: cn=Bjorn Jensen, ou=Accounting, dc=airius, dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
cn: Bjorn Jensen
sn: Jensen
telephonenumber: +1 408 555 1212
        
dn: cn=Bjorn Jensen, ou=Accounting, dc=airius, dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
cn: Bjorn Jensen
sn: Jensen
telephonenumber: +1 408 555 1212
        

Example 2: A file containing an entry with a folded attribute value

示例2:包含具有折叠属性值的条目的文件

version: 1
dn:cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com
objectclass:top
objectclass:person
objectclass:organizationalPerson
cn:Barbara Jensen
cn:Barbara J Jensen
cn:Babs Jensen
sn:Jensen
uid:bjensen
telephonenumber:+1 408 555 1212
description:Babs is a big sailing fan, and travels extensively in sea
 rch of perfect sailing conditions.
title:Product Manager, Rod and Reel Division
        
version: 1
dn:cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com
objectclass:top
objectclass:person
objectclass:organizationalPerson
cn:Barbara Jensen
cn:Barbara J Jensen
cn:Babs Jensen
sn:Jensen
uid:bjensen
telephonenumber:+1 408 555 1212
description:Babs is a big sailing fan, and travels extensively in sea
 rch of perfect sailing conditions.
title:Product Manager, Rod and Reel Division
        

Example 3: A file containing a base-64-encoded value

示例3:包含base-64编码值的文件

version: 1
dn: cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
cn: Gern Jensen
cn: Gern O Jensen
sn: Jensen
uid: gernj
telephonenumber: +1 408 555 1212
description:: V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvdSBhcmUhICBUaGlzIHZhbHVl
IGlzIGJhc2UtNjQtZW5jb2RlZCBiZWNhdXNlIGl0IGhhcyBhIGNvbnRyb2wgY2hhcmFjdG
VyIGluIGl0IChhIENSKS4NICBCeSB0aGUgd2F5LCB5b3Ugc2hvdWxkIHJlYWxseSBnZXQg
b3V0IG1vcmUu
        
version: 1
dn: cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
cn: Gern Jensen
cn: Gern O Jensen
sn: Jensen
uid: gernj
telephonenumber: +1 408 555 1212
description:: V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvdSBhcmUhICBUaGlzIHZhbHVl
IGlzIGJhc2UtNjQtZW5jb2RlZCBiZWNhdXNlIGl0IGhhcyBhIGNvbnRyb2wgY2hhcmFjdG
VyIGluIGl0IChhIENSKS4NICBCeSB0aGUgd2F5LCB5b3Ugc2hvdWxkIHJlYWxseSBnZXQg
b3V0IG1vcmUu
        

Example 4: A file containing an entries with UTF-8-encoded attribute values, including language tags. Comments indicate the contents of UTF-8-encoded attributes and distinguished names.

示例4:包含具有UTF-8编码属性值的条目(包括语言标记)的文件。注释表示UTF-8编码属性和可分辨名称的内容。

version: 1
dn:: b3U95Za25qWt6YOoLG89QWlyaXVz
# dn:: ou=<JapaneseOU>,o=Airius
objectclass: top
objectclass: organizationalUnit
ou:: 5Za25qWt6YOo
# ou:: <JapaneseOU>
ou;lang-ja:: 5Za25qWt6YOo
# ou;lang-ja:: <JapaneseOU>
ou;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2
        
version: 1
dn:: b3U95Za25qWt6YOoLG89QWlyaXVz
# dn:: ou=<JapaneseOU>,o=Airius
objectclass: top
objectclass: organizationalUnit
ou:: 5Za25qWt6YOo
# ou:: <JapaneseOU>
ou;lang-ja:: 5Za25qWt6YOo
# ou;lang-ja:: <JapaneseOU>
ou;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2
        
# ou;lang-ja:: <JapaneseOU_in_phonetic_representation>
ou;lang-en: Sales
description: Japanese office
        
# ou;lang-ja:: <JapaneseOU_in_phonetic_representation>
ou;lang-en: Sales
description: Japanese office
        
dn:: dWlkPXJvZ2FzYXdhcmEsb3U95Za25qWt6YOoLG89QWlyaXVz
# dn:: uid=<uid>,ou=<JapaneseOU>,o=Airius
userpassword: {SHA}O3HSv1MusyL4kTjP+HKI5uxuNoM=
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
uid: rogasawara
mail: rogasawara@airius.co.jp
givenname;lang-ja:: 44Ot44OJ44OL44O8
# givenname;lang-ja:: <JapaneseGivenname>
sn;lang-ja:: 5bCP56yg5Y6f
# sn;lang-ja:: <JapaneseSn>
cn;lang-ja:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
# cn;lang-ja:: <JapaneseCn>
title;lang-ja:: 5Za25qWt6YOoIOmDqOmVtw==
# title;lang-ja:: <JapaneseTitle>
preferredlanguage: ja
givenname:: 44Ot44OJ44OL44O8
# givenname:: <JapaneseGivenname>
sn:: 5bCP56yg5Y6f
# sn:: <JapaneseSn>
cn:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
# cn:: <JapaneseCn>
title:: 5Za25qWt6YOoIOmDqOmVtw==
# title:: <JapaneseTitle>
givenname;lang-ja;phonetic:: 44KN44Gp44Gr44O8
# givenname;lang-ja;phonetic::
<JapaneseGivenname_in_phonetic_representation_kana>
sn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJ
# sn;lang-ja;phonetic:: <JapaneseSn_in_phonetic_representation_kana>
cn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJIOOCjeOBqeOBq+ODvA==
# cn;lang-ja;phonetic:: <JapaneseCn_in_phonetic_representation_kana>
title;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2IOOBtuOBoeOCh+OBhg==
# title;lang-ja;phonetic::
# <JapaneseTitle_in_phonetic_representation_kana>
givenname;lang-en: Rodney
sn;lang-en: Ogasawara
cn;lang-en: Rodney Ogasawara
title;lang-en: Sales, Director
        
dn:: dWlkPXJvZ2FzYXdhcmEsb3U95Za25qWt6YOoLG89QWlyaXVz
# dn:: uid=<uid>,ou=<JapaneseOU>,o=Airius
userpassword: {SHA}O3HSv1MusyL4kTjP+HKI5uxuNoM=
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
uid: rogasawara
mail: rogasawara@airius.co.jp
givenname;lang-ja:: 44Ot44OJ44OL44O8
# givenname;lang-ja:: <JapaneseGivenname>
sn;lang-ja:: 5bCP56yg5Y6f
# sn;lang-ja:: <JapaneseSn>
cn;lang-ja:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
# cn;lang-ja:: <JapaneseCn>
title;lang-ja:: 5Za25qWt6YOoIOmDqOmVtw==
# title;lang-ja:: <JapaneseTitle>
preferredlanguage: ja
givenname:: 44Ot44OJ44OL44O8
# givenname:: <JapaneseGivenname>
sn:: 5bCP56yg5Y6f
# sn:: <JapaneseSn>
cn:: 5bCP56yg5Y6fIOODreODieODi+ODvA==
# cn:: <JapaneseCn>
title:: 5Za25qWt6YOoIOmDqOmVtw==
# title:: <JapaneseTitle>
givenname;lang-ja;phonetic:: 44KN44Gp44Gr44O8
# givenname;lang-ja;phonetic::
<JapaneseGivenname_in_phonetic_representation_kana>
sn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJ
# sn;lang-ja;phonetic:: <JapaneseSn_in_phonetic_representation_kana>
cn;lang-ja;phonetic:: 44GK44GM44GV44KP44KJIOOCjeOBqeOBq+ODvA==
# cn;lang-ja;phonetic:: <JapaneseCn_in_phonetic_representation_kana>
title;lang-ja;phonetic:: 44GI44GE44GO44KH44GG44G2IOOBtuOBoeOCh+OBhg==
# title;lang-ja;phonetic::
# <JapaneseTitle_in_phonetic_representation_kana>
givenname;lang-en: Rodney
sn;lang-en: Ogasawara
cn;lang-en: Rodney Ogasawara
title;lang-en: Sales, Director
        

Example 5: A file containing a reference to an external file

示例5:包含对外部文件的引用的文件

version: 1
dn: cn=Horatio Jensen, ou=Product Testing, dc=airius, dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
cn: Horatio Jensen
        
version: 1
dn: cn=Horatio Jensen, ou=Product Testing, dc=airius, dc=com
objectclass: top
objectclass: person
objectclass: organizationalPerson
cn: Horatio Jensen
        
cn: Horatio N Jensen
sn: Jensen
uid: hjensen
telephonenumber: +1 408 555 1212
jpegphoto:< file:///usr/local/directory/photos/hjensen.jpg
        
cn: Horatio N Jensen
sn: Jensen
uid: hjensen
telephonenumber: +1 408 555 1212
jpegphoto:< file:///usr/local/directory/photos/hjensen.jpg
        

Example 6: A file containing a series of change records and comments

示例6:包含一系列更改记录和注释的文件

version: 1
# Add a new entry
dn: cn=Fiona Jensen, ou=Marketing, dc=airius, dc=com
changetype: add
objectclass: top
objectclass: person
objectclass: organizationalPerson
cn: Fiona Jensen
sn: Jensen
uid: fiona
telephonenumber: +1 408 555 1212
jpegphoto:< file:///usr/local/directory/photos/fiona.jpg
        
version: 1
# Add a new entry
dn: cn=Fiona Jensen, ou=Marketing, dc=airius, dc=com
changetype: add
objectclass: top
objectclass: person
objectclass: organizationalPerson
cn: Fiona Jensen
sn: Jensen
uid: fiona
telephonenumber: +1 408 555 1212
jpegphoto:< file:///usr/local/directory/photos/fiona.jpg
        
# Delete an existing entry
dn: cn=Robert Jensen, ou=Marketing, dc=airius, dc=com
changetype: delete
        
# Delete an existing entry
dn: cn=Robert Jensen, ou=Marketing, dc=airius, dc=com
changetype: delete
        
# Modify an entry's relative distinguished name
dn: cn=Paul Jensen, ou=Product Development, dc=airius, dc=com
changetype: modrdn
newrdn: cn=Paula Jensen
deleteoldrdn: 1
        
# Modify an entry's relative distinguished name
dn: cn=Paul Jensen, ou=Product Development, dc=airius, dc=com
changetype: modrdn
newrdn: cn=Paula Jensen
deleteoldrdn: 1
        
# Rename an entry and move all of its children to a new location in
# the directory tree (only implemented by LDAPv3 servers).
dn: ou=PD Accountants, ou=Product Development, dc=airius, dc=com
changetype: modrdn
newrdn: ou=Product Development Accountants
deleteoldrdn: 0
newsuperior: ou=Accounting, dc=airius, dc=com
        
# Rename an entry and move all of its children to a new location in
# the directory tree (only implemented by LDAPv3 servers).
dn: ou=PD Accountants, ou=Product Development, dc=airius, dc=com
changetype: modrdn
newrdn: ou=Product Development Accountants
deleteoldrdn: 0
newsuperior: ou=Accounting, dc=airius, dc=com
        
# Modify an entry: add an additional value to the postaladdress
# attribute, completely delete the description attribute, replace
# the telephonenumber attribute with two values, and delete a specific
# value from the facsimiletelephonenumber attribute
dn: cn=Paula Jensen, ou=Product Development, dc=airius, dc=com
changetype: modify
add: postaladdress
postaladdress: 123 Anystreet $ Sunnyvale, CA $ 94086
-
        
# Modify an entry: add an additional value to the postaladdress
# attribute, completely delete the description attribute, replace
# the telephonenumber attribute with two values, and delete a specific
# value from the facsimiletelephonenumber attribute
dn: cn=Paula Jensen, ou=Product Development, dc=airius, dc=com
changetype: modify
add: postaladdress
postaladdress: 123 Anystreet $ Sunnyvale, CA $ 94086
-
        

delete: description - replace: telephonenumber telephonenumber: +1 408 555 1234 telephonenumber: +1 408 555 5678 - delete: facsimiletelephonenumber facsimiletelephonenumber: +1 408 555 9876 -

删除:说明-替换:电话号码电话号码:+1 408 555 1234电话号码:+1 408 555 5678-删除:传真号码传真号码传真号码传真号码:+1 408 555 9876-

# Modify an entry: replace the postaladdress attribute with an empty
# set of values (which will cause the attribute to be removed), and
# delete the entire description attribute. Note that the first will
# always succeed, while the second will only succeed if at least
# one value for the description attribute is present.
dn: cn=Ingrid Jensen, ou=Product Support, dc=airius, dc=com
changetype: modify
replace: postaladdress
-
delete: description
-
        
# Modify an entry: replace the postaladdress attribute with an empty
# set of values (which will cause the attribute to be removed), and
# delete the entire description attribute. Note that the first will
# always succeed, while the second will only succeed if at least
# one value for the description attribute is present.
dn: cn=Ingrid Jensen, ou=Product Support, dc=airius, dc=com
changetype: modify
replace: postaladdress
-
delete: description
-
        
Example 7: An LDIF file containing a change record with a control
version: 1
# Delete an entry. The operation will attach the LDAPv3
# Tree Delete Control defined in [9]. The criticality
# field is "true" and the controlValue field is
# absent, as required by [9].
dn: ou=Product Development, dc=airius, dc=com
control: 1.2.840.113556.1.4.805 true
changetype: delete
        
Example 7: An LDIF file containing a change record with a control
version: 1
# Delete an entry. The operation will attach the LDAPv3
# Tree Delete Control defined in [9]. The criticality
# field is "true" and the controlValue field is
# absent, as required by [9].
dn: ou=Product Development, dc=airius, dc=com
control: 1.2.840.113556.1.4.805 true
changetype: delete
        

Security Considerations

安全考虑

Given typical directory applications, an LDIF file is likely to contain sensitive personal data. Appropriate measures should be taken to protect the privacy of those persons whose data is contained in an LDIF file.

给定典型的目录应用程序,LDIF文件可能包含敏感的个人数据。应采取适当措施保护LDIF文件中包含数据的人员的隐私。

Since ":<" directives can cause external content to be included when processing an LDIF file, one should be cautious of accepting LDIF files from external sources. A "trojan" LDIF file could name a file with sensitive contents and cause it to be included in a directory entry, which a hostile entity could read via LDAP.

由于“:<”指令可能导致在处理LDIF文件时包含外部内容,因此应谨慎接受来自外部源的LDIF文件。“特洛伊木马”LDIF文件可能会命名包含敏感内容的文件,并导致该文件包含在目录条目中,恶意实体可以通过LDAP读取该目录条目。

LDIF does not provide any method for carrying authentication information with an LDIF file. Users of LDIF files must take care to verify the integrity of an LDIF file received from an external source.

LDIF不提供任何通过LDIF文件携带身份验证信息的方法。LDIF文件的用户必须注意验证从外部来源接收的LDIF文件的完整性。

Acknowledgments

致谢

The LDAP Interchange Format was developed as part of the University of Michigan LDAP reference implementation, and was developed by Tim Howes, Mark Smith, and Gordon Good. It is based in part upon work supported by the National Science Foundation under Grant No. NCR-9416667.

LDAP交换格式是作为密歇根大学LDAP参考实现的一部分开发的,由Tim Howes、Mark Smith和Gordon Good开发。它部分地基于国家科学基金资助的NCR-9416667号的工作。

Members of the IETF LDAP Extensions Working group provided many helpful suggestions. In particular, Hallvard B. Furuseth of the University of Oslo made many significant contributions to this document, including a thorough review and rewrite of the BNF.

IETF LDAP扩展工作组的成员提供了许多有用的建议。特别是,奥斯陆大学的Hallvard B. Furuseth对这份文件做出了许多重大贡献,包括对BNF的彻底审查和重写。

References

工具书类

[1] Howes, T. and M. Smith, "A MIME Content-Type for Directory Information", RFC 2425, September 1998.

[1] Howes,T.和M.Smith,“目录信息的MIME内容类型”,RFC2425,1998年9月。

[2] Crocker, D., and P. Overell, "Augmented BNF for Syntax Specifications: ABNF", RFC 2234, November 1997.

[2] Crocker,D.和P.Overell,“语法规范的扩充BNF:ABNF”,RFC 2234,1997年11月。

[3] Wahl, M., Kille, S. and T. Howes, "A String Representation of Distinguished Names", RFC 2253, December 1997.

[3] Wahl,M.,Kille,S.和T.Howes,“区分名称的字符串表示”,RFC 2253,1997年12月。

[4] Wahl, M., Howes, T. and S. Kille, "Lightweight Directory Access Protocol (v3)", RFC 2251, July 1997.

[4] Wahl,M.,Howes,T.和S.Kille,“轻量级目录访问协议(v3)”,RFC 2251,1997年7月。

[5] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.

[5] Freed,N.和N.Borenstein,“多用途互联网邮件扩展(MIME)第一部分:互联网邮件正文格式”,RFC 20451996年11月。

[6] Berners-Lee, T., Masinter, L. and M. McCahill, "Uniform Resource Locators (URL)", RFC 1738, December 1994.

[6] Berners Lee,T.,Masinter,L.和M.McCahill,“统一资源定位器(URL)”,RFC 17381994年12月。

[7] Bradner, S., "Key Words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[7] Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

   [8]  The SLAPD and SLURPD Administrators Guide.  University of
        Michigan, April 1996.  <URL:
        http://www.umich.edu/~dirsvcs/ldap/doc/guides/slapd/toc.html>
        
   [8]  The SLAPD and SLURPD Administrators Guide.  University of
        Michigan, April 1996.  <URL:
        http://www.umich.edu/~dirsvcs/ldap/doc/guides/slapd/toc.html>
        

[9] M. P. Armijo, "Tree Delete Control", Work in Progress.

[9] M.P.Armijo,“树删除控制”,正在进行中。

Author's Address

作者地址

Gordon Good iPlanet e-commerce Solutions 150 Network Circle Mailstop USCA17-201 Santa Clara, CA 95054, USA

Gordon Good iPlanet电子商务解决方案150 Network Circle邮箱USCA17-201加利福尼亚州圣克拉拉95054

   Phone: +1 408 276 4351
   EMail:  ggood@netscape.com
        
   Phone: +1 408 276 4351
   EMail:  ggood@netscape.com
        

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (2000). All Rights Reserved.

版权所有(C)互联网协会(2000年)。版权所有。

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English.

本文件及其译本可复制并提供给他人,对其进行评论或解释或协助其实施的衍生作品可全部或部分编制、复制、出版和分发,不受任何限制,前提是上述版权声明和本段包含在所有此类副本和衍生作品中。但是,不得以任何方式修改本文件本身,例如删除版权通知或对互联网协会或其他互联网组织的引用,除非出于制定互联网标准的需要,在这种情况下,必须遵循互联网标准过程中定义的版权程序,或根据需要将其翻译成英语以外的其他语言。

The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assigns.

上述授予的有限许可是永久性的,互联网协会或其继承人或受让人不会撤销。

This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件和其中包含的信息是按“原样”提供的,互联网协会和互联网工程任务组否认所有明示或暗示的保证,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Acknowledgement

确认

Funding for the RFC Editor function is currently provided by the Internet Society.

RFC编辑功能的资金目前由互联网协会提供。