It could be possible, but it's going to be rather clumsy;
it depends on whether there's a clear way you can extract
a filtering attribute from the DN, e.g. the "uid=<smtg>"
part, to do:
rewriteMap ldap uidMap "ldap:///<naming context>?uid?sub"
rewriteRule "^(uid=[^,]+)(,.*)$$" "%1-%{uidMap(%1)}%2" ":@I"
EXAMPLE:
rewriteMap ldap uidMap "ldap:///ou=People,dc=int-evry,dc=fr?uid?one"
rewriteRule "^(uid=[^,]+)(,.*)$$" "%1-%{uidMap(%1)}%2" ":@I"
so that:
"uid=test,ou=People,dc=int-evry,dc=fr" =>
"ldap:///ou=People,dc=int-evry,dc=fr?uid?sub?uid=test" =>
"uid=test-ei0205,dc=int-evry,dc=fr"
Otherwise, if all you can tell from the DN is the DN itself,
the ldap rewriteMap should be hacked to support using the
filter string in the naming context, to do something like
rewriteMap ldap uidMap "ldap:///%0?uid?base"
rewriteRule "^(uid=[^,]+)(,.*)$$" "%1-%{uidMap(%0)}%2" ":@I"
This latter sintax is NOT SUPPORTED YET (AFAIK), but shouldn't
require a tremendous effort; only, the naming context part
of the URI should be rewritten itself.
p.