ubccr / mokey

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

Mokey fails to start: "Encoding_Error" #106

Closed blasphemite closed 2 years ago

blasphemite commented 2 years ago

mokey --debug server is met with:

INFO[0000] Using template dir: /usr/share/mokey/templates
FATA[0133] [Root cause: Encoding_Error] Encoding_Error: AS Exchange Error: failed to process the AS_REP < Encoding_Error: failed to unmarshal KDC's reply: asn1: syntax error: sequence truncated

mokey.yaml

driver: "mysql"
dsn: "mokey:password@tcp(mysqlhost:3306)/mokey?parseTime=true"
keytab: "/etc/mokey/mokeyapp.keytab"
ktuser: "mokeyapp"
auth_key: "e99e3eb91b0ad611e7c6e6167896be37"
enc_key: "05c5046b4475bbe7a785f96856642b68"
bind: "0.0.0.0"
port: 8080
ipahost: "ipa.example.lan"
rate_limit: false
templates: /usr/share/mokey/templates
develop: true

I've recreated the keytab & still get the same error. Running klist -kt /etc/mokey/mokeyapp.keytab -e seems to run without errors:

Keytab name: FILE:/etc/mokey/mokeyapp.keytab
KVNO Timestamp           Principal
---- ------------------- ------------------------------------------------------
   3 10/10/2021 00:48:24 mokeyapp@EXAMPLE.LAN (aes256-cts-hmac-sha1-96)
   3 10/10/2021 00:48:24 mokeyapp@EXAMPLE.LAN (aes128-cts-hmac-sha1-96)

The mokeyapp user is a member of the "Mokey User Manager" role, which possesses the "User Administrators" privilege. Not sure what I'm missing -- any assistance is appreciated.

aebruno commented 2 years ago

@blasphemite Can you provide some more details.. what version of mokey, FreeIPA? What version/flavor of Linux are you running?

blasphemite commented 2 years ago

Centos 8 FreeIPA 4.9.6 mokey v0.5.6 installed via rpm

edit: Attempted with Centos 7 & identical config and receive the same error

blasphemite commented 2 years ago

I created a new FreeIPA server to test this, and now I'm no longer getting this error. I'm thinking that's indicative of what's causing the problem, so I'll close this issue now. I'll edit in an update if I'm able to figure out the root cause.

aebruno commented 2 years ago

@blasphemite Glad to hear it's working for you. Thanks for reporting back.