cs3org / reva

WebDAV/gRPC/HTTP high performance server to link high level clients to storage backends
https://reva.link
Apache License 2.0
167 stars 113 forks source link

better error message in reva-cli when user authentication fails in the backend #3442

Open michielbdejong opened 1 year ago

michielbdejong commented 1 year ago

When you use for instance Nextcloud as the user backend, and the error logged there is:

{"reqId":"s9PKOXFeUbdbrJF1Ug04","level":3,"time":"2022-11-10T10:36:20+00:00","remoteAddr":"172.18.0.2","user":"--","app":"PHP","method":"POST","url":"/index.php/apps/sciencemesh/~einstein/api/auth/Authenticate","message":"require_once(): Failed opening required '/var/www/html/apps/sciencemesh/lib/Controller/../../vendor/autoload.php' (include_path='/var/www/html/3rdparty/pear/archive_tar:/var/www/html/3rdparty/pear/console_getopt:/var/www/html/3rdparty/pear/pear-core-minimal/src:/var/www/html/3rdparty/pear/pear_exception:/var/www/html/apps') at /var/www/html/apps/sciencemesh/lib/Controller/RevaController.php#110","userAgent":"Go-http-client/1.1","version":"25.0.0.1"}

In the revad logs you see:

2022-11-10 10:36:20.303 WRN ../../reva/internal/grpc/services/authprovider/authprovider.go:170 > error authenticating user error="authsvc: error in Authenticate: Unexpected response code from EFSS API: 500" pid=25 pkg=rgrpc traceid=1a7d9eba7d5aa2408ebabe42ca9e8a64

In the reva-cli you see:

Please use `exit` or `Ctrl-D` to exit this program.
>> login basic
username: einstein
password: error: code=CODE_UNAUTHENTICATED msg="error authenticating user" support_trace="4ffc262167e26f7d59a9bd5de4ecc0d2"
>>

It could at least point you to the revad logs, or also copy the "Unexpected response code from EFSS API: 500" to the client.

michielbdejong commented 1 year ago

same for ocm-share-create, it says "error creating share" in the CLI and could include the "Unexpected response code from EFSS API: 500" message which revad log does have.