Bug 49320 - Apple School Connector fails silent if anonymize attribut is set which a user does not have
Apple School Connector fails silent if anonymize attribut is set which a user...
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: Apple School Manager
UCS@school 4.4
Other Mac OS X 10.1
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-18 11:37 CEST by Michel Smidt
Modified: 2022-07-13 16:13 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 4: Minor Usability: Impairs usability in secondary scenarios
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 5: Blocking further progress on the daily work
User Pain: 0.114
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Smidt 2019-04-18 11:37:35 CEST
Connector fails "silent" with traceback:
1723 actions.configure                19-04-18 11:13:28 [ WARNING]: Creating ZIP file in /var/lib/asm/asm_2019-04-18T11:13:28.983662.zip...
  1723 actions.configure                19-04-18 11:13:28 [ WARNING]: Creating CSV files...
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]: Writing 2 objects to students.csv...
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]: Writing 3 objects to locations.csv...
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]: Traceback (most recent call last):
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/sbin/asm-upload", line 98, in <module>
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     main()
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/sbin/asm-upload", line 89, in main
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     zip_path = asmUpload.upload()
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/lib/pymodules/python2.7/univention/asm/asm_upload.py", line 60, in upload
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     zip_path = AsmZipFile(file_path, self.ou_whitelist).write_zip()
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/lib/pymodules/python2.7/univention/asm/csv/zip_file.py", line 99, in write_zip
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     self.csv_files = self.create_csv_files()
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/lib/pymodules/python2.7/univention/asm/csv/zip_file.py", line 76, in create_csv_files
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     self.csv_files = create_csv_files(tmp_dir, self.ou_whitelist)
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/lib/pymodules/python2.7/univention/asm/csv/csv_file.py", line 369, in create_csv_files
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     cls(path, ou_whitelist).write_csv()
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/lib/pymodules/python2.7/univention/asm/csv/csv_file.py", line 182, in write_csv
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     for obj in objs:
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/lib/pymodules/python2.7/univention/asm/csv/csv_file.py", line 301, in find_and_create_objects
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     yield AsmStaff.from_dn(dn, ou_whitelist=self.ou_whitelist)
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/lib/pymodules/python2.7/univention/asm/models/staff.py", line 174, in from_dn
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     additional_location_ids=location_ids[1:]
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:   File "/usr/lib/pymodules/python2.7/univention/asm/models/base.py", line 149, in anonymize
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]:     raise ValueError('Attribute {!r} not found in LDAP object of {}.'.format(attr, user))
  1723 actions.configure                19-04-18 11:13:29 [ WARNING]: ValueError: Attribute 'mailPrimaryAddress' not found in LDAP object of Teacher(name='demo_teacher', school='DEMOSCHOOL', dn='uid=demo_teacher,cn=lehrer,cn=users,ou=DEMOSCHOOL,dc=schulen-univention,dc=intranet').

Konfiguration:
asm/attributes/staff/anonymize: yes
asm/attributes/staff/anonymize/email_address: %mailPrimaryAddress
asm/attributes/student/anonymize: yes
asm/attributes/student/anonymize/email_address: %mailPrimaryAddress