ubccr / mokey

FreeIPA self-service account management portal
BSD 3-Clause "New" or "Revised" License
194 stars 46 forks source link

Disabled tokens always show up as enabled #125

Closed fajo-de closed 6 months ago

fajo-de commented 1 year ago

In MoKey 6.3 when disabling a token, the token remains shown as enabled. Subsequent attempts to disable the token fail (as the token is disabled already). The token status remains shown as enabled even after logout and re-login.

Log shows:

msg="Failed to enable OTP token" err="ipa: error 4202 - no modifications to be performed"

on repeated attempts to disable the token.

fajo-de commented 1 year ago

The issue is with goipa/otp.go which expects ipatokendisabled is in uppercase which actually is not the case (at least not in FreeIPA 4.10). The value should first be converted to uppercase before comparing it.

aebruno commented 6 months ago

Fixed in b65a0cdb01fd0d2406f31e01768fa5c5ea459746 and ubccr/goipa#13