Privacy idea '/validate/triggerchallenge' endpoint throws 'value too long for type character varying(20)\n' error

When I attempt to call ‘/validate/triggerchallenge’ I receive error with the following logs

privacyidea.lib.auditmodules.sqlaudit:exception DataError(‘(psycopg2.errors.StringDataRightTruncation) value too long for type character varying(20)\n’)

privacyidea ComputeInstance-microservices - ip-10-170-98-156 Aug 10 09:51:51 ERROR:privacyidea.lib.auditmodules.sqlaudit:DATA: {‘startdate’: datetime.datetime(2022, 8, 10, 9, 51, 50, 349611), ‘success’: True, ‘action_detail’: ‘’, ‘client’: ‘10.207.4.8’, ‘client_user_agent’: None, ‘privacyidea_server’: ‘10.170.98.156:25081’, ‘action’: ‘POST /validate/triggerchallenge’, ‘info’: ‘triggered 1 challenges’, ‘policies’: ‘otp-message-policy’, ‘user’: ‘f4571bc3-58e9-4473-8148-c159c70430d4|490d6fac-d323-4695-99b8-9515f02da92a’, ‘resolver’: ‘test-resolver’, ‘realm’: ‘test’, ‘serial’: ‘PISM0000F716’}

privacyidea ComputeInstance-microservices - ip-10-170-98-156 Aug 10 09:51:51 10.207.4.8 - - [10/Aug/2022:09:51:51 +0000] “POST /validate/triggerchallenge?serial=PISM0000F716&realm=test&user=f4571bc3-58e9-4473-8148-c159c70430d4%7C490d6fac-d323-4695-99b8-9515f02da92a HTTP/1.1” 200 1345 “-” “Apache-HttpClient/4.5.13 (Java/11.0.13)” “-”

Please let me know if we have missed any configuration Or which table needs to be altered for this ?

@cornelinux , Similar is the case for me as well

Interesting, it looks like the username is too long for the audit table column (20 chars).
Usually this should be the login name and not some kind of uuid.
Alternatively You can set PI_AUDIT_SQL_TRUNCATE to True in the pi.cfg file or adjust the audit table accordingly:
https://privacyidea.readthedocs.io/en/latest/audit/index.html?highlight=truncate#table-size

Thank you. We will add this configuration.