core icon indicating copy to clipboard operation
core copied to clipboard

User unable to log in; receives `Public Key missing for user: <username>` error

Open posita opened this issue 2 years ago • 1 comments

Spontaneously, I can no longer log into my owncloud instance. I receive a Public Key missing for user: <username> error on the login screen, and the following in the log:

{"reqId":"…","level":4,"time":"2022-05-11T20:41:00+00:00","remoteAddr":"….….….…","user":"<username>","app":"webdav","method":"PROPFIND","url":"\/remote.php\/dav\/addressbooks\/users\/<username>\/","message":"Exception: HTTP\/1.1 503 OCA\\Encryption\\Exceptions\\PublicKeyMissingException: Public Key missing for user: <username>: {\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Message\":\"OCA\\\\Encryption\\\\Exceptions\\\\PublicKeyMissingException: Public Key missing for user: <username>\",\"Code\":0,\"Trace\":\"#0 \\\/home\\\/…\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(182): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\Auth->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#1 \\\/home\\\/…\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php(137): Sabre\\\\DAV\\\\Auth\\\\Plugin->check(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/home\\\/…\\\/lib\\\/composer\\\/sabre\\\/event\\\/lib\\\/WildcardEmitterTrait.php(89): Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/home\\\/…\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(456): Sabre\\\\DAV\\\\Server->emit('beforeMethod:PR...', Array)\\n#4 \\\/home\\\/…\\\/lib\\\/composer\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(253): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/home\\\/…\\\/apps\\\/dav\\\/lib\\\/Server.php(334): Sabre\\\\DAV\\\\Server->start()\\n#6 \\\/home\\\/…\\\/apps\\\/dav\\\/appinfo\\\/v2\\\/remote.php(31): OCA\\\\DAV\\\\Server->exec()\\n#7 \\\/home\\\/…\\\/remote.php(165): require_once('\\\/home\\\/…...')\\n#8 {main}\",\"File\":\"\\\/home\\\/…\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/Auth.php\",\"Line\":172}"}

I don't understand why or how this came about. This user could log in a few days ago. I don't know of anything that has changed since that time.

$ ./occ encryption:status
  - enabled: false
  - defaultModule: OC_DEFAULT_MODULE

I can log in as the admin user. Only this particular user cannot log in. The installation is configured to use Wasabi S3 for storage.

posita avatar May 11 '22 20:05 posita

This is really annoying. Removing and then adding back this user (after requiring the user to back up and resync all files, calendar items, contacts, etc.), allowed them to log in again, but kept presenting them with a similar error upon login. The only way I could figure out to get rid of this was to completely reinstall the installation from scratch.

posita avatar May 15 '22 18:05 posita

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Nov 12 '22 01:11 github-actions[bot]