Bug 55519 - Univention-keycloak failure while activating 2fa
Univention-keycloak failure while activating 2fa
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: Keycloak
UCS 5.0
Other Linux
: P5 normal (vote)
: UCS 5.0-2-errata
Assigned To: Juan Pedro Torres
Julia Bremer
https://git.knut.univention.de/univen...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2022-12-26 15:14 CET by Juan Pedro Torres
Modified: 2023-01-18 18:46 CET (History)
2 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
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 Juan Pedro Torres univentionstaff 2022-12-26 15:14:10 CET
When trying to activate 2fa there is a traceback.

root@master:~# univention-keycloak 2fa enable
Enabling 2FA ...
Using KC_URL: https://ucs-sso-ng.ucs.test:443
Traceback (most recent call last):
  File "/usr/sbin/univention-keycloak", line 1337, in <module>
    exit(main())
  File "/usr/sbin/univention-keycloak", line 1333, in main
    return opt.func(opt) or 0
  File "/usr/sbin/univention-keycloak", line 692, in enable_2fa
    kc_admin = KeycloakAdmin(server_url=opt.keycloak_url, username=opt.binduser, password=opt.binduser, realm_name=opt.realm, user_realm_name=DEFAULT_REALM, verify=opt.no_ssl_verify)
  File "/usr/lib/python3/dist-packages/keycloak/keycloak_admin.py", line 96, in __init__
    self.get_token()
  File "/usr/lib/python3/dist-packages/keycloak/keycloak_admin.py", line 1786, in get_token
    self._token = self.keycloak_openid.token(self.username, self.password, grant_type=grant_type)
  File "/usr/lib/python3/dist-packages/keycloak/keycloak_openid.py", line 201, in token
    return raise_error_from_response(data_raw, KeycloakGetError)
  File "/usr/lib/python3/dist-packages/keycloak/exceptions.py", line 108, in raise_error_from_response
    response_body=response.content)
keycloak.exceptions.KeycloakAuthenticationError: 401: b'{"error":"invalid_grant","error_description":"Invalid user credentials"}'
Comment 1 Juan Pedro Torres univentionstaff 2023-01-17 12:22:14 CET
Package Build.

Package: univention-keycloak
Version: 1.0.7A~5.0.0.202301171216
Branch: ucs_5.0-0
Scope: errata5.0-2


univention-keycloak.yaml
465dacaa046c | Bug #55519: Update yaml
c9041e978db8 | Bug #55519: solve 2fa activation crash

univention-keycloak (1.0.7)
c9041e978db8 | Bug #55519: solve 2fa activation crash
Comment 2 Julia Bremer univentionstaff 2023-01-18 12:22:09 CET
OK: Enabling 2fa works
OK: Package build
OK: YAML

Verified