better sftp server error reporting

Bug #85392 reported by David Allouche
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
Jonathan Lange

Bug Description

Many users have difficulties using the bzr branch hosting service on Lanuchpad. The most common problems in order, are:

 1. did not specify launchpad user name correctly, either ommitting the login part or specifying the login part and the owner part incorrectly.
 2. using a system where the ssh key registered on launchpad is not available
 3. not being a member of the team owning the branch

It would be good if the sftp server could give useful error messages to let user diagnose and correct those common problems themselves.

Tags: lp-code
Revision history for this message
David Allouche (ddaa) wrote :

Maybe the sftp auth code on the server could be more helpful. Some examples:

 * "No such Launchpad account: foo"
 * "Launchpad user foo does not have a registered ssh key: https://launchpad.net/~foo"
 * "You ssh key does not match any key registered for Launchpad user foo: https://launchpad.net/~foo"

The permission error for branch access should also be improved (as previously mentioned on bug 33223.

 * "You cannot write to branch ~foo/bar/baz because you are not foo: https://launchpad.net/~foo"
 * "You cannot write to branch ~foo/bar/baz because you are not a member of foo: https://launchpad.net/~foo"

Revision history for this message
David Allouche (ddaa) wrote :

This is getting in the way of people trying launchpad branch hosting for the first time. We see a user asking about this on IRC about once a week. Presumably a lot of users hit the same problems and silently give up.

Changed in launchpad-bazaar:
importance: Undecided → High
status: Unconfirmed → Confirmed
Jonathan Lange (jml)
Changed in launchpad-bazaar:
assignee: nobody → jml
Revision history for this message
Jonathan Lange (jml) wrote :

This is really two bugs: improved error messages for authentication problems and improved error messages for permission problems.

I've filed bug #93606 to take care of the latter. From henceforth, this bug is about authentication problems.

Changed in launchpad-bazaar:
status: Confirmed → In Progress
Revision history for this message
Jonathan Lange (jml) wrote :

The authserver doesn't distinguish between "no such user" and "no keys for user", so the SFTP server can't make the distinction. A separate branch is required to extend the authserver, then another one to make the SFTP use the extension.

Revision history for this message
Andrew Bennetts (spiv) wrote :

The authserver can: call getUser. The getSSHKeys XML-RPC method doesn't distinguish, but the broader authserver does :)

So, if the SFTP server tried a getUser call after getSSHKeys returns no results, it would be able to distinguish between "no such user" and "no keys for user".

It might not be particularly elegant, but I think it'll be good enough.

Revision history for this message
Jonathan Lange (jml) wrote :

Well called Andrew. I've made the change as you suggested and put it up for review.

Jonathan Lange (jml)
Changed in launchpad-bazaar:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.