Keyclaok -Espo portal 500 error no hash

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Doraalkub
    Junior Member
    • Mar 2024
    • 2

    Keyclaok -Espo portal 500 error no hash

    I'm having a 500 error while trying to login using keycloak:
    When I login using an account with a username that has an already created account in portal it returns 500 no hash but when I use an account that doesn't have it's matching profile in portal (my config in the SSO is to create the portal account if it doesn't exist) it create an account I got logged and the portal user created with the accurate information


    2024-03-25 22:33:28] DEBUG: API (0) No hash.; GET /64cbbb3e309d64j59/; Route pattern: /{portalId}/; Route params: Array ( [controller] => ApiIndex [action] => index [portalId] => 64cbbb3e309d64j59 )
    [2024-03-25 22:33:28] ERROR: (0) No hash.; GET /64cbbb3e309d64j59/; line: 70, file: /app/code/8.1.5/application/Espo/Core/Authentication/Logins/Espo.php​
    ​​
  • yuri
    Member
    • Mar 2014
    • 8527

    #2
    IIRC, it's a limitation of our implementation. The user record should have a non-empty password value in the database.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8527

      #3
      What EspoCRM version do you use? Passwords should be automatically generated as of v8.0 https://github.com/espocrm/espocrm/issues/2775.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      • kirilll-roskolii
        Junior Member
        • Aug 2024
        • 1

        #4
        We had the same issue on 8.2.4 where some of the users were having an empty "password" field in the DB. Most of the users, except admins, were using custom SSO previously which is now replaced by the OIDC.

        Error we saw was:

        Code:
        DEBUG: OIDC: JWT header: {"alg":"RS256","typ" : "JWT","kid" : "fcjhsdfbhkgjsdhgjhkdfj"} DEBUG: OIDC: JWT payload: {"exp":1724982796,"iat":1724982496,"auth_time":172 4982496,"jti":"93509833-2921-47ae-90c7-2383393aebbf","iss":"[COLOR=#006dcc]https://my.company.com/auth/realms/my-company","aud":"crm-uat","sub":"96a49e65-74a4-44e2-b4af-655b0d08aed4","typ":"ID","azp":"crm-uat","nonce":"askjdfh","sid":"5be6d69e-1668-43f4-9b60-d4684aad0c52","at_hash":"jkshdfk-xXg","acr":"1","email_verified":true,"name":"Kiril l [/COLOR]Roskolii","preferred_username":"kirill","given_nam e":"Kirill","family_name":"Roskolii","email":"kiri ll@company.com"} DEBUG: API (0) No hash.; GET /I18n; Route pattern: /I18n; Route params: Array ( [COLOR=#0033b3][controller] [/COLOR]=> I18n ) ERROR: (0) No hash.; GET /I18n; line: 70, file: /var/www/html/application/Espo/Core/Authentication/Logins/Espo.php
        ​
        Fixed with this simple SQL:
        Code:
        UPDATE user SET password = 'fake-hash-to-work-around-oidc-bug' where password IS NULL;

        Comment

        Working...