How to configure alternate mappings for datasources
OverviewVISULOX reads from datasources and uses a mapping to map the datasource fields to internal names. VISULOX has a mapping for standard Active Directory (MSAD) and LDAP Servers (LDAP). Depending of the data, which has to be imported a different mapping could be necessary. This article explains how to create such a mapping file. |
Usage
The default mapping file is $VLXDIR/setup/database/mapping.data and should not be changed. This file will be overwritten by update.
For a new mapping create a file in $VLXDIR/setup/database with the extension .cust and make necessary changing. This file will not not be overwritten by update.
A new mapping must have a new mapping source. The mapping source in this example is MYMAP.
The mapping has to be added then with:
visulox datasource add ... -mapping MYMAP
See also: How to work with VISULOX Datasources
$VLXDIR/setup/database/mymap.cust: Example for a new mapping named "MYMAP"
{
varmapping {
columns {source external internal convert}
rows {
{# Customized mapping}
{{MYMAP.USER} {type} {vlxobjecttype} {}}
{{MYMAP.USER} {source} {vlxobjectsource} {}}
{{MYMAP.USER} {object} {vlxobjectname} {}}
{{MYMAP.USER} {object} {vlxowner} {}}
{{MYMAP.USER} {cn} {vlxfullname} {listvar}}
{{MYMAP.USER} {givenName} {vlxsurname} {}}
{{MYMAP.USER} {email} {vlxemail} {}}
{{MYMAP.USER} {unixusername} {vlxloginuser} {}}
{{MYMAP.USER} {textmessage} {vlxsms} {}}
{{MYMAP.USER} {uniqueMember} {vlxgrouplist} {}}
{{MYMAP.USER} {manager} {vlxmanager} {}}
{{MYMAP.USER} {uidNumber} {vlxuid} {}}
{{MYMAP.USER} {gidNumber} {vlxgid} {}}
{{MYMAP.USER} {unixHomeDirectory} {vlxhome} {}}
{{MYMAP.GROUP} {type} {vlxobjecttype} {}}
{{MYMAP.GROUP} {source} {vlxobjectsource} {}}
{{MYMAP.GROUP} {object} {vlxobjectname} {}}
{{MYMAP.GROUP} {object} {vlxgroup} {}}
{{MYMAP.GROUP} {member} {vlxuserlist} {}}
}
}
}
Copy the new mapping on each node, load the new mapping with ./loadconfig.tcl and restart VISULOX.
This new mapping must be applied on all VISULOX nodes.
How to provide a list of eMails from AD to the VISULOX 2FA interface
The default configuration of VISULOX maps the LDAP attribute "email" as a single value to vlxemail.
Available LDAP attributes can be checked with:
./ldap.tcl -name <source> -print
If another attribute holds the eMail address to send the PIN, it can be configured with an alternate attribute mapping.
If the eMail field contains more than one eMail address, the possible delimiter has to be configured in the regexp.email field.
Related information
How to work with VISULOX Datasources
Creating VISULOX user groups based on an AD/LDAP attribute