GluuFederation / community-edition-setup

Scripts and templates to automate deployment and configuration of the Gluu Server Community Edition
https://gluu.org/docs/ce
MIT License
188 stars 58 forks source link

fix: 'java.util.HashSet' object has no attribute 'get' in Casa Script #923

Closed maduvena closed 2 years ago

maduvena commented 2 years ago

Same as https://github.com/GluuFederation/oxAuth/issues/1734

Describe the bug

12:12:43 INFO  PythonService.java:243 - Casa. authenticate for step 1
12:12:44 INFO  PythonService.java:243 - Casa. getAvailMethodsUser [otp, fido2]
12:12:44 INFO  PythonService.java:243 - Casa. getSuitableAcr. On mobile = True
12:12:44 INFO  PythonService.java:243 - Casa. getSuitableAcr. No mobile-friendly authentication method available for user user41
12:12:44 ERROR ExternalAuthenticationService.java:216 - AttributeError: 'java.util.HashSet' object has no attribute 'get'
org.python.core.PyException: AttributeError: 'java.util.HashSet' object has no attribute 'get'
        at org.python.core.Py.AttributeError(Py.java:176) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT]
        at org.python.core.PyObject.noAttributeError(PyObject.java:965) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT]
        at org.python.core.PyObject.__getattr__(PyObject.java:959) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT]
        at org.python.pycode._pyx0.getSuitableAcr$24(casa.py:457) ~[?:?]
        at org.python.pycode._pyx0.call_function(casa.py) ~[?:?]
        at org.python.core.PyTableCode.call(PyTableCode.java:173) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT]
        at org.python.core.PyBaseCode.call(PyBaseCode.java:187) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT]
        at org.python.core.PyFunction.__call__(PyFunction.java:449) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT]
        at org.python.core.PyMethod.__call__(PyMethod.java:171) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT]
        at org.python.pycode._pyx0.authenticate$9(casa.py:189) ~[?:?]
        at org.python.pycode._pyx0.call_function(casa.py) ~[?:?]
        at org.python.core.PyTableCode.call(PyTableCode.java:173) ~[jython-standalone-2.7.3.jar:2.7.3b1-SNAPSHOT]

To Reproduce Steps to reproduce the behavior:

  1. Register apple touch ID on casa
  2. Register one more cred and turn on 2fa
  3. Login using mobile phone so the isMobile criteria is fullfilled.
  4. Unable to login, check the jans-auth logs

Expected behavior Login without error

Smartphone (please complete the following information):