1 2 3 4 5 6 7 Network Working Group V. Ryan 8 Request for Comments: 2713 S. Seligman 9 Category: Informational R. Lee 10 Sun Microsystems, Inc. 11 October 1999 12 13 14 Schema for Representing Java(tm) Objects in an LDAP Directory 15 16 Status of this Memo 17 18 This memo provides information for the Internet community. It does 19 not specify an Internet standard of any kind. Distribution of this 20 memo is unlimited. 21 22 Copyright Notice 23 24 Copyright (C) The Internet Society (1999). All Rights Reserved. 25 26 Abstract 27 28 This document defines the schema for representing Java(tm) objects in 29 an LDAP directory [LDAPv3]. It defines schema elements to represent 30 a Java serialized object [Serial], a Java marshalled object [RMI], a 31 Java remote object [RMI], and a JNDI reference [JNDI]. 32 33 1. Introduction 34 35 This document assumes that the reader has a general knowledge of the 36 Java programming language [Java]. For brevity we use the term "Java 37 object" in place of "object in the Java programming language" 38 throughout this text. 39 40 Traditionally, LDAP directories have been used to store data. Users 41 and programmers think of the directory as a hierarchy of directory 42 entries, each containing a set of attributes. You look up an entry 43 from the directory and extract the attribute(s) of interest. For 44 example, you can look up a person's telephone number from the 45 directory. Alternatively, you can search the directory for entries 46 with a particular set of attributes. For example, you can search for 47 all persons in the directory with the surname "Smith". 48 49 For applications written in the Java programming language, a kind of 50 data that is typically shared are Java objects themselves. For such 51 applications, it makes sense to be able to use the directory as a 52 repository for Java objects. The directory provides a centrally 53 administered, and possibly replicated, service for use by Java 54 applications distributed across the network. 55 56 57 58 Ryan, et al. Informational [Page 1] 59 61 RFC 2713 Schema for Java Objects October 1999 62 63 64 For example, an application server might use the directory for 65 "registering" objects representing the services that it manages, so 66 that a client can later search the directory to locate those services 67 as it needs. 68 69 The motivation for this document is to define a common way for 70 applications to store and retrieve Java objects from the directory. 71 Using this common schema, any Java application that needs to read or 72 store Java objects in the directory can do so in an interoperable 73 way. 74 75 2 Representation of Java Objects 76 77 This document defines schema elements to represent three types of 78 Java objects: a Java serialized object, a Java marshalled object, 79 and a JNDI reference. A Java remote object is stored as either a Java 80 marshalled object or a JNDI reference. 81 82 2.1 Common Representations 83 84 A Java object is stored in the LDAP directory by using the object 85 class javaObject. This is the base class from which other Java object 86 related classes derive: javaSerializedObject, javaMarshalledObject, 87 and javaNamingReference. javaObject is an abstract object class, 88 which means that a javaObject cannot exist by itself in the 89 directory; only auxiliary or structural subclasses of it can exist in 90 the directory. 91 92 The object class javaContainer represents a directory entry dedicated 93 to storing a Java object. It is a structural object class. In cases 94 where a subclass of javaObject is mixed in with another structural 95 object class, javaContainer is not required. 96 97 The definitions for the object classes javaObject and javaContainer 98 are presented in Section 4. 99 100 The javaObject class has one mandatory attribute (javaClassName) and 101 four optional attributes (javaClassNames, javaCodebase, javaDoc, 102 description). javaClassName is a single valued attribute that is 103 used to store the fully qualified name of the object's Java class 104 (for example, "java.lang.String"). This may be the object's most 105 derived class's name, but does not have to be; that of a superclass 106 or interface in some cases might be most appropriate. This attribute 107 is intended for storing the name of the object's "distinguished" 108 class, that is, the class or interface with which the object should 109 be identified. 110 111 112 113 114 115 Ryan, et al. Informational [Page 2] 116 118 RFC 2713 Schema for Java Objects October 1999 119 120 121 javaClassNames is a multivalued attribute that is used to store the 122 fully qualified names of the object's Java classes and interfaces 123 (for example, "java.lang.Byte"). Like all multivalued attributes, the 124 javaClassNames attribute's values are unordered and so no one value 125 is more "distinguished" than the others. This attribute is intended 126 for storing an object's class and interface names and those of its 127 ancestor classes and interfaces, although the list of values does not 128 have to be complete. If the javaClassNames attribute is present, it 129 should include the value of javaClassName. 130 131 For example, suppose an object is stored in the directory with a 132 javaClassName attribute of "java.io.FilePermission", and a 133 javaClassNames attribute of {"java.security.Permission", 134 "java.io.FilePermission", "java.security.Guard", 135 "java.io.Serializable"}. An application searching a directory for 136 Java objects might use javaClassName to produce a summary of the 137 names and types of Java objects in that directory. Another 138 application might use the javaClassNames attribute to find, for 139 example, all java.security.Permission objects. 140 141 javaCodebase is a multivalued attribute that is used to store the 142 location(s) of the object's class definition. javaDoc is used to 143 store a pointer (URL) to the Java documentation for the class. 144 description is used to store a textual description of a Java object 145 and is defined in [v3Schema]. The definitions of these attributes are 146 presented in Section 3. 147 148 2.2 Serialized Objects 149 150 To "serialize" an object means to convert its state into a byte 151 stream in such a way that the byte stream can be converted back into 152 a copy of the object. A Java object is "serializable" if its class 153 or any of its superclasses implements either the java.io.Serializable 154 interface or its subinterface java.io.Externalizable. 155 "Deserialization" is the process of converting the serialized form of 156 an object back into a copy of the object. When an object is 157 serialized, the entire tree of objects rooted at the object is also 158 serialized. When it is deserialized, the tree is reconstructed. For 159 example, suppose a serializable Book object contains (a serializable 160 field of) an array of Page objects. When a Book object is 161 serialized, so is the array of Page objects. 162 163 The Java platform specifies a default algorithm by which serializable 164 objects are serialized. A Java class can also override this default 165 serialization with its own algorithm. [Serial] describes object 166 serialization in detail. 167 168 169 170 171 172 Ryan, et al. Informational [Page 3] 173 175 RFC 2713 Schema for Java Objects October 1999 176 177 178 When an object is serialized, information that identifies its class 179 is recorded in the serialized stream. However, the class's definition 180 ("class file") itself is not recorded. It is the responsibility of 181 the system that is deserializing the object to determine the 182 mechanism to use for locating and loading the associated class 183 definitions. For example, the Java application might include in its 184 classpath a JAR file containing the class definitions of the 185 serialized object, or load the class definitions using information 186 from the directory, as explained below. 187 188 2.2.1 Representation in the Directory 189 190 A serialized object is represented in the directory by the attributes 191 javaClassName, javaClassNames, javaCodebase, and javaSerializedData, 192 as defined in Section 3. The mandatory attribute, 193 javaSerializedData, contains the serialized form of the object. 194 Although the serialized form already contains the class name, the 195 mandatory javaClassName attribute also records the class name of the 196 serialized object so that applications can determined class 197 information without having to first deserialize the object. The 198 optional javaClassNames attribute is used to record additional class 199 information about the serialized object. The optional javaCodebase 200 attribute is used to record the locations of the class definitions 201 needed to deserialize the serialized object. 202 203 A directory entry that contains a serialized object is represented by 204 the object class javaSerializedObject, which is a subclass of 205 javaObject. javaSerializedObject is an auxiliary object class, which 206 means that it needs to be mixed in with a structural object class. 207 javaSerializedObject's definition is given in Section 4. 208 209 2.3 Marshalled Objects 210 211 To "marshal" an object means to record its state and codebase(s) in 212 such a way that when the marshalled object is "unmarshalled," a copy 213 of the original object is obtained, possibly by automatically loading 214 the class definitions of the object. You can marshal any object that 215 is serializable or remote (that is, implements the java.rmi.Remote 216 interface). Marshalling is like serialization, except marshalling 217 also records codebases. Marshalling is different from serialization 218 in that marshalling treats remote objects specially. If an object is 219 a java.rmi.Remote object, marshalling records the remote object's 220 "stub" (see Section 2.5), instead of the remote object itself. Like 221 serialization, when an object is marshalled, the entire tree of 222 objects rooted at the object is marshalled. When it is unmarshalled, 223 the tree is reconstructed. 224 225 226 227 228 229 Ryan, et al. Informational [Page 4] 230 232 RFC 2713 Schema for Java Objects October 1999 233 234 235 A "marshalled" object is the represented by the 236 java.rmi.MarshalledObject class. Here's an example of how to create 237 MarshalledObjects for serializable and remote objects: 238 239 java.io.Serializable sobj = ...; 240 java.rmi.MarshalledObject mobj1 = 241 new java.rmi.MarshalledObject(sobj); 242 243 java.rmi.Remote robj = ...; 244 java.rmi.MarshalledObject mobj2 = 245 new java.rmi.MarshalledObject(robj); 246 247 Then, to retrieve the original objects from the MarshalledObjects, do 248 as follows: 249 250 java.io.Serializable sobj = (java.io.Serializable) mobj1.get(); 251 java.io.Remote rstub = (java.io.Remote) mobj2.get(); 252 253 MarshalledObject is available only on the Java 2 Platform, Standard 254 Edition, v1.2, and higher releases. 255 256 2.3.1 Representation in the Directory 257 258 A marshalled object is represented in the directory by the attributes 259 javaClassName, javaClassNames, and javaSerializedData, as defined in 260 Section 3. The mandatory attribute, javaSerializedData, contains the 261 serialized form of the marshalled object (that is, the serialized 262 form of a MarshalledObject instance). The mandatory javaClassName 263 attribute records the distinguished class name of the object before 264 it has been marshalled. The optional javaClassNames attribute is 265 used to record additional class information about the object before 266 it has been marshalled. 267 268 A directory entry that contains a marshalled object is represented by 269 the object class javaMarshalledObject, which is a subclass of 270 javaObject. javaMarshalledObject is an auxiliary object class, which 271 means that it needs to be mixed in with a structural object class. 272 javaMarshalledObject's definition is given in Section 4. 273 274 As evident in this description, a javaMarshalledObject differs from a 275 javaSerializedObject only in the interpretation of the javaClassName 276 and javaClassNames attributes. 277 278 279 280 281 282 283 284 285 286 Ryan, et al. Informational [Page 5] 287 289 RFC 2713 Schema for Java Objects October 1999 290 291 292 2.4 JNDI References 293 294 Java Naming and Directory Interface(tm) (JNDI) is a directory access 295 API specified in the Java programming language [JNDI]. It provides 296 an object-oriented view of the directory, allowing Java objects to be 297 added to and retrieved from the directory without requiring the 298 client to manage data representation issues. 299 300 JNDI defines the notion of a "reference" for use when an object 301 cannot be stored in the directory directly, or when it is 302 inappropriate or undesirable to do so. An object with an associated 303 reference is stored in the directory indirectly, by storing its 304 reference instead. 305 306 2.4.1 Contents of a Reference 307 308 A JNDI reference is a Java object of class javax.naming.Reference. 309 It consists of class information about the object being referenced 310 and an ordered list of addresses. An address is a Java object of 311 class javax.naming.RefAddr. Each address contains information on how 312 to construct the object. 313 314 A common use for JNDI references is to represent connections to a 315 network service such as a database, directory, or file system. Each 316 address may then identify a "communications endpoint" for that 317 service, containing information on how to contact the service. 318 Multiple addresses may arise for various reasons, such as replication 319 or the object offering interfaces over more than one communication 320 mechanism. 321 322 A reference also contains information to assist in the creation of an 323 instance of the object to which the reference refers. It contains 324 the Java class name of that object, and the class name and location 325 of the object factory to be used to create the object. The 326 procedures for creating an object given its reference and the reverse 327 are described in [JNDI]. 328 329 2.4.2 Representation in the Directory 330 331 A JNDI reference is stored in the directory by using the attributes 332 javaClassName, javaClassNames, javaCodebase, javaReferenceAddress, 333 and javaFactory, defined in Section 3. These attributes store 334 information corresponding to the contents of a reference described 335 above. javaReferenceAddress is a multivalued optional attribute for 336 storing reference addresses. javaFactory is the optional attribute 337 for storing the object factory's fully qualified class name. The 338 mandatory javaClassName attribute is used to store the name of the 339 distinguished class of the object. The optional javaClassNames 340 341 342 343 Ryan, et al. Informational [Page 6] 344 346 RFC 2713 Schema for Java Objects October 1999 347 348 349 attribute is used to record additional class and interface names. 350 The optional javaCodebase attribute is used to store the locations of 351 the object factory's and the object's class definitions. 352 353 A directory entry containing a JNDI reference is represented by the 354 object class javaNamingReference, which is a subclass of javaObject. 355 javaNamingReference is an auxiliary object class, which means that it 356 needs to be mixed in with a structural object class. 357 javaNamingReference's definition is given in Section 4. 358 359 2.5 Remote Objects 360 361 The Java Remote Method Invocation (RMI) system [RMI] is a mechanism 362 that enables an object on one Java virtual machine to invoke methods 363 on an object in another Java virtual machine. Any object whose 364 methods can be invoked in this way must implement the java.rmi.Remote 365 interface. When such an object is invoked, its arguments are 366 marshalled and sent from the local virtual machine to the remote one, 367 where the arguments are unmarshalled and used. When the method 368 terminates, the results are marshalled from the remote machine and 369 sent to the caller's virtual machine. 370 371 To make a remote object accessible to other virtual machines, a 372 program typically registers it with the RMI registry. The program 373 supplies to the RMI registry the string name of the remote object and 374 the remote object itself. When a program wants to access a remote 375 object, it supplies the object's string name to the RMI registry on 376 the same machine as the remote object. The RMI registry returns to 377 the caller a reference (called "stub") to the remote object. When 378 the program receives the stub for the remote object, it can invoke 379 methods on the remote object (through the stub). A program can also 380 obtain references to remote objects as a result of remote calls to 381 other remote objects or from other naming services. For example, the 382 program can look up a reference to a remote object from an LDAP 383 server that supports the schema defined in this document. 384 385 The string name accepted by the RMI registry has the syntax 386 "rmi://hostname:port/remoteObjectName", where "hostname" and "port" 387 identify the machine and port on which the RMI registry is running, 388 respectively, and "remoteObjectName" is the string name of the remote 389 object. "hostname", "port", and the prefix, "rmi:", are optional. If 390 "hostname" is not specified, it defaults to the local host. If 391 "port" is not specified, it defaults to 1099. If "remoteObjectName" 392 is not specified, then the object being named is the RMI registry 393 itself. See [RMI] for details. 394 395 396 397 398 399 400 Ryan, et al. Informational [Page 7] 401 403 RFC 2713 Schema for Java Objects October 1999 404 405 406 RMI can be supported using different protocols: the Java Remote 407 Method Protocol (JRMP) and the Internet Inter-ORB Protocol (IIOP). 408 The JRMP is a specialized protocol designed for RMI; the IIOP is the 409 standard protocol for communication between CORBA objects [CORBA]. 410 RMI over IIOP allows Java remote objects to communicate with CORBA 411 objects which might be written in a non-Java programming language 412 [RMI-IIOP]. 413 414 2.5.1 Representation in the Directory 415 416 Remote objects that use the IIOP are represented in the directory as 417 CORBA object references [CORBA-LDAP]. Remote objects that use the 418 JRMP are represented in the directory in one of two ways: as a 419 marshalled object, or as a JNDI reference. 420 421 A marshalled object records the codebases of the remote object's stub 422 and any serializable or remote objects that it references, and 423 replaces remote objects with their stubs. To store a Remote object 424 as a marshalled object (java.rmi.MarshalledObject), you first create 425 a java.rmi.MarshalledObject instance for it. 426 427 java.rmi.Remote robj = ...; 428 java.rmi.MarshalledObject mobj = 429 new java.rmi.MarshalledObject(robj); 430 431 You can then store the MarshalledObject instance as a 432 javaMarshalledObject. The javaClassName attribute should contain the 433 fully qualified name of the distinguished class of the remote object. 434 The javaClassNames attribute should contain the names of the classes 435 and interfaces of the remote object. To read the remote object back 436 from the directory, first deserialize the contents of the 437 javaSerializedData to get a MarshalledObject (mobj), then retrieve it 438 from the MarshalledObject as follows: 439 440 java.rmi.Remote robj = (java.rmi.Remote)mobj.get(); 441 442 This returns the remote stub, which you can then use to invoke remote 443 methods. 444 445 MarshalledObject is available only on the Java 2 Platform, Standard 446 Edition, v1.2 and higher releases. Therefore, a remote object stored 447 as a MarshalledObject can only be read by clients using the the Java 448 2 Platform, Standard Edition, v1.2 or higher releases. 449 450 451 452 453 454 455 456 457 Ryan, et al. Informational [Page 8] 458 460 RFC 2713 Schema for Java Objects October 1999 461 462 463 To store a remote object as a JNDI reference, you first create a 464 javax.naming.Reference object instance for it using the remote 465 object's string name as it has been, or will be, recorded with the 466 RMI registry, with the additional restriction that the "rmi:" prefix 467 must be present. Here's an example: 468 469 javax.naming.Reference ref = new javax.naming.Reference( 470 obj.getClass().getName(), 471 new javax.naming.StringRefAddr("URL", 472 "rmi://rserver/AppRemoteObjectX")); 473 474 You then store the javax.naming.Reference instance as a 475 javaNamingReference. The advantage of using a JNDI reference is that 476 this can be done without a reference to the remote object. In fact, 477 the remote object does not have to exist at the time that this 478 recording in the directory is made. The remote object needs to exist 479 and be bound with the RMI registry when the object is looked up from 480 the directory. 481 482 2.6 Serialized Objects Vs. Marshalled Objects Vs. References 483 484 The object classes defined in this document store different aspects 485 of the Java objects. 486 487 A javaSerializedObject or a serializable object stored as a 488 javaMarshalledObject represents the object itself, while a 489 javaNamingReference or a remote object stored as a 490 javaMarshalledObject represents a "pointer" to the object. 491 492 When storing a serializable object in the directory, you have a 493 choice of storing it as a javaSerializedObject or a 494 javaMarshalledObject. The javaSerializedObject object class provides 495 the basic way in which to store serializable objects. When you create 496 an LDAP entry using the javaSerializableObject object class, you must 497 explicitly set the javaCodebase attribute if you want readers of that 498 entry to know where to load the class definitions of the object. When 499 you create an LDAP entry using the javaMarshalledObject object class, 500 you use the MarshalledObject class. The MarshalledObject class uses 501 the RMI infrastructure available on the Java platform to automate how 502 codebase information is gathered and recorded, thus freeing you from 503 having to set the javaCodebase attribute. On the other hand, the 504 javaCodebase attribute is human-readable and can be updated easily by 505 using text-based tools without having to change other parts of the 506 entry. This allows you, for instance, to move the class definitions 507 to another location and then update the javaCodebase attribute to 508 reflect the move without having to update the serialized object 509 itself. 510 511 512 513 514 Ryan, et al. Informational [Page 9] 515 517 RFC 2713 Schema for Java Objects October 1999 518 519 520 A javaNamingReference provides a way of recording address information 521 about an object which itself is not directly stored in the directory. 522 A remote object stored as a javaMarshalledObject also records address 523 information (the object's "stub") of an object which itself is not 524 directory stored in the directory. In other words, you can think of 525 these as compact representations of the information required to 526 access the object. 527 528 A javaNamingReference typically consists of a small number of human- 529 readable strings. Standard text-based tools for directory 530 administration may therefore be used to add, read, or modify 531 reference entries -- if so desired -- quite easily. Serialized and 532 marshalled objects are not intended to be read or manipulated 533 directly by humans. 534 535 3 Attribute Type Definitions 536 537 The following attribute types are defined in this document: 538 539 javaClassName 540 javaClassNames 541 javaCodebase 542 javaSerializedData 543 javaFactory 544 javaReferenceAddress 545 javaDoc 546 547 3.1 javaClassName 548 549 This attribute stores the fully qualified name of the Java object's 550 "distinguished" class or interface (for example, "java.lang.String"). 551 It is a single-valued attribute. This attribute's syntax is ' 552 Directory String' and its case is significant. 553 554 ( 1.3.6.1.4.1.42.2.27.4.1.6 555 NAME 'javaClassName' 556 DESC 'Fully qualified name of distinguished Java class or 557 interface' 558 EQUALITY caseExactMatch 559 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 560 SINGLE-VALUE 561 ) 562 563 564 565 566 567 568 569 570 571 Ryan, et al. Informational [Page 10] 572 574 RFC 2713 Schema for Java Objects October 1999 575 576 577 3.2 javaCodebase 578 579 This attribute stores the Java class definition's locations. It 580 specifies the locations from which to load the class definition for 581 the class specified by the javaClassName attribute. Each value of 582 the attribute contains an ordered list of URLs, separated by spaces. 583 For example, a value of "url1 url2 url3" means that the three 584 (possibly interdependent) URLs (url1, url2, and url3) form the 585 codebase for loading in the Java class definition. 586 587 If the javaCodebase attribute contains more than one value, each 588 value is an independent codebase. That is, there is no relationship 589 between the URLs in one value and those in another; each value can be 590 viewed as an alternate source for loading the Java class definition. 591 See [Java] for information regarding class loading. 592 593 This attribute's syntax is 'IA5 String' and its case is significant. 594 595 ( 1.3.6.1.4.1.42.2.27.4.1.7 596 NAME 'javaCodebase' 597 DESC 'URL(s) specifying the location of class definition' 598 EQUALITY caseExactIA5Match 599 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 600 ) 601 602 3.3 javaClassNames 603 604 This attribute stores the Java object's fully qualified class or 605 interface names (for example, "java.lang.String"). It is a 606 multivalued attribute. When more than one value is present, each is 607 the name of a class or interface, or ancestor class or interface, of 608 this object. 609 610 This attribute's syntax is 'Directory String' and its case is 611 significant. 612 613 ( 1.3.6.1.4.1.42.2.27.4.1.13 614 NAME 'javaClassNames' 615 DESC 'Fully qualified Java class or interface name' 616 EQUALITY caseExactMatch 617 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 618 ) 619 620 621 622 623 624 625 626 627 628 Ryan, et al. Informational [Page 11] 629 631 RFC 2713 Schema for Java Objects October 1999 632 633 634 3.4 javaSerializedData 635 636 This attribute stores the serialized form of a Java object. The 637 serialized form is described in [Serial]. 638 639 This attribute's syntax is 'Octet String'. 640 641 ( 1.3.6.1.4.1.42.2.27.4.1.8 642 NAME 'javaSerializedData 643 DESC 'Serialized form of a Java object' 644 SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 645 SINGLE-VALUE 646 ) 647 648 3.5 javaFactory 649 650 This attribute stores the fully qualified class name of the object 651 factory (for example, "com.wiz.jndi.WizObjectFactory") that can be 652 used to create an instance of the object identified by the 653 javaClassName attribute. 654 655 This attribute's syntax is 'Directory String' and its case is 656 significant. 657 658 ( 1.3.6.1.4.1.42.2.27.4.1.10 659 NAME 'javaFactory' 660 DESC 'Fully qualified Java class name of a JNDI object factory' 661 EQUALITY caseExactMatch 662 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 663 SINGLE-VALUE 664 ) 665 666 3.6 javaReferenceAddress 667 668 This attribute represents the sequence of addresses of a JNDI 669 reference. Each of its values represents one address, a Java object 670 of type javax.naming.RefAddr. Its value is a concatenation of the 671 address type and address contents, preceded by a sequence number (the 672 order of addresses in a JNDI reference is significant). For example: 673 674 #0#TypeA#ValA 675 #1#TypeB#ValB 676 #2#TypeC##rO0ABXNyABpq... 677 678 In more detail, the value is encoded as follows: 679 680 681 682 683 684 685 Ryan, et al. Informational [Page 12] 686 688 RFC 2713 Schema for Java Objects October 1999 689 690 691 The delimiter is the first character of the value. For readability 692 the character '#' is recommended when it is not otherwise used 693 anywhere in the value, but any character may be used subject to 694 restrictions given below. 695 696 The first delimiter is followed by the sequence number. The sequence 697 number of an address is its position in the JNDI reference, with the 698 first address being numbered 0. It is represented by its shortest 699 string form, in decimal notation. 700 701 The sequence number is followed by a delimiter, then by the address 702 type, and then by another delimiter. If the address is of Java class 703 javax.naming.StringRefAddr, then this delimiter is followed by the 704 value of the address contents (which is a string). Otherwise, this 705 delimiter is followed immediately by another delimiter, and then by 706 the Base64 encoding of the serialized form of the entire address. 707 708 The delimiter may be any character other than a digit or a character 709 contained in the address type. In addition, if the address contents 710 is a string, the delimiter may not be the first character of that 711 string. 712 713 This attribute's syntax is 'Directory String' and its case is 714 significant. It can contain multiple values. 715 716 ( 1.3.6.1.4.1.42.2.27.4.1.11 717 NAME 'javaReferenceAddress' 718 DESC 'Addresses associated with a JNDI Reference' 719 EQUALITY caseExactMatch 720 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 721 ) 722 723 3.7 javaDoc 724 725 This attribute stores a pointer to the Java documentation for the 726 class. It's value is a URL. For example, the following URL points to 727 the specification of the java.lang.String class: 728 http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html 729 730 This attribute's syntax is 'IA5 String' and its case is significant. 731 732 ( 1.3.6.1.4.1.42.2.27.4.1.12 733 NAME 'javaDoc' 734 DESC 'The Java documentation for the class' 735 EQUALITY caseExactIA5Match 736 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 737 ) 738 739 740 741 742 Ryan, et al. Informational [Page 13] 743 745 RFC 2713 Schema for Java Objects October 1999 746 747 748 4 Object Class Definitions 749 750 The following object classes are defined in this document: 751 752 javaContainer 753 javaObject 754 javaSerializedObject 755 javaMarshalledObject 756 javaNamingReference 757 758 4.1 javaContainer 759 760 This structural object class represents a container for a Java 761 object. 762 763 ( 1.3.6.1.4.1.42.2.27.4.2.1 764 NAME 'javaContainer' 765 DESC 'Container for a Java object' 766 SUP top 767 STRUCTURAL 768 MUST ( cn ) 769 ) 770 771 4.2 javaObject 772 773 This abstract object class represents a Java object. A javaObject 774 cannot exist in the directory; only auxiliary or structural 775 subclasses of it can exist in the directory. 776 777 ( 1.3.6.1.4.1.42.2.27.4.2.4 778 NAME 'javaObject' 779 DESC 'Java object representation' 780 SUP top 781 ABSTRACT 782 MUST ( javaClassName ) 783 MAY ( javaClassNames $ 784 javaCodebase $ 785 javaDoc $ 786 description ) 787 ) 788 789 790 791 792 793 794 795 796 797 798 799 Ryan, et al. Informational [Page 14] 800 802 RFC 2713 Schema for Java Objects October 1999 803 804 805 4.3 javaSerializedObject 806 807 This auxiliary object class represents a Java serialized object. It 808 must be mixed in with a structural object class. 809 810 ( 1.3.6.1.4.1.42.2.27.4.2.5 811 NAME 'javaSerializedObject' 812 DESC 'Java serialized object' 813 SUP javaObject 814 AUXILIARY 815 MUST ( javaSerializedData ) 816 ) 817 818 4.4 javaMarshalledObject 819 820 This auxiliary object class represents a Java marshalled object. It 821 must be mixed in with a structural object class. 822 823 ( 1.3.6.1.4.1.42.2.27.4.2.8 824 NAME 'javaMarshalledObject' 825 DESC 'Java marshalled object' 826 SUP javaObject 827 AUXILIARY 828 MUST ( javaSerializedData ) 829 ) 830 831 4.5 javaNamingReference 832 833 This auxiliary object class represents a JNDI reference. It must be 834 mixed in with a structural object class. 835 836 ( 1.3.6.1.4.1.42.2.27.4.2.7 837 NAME 'javaNamingReference' 838 DESC 'JNDI reference' 839 SUP javaObject 840 AUXILIARY 841 MAY ( javaReferenceAddress $ 842 javaFactory ) 843 ) 844 845 846 847 848 849 850 851 852 853 854 855 856 Ryan, et al. Informational [Page 15] 857 859 RFC 2713 Schema for Java Objects October 1999 860 861 862 5. Security Considerations 863 864 Serializing an object and storing it into the directory enables (a 865 copy of) the object to be examined and used outside the environment 866 in which it was originally created. The directory entry containing 867 the serialized object could be read and modified within the 868 constraints imposed by the access control mechanisms of the 869 directory. If an object contains sensitive information or 870 information that could be misused outside of the context in which it 871 was created, the object should not be stored in the directory. For 872 more details on security issues relating to serialization in general, 873 see [Serial]. 874 875 6. Acknowledgements 876 877 We would like to thank Joseph Fialli, Peter Jones, Roger Riggs, Bob 878 Scheifler, and Ann Wollrath of Sun Microsystems for their comments 879 and suggestions. 880 881 7. References 882 883 [CORBA] The Object Management Group, "Common Object Request 884 Broker Architecture Specification 2.0," 885 http://www.omg.org 886 887 [CORBA-LDAP] Ryan, V., Lee, R. and S. Seligman, "Schema for 888 Representing CORBA Object References in an LDAP 889 Directory", RFC 2714, October 1999. 890 891 [Java] Ken Arnold and James Gosling, "The Java(tm) Programming 892 Language," Second Edition, ISBN 0-201-31006-6. 893 894 [JNDI] Java Software, Sun Microsystems, Inc., "The Java(tm) 895 Naming and Directory Interface (tm) Specification," 896 February 1998. http://java.sun.com/products/jndi/ 897 898 [LDAPv3] Wahl, M., Howes, T. and S. Kille, "Lightweight 899 Directory Access Protocol (v3)", RFC 2251, December 900 1997. 901 902 [RMI] Java Software, Sun Microsystems, Inc., "Remote Method 903 Invocation," November 1998. 904 http://java.sun.com/products/jdk/1.2/docs/guide/rmi 905 906 907 908 909 910 911 912 913 Ryan, et al. Informational [Page 16] 914 916 RFC 2713 Schema for Java Objects October 1999 917 918 919 [RMI-IIOP] IBM and Java Software, Sun Microsystems, Inc., "RMI over 920 IIOP", June 1999. 921 http://java.sun.com/products/rmi-iiop/ 922 923 [Serial] Java Software, Sun Microsystems, Inc., "Object 924 Serialization Specification," November 1998. 925 http://java.sun.com/products/jdk/1.2/docs/guide/ 926 serialization 927 928 [v3Schema] Wahl, M., "A Summary of the X.500(96) User Schema for 929 use with LDAPv3", RFC 2256, December 1997. 930 931 8. Authors' Addresses 932 933 Vincent Ryan 934 Sun Microsystems, Inc. 935 Mail Stop EDUB03 936 901 San Antonio Road 937 Palo Alto, CA 94303 938 USA 939 940 Phone: +353 1 819 9151 941 EMail: vincent.ryan (a] ireland.sun.com 942 943 944 Scott Seligman 945 Sun Microsystems, Inc. 946 Mail Stop UCUP02-209 947 901 San Antonio Road 948 Palo Alto, CA 94303 949 USA 950 951 Phone: +1 408 863 3222 952 EMail: scott.seligman (a] eng.sun.com 953 954 955 Rosanna Lee 956 Sun Microsystems, Inc. 957 Mail Stop UCUP02-206 958 901 San Antonio Road 959 Palo Alto, CA 94303 960 USA 961 962 Phone: +1 408 863 3221 963 EMail: rosanna.lee (a] eng.sun.com 964 965 966 967 968 969 970 Ryan, et al. Informational [Page 17] 971 973 RFC 2713 Schema for Java Objects October 1999 974 975 976 Appendix - LDAP Schema 977 978 -- Attribute types -- 979 980 ( 1.3.6.1.4.1.42.2.27.4.1.6 981 NAME 'javaClassName' 982 DESC 'Fully qualified name of distinguished Java class or interface' 983 EQUALITY caseExactMatch 984 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 985 SINGLE-VALUE 986 ) 987 988 ( 1.3.6.1.4.1.42.2.27.4.1.7 989 NAME 'javaCodebase' 990 DESC 'URL(s) specifying the location of class definition' 991 EQUALITY caseExactIA5Match 992 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 993 ) 994 995 ( 1.3.6.1.4.1.42.2.27.4.1.8 996 NAME 'javaSerializedData' 997 DESC 'Serialized form of a Java object' 998 SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 999 SINGLE-VALUE 1000 ) 1001 1002 ( 1.3.6.1.4.1.42.2.27.4.1.10 1003 NAME 'javaFactory' 1004 DESC 'Fully qualified Java class name of a JNDI object factory' 1005 EQUALITY caseExactMatch 1006 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 1007 SINGLE-VALUE 1008 ) 1009 1010 ( 1.3.6.1.4.1.42.2.27.4.1.11 1011 NAME 'javaReferenceAddress' 1012 DESC 'Addresses associated with a JNDI Reference' 1013 EQUALITY caseExactMatch 1014 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 1015 ) 1016 1017 ( 1.3.6.1.4.1.42.2.27.4.1.12 1018 NAME 'javaDoc' 1019 DESC 'The Java documentation for the class' 1020 EQUALITY caseExactIA5Match 1021 SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 1022 ) 1023 1024 1025 1026 1027 Ryan, et al. Informational [Page 18] 1028 1030 RFC 2713 Schema for Java Objects October 1999 1031 1032 1033 ( 1.3.6.1.4.1.42.2.27.4.1.13 1034 NAME 'javaClassNames' 1035 DESC 'Fully qualified Java class or interface name' 1036 EQUALITY caseExactMatch 1037 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 1038 ) 1039 1040 -- from RFC-2256 -- 1041 1042 ( 2.5.4.13 1043 NAME 'description' 1044 EQUALITY caseIgnoreMatch 1045 SUBSTR caseIgnoreSubstringsMatch 1046 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{1024} 1047 ) 1048 1049 -- Object classes -- 1050 1051 ( 1.3.6.1.4.1.42.2.27.4.2.1 1052 NAME 'javaContainer' 1053 DESC 'Container for a Java object' 1054 SUP top 1055 STRUCTURAL 1056 MUST ( cn ) 1057 ) 1058 1059 ( 1.3.6.1.4.1.42.2.27.4.2.4 1060 NAME 'javaObject' 1061 DESC 'Java object representation' 1062 SUP top 1063 ABSTRACT 1064 MUST ( javaClassName ) 1065 MAY ( javaClassNames $ javaCodebase $ javaDoc $ description ) 1066 ) 1067 1068 ( 1.3.6.1.4.1.42.2.27.4.2.5 1069 NAME 'javaSerializedObject' 1070 DESC 'Java serialized object' 1071 SUP javaObject 1072 AUXILIARY 1073 MUST ( javaSerializedData ) 1074 ) 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 Ryan, et al. Informational [Page 19] 1085 1087 RFC 2713 Schema for Java Objects October 1999 1088 1089 1090 ( 1.3.6.1.4.1.42.2.27.4.2.7 1091 NAME 'javaNamingReference' 1092 DESC 'JNDI reference' 1093 SUP javaObject 1094 AUXILIARY 1095 MAY ( javaReferenceAddress $ javaFactory ) 1096 ) 1097 1098 ( 1.3.6.1.4.1.42.2.27.4.2.8 1099 NAME 'javaMarshalledObject' 1100 DESC 'Java marshalled object' 1101 SUP javaObject 1102 AUXILIARY 1103 MUST ( javaSerializedData ) 1104 ) 1105 1106 -- Matching rule from ISO X.520 -- 1107 1108 ( 2.5.13.5 1109 NAME 'caseExactMatch' 1110 SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 1111 ) 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 Ryan, et al. Informational [Page 20] 1142 1144 RFC 2713 Schema for Java Objects October 1999 1145 1146 1147 Full Copyright Statement 1148 1149 Copyright (C) The Internet Society (1999). All Rights Reserved. 1150 1151 This document and translations of it may be copied and furnished to 1152 others, and derivative works that comment on or otherwise explain it 1153 or assist in its implementation may be prepared, copied, published 1154 and distributed, in whole or in part, without restriction of any 1155 kind, provided that the above copyright notice and this paragraph are 1156 included on all such copies and derivative works. However, this 1157 document itself may not be modified in any way, such as by removing 1158 the copyright notice or references to the Internet Society or other 1159 Internet organizations, except as needed for the purpose of 1160 developing Internet standards in which case the procedures for 1161 copyrights defined in the Internet Standards process must be 1162 followed, or as required to translate it into languages other than 1163 English. 1164 1165 The limited permissions granted above are perpetual and will not be 1166 revoked by the Internet Society or its successors or assigns. 1167 1168 This document and the information contained herein is provided on an 1169 "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING 1170 TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING 1171 BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION 1172 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF 1173 MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1174 1175 Acknowledgement 1176 1177 Funding for the RFC Editor function is currently provided by the 1178 Internet Society. 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 Ryan, et al. Informational [Page 21] 1199 1201