JanssenProject / jans

An open source enterprise digital identity platform for CIAM or workforce... Janssen is a distribution of standards-based, developer friendly, components that are engineered to work together in any cloud. #OAuth #OpenID #FIDO
https://docs.jans.io
Apache License 2.0
439 stars 73 forks source link

Fido2 authentication not working when on MySQL #1107

Closed jgomer2001 closed 2 months ago

jgomer2001 commented 2 years ago

Two weeks ago, authentication was working fine with fido2 after properly widening a column, see #1044

A couple of days ago it started to fail again (in both VM and CN environments). Some findings:

 "cause2":"Failed to build search entries query. Key: 'people', expression: 'doc.jansCodeChallenge = obYFDiMssezrEN3LQBGT0_k1diSXvcFTI-xIIb3-iZ8'",
 "cause1":"io.jans.orm.exception.EntryPersistenceException: Failed to find entries with key: 'people'",
 "servlet":"io.jans.fido2.service.app.ResteasyInitializer",
 "cause4":"java.sql.SQLSyntaxErrorException: Unknown column 'doc.jansCodeChallengeHash' in 'field list'",
 "cause3":"com.querydsl.core.QueryException: Caught SQLSyntaxErrorException for select doc.jansStatus, doc.jansCodeChallengeHash, doc.jansAuthData, doc.jansCodeChallenge, doc.jansId, doc.creationDate, doc.personInum, doc.dn, doc.doc_id\nfrom gluu.jansFido2AuthnEntry doc\nwhere doc.jansCodeChallenge = ?\norder by creationDate asc",
 "cause0":"org.jboss.resteasy.spi.UnhandledException: io.jans.orm.exception.EntryPersistenceException: Failed to find entries with key: 'people'",
 "message":"org.jboss.resteasy.spi.UnhandledException: io.jans.orm.exception.EntryPersistenceException: Failed to find entries with key: 'people'",
 "url":"/jans-fido2/restv1/assertion/result",
 "status":"500"

The above means:

To make my tests quicker, I simply added the column to table jansFido2AuthnEntry but again found the problem of issue #1044 (data too long). I opened a separate issue because column jansAuthData needs better sizing.

jgomer2001 commented 2 years ago

There are serious problems with this fix. I'll take a look

jgomer2001 commented 2 months ago

It is working now with 1.1.3-snapshot deb package in FF and chrome