Merge lp:~jml/launchpad/extract-ssh-server into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | no longer in the source branch. |
Merged at revision: | not available |
Proposed branch: | lp:~jml/launchpad/extract-ssh-server |
Merge into: | lp:launchpad |
Diff against target: |
351 lines (+108/-79) 5 files modified
daemons/sftp.tac (+15/-6) lib/lp/codehosting/sshserver/accesslog.py (+1/-4) lib/lp/codehosting/sshserver/auth.py (+4/-4) lib/lp/codehosting/sshserver/service.py (+66/-33) lib/lp/codehosting/sshserver/tests/test_auth.py (+22/-32) |
To merge this branch: | bzr merge lp:~jml/launchpad/extract-ssh-server |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Hudson-Doyle | Approve | ||
Canonical Launchpad Engineering | Pending | ||
Review via email: mp+23350@code.launchpad.net |
Commit message
Refactor some codehosting SSH server stuff to not depend on codehosting configuration
Description of the change
This branch extracts some of the changes from my mega-branch lp:~jml/launchpad/ssh-key-auth.
In particular, it parametrizes three of the key classes so that they don't look up configuration variables themselves, but rather get passed the values that they need. This pushes most of the configuration up to the sftp.tac file, which is good, since tac files are all about configuration.
The three classes are SSHUserAuthServer, Factory and SSHService. The changes are pretty boring -- just moving config variables out into constructor parameters.
Other than that, there's a tweak to LoggingManager to remove an unused parameter.
I look forward to your review.
Well, I certainly like the idea of this branch.
I think SSHService. __init_ _'s port argument should perhaps be called strport. I'd expect 'port' to be an integer (I guess the config item is poorly named too, but that's harder to fix).
The parameterization around the key path names smells a little funny to me. Would it be safe for SSHService to just take the directory and assume the file names? Maybe not...
I think service. Factory. __doc__ could be clearer about the expected types of the key arguments.
Um, I think that's it.
Thanks for working on this!