Commit f4ce4a3c authored by Rubén Dávila's avatar Rubén Dávila

Pass custom git_config_options to Gitalyo

The /api/internal/allowed endpoint on GitLab has been updated to return some
custom git options that can be used with git commands, we need to pass these received options to Gitaly.
parent 21d6b315
...@@ -215,8 +215,9 @@ type Tag struct { ...@@ -215,8 +215,9 @@ type Tag struct {
// If message exceeds a certain threshold, it will be nullified, // If message exceeds a certain threshold, it will be nullified,
// but its size will be set in message_size so we can know if // but its size will be set in message_size so we can know if
// a tag had a message in the first place. // a tag had a message in the first place.
Message []byte `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"` Message []byte `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
MessageSize int64 `protobuf:"varint,5,opt,name=message_size,json=messageSize" json:"message_size,omitempty"` MessageSize int64 `protobuf:"varint,5,opt,name=message_size,json=messageSize" json:"message_size,omitempty"`
Tagger *CommitAuthor `protobuf:"bytes,6,opt,name=tagger" json:"tagger,omitempty"`
} }
func (m *Tag) Reset() { *m = Tag{} } func (m *Tag) Reset() { *m = Tag{} }
...@@ -259,6 +260,13 @@ func (m *Tag) GetMessageSize() int64 { ...@@ -259,6 +260,13 @@ func (m *Tag) GetMessageSize() int64 {
return 0 return 0
} }
func (m *Tag) GetTagger() *CommitAuthor {
if m != nil {
return m.Tagger
}
return nil
}
type User struct { type User struct {
GlId string `protobuf:"bytes,1,opt,name=gl_id,json=glId" json:"gl_id,omitempty"` GlId string `protobuf:"bytes,1,opt,name=gl_id,json=glId" json:"gl_id,omitempty"`
Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Name []byte `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
...@@ -312,40 +320,41 @@ func init() { ...@@ -312,40 +320,41 @@ func init() {
func init() { proto.RegisterFile("shared.proto", fileDescriptor12) } func init() { proto.RegisterFile("shared.proto", fileDescriptor12) }
var fileDescriptor12 = []byte{ var fileDescriptor12 = []byte{
// 553 bytes of a gzipped FileDescriptorProto //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 0xcb, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff,
0xf1, 0xe6, 0xc7, 0x44, 0x47, 0x04, 0x00, 0x00,
} }
...@@ -140,6 +140,8 @@ type PostReceivePackRequest struct { ...@@ -140,6 +140,8 @@ type PostReceivePackRequest struct {
GlUsername string `protobuf:"bytes,5,opt,name=gl_username,json=glUsername" json:"gl_username,omitempty"` GlUsername string `protobuf:"bytes,5,opt,name=gl_username,json=glUsername" json:"gl_username,omitempty"`
// Git protocol version // Git protocol version
GitProtocol string `protobuf:"bytes,6,opt,name=git_protocol,json=gitProtocol" json:"git_protocol,omitempty"` GitProtocol string `protobuf:"bytes,6,opt,name=git_protocol,json=gitProtocol" json:"git_protocol,omitempty"`
// Parameters to use with git -c (key=value pairs)
GitConfigOptions []string `protobuf:"bytes,7,rep,name=git_config_options,json=gitConfigOptions" json:"git_config_options,omitempty"`
} }
func (m *PostReceivePackRequest) Reset() { *m = PostReceivePackRequest{} } func (m *PostReceivePackRequest) Reset() { *m = PostReceivePackRequest{} }
...@@ -189,6 +191,13 @@ func (m *PostReceivePackRequest) GetGitProtocol() string { ...@@ -189,6 +191,13 @@ func (m *PostReceivePackRequest) GetGitProtocol() string {
return "" return ""
} }
func (m *PostReceivePackRequest) GetGitConfigOptions() []string {
if m != nil {
return m.GitConfigOptions
}
return nil
}
type PostReceivePackResponse struct { type PostReceivePackResponse struct {
// Raw data from stdout of 'git receive-pack' // Raw data from stdout of 'git receive-pack'
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
...@@ -515,31 +524,32 @@ var _SmartHTTPService_serviceDesc = grpc.ServiceDesc{ ...@@ -515,31 +524,32 @@ var _SmartHTTPService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("smarthttp.proto", fileDescriptor13) } func init() { proto.RegisterFile("smarthttp.proto", fileDescriptor13) }
var fileDescriptor13 = []byte{ var fileDescriptor13 = []byte{
// 413 bytes of a gzipped FileDescriptorProto // 423 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x52, 0xd1, 0x8a, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0xd1, 0x8a, 0xd3, 0x40,
0x14, 0x75, 0xda, 0x6e, 0x61, 0x6f, 0xa3, 0x2d, 0x77, 0xd1, 0x0d, 0x01, 0xdd, 0x1a, 0x41, 0xf2, 0x14, 0x75, 0xd2, 0x6e, 0x65, 0x6f, 0xa3, 0x2d, 0x77, 0xd1, 0x0d, 0x01, 0xdd, 0x1a, 0x41, 0xf2,
0xb0, 0x96, 0xa5, 0x7e, 0x82, 0x2f, 0x2e, 0x0a, 0x86, 0xd9, 0x2d, 0xf8, 0x16, 0xc6, 0x64, 0x3a, 0xb0, 0x96, 0xa5, 0x7e, 0x82, 0x2f, 0x2e, 0x0a, 0x86, 0xd9, 0x2d, 0xf8, 0x16, 0xc6, 0x64, 0x3a,
0x3b, 0x38, 0xcd, 0xc4, 0xcc, 0xb4, 0xd0, 0x1f, 0xf1, 0x3b, 0xfc, 0xa2, 0x7e, 0x8b, 0x34, 0x69, 0x3b, 0x38, 0x9b, 0x89, 0x99, 0xd9, 0x85, 0xfe, 0x83, 0xcf, 0x7e, 0x87, 0x5f, 0xe4, 0xb7, 0x48,
0x9a, 0xb6, 0x31, 0x22, 0x8a, 0x6f, 0xc3, 0xbd, 0x77, 0xce, 0x3d, 0xe7, 0xdc, 0x03, 0x43, 0xb3, 0x93, 0xa6, 0x69, 0x9b, 0x46, 0x44, 0xf1, 0x2d, 0xdc, 0x7b, 0x72, 0xee, 0x39, 0xe7, 0xde, 0x81,
0x60, 0xb9, 0x7d, 0xb0, 0x36, 0x9b, 0x64, 0xb9, 0xb6, 0x1a, 0xfb, 0x42, 0x5a, 0xa6,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0xc1, 0x0f, 0x70, 0xd2, 0xd4, 0x37, 0xa2, 0xfe, 0x96,
0xe6, 0xd6, 0x7b, 0xd1, 0xd6, 0xae, 0x40, 0x03, 0x72, 0x43, 0xf0, 0x33, 0x0c, 0x4f, 0x5c, 0xc3, 0x6d, 0x0e, 0x8f, 0x77, 0x6f, 0x03, 0x9f, 0xd5, 0xf8, 0x83, 0x57, 0xee, 0x3f, 0xef, 0x6a, 0xd7,
0xa3, 0x8f, 0xcd, 0xb8, 0x78, 0x57, 0xad, 0xfd, 0x43, 0xe4, 0x2f, 0xfd, 0xe2, 0x58, 0x6f, 0x7f, 0xa4, 0x21, 0xb9, 0x20, 0xf8, 0x09, 0x46, 0x7b, 0xa9, 0xe1, 0xce, 0x8f, 0xed, 0xe3, 0xf2, 0xcf,
0x06, 0x00, 0x00, 0xff, 0xff, 0x7f, 0xae, 0x74, 0xb7, 0x42, 0x04, 0x00, 0x00, 0x3a, 0xfb, 0xdb, 0xcc, 0x9f, 0x07, 0xe5, 0x6a, 0xdf, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0xf1,
0x46, 0x34, 0x66, 0x70, 0x04, 0x00, 0x00,
} }
...@@ -109,6 +109,8 @@ type SSHReceivePackRequest struct { ...@@ -109,6 +109,8 @@ type SSHReceivePackRequest struct {
GlUsername string `protobuf:"bytes,5,opt,name=gl_username,json=glUsername" json:"gl_username,omitempty"` GlUsername string `protobuf:"bytes,5,opt,name=gl_username,json=glUsername" json:"gl_username,omitempty"`
// Git protocol version // Git protocol version
GitProtocol string `protobuf:"bytes,6,opt,name=git_protocol,json=gitProtocol" json:"git_protocol,omitempty"` GitProtocol string `protobuf:"bytes,6,opt,name=git_protocol,json=gitProtocol" json:"git_protocol,omitempty"`
// Parameters to use with git -c (key=value pairs)
GitConfigOptions []string `protobuf:"bytes,7,rep,name=git_config_options,json=gitConfigOptions" json:"git_config_options,omitempty"`
} }
func (m *SSHReceivePackRequest) Reset() { *m = SSHReceivePackRequest{} } func (m *SSHReceivePackRequest) Reset() { *m = SSHReceivePackRequest{} }
...@@ -158,6 +160,13 @@ func (m *SSHReceivePackRequest) GetGitProtocol() string { ...@@ -158,6 +160,13 @@ func (m *SSHReceivePackRequest) GetGitProtocol() string {
return "" return ""
} }
func (m *SSHReceivePackRequest) GetGitConfigOptions() []string {
if m != nil {
return m.GitConfigOptions
}
return nil
}
type SSHReceivePackResponse struct { type SSHReceivePackResponse struct {
// A chunk of raw data from 'git receive-pack' standard output // A chunk of raw data from 'git receive-pack' standard output
Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"` Stdout []byte `protobuf:"bytes,1,opt,name=stdout,proto3" json:"stdout,omitempty"`
...@@ -507,33 +516,34 @@ var _SSHService_serviceDesc = grpc.ServiceDesc{ ...@@ -507,33 +516,34 @@ var _SSHService_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("ssh.proto", fileDescriptor14) } func init() { proto.RegisterFile("ssh.proto", fileDescriptor14) }
var fileDescriptor14 = []byte{ var fileDescriptor14 = []byte{
// 445 bytes of a gzipped FileDescriptorProto // 452 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x53, 0xc1, 0x6e, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x53, 0xc1, 0x6e, 0xd3, 0x40,
0x10, 0xc5, 0x8d, 0x13, 0x91, 0x89, 0x8b, 0xa2, 0xa5, 0x2d, 0x56, 0x04, 0xd4, 0x98, 0x8b, 0x0f, 0x10, 0xc5, 0x89, 0x13, 0xc8, 0xc4, 0x45, 0xd1, 0xd2, 0x16, 0x2b, 0x02, 0x6a, 0xcc, 0xc5, 0x07,
0x28, 0x42, 0xe9, 0x17, 0x20, 0x84, 0x54, 0xb8, 0x50, 0xad, 0x95, 0x13, 0x07, 0xcb, 0xd8, 0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, 0xc1, 0xfd, 0xb6, 0x8f, 0xa4, 0xf9, 0x5b, 0xf7, 0xdc, 0xe7, 0x4f, 0xfa, 0xe0, 0x16,
0xf7, 0xe6, 0xe9, 0x6e, 0x6e, 0x16, 0xec, 0x2f, 0x68, 0x93, 0xbf, 0x1f, 0x55, 0x87, 0x79, 0xf1, 0xed, 0x7b, 0x98, 0xed, 0x4b, 0x47, 0xce, 0x3a, 0xf3, 0xb4, 0x9d, 0x9b, 0x07, 0xfd, 0x05, 0x4d,
0x33, 0x00, 0x00, 0xff, 0xff, 0xf7, 0x9a, 0x40, 0x97, 0xd6, 0x04, 0x00, 0x00, 0xf2, 0x0f, 0x63, 0x7b, 0xc6, 0xe7, 0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x98, 0x8e, 0xd7,
0x04, 0x05, 0x00, 0x00,
} }
...@@ -41,13 +41,13 @@ ...@@ -41,13 +41,13 @@
"versionExact": "v1.0.5" "versionExact": "v1.0.5"
}, },
{ {
"checksumSHA1": "RRkpmIDyoI4sb+EHc5I9m1Q8eJc=", "checksumSHA1": "cGc0AOiqkNlSVMc2w/dIJfoWDdQ=",
"path": "gitlab.com/gitlab-org/gitaly-proto/go", "path": "gitlab.com/gitlab-org/gitaly-proto/go",
"revision": "db2cc649cf77ebe5b3b2672672888522060145d6", "revision": "e3a5c0a6da1c62f406f6b74b281dad43f8b74ea5",
"revisionTime": "2018-07-20T09:14:50Z", "revisionTime": "2018-08-02T15:59:47Z",
"tree": true, "tree": true,
"version": "v0.109.0", "version": "v0.112.0",
"versionExact": "v0.109.0" "versionExact": "v0.112.0"
}, },
{ {
"checksumSHA1": "dUHJbKas746n5fLzlwxHb6FOCxs=", "checksumSHA1": "dUHJbKas746n5fLzlwxHb6FOCxs=",
......
...@@ -11,10 +11,11 @@ module Action ...@@ -11,10 +11,11 @@ module Action
'git-receive-pack' => File.join(ROOT_PATH, 'bin', 'gitaly-receive-pack') 'git-receive-pack' => File.join(ROOT_PATH, 'bin', 'gitaly-receive-pack')
}.freeze }.freeze
def initialize(actor, gl_repository, gl_username, git_protocol, repository_path, gitaly) def initialize(actor, gl_repository, gl_username, git_config_options, git_protocol, repository_path, gitaly)
@actor = actor @actor = actor
@gl_repository = gl_repository @gl_repository = gl_repository
@gl_username = gl_username @gl_username = gl_username
@git_config_options = git_config_options
@git_protocol = git_protocol @git_protocol = git_protocol
@repository_path = repository_path @repository_path = repository_path
@gitaly = gitaly @gitaly = gitaly
...@@ -24,6 +25,7 @@ module Action ...@@ -24,6 +25,7 @@ module Action
new(actor, new(actor,
json['gl_repository'], json['gl_repository'],
json['gl_username'], json['gl_username'],
json['git_config_options'],
json['git_protocol'], json['git_protocol'],
json['repository_path'], json['repository_path'],
json['gitaly']) json['gitaly'])
...@@ -39,7 +41,7 @@ module Action ...@@ -39,7 +41,7 @@ module Action
private private
attr_reader :actor, :gl_repository, :gl_username, :repository_path, :gitaly attr_reader :actor, :gl_repository, :gl_username, :git_config_options, :repository_path, :gitaly
def git_protocol def git_protocol
@git_protocol || ENV['GIT_PROTOCOL'] # TODO: tidy this up @git_protocol || ENV['GIT_PROTOCOL'] # TODO: tidy this up
...@@ -98,6 +100,7 @@ module Action ...@@ -98,6 +100,7 @@ module Action
'gl_repository' => gl_repository, 'gl_repository' => gl_repository,
'gl_id' => actor.identifier, 'gl_id' => actor.identifier,
'gl_username' => gl_username, 'gl_username' => gl_username,
'git_config_options' => git_config_options,
'git_protocol' => git_protocol 'git_protocol' => git_protocol
} }
end end
......
...@@ -10,6 +10,7 @@ describe Action::Gitaly do ...@@ -10,6 +10,7 @@ describe Action::Gitaly do
let(:key) { Actor::Key.new(key_id) } let(:key) { Actor::Key.new(key_id) }
let(:gl_repository) { 'project-1' } let(:gl_repository) { 'project-1' }
let(:gl_username) { 'testuser' } let(:gl_username) { 'testuser' }
let(:git_config_options) { ['receive.MaxInputSize=10000'] }
let(:git_protocol) { 'version=2' } let(:git_protocol) { 'version=2' }
let(:tmp_repos_path) { File.join(ROOT_PATH, 'tmp', 'repositories') } let(:tmp_repos_path) { File.join(ROOT_PATH, 'tmp', 'repositories') }
let(:repo_name) { 'gitlab-ci.git' } let(:repo_name) { 'gitlab-ci.git' }
...@@ -37,7 +38,7 @@ describe Action::Gitaly do ...@@ -37,7 +38,7 @@ describe Action::Gitaly do
end end
subject do subject do
described_class.new(key, gl_repository, gl_username, git_protocol, repository_path, gitaly) described_class.new(key, gl_repository, gl_username, git_config_options, git_protocol, repository_path, gitaly)
end end
describe '#execute' do describe '#execute' do
...@@ -68,6 +69,7 @@ describe Action::Gitaly do ...@@ -68,6 +69,7 @@ describe Action::Gitaly do
'gl_repository' => gl_repository, 'gl_repository' => gl_repository,
'gl_id' => key_str, 'gl_id' => key_str,
'gl_username' => gl_username, 'gl_username' => gl_username,
'git_config_options' => git_config_options,
'git_protocol' => git_protocol 'git_protocol' => git_protocol
} }
end end
......
...@@ -12,6 +12,7 @@ describe GitlabAccess do ...@@ -12,6 +12,7 @@ describe GitlabAccess do
'key-1', 'key-1',
'project-1', 'project-1',
'testuser', 'testuser',
['receive.MaxInputSize=10000'],
'version=2', 'version=2',
'/home/git/repositories', '/home/git/repositories',
nil nil
......
...@@ -20,6 +20,7 @@ describe GitlabShell do ...@@ -20,6 +20,7 @@ describe GitlabShell do
let(:repo_path) { File.join(tmp_repos_path, repo_name) } let(:repo_path) { File.join(tmp_repos_path, repo_name) }
let(:gl_repository) { 'project-1' } let(:gl_repository) { 'project-1' }
let(:gl_username) { 'testuser' } let(:gl_username) { 'testuser' }
let(:git_config_options) { ['receive.MaxInputSize=10000'] }
let(:git_protocol) { 'version=2' } let(:git_protocol) { 'version=2' }
let(:api) { double(GitlabNet) } let(:api) { double(GitlabNet) }
...@@ -29,6 +30,7 @@ describe GitlabShell do ...@@ -29,6 +30,7 @@ describe GitlabShell do
actor, actor,
gl_repository, gl_repository,
gl_username, gl_username,
git_config_options,
git_protocol, git_protocol,
repo_path, repo_path,
{ 'repository' => { 'relative_path' => repo_name, 'storage_name' => 'default' } , 'address' => 'unix:gitaly.socket' }) { 'repository' => { 'relative_path' => repo_name, 'storage_name' => 'default' } , 'address' => 'unix:gitaly.socket' })
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment