On 19/03/2013 02:39, Edward Siewick wrote:
Hi.
Just a quick note to report some unexpected behavior (v1.0.6).
I've been tinkering with two resources, a MySQL database and an
openLDAP directory with inetOrgPerson and posixAccount schema.
The only guaranteed unique field from the (OrangeHRM) MySQL resource
is the key field, emp_number (an int data type). Within Syncope's
Resources / Schema Mappings for the resource, the key field isn't
provided as an option in the pulldown for External Attributes. It does
get set to Username, however.
I understand that emp_number is not shown in the dropdown, and this
sounds strange: could you please provide the details of your DB Table
configuration and the database table schema from MySQL? And maybe also a
screenshot from the admin console, in the schema mapping window?
What does "It does get set to Username, however" mean exactly?
Now, the openLDAP wants a uid as a guaranteed unique value. (More
precisely, it wants a DN that happens to include the uid.)
That's why LDAP (and LDAP-like as Active Directory) resources need an
additional "Account Link": for generating a correct DN.
What's the Account Link you've provided for OpenLDAP?
Normally, for LDAP, one should flag Syncope's username as AccountId in
the mapping + provide an account link as JEXL expression, including uid;
something like
'uid=' + username + ',ou=People,o=isp'
Could you please provide a screenshot of the mapping of this OpenLDAP
resource?
The derived attribute (uid => username) in Schema was still not
working out for me. So I decided to poke at this by adding to the
MySQL resource's schema mapping uid => emp_firstname (Internal
Attributes => External Attributes) which I'd expected would produce a
string value in the uid fields. And, surprise! The derived attribute
(uid => username) instantly popped to life. The next run of the sync
task with the MySQL resource produced a complete set of (numeric) uids.
To test this again, I added uidNumber => username as another derived
attribute. Again, it wouldn't populate automatically. I added
uidNumber => emp_smoker (a smallint in the MySQL schema.) The column
populated at the next sync with the MySQL resource.
--
Francesco Chicchiriccò
ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/