summaryrefslogtreecommitdiff
path: root/internal/handler/exec.go
diff options
context:
space:
mode:
authorAsh McKenzie <amckenzie@gitlab.com>2020-11-20 10:59:19 +1100
committerAsh McKenzie <amckenzie@gitlab.com>2020-11-20 10:59:19 +1100
commit97bb3321f711a21a33d1b9e1f3975654e23660b4 (patch)
tree61bc3e7e8dc33eba38da983e58a4ef0ddd750c23 /internal/handler/exec.go
parentf558aa505cb2803cc0680e9176f1e78b1f1a711a (diff)
downloadgitlab-shell-97bb3321f711a21a33d1b9e1f3975654e23660b4.tar.gz
Include key ID and type in metadata
Diffstat (limited to 'internal/handler/exec.go')
-rw-r--r--internal/handler/exec.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/handler/exec.go b/internal/handler/exec.go
index fdf3810..5ead63e 100644
--- a/internal/handler/exec.go
+++ b/internal/handler/exec.go
@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"os"
+ "strconv"
"strings"
log "github.com/sirupsen/logrus"
@@ -73,6 +74,8 @@ func (gc *GitalyCommand) PrepareContext(ctx context.Context, repository *pb.Repo
if !ok {
md = metadata.New(nil)
}
+ md.Append("key_id", strconv.Itoa(response.KeyId))
+ md.Append("key_type", response.KeyType)
md.Append("user_id", response.UserId)
md.Append("username", response.Username)
md.Append("remote_ip", sshenv.LocalAddr())