Apple OS X manual Search Policies and Search Nodes, Record Types

Page 12

C H A P T E R 1

Concepts

Note: An Open Directory plug-in is not required to return information that conforms exactly to the information that the directory service maintains. A plug-in can generate information “on the fly.” In addition, a plug-in may not return information about certain nodes; the plug-in's behavior in this respect can be configurable.

Search Policies and Search Nodes

A search policy defines the locations that are to be searched and the order in which those locations are searched in order to get certain kinds of information. The first location that a search policy defines must be the local NetInfo database.

Search nodes implement search policies, which are configured by administrators through the Directory Access application. Search nodes are easy for Open Directory applications to find and are guaranteed to always be available.

There are four search node types:

authentication search node — Use this search node when you are looking for information that is needed to authenticate a user. Use the pattern matching constant eDSAuthenticationSearchNodeName to locate the authentication search node. Examples of applications that use the authentication search node include the login window and applications that set System Preferences. The authentication search node is also used indirectly by all UNIX commands that use lookupd.

contacts search node — Use this search node when you are looking for contact information, such as an e-mail address, a telephone number, or a street address. Use the pattern matching constant eDSContactsSearchNodeName to locate the contacts search node. Mail.app and Address Book use the contacts search node to look up e-mail addresses and other types of contact information.

network search node — Use this search node, which consolidates all of the nodes that are local to a machine for service discovery purposes, to find services on the local network. When third-party Open Directory plug-ins are loaded, they register their nodes with Open Directory so they can be found by the network search node. Use the pattern matching constant eDSNetworkSearchNodeName to locate the network search node.

locally hosted nodes — Use a locally hosted node to find NetInfo domains stored on this machine (that is, the local domain plus any shared domains that are running locally). Locally hosted nodes are a class of nodes that have a special pattern match. Use the pattern matching constant eDSLocalHostedNodes to locate locally hosted nodes.

When an Open Directory client application uses a search node to search for information, it can request the fully qualified path for any record that matches a specific search criteria. As a result, Open Directory can perform extremely precise searches and a high degree of control over the type of information that is returned.

Record Types

Apple Computer has defined a series of standard record types. The standard record types include but are not limited to user records, group records, machine records, and printer records.

Providers of services can define their own record types (known as native record types) and are encouraged to publish information about them. Developers are encouraged to use Apple’s standard record types whenever possible.

12Open Directory Overview

2007-01-08 © 2007 Apple Inc. All Rights Reserved.

Image 12
Contents Open Directory Programming Guide Apple Inc Contents N T E N T S Figures, Tables, and Listings G U R E S , T a B L E S , a N D L I S T I N G S Organization of This Document See AlsoIntroduction See Also Concepts Open Directory OverviewNodes 1Flow of an Open Directory request2An Open Directory request over a network Search Policies and Search Nodes Record TypesConstant Description Standard Attribute Types Standard attribute for storing a unique ID commonly foundAuthentication Native Attribute TypesBasic Authentication Open Directory Overview Local Windows Hash Authentication Local Cached User Authentication Disabled User Authentication Directory Native Authentication Directory ProxyOpen Directory, lookupd, and NetInfo 3lookupd and NetInfo interaction when using SSH Directory Service Command Line Utility DebuggingWorking with Nodes Listing Registered NodesWorking with Nodes Finding a Node Opening and Closing a Node Authenticating a User to a Node Directory Native Authentication Authenticating using directory native authenticationWorking with Nodes Working with Nodes Authenticating a User to a Node Working with Records Listing RecordsListing Records Getting Information About a Record’s Attribute Working with RecordsGetting Information About a Record’s Attribute Setting the Name of a Record Working with Records Listing 3-3Setting the name of a record Creating a Record and Adding an Attribute Void CreateRecord const tDirNodeReference inDirNodeRef Deleting a Record Working with Records Document Revision History Document Revision History
Related manuals
Manual 32 pages 7.58 Kb