stable

Clone or download

Read-only

Git LFS operations can be authenticated from a SSH connection

With this contribution it is not mandatory to use the HTTP Basic Authentication to do LFS operations. The authentication process from an SSH connection is described in the Git LFS specification [0][1]. To be able to test this, you need to deploy the git-lfs-authenticate command as described in 0a7cd6ee39f28cfa308fc55d088cb391070ba03e. This is part of story #12324: use git-lfs with ssh transfer [0] https://github.com/git-lfs/git-lfs/blob/v2.6.0/docs/api/authentication.md#ssh [1] https://github.com/git-lfs/git-lfs/blob/v2.6.0/docs/api/server-discovery.md#ssh Change-Id: I97135ab18b792d1c74f3eecd63fa74be92c67a1e

Modified Files

Name
M plugins/git/include/GitRepository.class.php +16 −0 Go to diff View file
M plugins/git/include/GitRepositoryUrlManager.class.php +1 −5 Go to diff View file
M plugins/git/phpunit/Git/Gitolite/_fixtures/gitolite-mail-config/mailhook-rev-mail-prefix-quote.txt +1 −1 Go to diff View file
M plugins/git/phpunit/Git/Gitolite/_fixtures/gitolite-mail-config/mailhook-rev-mail-prefix.txt +1 −1 Go to diff View file
M plugins/git/phpunit/Git/Gitolite/_fixtures/gitolite-mail-config/mailhook-rev.txt +1 −1 Go to diff View file
M plugins/git/phpunit/Git/Gitolite/_fixtures/perms/migrated_to_gerrit.conf +2 −2 Go to diff View file
M plugins/git/phpunit/Git/Gitolite/_fixtures/perms/project1-full.conf +2 −2 Go to diff View file
M plugins/git/tests/GitBackendTest.php +2 −1 Go to diff View file
M plugins/gitlfs/bin/git-lfs-authenticate.php +17 −2 Go to diff View file
M plugins/gitlfs/db/install.sql +10 −0 Go to diff View file
A plugins/gitlfs/db/mysql/updates/201811291215_add_ssh_authorization_table.php +49 −0 Go to diff View file
M plugins/gitlfs/db/uninstall.sql +2 −1 Go to diff View file
R plugins/gitlfs/include/Authorization/Action/ActionAuthorizationTokenHeaderSerializer.php Go to diff View file
A plugins/gitlfs/include/Authorization/User/InvalidUserUserAuthorizationException.php +30 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/Operation/UnknownUserOperationException.php +29 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/Operation/UserOperation.php +29 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/Operation/UserOperationDownload.php +31 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/Operation/UserOperationFactory.php +39 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/Operation/UserOperationUpload.php +31 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/UserAuthorizationDAO.php +67 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/UserAuthorizationException.php +26 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/UserAuthorizationNotFoundException.php +30 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/UserAuthorizationRemover.php +39 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/UserNotFoundExceptionUser.php +30 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/UserTokenCreator.php +68 −0 Go to diff View file
A plugins/gitlfs/include/Authorization/User/UserTokenVerifier.php +83 −0 Go to diff View file
M plugins/gitlfs/include/Batch/LFSBatchAPIHTTPAccessControl.php +43 −7 Go to diff View file
M plugins/gitlfs/include/Batch/LFSBatchController.php +7 −1 Go to diff View file
A plugins/gitlfs/include/Batch/LSFBatchAPIHTTPAuthorization.php +95 −0 Go to diff View file
A plugins/gitlfs/include/SSHAuthenticate/LFSEndPointDiscovery.php +45 −0 Go to diff View file
M plugins/gitlfs/include/SSHAuthenticate/SSHAuthenticate.php +33 −4 Go to diff View file
A plugins/gitlfs/include/SSHAuthenticate/SSHAuthenticateResponseBuilder.php +61 −0 Go to diff View file
M plugins/gitlfs/include/gitlfsPlugin.class.php +21 −5 Go to diff View file
R plugins/gitlfs/phpunit/Authorization/Action/ActionAuthorizationTokenHeaderSerializerTest.php Go to diff View file
A plugins/gitlfs/phpunit/Authorization/User/Operation/UserOperationFactoryTest.php +35 −0 Go to diff View file
A plugins/gitlfs/phpunit/Authorization/User/UserTokenCreatorTest.php +54 −0 Go to diff View file
A plugins/gitlfs/phpunit/Authorization/User/UserTokenVerifierTest.php +222 −0 Go to diff View file
M plugins/gitlfs/phpunit/Batch/LFSBatchAPIHTTPAccessControlTest.php +49 −9 Go to diff View file
A plugins/gitlfs/phpunit/Batch/LSFBatchAPIHTTPAuthorizationTest.php +162 −0 Go to diff View file
A plugins/gitlfs/phpunit/SSHAuthenticate/LFSEndPointDiscoveryTest.php +52 −0 Go to diff View file
A plugins/gitlfs/phpunit/SSHAuthenticate/SSHAuthenticateResponseBuilderTest.php +116 −0 Go to diff View file
M plugins/gitlfs/phpunit/SSHAuthenticate/SSHAuthenticateTest.php +71 −24 Go to diff View file