组织:中国互动出版网(http://www.china-pub.com/) RFC文档中文翻译计划(http://www.china-pub.com/compters/emook/aboutemook.htm) E-mail:ouyang@china-pub.com 译者:ouseka (ouseka, ouseka@sina.com) 译文发布时间:2001-4-20 版权:本中文翻译文档版权归中国互动出版网所有。可以用于非商业用途自由转载,但必须 保留本文档的翻译及版权信息。 Network Working Group V. Ryan Request for Comments: 2714 R. Lee Category: Informational S. Seligman Sun Microsystems, Inc. October 1999 LDAP(轻型目录存取协议)目录中的CORBA对象参考方案 (RFC 2714 Schema for Representing CORBA Object References in an LDAP Directory) 本备忘录状态 This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited. 版权声明 Copyright (C) The Internet Society (1999). All Rights Reserved. 目 录 摘要 2 1、绪论 2 2、CORBA对象参考陈述 2 3、属性类型定义 3 3.1 corbaIor 3 3.2 corbaRepositoryId 3 4、对象类定义 4 4.1 corbaContainer 5 4.2 corbaObject 5 4.3 corbaObjectReference 5 5、安全考虑 6 6、鸣谢 6 7、参考 6 8、作者地址 6 9、附录 - LDAP 方案 7 10.完整的版权声明 9 鸣谢 9 摘要 CORBA [CORBA] 即“公共对象请求代理体系”(Common Object Request Broker Architecture),是由对象管理组集团(OMG)所定义。该文档为LDAP目录中的CORBA 对象参考方案 [LDAPv3] 进行定义。 1、绪论 该文档假设读者已经对CORBA有了一般性的理解。 一般地, LDAP目录被用来存储数据。用户与程序员把目录看成是具有一系列属性的目 录层次。你从目录中查寻一条记录并且抽取你所感兴趣的一个或多个属性。例如:你可 以从目录中查寻某人的电话号码。或者,你可以在目录中搜索具体特殊属性的记录。比 如,你可以在目录中查找所有姓氏为Smith的人员。 CORBA应用需要访问CORBA对象。一般地,CORBA应用使用COS名字服务来存储 和读取CORBA对象参考。在有目录的环境下,CORBA应用应该能够把目录作为CORBA 对象参考的库来使用。目录提供核心管理,并且是可复制的,通过网络服务于分布式的 CORBA应用。 比如,一个应用服务器可能用目录来“注册”CORBA对象以执行它所管理的服务,所 以一个客户能随后查找目录来定位所需服务。 本文的目的是来定义应用程序从目录中存储与读取CORBA对象参考的公共方法。使用 这种公共方案,任何需要读取或存储目录中的CORBA对象参考的CORBA应用都能使 用一种能公共操作的方法。 注意本方案是为存储CORBA“对象参考”而定义的,不是一般情形下的CORBA对象。 可能还存在其它没有被本方案代替的在LDAP目录中保存CORBA对象的方法。 2、CORBA对象参考陈述 本文定义方案基础来描述LDAP目录中的一个CORBA对象参考。拥有对象的一个参考 的应用可以调用该对象有调用。这样的参考被称为“可公共操作的对象参考”或简称IOR (Interoperable Object Reference)。依据一般的Inter-ORB协议,使用IOR访问CORBA 对象对于应用来说是透明地完成的。 一个CORBA对象参考是由corbaObjectReference对象类在目录中来扮演。它是个结构上 的对象类,当扮演一个对象参考时,corbaObjectReference对象类也应该是存在于记录中 的。当一个corbaObjet的子类(如corbaObjectReference)与其它结构上的对象类混合在 一起时,corbaContainer不是必需的。 关于对象类corbaOject,corbaObjectReference,和corbaContainer的定义在第4节中。 corbaObject类有两个可选的属性:corbaRepositoryId与description。corbaRepositoryId是 用来保存一个CORBA对象实现接口的repository id的多值属性。 corbaObjectReference类有一个固有属性:corbaIor。corbaIor是用来存储对象的IOR。 corbaIor与corbaRepositoryId在第3节中定义;描述在 [v3Schema] 中定义。 3、属性类型定义 以下属性类型在本文中定义: corbaIor corbaRepositoryId 3.1 corbaIor 此属性保存一个CORBA对象的可公共操作的对象参考(IOR)的字符串类型陈述。IOR 是一个对于包含有定位对象必需信息的对象来说是不透明的操作。 此属性的语法是 'IA5 String' 并且是大小写无关的。 ( 1.3.6.1.4.1.42.2.27.4.1.14 NAME 'corbaIor' DESC 'Stringified interoperable object reference of a CORBA object' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) 3.2 corbaRepositoryId 每一个CORBA接口都有个唯一的“repository id”(也叫作“type id”)用来确定接口。 一个CORBA对象有一个或多个repository id,每一个对应那个它实现的接口。 repository id的格式可是以任意字符串,然而OMG指定了四个标准的格式: a. IDL-style IDL:Prefix/ModuleName/InterfaceName:VersionNumber 例如,“NamingContext”以OMG COS命名模式的repository id即为: “IDL:omg.org/CosNaming/NamingContext:1.0”。 b. RMI-style RMI:ClassName:HashCode[:SUID] 该格式为RMI-IIOP远程对象 [RMI-IIOP] 所使用。“ClassName”是完整的类名(如 java.lang.String)。“HashCode”是该对象的HASH编码(简而言之,是由调用 “hashCode()”方法所得的)。“SUID”即Stream Unique Identifier,它是个64们数 字以唯一地识别类的连续性版本;SUID是repository id可选的项。 c. DCE-style DCE:UUID 该格式用于DCE/CORBA互用性 [CORBA-DCE]。UUID描述一个DCE UUID。 d. "local" 该格式由本地对象请求代理(ORB)定义。 此属性的语法是'Direcotry String',并且大小写无关。其值用UTF-8方式编码。有些值 可能需要转换自他们的本地化陈述以正确地用UTF-8方式编码。 ( 1.3.6.1.4.1.42.2.27.4.1.15 NAME 'corbaRepositoryId' DESC 'Repository ids of interfaces implemented by a CORBA object' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) 4、对象类定义 以下对象类在文中定义: corbaContainer corbaObject corbaObjectReference 4.1 corbaContainer 该结构上的对象类描述一种CORBA对象的容器。 ( 1.3.6.1.4.1.42.2.27.4.2.10 NAME 'corbaContainer' DESC 'Container for a CORBA object' SUP top STRUCTURAL MUST ( cn ) ) 4.2 corbaObject 该抽象对象类是描述一个CORBA对象的根类。 ( 1.3.6.1.4.1.42.2.27.4.2.9 NAME 'corbaObject' DESC 'CORBA object representation' SUP top ABSTRACT MAY ( corbaRepositoryId $ description ) ) 4.3 corbaObjectReference 该辅助对象类描述一个CORBA对象参考。它必须与一个结构上的对象类混合在一起。 ( 1.3.6.1.4.1.42.2.27.4.2.11 NAME 'corbaObjectReference' DESC 'CORBA interoperable object reference' SUP corbaObject AUXILIARY MUST ( corbaIor ) ) 5、安全考虑 获得一个对象的参考并保存到目录中可能会导致该对象在大范围内是可用的。这里可能 有安全方面的牵连。 6、鸣谢 我们要感谢Sun Micorsystems的Sanjeev Krishnan,IBM的Simon Nash,和Oracle的Jeffrey Spirn,感谢他们的意见和建议。 7、参考 [CORBA] The Object Management Group, "Common Object Request Broker Architecture Specification 2.2", http://www.omg.org [CORBA-DCE] Distributed Systems Technology Center and Digital Equipment Corporation, "DCE/CORBA Interworking Specification", May 1998. http://www.omg.org/library/schedule/ DCE_CORBA_Interworking_RFP.html [LDAPv3] Wahl, M., Howes, T. and S. Kille, "Lightweight Directory Access Protocol (v3)", RFC 2251, December 1997. [RMI-IIOP] IBM and Java Software, Sun Microsystems, Inc., "RMI over IIOP", June 1999. http://java.sun.com/products/rmi- iiop/index.html [v3Schema] Wahl, M., "A Summary of the X.500(96) User Schema for use with LDAPv3", RFC 2256, December 1997. 8、作者地址 Vincent Ryan Sun Microsystems, Inc. Mail Stop EDUB03 901 San Antonio Road Palo Alto, CA 94303 USA Phone: +353 1 819 9151 EMail: vincent.ryan@ireland.sun.com Rosanna Lee Sun Microsystems, Inc. Mail Stop UCUP02-206 901 San Antonio Road Palo Alto, CA 94303 USA Phone: +1 408 863 3221 EMail: rosanna.lee@eng.sun.com Scott Seligman Sun Microsystems, Inc. Mail Stop UCUP02-209 901 San Antonio Road Palo Alto, CA 94303 USA Phone: +1 408 863 3222 EMail: scott.seligman@eng.sun.com 9、附录 - LDAP 方案 -- 属性类型 -- ( 1.3.6.1.4.1.42.2.27.4.1.14 NAME 'corbaIor' DESC 'Stringified interoperable object reference of a CORBA object' EQUALITY caseIgnoreIA5Match SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 SINGLE-VALUE ) ( 1.3.6.1.4.1.42.2.27.4.1.15 NAME 'corbaRepositoryId' DESC 'Repository ids of interfaces implemented by a CORBA object' EQUALITY caseExactMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) -- 来自于 RFC-2256 -- ( 2.5.4.13 NAME 'description' EQUALITY caseIgnoreMatch SUBSTR caseIgnoreSubstringsMatch SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} ) -- 对象类 -- ( 1.3.6.1.4.1.42.2.27.4.2.9 NAME 'corbaObject' DESC 'CORBA object representation' SUP top ABSTRACT MAY ( corbaRepositoryId $ description ) ) ( 1.3.6.1.4.1.42.2.27.4.2.10 NAME 'corbaContainer' DESC 'Container for a CORBA object' SUP top STRUCTURAL MUST ( cn ) ) ( 1.3.6.1.4.1.42.2.27.4.2.11 NAME 'corbaObjectReference' DESC 'CORBA interoperable object reference' SUP corbaObject AUXILIARY MUST ( corbaIor ) ) -- 自ISO X.520的匹配规则 -- ( 2.5.13.5 NAME 'caseExactMatch' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 ) 10.完整的版权声明 Copyright (C) The Internet Society (1999). All Rights Reserved. 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. 鸣谢 当前由INTERNET协会提供的RFC编者职责基金投资。 RFC 2714 LDAP(轻型目录存取协议)目录中的CORBA对象参考方案 (RFC 2714 Schema for Representing CORBA Object References in an LDAP Directory) 1 RFC文档中文翻译计划