]> git.sur5r.net Git - openldap/blob - doc/man/man5/slapo-rwm.5
ITS#5189 add note about db_stat and slapd needing to be run when using quick mode.
[openldap] / doc / man / man5 / slapo-rwm.5
1 .TH SLAPO-RWM 5 "RELEASEDATE" "OpenLDAP LDVERSION"
2 .\" Copyright 1998-2007 The OpenLDAP Foundation, All Rights Reserved.
3 .\" Copying restrictions apply.  See the COPYRIGHT file.
4 .\" Copyright 2004, Pierangelo Masarati, All rights reserved. <ando@sys-net.it>
5 .\" $OpenLDAP$
6 .\"
7 .\" Portions of this document should probably be moved to slapd-ldap(5)
8 .\" and maybe manual pages for librewrite.
9 .\"
10 .SH NAME
11 slapo-rwm \- rewrite/remap overlay to slapd
12 .SH SYNOPSIS
13 ETCDIR/slapd.conf
14 .SH DESCRIPTION
15 The
16 .B rwm
17 overlay to
18 .BR slapd (8)
19 performs basic DN/data rewrite and objectClass/attributeType mapping.
20 Its usage is mostly intended to provide virtual views of existing data
21 either remotely, in conjunction with the proxy backend described in
22 .BR slapd-ldap (5),
23 or locally, in conjunction with the relay backend described in
24 .BR slapd-relay (5).
25 .LP
26 This overlay is experimental.
27 .SH MAPPING
28 An important feature of the
29 .B rwm
30 overlay is the capability to map objectClasses and attributeTypes
31 from the local set (or a subset of it) to a foreign set, and vice versa.
32 This is accomplished by means of the 
33 .B rwm-map
34 directive.
35 .TP
36 .B rwm-map "{attribute | objectclass} [<local name> | *] {<foreign name> | *}"
37 Map attributeTypes and objectClasses from the foreign server to
38 different values on the local slapd.
39 The reason is that some attributes might not be part of the local
40 slapd's schema, some attribute names might be different but serve the
41 same purpose, etc.
42 If local or foreign name is `*', the name is preserved.
43 If local name is omitted, the foreign name is removed.
44 Unmapped names are preserved if both local and foreign name are `*',
45 and removed if local name is omitted and foreign name is `*'.
46 .LP
47 The local 
48 .I objectClasses 
49 and 
50 .I attributeTypes 
51 must be defined in the local schema; the foreign ones do not have to,
52 but users are encouraged to explicitly define the remote attributeTypes
53 and the objectClasses they intend to map.  All in all, when remapping
54 a remote server via back-ldap (\fBslapd-ldap\fP(5)) 
55 or back-meta (\fBslapd-meta\fP(5))
56 their definition can be easily obtained by querying the \fIsubschemaSubentry\fP
57 of the remote server; the problem should not exist when remapping a local 
58 database.
59 Note, however, that the decision whether to rewrite or not attributeTypes
60 with 
61 .IR "distinguishedName syntax" ,
62 requires the knowledge of the attributeType syntax.
63 See the REWRITING section for details.
64 .LP
65 Note that when mapping DN-valued attributes from local to remote,
66 first the DN is rewritten, and then the attributeType is mapped;
67 while mapping from remote to local, first the attributeType is mapped,
68 and then the DN is rewritten.
69 As such, it is important that the local attributeType is appropriately
70 defined as using the distinguishedName syntax.
71 Also, note that there are DN-related syntaxes (i.e. compound types with
72 a portion that is DN-valued), like nameAndOptionalUID,
73 whose values are currently not rewritten.
74 .LP
75 If the foreign type of an attribute mapping is not defined on the local 
76 server, it might be desirable to have the attribute values normalized after
77 the mapping process. Not normalizing the values can lead to wrong results, 
78 when the
79 .B rwm
80 overlay is used together with e.g. the
81 .B pcache
82 overlay. This normalization can be enabled by means of the 
83 .B rwm-normalize-mapped-attrs
84 directive.
85 .TP
86 .B rwm-normalize-mapped-attrs {yes|no}
87 Set this to "yes", if the
88 .B rwm
89 overlay should try to normalize the values of attributes that are mapped from
90 an attribute type that is unknown to the local server. The default value of
91 this setting is "no".
92 .SH SUFFIX MASSAGING
93 A basic feature of the
94 .B rwm
95 overlay is the capability to perform suffix massaging between a virtual
96 and a real naming context by means of the 
97 .B rwm-suffixmassage
98 directive.
99 This, in conjunction with proxy backends,
100 .BR slapd-ldap (5)
101 and
102 .BR slapd-meta (5),
103 or with the relay backend, 
104 .BR slapd-relay (5),
105 allows to create virtual views of databases.
106 A distinguishing feature of this overlay is that, when instantiated
107 before any database, it can modify the DN of requests
108 .I before
109 database selection.
110 For this reason, rules that rewrite the empty DN ("") 
111 or the subschemaSubentry DN (usually "cn=subschema"),
112 would prevent clients from reading the root DSE or the DSA's schema.
113 .TP
114 .B rwm-suffixmassage "[<virtual naming context>]" "<real naming context>"
115 Shortcut to implement naming context rewriting; the trailing part
116 of the DN is rewritten from the virtual to the real naming context
117 in the bindDN, searchDN, searchFilterAttrDN, compareDN, compareAttrDN,
118 addDN, addAttrDN, modifyDN, modifyAttrDN, modrDN, newSuperiorDN,
119 deleteDN, exopPasswdDN, and from the real to the virtual naming context
120 in the searchEntryDN, searchAttrDN and matchedDN rewrite contexts.
121 By default no rewriting occurs for the searchFilter 
122 and for the referralAttrDN and referralDN rewrite contexts.
123 If no \fI<virtual naming context>\fP is given, the first suffix of the
124 database is used; this requires the 
125 .B rwm-suffixmassage
126 directive be defined \fIafter\fP the database
127 .B suffix
128 directive.
129 The
130 .B rwm-suffixmassage
131 directive automatically sets the
132 .B rwm-rewriteEngine
133 to
134 .BR ON .
135 .LP
136 See the REWRITING section for details.
137 .SH REWRITING
138 A string is rewritten according to a set of rules, called a `rewrite
139 context'.
140 The rules are based on POSIX (''extended'') regular expressions with
141 substring matching; basic variable substitution and map resolution 
142 of substrings is allowed by specific mechanisms detailed in the following.
143 The behavior of pattern matching/substitution can be altered by a set
144 of flags.
145 .LP
146 .RS
147 .nf
148 <rewrite context> ::= <rewrite rule> [...]
149 <rewrite rule> ::= <pattern> <action> [<flags>]
150 .fi
151 .RE
152 .LP
153 The underlying concept is to build a lightweight rewrite module
154 for the slapd server (initially dedicated to the LDAP backend):
155 .LP
156 .SH Passes
157 An incoming string is matched against a set of
158 .IR rewriteRules .
159 Rules are made of a 
160 .IR "regex match pattern" , 
161
162 .I "substitution pattern"
163 and a set of actions, described by a set of 
164 .IR "optional flags" .
165 In case of match, string rewriting is performed according to the
166 substitution pattern that allows to refer to substrings matched in the
167 incoming string.
168 The actions, if any, are finally performed.
169 Each rule is executed recursively, unless altered by specific action 
170 flags; see "Action Flags" for details.
171 A default limit on the recursion level is set, and can be altered
172 by the
173 .B rwm-rewriteMaxPasses
174 directive, as detailed in the "Additional Configuration Syntax" section.
175 The substitution pattern allows map resolution of substrings.
176 A map is a generic object that maps a substitution pattern to a value.
177 The flags are divided in "Pattern Matching Flags" and "Action Flags";
178 the former alter the regex match pattern behavior, while the latter
179 alter the actions that are taken after substitution.
180 .SH "Pattern Matching Flags"
181 .TP
182 .B `C'
183 honors case in matching (default is case insensitive)
184 .TP
185 .B `R'
186 use POSIX ''basic'' regular expressions (default is ''extended'')
187 .TP
188 .B `M{n}'
189 allow no more than
190 .B n
191 recursive passes for a specific rule; does not alter the max total count
192 of passes, so it can only enforce a stricter limit for a specific rule.
193 .SH "Action Flags"
194 .TP
195 .B `:'
196 apply the rule once only (default is recursive)
197 .TP
198 .B `@'
199 stop applying rules in case of match; the current rule is still applied 
200 recursively; combine with `:' to apply the current rule only once 
201 and then stop.
202 .TP
203 .B `#'
204 stop current operation if the rule matches, and issue an `unwilling to
205 perform' error.
206 .TP
207 .B `G{n}'
208 jump
209 .B n
210 rules back and forth (watch for loops!).
211 Note that `G{1}' is implicit in every rule.
212 .TP
213 .B `I'
214 ignores errors in rule; this means, in case of error, e.g. issued by a
215 map, the error is treated as a missed match.
216 The `unwilling to perform' is not overridden.
217 .TP
218 .B `U{n}'
219 uses
220 .B
221 n
222 as return code if the rule matches; the flag does not alter the recursive
223 behavior of the rule, so, to have it performed only once, it must be used 
224 in combination with `:', e.g.
225 .B `:U{32}'
226 returns the value `32' (indicating noSuchObject) after exactly 
227 one execution of the rule, if the pattern matches.
228 As a consequence, its behavior is equivalent to `@', with the return
229 code set to
230 .BR n ;
231 or, in other words, `@' is equivalent to `U{0}'.
232 Positive errors are allowed, indicating the related LDAP error codes
233 as specified in \fIdraft-ietf-ldapbis-protocol\fP.
234 .LP
235 The ordering of the flags can be significant.
236 For instance: `IG{2}' means ignore errors and jump two lines ahead
237 both in case of match and in case of error, while `G{2}I' means ignore
238 errors, but jump two lines ahead only in case of match.
239 .LP
240 More flags (mainly Action Flags) will be added as needed.
241 .SH "Pattern Matching"
242 See
243 .BR regex (7)
244 and/or
245 .BR re_format (7).
246 .SH "Substitution Pattern Syntax"
247 Everything starting with `$' requires substitution;
248 .LP
249 the only obvious exception is `$$', which is turned into a single `$';
250 .LP
251 the basic substitution is `$<d>', where `<d>' is a digit;
252 0 means the whole string, while 1-9 is a submatch, as discussed in 
253 .BR regex (7)
254 and/or
255 .BR re_format (7).
256 .LP
257 a `$' followed by a `{' invokes an advanced substitution.
258 The pattern is:
259 .LP
260 .RS
261 `$' `{' [ <operator> ] <name> `(' <substitution> `)' `}'
262 .RE
263 .LP
264 where <name> must be a legal name for the map, i.e.
265 .LP
266 .RS
267 .nf
268 <name> ::= [a-z][a-z0-9]* (case insensitive)
269 <operator> ::= `>' `|' `&' `&&' `*' `**' `$'
270 .fi
271 .RE
272 .LP
273 and <substitution> must be a legal substitution
274 pattern, with no limits on the nesting level.
275 .LP
276 The operators are:
277 .TP
278 .B >
279 sub-context invocation; <name> must be a legal, already defined
280 rewrite context name
281 .TP
282 .B |
283 external command invocation; <name> must refer to a legal, already
284 defined command name (NOT IMPLEMENTED YET)
285 .TP
286 .B &
287 variable assignment; <name> defines a variable in the running
288 operation structure which can be dereferenced later; operator
289 .B &
290 assigns a variable in the rewrite context scope; operator
291 .B &&
292 assigns a variable that scopes the entire session, e.g. its value
293 can be dereferenced later by other rewrite contexts
294 .TP
295 .B *
296 variable dereferencing; <name> must refer to a variable that is
297 defined and assigned for the running operation; operator
298 .B *
299 dereferences a variable scoping the rewrite context; operator
300 .B **
301 dereferences a variable scoping the whole session, e.g. the value
302 is passed across rewrite contexts
303 .TP
304 .B $
305 parameter dereferencing; <name> must refer to an existing parameter;
306 the idea is to make some run-time parameters set by the system
307 available to the rewrite engine, as the client host name, the bind DN
308 if any, constant parameters initialized at config time, and so on;
309 no parameter is currently set by either 
310 .B back\-ldap
311 or
312 .BR back\-meta ,
313 but constant parameters can be defined in the configuration file
314 by using the
315 .B rewriteParam
316 directive.
317 .LP
318 Substitution escaping has been delegated to the `$' symbol, 
319 which is used instead of `\e' in string substitution patterns
320 because `\e' is already escaped by slapd's low level parsing routines;
321 as a consequence, regex escaping requires
322 two `\e' symbols, e.g. `\fB.*\e.foo\e.bar\fP' must
323 be written as `\fB.*\e\e.foo\e\e.bar\fP'.
324 .\"
325 .\" The symbol can be altered at will by redefining the related macro in
326 .\" "rewrite-int.h".
327 .\"
328 .SH "Rewrite Context"
329 A rewrite context is a set of rules which are applied in sequence.
330 The basic idea is to have an application initialize a rewrite
331 engine (think of Apache's mod_rewrite ...) with a set of rewrite
332 contexts; when string rewriting is required, one invokes the
333 appropriate rewrite context with the input string and obtains the
334 newly rewritten one if no errors occur.
335 .LP
336 Each basic server operation is associated to a rewrite context;
337 they are divided in two main groups: client \-> server and
338 server \-> client rewriting.
339 .LP
340 client -> server:
341 .LP
342 .RS
343 .nf
344 (default)            if defined and no specific context 
345                      is available
346 bindDN               bind
347 searchDN             search
348 searchFilter         search
349 searchFilterAttrDN   search
350 compareDN            compare
351 compareAttrDN        compare AVA
352 addDN                add
353 addAttrDN            add AVA (DN portion of "ref" excluded)
354 modifyDN             modify
355 modifyAttrDN         modify AVA (DN portion of "ref" excluded)
356 referralAttrDN       add/modify DN portion of referrals
357                      (default to none)
358 modrDN               modrdn
359 newSuperiorDN        modrdn
360 deleteDN             delete
361 exopPasswdDN         password modify extended operation DN
362 .fi
363 .RE
364 .LP
365 server -> client:
366 .LP
367 .RS
368 .nf
369 searchEntryDN        search (only if defined; no default;
370                      acts on DN of search entries)
371 searchAttrDN         search AVA (only if defined; defaults
372                      to searchEntryDN; acts on DN-syntax
373                      attributes of search results)
374 matchedDN            all ops (only if applicable; defaults
375                      to searchEntryDN)
376 referralDN           all ops (only if applicable; defaults
377                      to none)
378 .fi
379 .RE
380 .LP
381 .SH "Basic Configuration Syntax"
382 All rewrite/remap directives start with the prefix
383 .BR rwm- ;
384 for backwards compatibility with the historical
385 .BR slapd-ldap (5)
386 and
387 .BR slapd-meta (5)
388 builtin rewrite/remap capabilities, the prefix may be omitted, 
389 but this practice is strongly discouraged.
390 .TP
391 .B rwm-rewriteEngine { on | off }
392 If `on', the requested rewriting is performed; if `off', no
393 rewriting takes place (an easy way to stop rewriting without
394 altering too much the configuration file).
395 .TP
396 .B rwm-rewriteContext <context name> "[ alias <aliased context name> ]"
397 <Context name> is the name that identifies the context, i.e. the name
398 used by the application to refer to the set of rules it contains.
399 It is used also to reference sub contexts in string rewriting.
400 A context may alias another one.
401 In this case the alias context contains no rule, and any reference to
402 it will result in accessing the aliased one.
403 .TP
404 .B rwm-rewriteRule "<regex match pattern>" "<substitution pattern>" "[ <flags> ]"
405 Determines how a string can be rewritten if a pattern is matched.
406 Examples are reported below.
407 .SH "Additional Configuration Syntax"
408 .TP
409 .B rwm-rewriteMap "<map type>" "<map name>" "[ <map attrs> ]"
410 Allows to define a map that transforms substring rewriting into
411 something else.
412 The map is referenced inside the substitution pattern of a rule.
413 .TP
414 .B rwm-rewriteParam <param name> <param value>
415 Sets a value with global scope, that can be dereferenced by the
416 command `${$paramName}'.
417 .TP
418 .B rwm-rewriteMaxPasses <number of passes> [<number of passes per rule>]
419 Sets the maximum number of total rewriting passes that can be
420 performed in a single rewrite operation (to avoid loops).
421 A safe default is set to 100; note that reaching this limit is still
422 treated as a success; recursive invocation of rules is simply 
423 interrupted.
424 The count applies to the rewriting operation as a whole, not 
425 to any single rule; an optional per-rule limit can be set.
426 This limit is overridden by setting specific per-rule limits
427 with the `M{n}' flag.
428
429 .SH "MAPS"
430 Currently, few maps are builtin and there are no provisions for developers
431 to register new map types at runtime.
432
433 Supported maps are:
434 .TP
435 .B LDAP <URI> [bindwhen=<when>] [version=<version>] [binddn=<DN>] [credentials=<cred>]
436 The
437 .B LDAP
438 map expands a value by performing a simple LDAP search.
439 Its configuration is based on a mandatory URI, whose
440 .B attrs
441 portion must contain exactly one attribute
442 (use
443 .B entryDN
444 to fetch the DN of an entry).
445 If a multi-valued attribute is used, only the first value is considered.
446
447 The parameter
448 .B bindwhen
449 determines when the connection is established.
450 It can take the values
451 .BR now ,
452 .BR later ,
453 and
454 .BR everytime ,
455 respectively indicating that the connection should be created at startup,
456 when required, or any time it is used.
457 In the former two cases, the connection is cached, while in the latter
458 a fresh new one is used all times.  This is the default.
459
460 The parameters
461 .B binddn
462 and
463 .B credentials
464 represent the DN and the password that is used to perform an authenticated
465 simple bind before performing the search operation; if not given,
466 an anonymous connection is used.
467
468 The parameter
469 .B version
470 can be 2 or 3 to indicate the protocol version that must be used.
471 The default is 3.
472
473 .SH "REWRITE CONFIGURATION EXAMPLES"
474 .nf
475 # set to `off' to disable rewriting
476 rwm-rewriteEngine on
477
478 # the rules the "suffixmassage" directive implies
479 rwm-rewriteEngine on
480 # all dataflow from client to server referring to DNs
481 rwm-rewriteContext default
482 rwm-rewriteRule "(.+,)?<virtualnamingcontext>$" "$1<realnamingcontext>" ":"
483 # empty filter rule
484 rwm-rewriteContext searchFilter
485 # all dataflow from server to client
486 rwm-rewriteContext searchEntryDN
487 rwm-rewriteRule "(.+,)?<realnamingcontext>$" "$1<virtualnamingcontext>" ":"
488 rwm-rewriteContext searchAttrDN alias searchEntryDN
489 rwm-rewriteContext matchedDN alias searchEntryDN
490 # misc empty rules
491 rwm-rewriteContext referralAttrDN
492 rwm-rewriteContext referralDN
493
494 # Everything defined here goes into the `default' context.
495 # This rule changes the naming context of anything sent
496 # to `dc=home,dc=net' to `dc=OpenLDAP, dc=org'
497
498 rwm-rewriteRule "(.+,)?dc=home,[ ]?dc=net$"
499             "$1dc=OpenLDAP, dc=org"  ":"
500
501 # since a pretty/normalized DN does not include spaces
502 # after rdn separators, e.g. `,', this rule suffices:
503
504 rwm-rewriteRule "(.+,)?dc=home,dc=net$"
505             "$1dc=OpenLDAP,dc=org"  ":"
506
507 # Start a new context (ends input of the previous one).
508 # This rule adds blanks between DN parts if not present.
509 rwm-rewriteContext  addBlanks
510 rwm-rewriteRule     "(.*),([^ ].*)" "$1, $2"
511
512 # This one eats blanks
513 rwm-rewriteContext  eatBlanks
514 rwm-rewriteRule     "(.*), (.*)" "$1,$2"
515
516 # Here control goes back to the default rewrite
517 # context; rules are appended to the existing ones.
518 # anything that gets here is piped into rule `addBlanks'
519 rwm-rewriteContext  default
520 rwm-rewriteRule     ".*" "${>addBlanks($0)}" ":"
521
522 .\" # Anything with `uid=username' is looked up in
523 .\" # /etc/passwd for gecos (I know it's nearly useless,
524 .\" # but it is there just as a guideline to implementing
525 .\" # custom maps).
526 .\" # Note the `I' flag that leaves `uid=username' in place 
527 .\" # if `username' does not have a valid account, and the
528 .\" # `:' that forces the rule to be processed exactly once.
529 .\" rwm-rewriteContext  uid2Gecos
530 .\" rwm-rewriteRule     "(.*)uid=([a-z0-9]+),(.+)"
531 .\"                 "$1cn=$2{xpasswd},$3"      "I:"
532 .\" 
533 .\" # Finally, in a bind, if one uses a `uid=username' DN,
534 .\" # it is rewritten in `cn=name surname' if possible.
535 .\" rwm-rewriteContext  bindDN
536 .\" rwm-rewriteRule     ".*" "${>addBlanks(${>uid2Gecos($0)})}" ":"
537 .\" 
538 # Rewrite the search base according to `default' rules.
539 rwm-rewriteContext  searchDN alias default
540
541 # Search results with OpenLDAP DN are rewritten back with
542 # `dc=home,dc=net' naming context, with spaces eaten.
543 rwm-rewriteContext  searchEntryDN
544 rwm-rewriteRule     "(.*[^ ],)?[ ]?dc=OpenLDAP,[ ]?dc=org$"
545                 "${>eatBlanks($1)}dc=home,dc=net"    ":"
546
547 # Bind with email instead of full DN: we first need
548 # an ldap map that turns attributes into a DN (the
549 # argument used when invoking the map is appended to 
550 # the URI and acts as the filter portion)
551 rwm-rewriteMap ldap attr2dn "ldap://host/dc=my,dc=org?dn?sub"
552
553 # Then we need to detect DN made up of a single email,
554 # e.g. `mail=someone@example.com'; note that the rule
555 # in case of match stops rewriting; in case of error,
556 # it is ignored.  In case we are mapping virtual
557 # to real naming contexts, we also need to rewrite
558 # regular DNs, because the definition of a bindDN
559 # rewrite context overrides the default definition.
560 rwm-rewriteContext bindDN
561 rwm-rewriteRule "^mail=[^,]+@[^,]+$" "${attr2dn($0)}" ":@I"
562
563 # This is a rather sophisticated example. It massages a
564 # search filter in case who performs the search has
565 # administrative privileges.  First we need to keep
566 # track of the bind DN of the incoming request, which is
567 # stored in a variable called `binddn' with session scope,
568 # and left in place to allow regular binding:
569 rwm-rewriteContext  bindDN
570 rwm-rewriteRule     ".+" "${&&binddn($0)}$0" ":"
571
572 # A search filter containing `uid=' is rewritten only
573 # if an appropriate DN is bound.
574 # To do this, in the first rule the bound DN is
575 # dereferenced, while the filter is decomposed in a
576 # prefix, in the value of the `uid=<arg>' AVA, and 
577 # in a suffix. A tag `<>' is appended to the DN. 
578 # If the DN refers to an entry in the `ou=admin' subtree, 
579 # the filter is rewritten OR-ing the `uid=<arg>' with
580 # `cn=<arg>'; otherwise it is left as is. This could be
581 # useful, for instance, to allow apache's auth_ldap-1.4
582 # module to authenticate users with both `uid' and
583 # `cn', but only if the request comes from a possible
584 # `cn=Web auth,ou=admin,dc=home,dc=net' user.
585 rwm-rewriteContext searchFilter
586 rwm-rewriteRule "(.*\e\e()uid=([a-z0-9_]+)(\e\e).*)"
587   "${**binddn}<>${&prefix($1)}${&arg($2)}${&suffix($3)}"
588   ":I"
589 rwm-rewriteRule "^[^,]+,ou=admin,dc=home,dc=net$"
590   "${*prefix}|(uid=${*arg})(cn=${*arg})${*suffix}" ":@I"
591 rwm-rewriteRule ".*<>$" "${*prefix}uid=${*arg}${*suffix}" ":"
592
593 # This example shows how to strip unwanted DN-valued
594 # attribute values from a search result; the first rule
595 # matches DN values below "ou=People,dc=example,dc=com";
596 # in case of match the rewriting exits successfully.
597 # The second rule matches everything else and causes
598 # the value to be rejected.
599 rwm-rewriteContext searchEntryDN
600 rwm-rewriteRule ".+,ou=People,dc=example,dc=com$" "$0" ":@"
601 rwm-rewriteRule ".*" "" "#"
602 .fi
603 .SH "MAPPING EXAMPLES"
604 The following directives map the object class `groupOfNames' to
605 the object class `groupOfUniqueNames' and the attribute type
606 `member' to the attribute type `uniqueMember':
607 .LP
608 .RS
609 .nf
610 map objectclass groupOfNames groupOfUniqueNames
611 map attribute uniqueMember member
612 .fi
613 .RE
614 .LP
615 This presents a limited attribute set from the foreign
616 server:
617 .LP
618 .RS
619 .nf
620 map attribute cn *
621 map attribute sn *
622 map attribute manager *
623 map attribute description *
624 map attribute *
625 .fi
626 .RE
627 .LP
628 These lines map cn, sn, manager, and description to themselves, and 
629 any other attribute gets "removed" from the object before it is sent 
630 to the client (or sent up to the LDAP server).  This is obviously a 
631 simplistic example, but you get the point.
632 .SH FILES
633 .TP
634 ETCDIR/slapd.conf
635 default slapd configuration file
636 .SH SEE ALSO
637 .BR slapd.conf (5),
638 .BR slapd\-ldap (5),
639 .BR slapd\-meta (5),
640 .BR slapd\-relay (5),
641 .BR slapd (8),
642 .BR regex (7),
643 .BR re_format (7).
644 .SH AUTHOR
645 Pierangelo Masarati; based on back-ldap rewrite/remap features
646 by Howard Chu, Pierangelo Masarati.