diff --git a/agentprotocol/NewForwardCtx.go b/agentprotocol/NewForwardCtx.go index e368bf9a..bb7808f9 100644 --- a/agentprotocol/NewForwardCtx.go +++ b/agentprotocol/NewForwardCtx.go @@ -3,13 +3,13 @@ package agentprotocol import ( "io" - log "go.containerssh.io/libcontainerssh/log" + log "go.containerssh.io/libcontainerssh/log" ) func NewForwardCtx(fromBackend io.Reader, toBackend io.Writer, logger log.Logger) *ForwardCtx { return &ForwardCtx{ fromBackend: fromBackend, - toBackend: toBackend, - logger: logger, + toBackend: toBackend, + logger: logger, } -} \ No newline at end of file +} diff --git a/agentprotocol/Protocol.go b/agentprotocol/Protocol.go index 0d60035d..9d2fce35 100644 --- a/agentprotocol/Protocol.go +++ b/agentprotocol/Protocol.go @@ -1,15 +1,15 @@ package agentprotocol const ( - CONNECTION_TYPE_X11 = iota - CONNECTION_TYPE_PORT_FORWARD = iota - CONNECTION_TYPE_PORT_DIAL = iota + CONNECTION_TYPE_X11 = iota + CONNECTION_TYPE_PORT_FORWARD = iota + CONNECTION_TYPE_PORT_DIAL = iota CONNECTION_TYPE_SOCKET_FORWARD = iota - CONNECTION_TYPE_SOCKET_DIAL = iota + CONNECTION_TYPE_SOCKET_DIAL = iota ) const ( - PROTOCOL_TCP string = "tcp" + PROTOCOL_TCP string = "tcp" PROTOCOL_UNIX string = "unix" ) @@ -24,10 +24,10 @@ const ( ) type SetupPacket struct { - ConnectionType uint32 - BindHost string - BindPort uint32 - Protocol string + ConnectionType uint32 + BindHost string + BindPort uint32 + Protocol string Screen string SingleConnection bool @@ -36,8 +36,8 @@ type SetupPacket struct { } type NewConnectionPayload struct { - Protocol string - + Protocol string + ConnectedAddress string ConnectedPort uint32 OriginatorAddress string @@ -45,7 +45,7 @@ type NewConnectionPayload struct { } type Packet struct { - Type int + Type int ConnectionId uint64 - Payload []byte + Payload []byte } diff --git a/agentprotocol/server.go b/agentprotocol/server.go index d0924358..2ae7285f 100644 --- a/agentprotocol/server.go +++ b/agentprotocol/server.go @@ -6,9 +6,9 @@ import ( "sync" "time" - log "go.containerssh.io/libcontainerssh/log" - message "go.containerssh.io/libcontainerssh/message" "github.com/fxamacker/cbor/v2" + log "go.containerssh.io/libcontainerssh/log" + message "go.containerssh.io/libcontainerssh/message" ) const ( diff --git a/agentprotocol/server_test.go b/agentprotocol/server_test.go index b4f589ae..1ecbc955 100644 --- a/agentprotocol/server_test.go +++ b/agentprotocol/server_test.go @@ -5,9 +5,9 @@ import ( "io" "testing" - proto "go.containerssh.io/libcontainerssh/agentprotocol" + proto "go.containerssh.io/libcontainerssh/agentprotocol" - log "go.containerssh.io/libcontainerssh/log" + log "go.containerssh.io/libcontainerssh/log" ) // region Tests diff --git a/auditlog/codec/Decoder.go b/auditlog/codec/Decoder.go index d9f8d778..eba51664 100644 --- a/auditlog/codec/Decoder.go +++ b/auditlog/codec/Decoder.go @@ -1,7 +1,7 @@ package codec import ( - internalCodec "go.containerssh.io/libcontainerssh/internal/auditlog/codec" + internalCodec "go.containerssh.io/libcontainerssh/internal/auditlog/codec" ) // Decoder is a module that is resonsible for decoding a binary testdata stream into audit log messages. diff --git a/auditlog/message/channelrequest.go b/auditlog/message/channelrequest.go index 566b2f3e..e1fc6c89 100644 --- a/auditlog/message/channelrequest.go +++ b/auditlog/message/channelrequest.go @@ -100,7 +100,7 @@ func (p PayloadChannelRequestPty) Equals(other Payload) bool { } type PayloadChannelRequestX11 struct { - RequestID uint64 `json:"requestId" yaml:"requestId"` + RequestID uint64 `json:"requestId" yaml:"requestId"` SingleConnection bool `json:"singleConnection" yaml:"singleConnection"` AuthProtocol string `json:"authProtocol" yaml:"authProtocol"` diff --git a/auditlog/message/globalrequest.go b/auditlog/message/globalrequest.go index a4cfd501..9243af91 100644 --- a/auditlog/message/globalrequest.go +++ b/auditlog/message/globalrequest.go @@ -29,4 +29,4 @@ func (p PayloadGlobalRequestDecodeFailed) Equals(other Payload) bool { return false } return p.RequestID == p2.RequestID && p.RequestType == p2.RequestType && p.Reason == p2.Reason -} \ No newline at end of file +} diff --git a/auditlog/storage/factory.go b/auditlog/storage/factory.go index e222cbc4..a2c4978e 100644 --- a/auditlog/storage/factory.go +++ b/auditlog/storage/factory.go @@ -1,10 +1,10 @@ package storage import ( - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auditlog" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auditlog" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) func New(cfg config.AuditLogConfig, logger log.Logger) (Storage, error) { diff --git a/auditlog/storage/storage.go b/auditlog/storage/storage.go index a06c2135..7ddee37a 100644 --- a/auditlog/storage/storage.go +++ b/auditlog/storage/storage.go @@ -1,7 +1,7 @@ package storage import ( - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" ) type Storage interface { diff --git a/auth/protocol.go b/auth/protocol.go index d50ec598..c665a08c 100644 --- a/auth/protocol.go +++ b/auth/protocol.go @@ -1,18 +1,20 @@ package auth import ( - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) // PasswordAuthRequest is an authentication request for password authentication. // // swagger:model PasswordAuthRequest type PasswordAuthRequest struct { + // swagger:allOf metadata.ConnectionAuthPendingMetadata `json:",inline"` // Password the user provided for authentication. // // required: true + // in: body // swagger:strfmt Base64 Password string `json:"passwordBase64"` } @@ -21,8 +23,11 @@ type PasswordAuthRequest struct { // // swagger:model PublicKeyAuthRequest type PublicKeyAuthRequest struct { + // swagger:allOf metadata.ConnectionAuthPendingMetadata `json:",inline"` + // in: body + // required: true PublicKey `json:",inline"` } @@ -32,6 +37,7 @@ type PublicKeyAuthRequest struct { // // swagger:model AuthorizationRequest type AuthorizationRequest struct { + // swagger:allOf metadata.ConnectionAuthenticatedMetadata `json:",inline"` } @@ -39,7 +45,16 @@ type AuthorizationRequest struct { // // swagger:model AuthResponseBody type ResponseBody struct { - metadata.ConnectionAuthenticatedMetadata `json:",inline"` + metadata.DynamicMetadata `json:",inline"` + + // AuthenticatedUsername contains the username that was actually verified. This may differ from LoginUsername when, + // for example OAuth2 or Kerberos authentication is used. This field is empty until the authentication phase is + // completed. + // + // required: false + // in: body + // example: systemusername + AuthenticatedUsername string `json:"authenticatedUsername,omitempty"` // Success indicates if the authentication was successful. // @@ -55,5 +70,6 @@ type Response struct { // The response body // // in: body - ResponseBody + // required: true + Body ResponseBody } diff --git a/auth/pubkey.go b/auth/pubkey.go index 0ab698c7..ed673d7c 100644 --- a/auth/pubkey.go +++ b/auth/pubkey.go @@ -5,5 +5,6 @@ type PublicKey struct { // PublicKey is the key in the authorized key format. // // required: true + // example: ssh-rsa ... PublicKey string `json:"publicKey"` } diff --git a/auth/webhook/client.go b/auth/webhook/client.go index 5502312e..3a3e921f 100644 --- a/auth/webhook/client.go +++ b/auth/webhook/client.go @@ -1,13 +1,13 @@ package webhook import ( - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/metadata" ) type Client interface { diff --git a/auth/webhook/handler.go b/auth/webhook/handler.go index 1802178a..7a34f9b1 100644 --- a/auth/webhook/handler.go +++ b/auth/webhook/handler.go @@ -1,7 +1,7 @@ package webhook import ( - "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/auth" ) // AuthRequestHandler describes the methods an authentication server has to implement in order to be usable with the diff --git a/auth/webhook/handler_factory.go b/auth/webhook/handler_factory.go index 10e2abee..7d668329 100644 --- a/auth/webhook/handler_factory.go +++ b/auth/webhook/handler_factory.go @@ -3,8 +3,8 @@ package webhook import ( "net/http" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/log" ) // NewHandler creates a HTTP handler that forwards calls to the provided h config request handler. diff --git a/auth/webhook/server.go b/auth/webhook/server.go index 6001c4c6..befb9e39 100644 --- a/auth/webhook/server.go +++ b/auth/webhook/server.go @@ -1,10 +1,10 @@ package webhook import ( - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/log" ) // NewServer returns a complete HTTP server that responds to the authentication requests. diff --git a/auth/webhook/server_test.go b/auth/webhook/server_test.go index ad192a88..34bbb3c9 100644 --- a/auth/webhook/server_test.go +++ b/auth/webhook/server_test.go @@ -5,12 +5,12 @@ import ( "os" "time" - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/auth/webhook" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/service" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/auth/webhook" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/service" ) // myAuthReqHandler is your handler for authentication requests. diff --git a/cmd/containerssh-auditlog-decoder/main.go b/cmd/containerssh-auditlog-decoder/main.go index 12f9f632..e90d9c5b 100644 --- a/cmd/containerssh-auditlog-decoder/main.go +++ b/cmd/containerssh-auditlog-decoder/main.go @@ -7,7 +7,7 @@ import ( "log" "os" - "go.containerssh.io/libcontainerssh/auditlog/codec" + "go.containerssh.io/libcontainerssh/auditlog/codec" ) func main() { diff --git a/cmd/containerssh-testauthconfigserver/main.go b/cmd/containerssh-testauthconfigserver/main.go index 982b145b..f3135a6f 100644 --- a/cmd/containerssh-testauthconfigserver/main.go +++ b/cmd/containerssh-testauthconfigserver/main.go @@ -1,7 +1,7 @@ // ContainerSSH Authentication and Configuration Server // // This OpenAPI document describes the API endpoints that are required for implementing an authentication -// and configuration server for ContainerSSH. (See https://github.com/containerssh/libcontainerssh for details.) +// and configuration server for ContainerSSH. (See https://github.com/containerssh/containerssh for details.) // // Schemes: http, https // Host: localhost @@ -24,23 +24,23 @@ import ( "os/signal" "syscall" - publicAuth "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - configWebhook "go.containerssh.io/libcontainerssh/config/webhook" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/service" "github.com/docker/docker/api/types/container" + "go.containerssh.io/libcontainerssh/auth" + authWebhook "go.containerssh.io/libcontainerssh/auth/webhook" + "go.containerssh.io/libcontainerssh/config" + configWebhook "go.containerssh.io/libcontainerssh/config/webhook" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/service" ) type authHandler struct { } -// swagger:operation POST /password Authentication authPassword +// swagger:operation POST /authz Authorization authorize // -// Password authentication +// Authorization // // --- // parameters: @@ -53,22 +53,17 @@ type authHandler struct { // responses: // "200": // "$ref": "#/responses/AuthResponse" -func (a *authHandler) OnPassword(meta metadata.ConnectionAuthPendingMetadata, Password []byte) ( +func (a *authHandler) OnAuthorization(meta metadata.ConnectionAuthenticatedMetadata) ( bool, metadata.ConnectionAuthenticatedMetadata, error, ) { - if os.Getenv("CONTAINERSSH_ALLOW_ALL") == "1" || - meta.Username == "foo" || - meta.Username == "busybox" { - return true, meta.Authenticated(meta.Username), nil - } - return false, meta.AuthFailed(), nil + return true, meta.Authenticated(meta.Username), nil } -// swagger:operation POST /pubkey Authentication authPubKey +// swagger:operation POST /password Authentication authPassword // -// Public key authentication +// Password authentication // // --- // parameters: @@ -77,37 +72,39 @@ func (a *authHandler) OnPassword(meta metadata.ConnectionAuthPendingMetadata, Pa // description: The authentication request // required: true // schema: -// "$ref": "#/definitions/PublicKeyAuthRequest" +// "$ref": "#/definitions/PasswordAuthRequest" // responses: // "200": // "$ref": "#/responses/AuthResponse" -func (a *authHandler) OnPubKey(meta metadata.ConnectionAuthPendingMetadata, publicKey publicAuth.PublicKey) ( +func (a *authHandler) OnPassword(metadata metadata.ConnectionAuthPendingMetadata, password []byte) ( bool, metadata.ConnectionAuthenticatedMetadata, error, ) { - if meta.Username == "foo" || meta.Username == "busybox" { - return true, meta.Authenticated(meta.Username), nil + if os.Getenv("CONTAINERSSH_ALLOW_ALL") == "1" || + metadata.Username == "foo" || + metadata.Username == "busybox" { + return true, metadata.Authenticated(metadata.Username), nil } - return false, meta.AuthFailed(), nil + return false, metadata.AuthFailed(), nil } -// swagger:operation POST /authz Authentication authz +// swagger:operation POST /pubkey Authentication authPubKey // -// Authorization +// Public key authentication // // --- // parameters: // - name: request // in: body -// description: The authorization request +// description: The authentication request // required: true // schema: -// "$ref": "#/definitions/AuthorizationRequest" +// "$ref": "#/definitions/PublicKeyAuthRequest" // responses: // "200": // "$ref": "#/responses/AuthResponse" -func (a *authHandler) OnAuthorization(meta metadata.ConnectionAuthenticatedMetadata) ( +func (a *authHandler) OnPubKey(meta metadata.ConnectionAuthPendingMetadata, publicKey auth.PublicKey) ( bool, metadata.ConnectionAuthenticatedMetadata, error, @@ -139,8 +136,8 @@ func (c *configHandler) OnConfig(request config.Request) (config.AppConfig, erro cfg := config.AppConfig{} if request.Username == "busybox" { - cfg.Docker.Execution.Launch.ContainerConfig = &container.Config{} - cfg.Docker.Execution.Launch.ContainerConfig.Image = "busybox" + cfg.Docker.Execution.DockerLaunchConfig.ContainerConfig = &container.Config{} + cfg.Docker.Execution.DockerLaunchConfig.ContainerConfig.Image = "busybox" cfg.Docker.Execution.DisableAgent = true cfg.Docker.Execution.Mode = config.DockerExecutionModeSession cfg.Docker.Execution.ShellCommand = []string{"/bin/sh"} @@ -168,15 +165,17 @@ func (h *handler) ServeHTTP(writer goHttp.ResponseWriter, request *goHttp.Reques } func main() { - logger, err := log.NewLogger(config.LogConfig{ - Level: config.LogLevelDebug, - Format: config.LogFormatLJSON, - Destination: config.LogDestinationStdout, - }) + logger, err := log.NewLogger( + config.LogConfig{ + Level: config.LogLevelDebug, + Format: config.LogFormatLJSON, + Destination: config.LogDestinationStdout, + }, + ) if err != nil { panic(err) } - authHTTPHandler := auth.NewHandler(&authHandler{}, logger) + authHTTPHandler := authWebhook.NewHandler(&authHandler{}, logger) configHTTPHandler, err := configWebhook.NewHandler(&configHandler{}, logger) if err != nil { panic(err) @@ -207,10 +206,12 @@ func main() { func(s service.Service, l service.Lifecycle) { println("Test Auth-Config Server is now running...") close(running) - }).OnStopped( + }, + ).OnStopped( func(s service.Service, l service.Lifecycle) { close(stopped) - }) + }, + ) exitSignalList := []os.Signal{os.Interrupt, os.Kill, syscall.SIGINT, syscall.SIGTERM} exitSignals := make(chan os.Signal, 1) signal.Notify(exitSignals, exitSignalList...) diff --git a/cmd/containerssh/main.go b/cmd/containerssh/main.go index 5fd124a9..7622cc39 100644 --- a/cmd/containerssh/main.go +++ b/cmd/containerssh/main.go @@ -1,7 +1,7 @@ package main import ( - "go.containerssh.io/libcontainerssh" + "go.containerssh.io/libcontainerssh" ) func main() { diff --git a/config/appconfig.go b/config/appconfig.go index af63a6e0..80ecf697 100644 --- a/config/appconfig.go +++ b/config/appconfig.go @@ -3,12 +3,11 @@ package config import ( "fmt" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/message" ) // AppConfig is the root configuration object of ContainerSSH. -//goland:noinspection GoDeprecation type AppConfig struct { // SSH contains the configuration for the SSH server. // swagger:ignore @@ -32,23 +31,30 @@ type AppConfig struct { // swagger:ignore Audit AuditLogConfig `json:"audit" yaml:"audit"` // Health contains the configuration for the health check service. + // swagger:ignore Health HealthConfig `json:"health" yaml:"health"` // Security contains the security restrictions on what can be executed. This option can be changed from the config // server. Security SecurityConfig `json:"security" yaml:"security"` // Backend defines which backend to use. This option can be changed from the config server. + // + // example: docker Backend Backend `json:"backend" yaml:"backend" default:"docker"` // Docker contains the configuration for the docker backend. This option can be changed from the config server. Docker DockerConfig `json:"docker,omitempty" yaml:"docker"` // DockerRun is a placeholder for the removed DockerRun backend. Filling this with anything but nil will yield a // validation error. + // + // swagger:ignore DockerRun interface{} `json:"dockerrun,omitempty"` // Kubernetes contains the configuration for the kubernetes backend. This option can be changed from the config // server. Kubernetes KubernetesConfig `json:"kubernetes,omitempty" yaml:"kubernetes"` // KubeRun is a placeholder for the removed DockerRun backend. Filling this with anything but nil will yield a // validation error. + // + // swagger:ignore KubeRun interface{} `json:"kuberun,omitempty"` // SSHProxy is the configuration for the SSH proxy backend, which forwards requests to a backing SSH server. SSHProxy SSHProxyConfig `json:"sshproxy,omitempty" yaml:"sshproxy"` diff --git a/config/docker.go b/config/docker.go index e207a131..9de199b9 100644 --- a/config/docker.go +++ b/config/docker.go @@ -13,6 +13,8 @@ import ( ) // DockerConfig is the base configuration structure of the Docker backend. +// +// swagger:model DockerConfig type DockerConfig struct { // Connection configures how to connect to dockerd Connection DockerConnectionConfig `json:"connection" yaml:"connection"` @@ -68,6 +70,8 @@ func parseRawDuration(rawValue interface{}, d *time.Duration) error { // DockerExecutionMode determines when a container is launched. // DockerExecutionModeConnection launches one container per SSH connection (default), while DockerExecutionModeSession launches // one container per SSH session. +// +// swagger:enum DockerExecutionMode type DockerExecutionMode string const ( @@ -90,39 +94,116 @@ func (e DockerExecutionMode) Validate() error { } // DockerExecutionConfig contains the configuration of what container to run in Docker. -//goland:noinspection GoVetStructTag +// +// swagger:model DockerExecutionConfig type DockerExecutionConfig struct { - // Launch contains the Docker-specific launch configuration. - Launch DockerLaunchConfig `json:",inline" yaml:",inline"` + // DockerLaunchConfig contains the Docker-specific launch configuration. + DockerLaunchConfig `json:",inline,omitempty" yaml:",inline,omitempty"` + // Mode influences how commands are executed. // - // - If DockerExecutionModeConnection is chosen (default) a new container is launched per connection. In this mode + // - If "connection" is chosen (default) a new container is launched per connection. In this mode // sessions are executed using the "docker exec" functionality and the main container console runs a script that // waits for a termination signal. - // - If DockerExecutionModeSession is chosen a new container is launched per session, leading to potentially multiple + // - If "session" is chosen a new container is launched per session, leading to potentially multiple // containers per connection. In this mode the program is launched directly as the main process of the container. // When configuring this mode you should explicitly configure the "cmd" option to an empty list if you want the // default command in the container to launch. - Mode DockerExecutionMode `json:"mode" yaml:"mode" default:"connection"` + // + // default: connection + Mode DockerExecutionMode `json:"mode,omitempty" yaml:"mode,omitempty" default:"connection"` // IdleCommand is the command that runs as the first process in the container in DockerExecutionModeConnection. Ignored in DockerExecutionModeSession. - IdleCommand []string `json:"idleCommand" yaml:"idleCommand" comment:"Run this command to wait for container exit" default:"[\"/usr/bin/containerssh-agent\", \"wait-signal\", \"--signal\", \"INT\", \"--signal\", \"TERM\"]"` + // + // default: ["/usr/bin/containerssh-agent", "wait-signal", "--signal", "INT", "--signal", "TERM"] + IdleCommand []string `json:"idleCommand,omitempty" yaml:"idleCommand,omitempty" comment:"Run this command to wait for container exit" default:"[\"/usr/bin/containerssh-agent\", \"wait-signal\", \"--signal\", \"INT\", \"--signal\", \"TERM\"]"` // ShellCommand is the command used for launching shells when the container is in DockerExecutionModeConnection. Ignored in DockerExecutionModeSession. - ShellCommand []string `json:"shellCommand" yaml:"shellCommand" comment:"Run this command as a default shell." default:"[\"/bin/bash\"]"` + // + // default: ["/bin/bash"] + ShellCommand []string `json:"shellCommand,omitempty" yaml:"shellCommand,omitempty" comment:"Run this command as a default shell." default:"[\"/bin/bash\"]"` // AgentPath contains the path to the ContainerSSH Guest Agent. - AgentPath string `json:"agentPath" yaml:"agentPath" default:"/usr/bin/containerssh-agent"` + // + // default: /usr/bin/containerssh-agent + AgentPath string `json:"agentPath,omitempty" yaml:"agentPath,omitempty" default:"/usr/bin/containerssh-agent"` // DisableAgent enables using the ContainerSSH Guest Agent. - DisableAgent bool `json:"disableAgent" yaml:"disableAgent"` + // + // default: false + DisableAgent bool `json:"disableAgent,omitempty" yaml:"disableAgent,omitempty"` // Subsystems contains a map of subsystem names and their corresponding binaries in the container. - Subsystems map[string]string `json:"subsystems" yaml:"subsystems" comment:"Subsystem names and binaries map." default:"{\"sftp\":\"/usr/lib/openssh/sftp-server\"}"` + // + // default: {"sftp":"/usr/lib/openssh/sftp-server"} + Subsystems map[string]string `json:"subsystems,omitempty" yaml:"subsystems,omitempty" comment:"Subsystem names and binaries map." default:"{\"sftp\":\"/usr/lib/openssh/sftp-server\"}"` // ImagePullPolicy controls when to pull container images. - ImagePullPolicy DockerImagePullPolicy `json:"imagePullPolicy" yaml:"imagePullPolicy" comment:"Image pull policy" default:"IfNotPresent"` + // + // default: IfNotPresent + ImagePullPolicy DockerImagePullPolicy `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty" comment:"Image pull policy" default:"IfNotPresent"` // ExposeAuthMetadataAsEnv lets you expose the authentication metadata (e.g. GITHUB_TOKEN) as an environment variable // in the container. In contrast to the environment variables set in the SSH connection these environment variables // are available to all processes in the container, including the idle command. - ExposeAuthMetadataAsEnv bool `json:"exposeAuthMetadataAsEnv" yaml:"exposeAuthMetadataAsEnv"` + // + // default: false + ExposeAuthMetadataAsEnv bool `json:"exposeAuthMetadataAsEnv,omitempty" yaml:"exposeAuthMetadataAsEnv,omitempty"` +} + +type tmpDockerExecutionConfig struct { + Container interface{} `json:"container" yaml:"container"` + Host interface{} `json:"host" yaml:"host"` + Network interface{} `json:"network" yaml:"network"` + Platform interface{} `json:"platform" yaml:"platform"` + ContainerName interface{} `json:"containername" yaml:"containername"` + Mode DockerExecutionMode `json:"mode,omitempty" yaml:"mode,omitempty" default:"connection"` + IdleCommand []string `json:"idleCommand,omitempty" yaml:"idleCommand,omitempty" comment:"Run this command to wait for container exit" default:"[\"/usr/bin/containerssh-agent\", \"wait-signal\", \"--signal\", \"INT\", \"--signal\", \"TERM\"]"` + ShellCommand []string `json:"shellCommand,omitempty" yaml:"shellCommand,omitempty" comment:"Run this command as a default shell." default:"[\"/bin/bash\"]"` + AgentPath string `json:"agentPath,omitempty" yaml:"agentPath,omitempty" default:"/usr/bin/containerssh-agent"` + DisableAgent bool `json:"disableAgent,omitempty" yaml:"disableAgent,omitempty"` + Subsystems map[string]string `json:"subsystems,omitempty" yaml:"subsystems,omitempty" comment:"Subsystem names and binaries map." default:"{\"sftp\":\"/usr/lib/openssh/sftp-server\"}"` + ImagePullPolicy DockerImagePullPolicy `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty" comment:"Image pull policy" default:"IfNotPresent"` + ExposeAuthMetadataAsEnv bool `json:"exposeAuthMetadataAsEnv,omitempty" yaml:"exposeAuthMetadataAsEnv,omitempty"` +} + + +// UnmarshalJSON takes a JSON byte array and unmarshalls it into a structure. +func (c *DockerExecutionConfig) UnmarshalJSON(b []byte) error { + decoder := json.NewDecoder(bytes.NewReader(b)) + tmp := &tmpDockerExecutionConfig{} + if err := decoder.Decode(tmp); err != nil { + return err + } + launch := DockerLaunchConfig{} + decoder = json.NewDecoder(bytes.NewReader(b)) + if err := decoder.Decode(&launch); err != nil { + return err + } + c.fill(launch, tmp) + return nil +} + +// UnmarshalYAML takes a YAML byte array and unmarshalls it into a structure. +func (c *DockerExecutionConfig) UnmarshalYAML(unmarshal func(interface{}) error) error { + tmp := &tmpDockerExecutionConfig{} + if err := unmarshal(tmp); err != nil { + return err + } + launch := DockerLaunchConfig{} + if err := unmarshal(&launch); err != nil { + return err + } + c.fill(launch, tmp) + return nil +} + +func (c *DockerExecutionConfig) fill(launch DockerLaunchConfig, tmp *tmpDockerExecutionConfig) { + c.DockerLaunchConfig = launch + c.Mode = tmp.Mode + c.IdleCommand = tmp.IdleCommand + c.ShellCommand = tmp.ShellCommand + c.AgentPath = tmp.AgentPath + c.DisableAgent = tmp.DisableAgent + c.Subsystems = tmp.Subsystems + c.ImagePullPolicy = tmp.ImagePullPolicy + c.ExposeAuthMetadataAsEnv = tmp.ExposeAuthMetadataAsEnv } // Validate validates the docker config structure. @@ -135,12 +216,12 @@ func (c DockerExecutionConfig) Validate() error { } switch c.Mode { case DockerExecutionModeSession: - if c.Launch.HostConfig != nil && !c.Launch.HostConfig.RestartPolicy.IsNone() { + if c.DockerLaunchConfig.HostConfig != nil && !c.DockerLaunchConfig.HostConfig.RestartPolicy.IsNone() { return wrap( newError( "restartPolicy", "unsupported restart policy for execution mode \"session\": %s (session containers may not restart)", - c.Launch.HostConfig.RestartPolicy.Name, + c.DockerLaunchConfig.HostConfig.RestartPolicy.Name, ), "hostConfig", ) @@ -149,7 +230,7 @@ func (c DockerExecutionConfig) Validate() error { if err := c.ImagePullPolicy.Validate(); err != nil { return wrap(err, "imagePullPolicy") } - if err := c.Launch.Validate(); err != nil { + if err := c.DockerLaunchConfig.Validate(); err != nil { return err } if err := c.Mode.Validate(); err != nil { @@ -166,6 +247,8 @@ func (c DockerExecutionConfig) Validate() error { // the "latest" tag was specified. // - ImagePullPolicyNever means that the image will be never pulled, and if the image is not available locally the // connection will fail. +// +// swagger:enum DockerImagePullPolicy type DockerImagePullPolicy string const ( @@ -194,18 +277,50 @@ func (p DockerImagePullPolicy) Validate() error { } // DockerTimeoutConfig drives the various timeouts in the Docker backend. +// +// swagger:model DockerTimeoutConfig type DockerTimeoutConfig struct { - // ContainerStart is the maximum time starting a container may take. + // ContainerStart is the maximum time starting a container may take. It may be configured as an integer in + // nanoseconds or as a time formatting string. + // + // required: false + // example: 60s + // swagger:type string ContainerStart time.Duration `json:"containerStart" yaml:"containerStart" default:"60s"` - // ContainerStop is the maximum time to wait for a container to stop. This should always be set higher than the Docker StopTimeout. + // ContainerStop is the maximum time to wait for a container to stop. + // This should always be set higher than the Docker StopTimeout. It may be configured as an integer in + // nanoseconds or as a time formatting string. + // + // required: true + // example: 60s + // swagger:type string ContainerStop time.Duration `json:"containerStop" yaml:"containerStop" default:"60s"` - // CommandStart sets the maximum time starting a command may take. + // CommandStart sets the maximum time starting a command may take. It may be configured as an integer in + // nanoseconds or as a time formatting string. + // + // required: true + // example: 60s + // swagger:type string CommandStart time.Duration `json:"commandStart" yaml:"commandStart" default:"60s"` - // Signal sets the maximum time sending a signal may take. + // Signal sets the maximum time sending a signal may take. It may be configured as an integer in + // nanoseconds or as a time formatting string. + // + // required: true + // example: 60s + // swagger:type string Signal time.Duration `json:"signal" yaml:"signal" default:"60s"` - // Signal sets the maximum time setting the window size may take. + // Signal sets the maximum time setting the window size may take. It may be configured as an integer in + // nanoseconds or as a time formatting string. + // + // required: true + // example: 60s + // swagger:type string Window time.Duration `json:"window" yaml:"window" default:"60s"` - // HTTP + // HTTP is the timeout for the HTTP calls themselves. + // + // required: true + // example: 60s + // swagger:type string HTTP time.Duration `json:"http" yaml:"http" default:"15s"` } @@ -270,6 +385,8 @@ func (t *DockerTimeoutConfig) unmarshalTmp(tmp *dockerTmpTimeoutConfig) error { // DockerLaunchConfig contains the container configuration for the Docker client version 20. type DockerLaunchConfig struct { // ContainerConfig contains container-specific configuration options. + // + // default: {"image":"containerssh/containerssh-guest-image"} ContainerConfig *container.Config `json:"container" yaml:"container" comment:"DockerConfig configuration." default:"{\"image\":\"containerssh/containerssh-guest-image\"}"` // HostConfig contains the host-specific configuration options. HostConfig *container.HostConfig `json:"host" yaml:"host" comment:"Host configuration"` diff --git a/config/docker_unix.go b/config/docker_unix.go index 07aed67c..c938b54c 100644 --- a/config/docker_unix.go +++ b/config/docker_unix.go @@ -6,11 +6,11 @@ package config // DockerConnectionConfig configures how to connect to dockerd. type DockerConnectionConfig struct { // Host is the docker connect URL. - Host string `json:"host" yaml:"host" default:"unix:///var/run/docker.sock"` + Host string `json:"host,omitempty" yaml:"host,omitempty" default:"unix:///var/run/docker.sock"` // CaCert is the CA certificate for Docker connection embedded in the configuration in PEM format. - CaCert string `json:"cacert" yaml:"cacert"` + CaCert string `json:"cacert,omitempty" yaml:"cacert,omitempty"` // Cert is the client certificate in PEM format embedded in the configuration. - Cert string `json:"cert" yaml:"cert"` + Cert string `json:"cert,omitempty" yaml:"cert,omitempty"` // Key is the client key in PEM format embedded in the configuration. - Key string `json:"key" yaml:"key"` + Key string `json:",omitempty" yaml:"key,omitempty"` } diff --git a/config/docker_windows.go b/config/docker_windows.go index c8f9ff97..8577af66 100644 --- a/config/docker_windows.go +++ b/config/docker_windows.go @@ -6,11 +6,11 @@ package config // DockerConnectionConfig configures how to connect to dockerd. type DockerConnectionConfig struct { // Host is the docker connect URL - Host string `json:"host" yaml:"host" default:"npipe:////./pipe/docker_engine"` + Host string `json:"host,omitempty" yaml:"host,omitempty" default:"npipe:////./pipe/docker_engine"` // CaCert is the CA certificate for Docker connection embedded in the configuration in PEM format. - CaCert string `json:"cacert" yaml:"cacert"` + CaCert string `json:"cacert,omitempty" yaml:"cacert,omitempty"` // Cert is the client certificate in PEM format embedded in the configuration. - Cert string `json:"cert" yaml:"cert"` + Cert string `json:"cert,omitempty" yaml:"cert,omitempty"` // Key is the client key in PEM format embedded in the configuration. - Key string `json:"key" yaml:"key"` + Key string `json:"key,omitempty" yaml:"key,omitempty"` } diff --git a/config/kubernetes.go b/config/kubernetes.go index a0339f1b..40241ca8 100644 --- a/config/kubernetes.go +++ b/config/kubernetes.go @@ -11,7 +11,9 @@ import ( k8sYaml "sigs.k8s.io/yaml" ) -// KubernetesConfig is the base configuration structure for Kubernetes +// KubernetesConfig is the base configuration structure for Kubernetes. +// +// swagger:model KubernetesConfig type KubernetesConfig struct { // Connection configures the connection to the Kubernetes cluster. Connection KubernetesConnectionConfig `json:"connection,omitempty" yaml:"connection" comment:"Kubernetes configuration options"` @@ -35,12 +37,25 @@ func (c KubernetesConfig) Validate() error { return nil } -// KubernetesConnectionConfig configures the connection to the Kubernetes cluster. -//goland:noinspection GoVetStructTag +// KubernetesConnectionConfig configures the connection to the Kubernetes cluster. There are multiple ways to +// configure the connection. +// +// - End users are typically issued certificates and will need to provide the "host", "certFile", "keyFile", and +// "caFile" fields. Alternatively, the certificates and keys can be directly provided. +// - Automated, outside the cluster users will typically use a service account and use the "host", "caFile", and +// "bearerTokenFile" fields. Alternatively, these can also be directly specified. +// - In-cluster users will typically use a service account mounted in the ContainerSSH container and specify the +// "caFile" and "bearerTokenFile" fields. +// +// swagger:model KubernetesConnectionConfig type KubernetesConnectionConfig struct { // Host is a host string, a host:port pair, or a URL to the Kubernetes apiserver. Defaults to kubernetes.default.svc. + // + // default: kubernetes.default.svc Host string `json:"host,omitempty" yaml:"host" comment:"a host string, a host:port pair, or a URL to the base of the apiserver." default:"kubernetes.default.svc"` // APIPath is a sub-path that points to the API root. Defaults to /api + // + // default: /api APIPath string `json:"path,omitempty" yaml:"path" comment:"APIPath is a sub-path that points to an API root." default:"/api"` // Username is the username for basic authentication. @@ -49,31 +64,51 @@ type KubernetesConnectionConfig struct { Password string `json:"password,omitempty" yaml:"password" comment:"Password for basic authentication"` // ServerName sets the server name to be set in the SNI and used by the client for TLS verification. + // + // default: same as host ServerName string `json:"serverName,omitempty" yaml:"serverName" comment:"ServerName is passed to the server for SNI and is used in the client to check server certificates against."` // CertFile points to a file that contains the client certificate used for authentication. + // + // example: /path/to/your/cert.crt CertFile string `json:"certFile,omitempty" yaml:"certFile" comment:"File containing client certificate for TLS client certificate authentication."` // KeyFile points to a file that contains the client key used for authentication. + // + // example: /path/to/your/key.pem KeyFile string `json:"keyFile,omitempty" yaml:"keyFile" comment:"File containing client key for TLS client certificate authentication"` // CAFile points to a file that contains the CA certificate for authentication. + // + // example: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt CAFile string `json:"cacertFile,omitempty" yaml:"cacertFile" comment:"File containing trusted root certificates for the server"` // CertData contains a PEM-encoded certificate for TLS client certificate authentication. + // + // example: -----BEGIN CERTIFICATE----- ... CertData string `json:"cert,omitempty" yaml:"cert" comment:"PEM-encoded certificate for TLS client certificate authentication"` // KeyData contains a PEM-encoded client key for TLS client certificate authentication. + // + // example: -----BEGIN RSA PRIVATE KEY----- ... KeyData string `json:"key,omitempty" yaml:"key" comment:"PEM-encoded client key for TLS client certificate authentication"` // CAData contains a PEM-encoded trusted root certificates for the server. + // + // example: -----BEGIN CERTIFICATE----- ... CAData string `json:"cacert,omitempty" yaml:"cacert" comment:"PEM-encoded trusted root certificates for the server"` // BearerToken contains a bearer (service) token for authentication. BearerToken string `json:"bearerToken,omitempty" yaml:"bearerToken" comment:"Bearer (service token) authentication"` // BearerTokenFile points to a file containing a bearer (service) token for authentication. // Set to /var/run/secrets/kubernetes.io/serviceaccount/token to use service token in a Kubernetes kubeConfigCluster. + // + // example: /var/run/secrets/kubernetes.io/serviceaccount/token BearerTokenFile string `json:"bearerTokenFile,omitempty" yaml:"bearerTokenFile" comment:"Path to a file containing a BearerToken. Set to /var/run/secrets/kubernetes.io/serviceaccount/token to use service token in a Kubernetes kubeConfigCluster."` - // QPS indicates the maximum QPS to the master from this client. Defaults to 5. + // QPS indicates the maximum QPS to the master from this client. + // + // default: 5 QPS float32 `json:"qps,omitempty" yaml:"qps" comment:"QPS indicates the maximum QPS to the master from this client." default:"5"` // Burst indicates the maximum burst for throttle. + // + // default: 10 Burst int `json:"burst,omitempty" yaml:"burst" comment:"Maximum burst for throttle." default:"10"` } @@ -93,25 +128,40 @@ func (c KubernetesConnectionConfig) Validate() error { } // KubernetesPodConfig describes the pod to launch. -//goland:noinspection GoVetStructTag type KubernetesPodConfig struct { // Metadata configures the pod metadata. + // + // default: {"namespace":"default","generateName":"containerssh-"} Metadata metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty" default:"{\"namespace\":\"default\",\"generateName\":\"containerssh-\"}"` // Spec contains the pod specification to launch. + // + // default: {"containers":[{"name":"shell","image":"containerssh/containerssh-guest-image"}]} Spec v1.PodSpec `json:"spec,omitempty" yaml:"spec" comment:"Pod specification to launch" default:"{\"containers\":[{\"name\":\"shell\",\"image\":\"containerssh/containerssh-guest-image\"}]}"` // ConsoleContainerNumber specifies the container to attach the running process to. Defaults to 0. + // + // default: 0 ConsoleContainerNumber int `json:"consoleContainerNumber,omitempty" yaml:"consoleContainerNumber" comment:"Which container to attach the SSH connection to" default:"0"` // IdleCommand contains the command to run as the first process in the container. Other commands are executed using the "exec" method. + // + // default: ["/usr/bin/containerssh-agent", "wait-signal", "--signal", "INT", "--signal", "TERM"] IdleCommand []string `json:"idleCommand,omitempty" yaml:"idleCommand" comment:"Run this command to wait for container exit" default:"[\"/usr/bin/containerssh-agent\", \"wait-signal\", \"--signal\", \"INT\", \"--signal\", \"TERM\"]"` // ShellCommand is the command used for launching shells when the container. Required in KubernetesExecutionModeConnection and when the agent is used. + // + // default: ["/bin/bash"] ShellCommand []string `json:"shellCommand,omitempty" yaml:"shellCommand" comment:"Run this command as a default shell." default:"[\"/bin/bash\"]"` // AgentPath contains the path to the ContainerSSH Guest Agent. + // + // default: /usr/bin/containerssh-agent AgentPath string `json:"agentPath,omitempty" yaml:"agentPath" default:"/usr/bin/containerssh-agent"` // DisableAgent disables using the ContainerSSH Guest Agent. + // + // default: false DisableAgent bool `json:"disableAgent,omitempty" yaml:"disableAgent"` // Subsystems contains a map of subsystem names and the executable to launch. + // + // default: {"sftp":"/usr/lib/openssh/sftp-server"} Subsystems map[string]string `json:"subsystems,omitempty" yaml:"subsystems" comment:"Subsystem names and binaries map." default:"{\"sftp\":\"/usr/lib/openssh/sftp-server\"}"` // Mode influences how commands are executed. diff --git a/config/log_test.go b/config/log_test.go index f8d991ff..9df5965b 100644 --- a/config/log_test.go +++ b/config/log_test.go @@ -4,9 +4,9 @@ import ( "encoding/json" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/structutils" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/structutils" "gopkg.in/yaml.v3" ) diff --git a/config/protocol.go b/config/protocol.go index da4dface..9b9706a7 100644 --- a/config/protocol.go +++ b/config/protocol.go @@ -14,8 +14,7 @@ type Request struct { // // swagger:model ConfigResponseBody type ResponseBody struct { - // Metadata is the metadata received from the authentication server. - metadata.ConnectionAuthenticatedMetadata `json:",inline"` + metadata.DynamicMetadata `json:",inline"` // Config is the configuration structure to be passed back from the config server. // diff --git a/config/security.go b/config/security.go index 6920cfb1..f701cf3b 100644 --- a/config/security.go +++ b/config/security.go @@ -37,6 +37,9 @@ type SecurityConfig struct { // MaxSessions drives how many session channels can be open at the same time for a single network connection. // -1 means unlimited. It is strongly recommended to configure this to a sane value, e.g. 10. + // + // default: -1 + // example: 10 MaxSessions int `json:"maxSessions" yaml:"maxSessions" default:"-1"` } @@ -69,15 +72,19 @@ func (c SecurityConfig) Validate() error { return nil } -// SecurityEnvConfig configures setting environment variables. +// SecurityEnvConfig configures whether to allow or deny setting environment variables from the SSH client. type SecurityEnvConfig struct { // Mode configures how to treat environment variable requests by SSH clients. Mode SecurityExecutionPolicy `json:"mode" yaml:"mode" default:""` - // Allow takes effect when Mode is ExecutionPolicyFilter and only allows the specified environment variables to be - // set. + // Allow takes effect when Mode is "filter" and only allows the specified environment variables to be + // set. Environment variables that are not listed are denied. + // + // example: ["TERM"] Allow []string `json:"allow" yaml:"allow"` - // Allow takes effect when Mode is not ExecutionPolicyDisable and disallows the specified environment variables to - // be set. + // Deny takes effect when Mode is not "filter" and disallows the specified environment variables to + // be set. All other environment variables are allowed. + // + // example: ["KILL"] Deny []string `json:"deny" yaml:"deny"` } @@ -95,6 +102,8 @@ type CommandConfig struct { Mode SecurityExecutionPolicy `json:"mode" yaml:"mode" default:""` // Allow takes effect when Mode is ExecutionPolicyFilter and only allows the specified commands to be // executed. Note that the match an exact match is performed to avoid shell injections, etc. + // + // example: ["/allow/this/command"] Allow []string `json:"allow" yaml:"allow"` } @@ -123,11 +132,17 @@ func (s SecurityShellConfig) Validate() error { // SubsystemConfig controls shell executions via SSH. type SubsystemConfig struct { // Mode configures how to treat subsystem requests by SSH clients. + // + // example: filter Mode SecurityExecutionPolicy `json:"mode" yaml:"mode" default:""` // Allow takes effect when Mode is ExecutionPolicyFilter and only allows the specified subsystems to be // executed. + // + // example: ["sftp"] Allow []string `json:"allow" yaml:"allow"` // Allow takes effect when Mode is not ExecutionPolicyDisable and disallows the specified subsystems to be executed. + // + // example: ["sftp"] Deny []string `json:"deny" yaml:"deny"` } @@ -139,20 +154,31 @@ func (s SubsystemConfig) Validate() error { return nil } +// ForwardingConfig configures the various security settings around forwarding network connections and X11 requests. type ForwardingConfig struct { // ReverseForwardingMode configures how to treat reverse port forwarding requests from the container to the client. + // + // default: disable ReverseForwardingMode SecurityExecutionPolicy `json:"reverseForwardingMode" yaml:"reverseForwardingMode" default:"disable"` // ForwardingMode configures how to treat port forwarding requests from the client to the container. Enabling this setting also allows using ContainerSSH as a SOCKs proxy. + // + // default: disable ForwardingMode SecurityExecutionPolicy `json:"forwardingMode" yaml:"forwardingMode" default:"disable"` // SocketForwardingMode configures how to treat connection requests from the client to a unix socket in the container. + // + // default: disable SocketForwardingMode SecurityExecutionPolicy `json:"socketForwardingMode" yaml:"socketForwardingMode" default:"disable"` // SocketListenMode configures how to treat requests to listen for connections to a unix socket in the container. + // + // default: disable SocketListenMode SecurityExecutionPolicy `json:"socketListenMode" yaml:"socketListenMode" default:"disable"` // X11forwardingMode configures how to treat X11 forwarding requests from the container to the client + // + // default: disable X11ForwardingMode SecurityExecutionPolicy `json:"x11ForwardingMode" yaml:"x11ForwardingMode" default:"disable"` } @@ -208,6 +234,8 @@ func (s SecuritySignalConfig) Validate() error { } // SecurityExecutionPolicy drives how to treat a certain request. +// +// swagger:enum SecurityExecutionPolicy type SecurityExecutionPolicy string const ( diff --git a/config/webhook/client_factory.go b/config/webhook/client_factory.go index dce7a8c2..54efb0b2 100644 --- a/config/webhook/client_factory.go +++ b/config/webhook/client_factory.go @@ -1,11 +1,11 @@ package webhook import ( - "go.containerssh.io/libcontainerssh/config" - internalConfig "go.containerssh.io/libcontainerssh/internal/config" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + internalConfig "go.containerssh.io/libcontainerssh/internal/config" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" ) // NewTestClient creates a configuration client, primarily for testing purposes. diff --git a/config/webhook/handler.go b/config/webhook/handler.go index eeb87b72..d9f5cb45 100644 --- a/config/webhook/handler.go +++ b/config/webhook/handler.go @@ -1,7 +1,7 @@ package webhook import ( - "go.containerssh.io/libcontainerssh/internal/config" + "go.containerssh.io/libcontainerssh/internal/config" ) // ConfigRequestHandler is a generic interface for simplified configuration request handling. diff --git a/config/webhook/handler_factory.go b/config/webhook/handler_factory.go index ff6681b9..9c7855f3 100644 --- a/config/webhook/handler_factory.go +++ b/config/webhook/handler_factory.go @@ -3,8 +3,8 @@ package webhook import ( "net/http" - "go.containerssh.io/libcontainerssh/internal/config" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/internal/config" + "go.containerssh.io/libcontainerssh/log" ) // NewHandler creates a HTTP handler that forwards calls to the provided h config request handler. diff --git a/config/webhook/server_test.go b/config/webhook/server_test.go index ac9825ba..09a04f45 100644 --- a/config/webhook/server_test.go +++ b/config/webhook/server_test.go @@ -5,10 +5,10 @@ import ( "os" "time" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/config/webhook" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/config/webhook" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/service" ) type myConfigReqHandler struct { diff --git a/e2e_backend_test.go b/e2e_backend_test.go index fb868391..b576698c 100644 --- a/e2e_backend_test.go +++ b/e2e_backend_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/config" ) // TestBackends tests all possible backends for basic functionality. diff --git a/e2e_framework_test.go b/e2e_framework_test.go index ffd2d08e..d1335fad 100644 --- a/e2e_framework_test.go +++ b/e2e_framework_test.go @@ -16,16 +16,16 @@ import ( "testing" "time" - containerssh "go.containerssh.io/libcontainerssh" - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/auth/webhook" - "go.containerssh.io/libcontainerssh/config" - internalssh "go.containerssh.io/libcontainerssh/internal/ssh" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/service" + containerssh "go.containerssh.io/libcontainerssh" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/auth/webhook" + "go.containerssh.io/libcontainerssh/config" + internalssh "go.containerssh.io/libcontainerssh/internal/ssh" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/service" "golang.org/x/crypto/ssh" ) diff --git a/go.mod b/go.mod index 2bde46ba..9dfc6293 100644 --- a/go.mod +++ b/go.mod @@ -20,7 +20,7 @@ require ( github.com/opencontainers/image-spec v1.0.2 github.com/oschwald/geoip2-golang v1.5.0 github.com/qdm12/reprint v0.0.0-20200326205758-722754a53494 - github.com/stretchr/testify v1.7.0 + github.com/stretchr/testify v1.7.1 golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 gopkg.in/jcmturner/goidentity.v3 v3.0.0 @@ -35,50 +35,94 @@ require ( require ( github.com/BurntSushi/toml v0.3.1 // indirect github.com/Microsoft/go-winio v0.5.1 // indirect + github.com/PuerkitoBio/purell v1.1.1 // indirect + github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/alessio/shellescape v1.4.1 // indirect + github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect + github.com/atombender/go-jsonschema v0.9.0 // indirect github.com/containerd/containerd v1.5.8 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/evanphx/json-patch/v5 v5.2.0 // indirect + github.com/felixge/httpsnoop v1.0.2 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-logr/logr v1.2.0 // indirect + github.com/go-openapi/analysis v0.21.2 // indirect + github.com/go-openapi/errors v0.20.2 // indirect + github.com/go-openapi/inflect v0.19.0 // indirect + github.com/go-openapi/jsonpointer v0.19.5 // indirect + github.com/go-openapi/jsonreference v0.19.6 // indirect + github.com/go-openapi/loads v0.21.0 // indirect + github.com/go-openapi/runtime v0.21.1 // indirect + github.com/go-openapi/spec v0.20.4 // indirect + github.com/go-openapi/strfmt v0.21.1 // indirect + github.com/go-openapi/swag v0.19.15 // indirect + github.com/go-openapi/validate v0.20.3 // indirect + github.com/go-stack/stack v1.8.1 // indirect + github.com/go-swagger/go-swagger v0.29.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/protobuf v1.5.2 // indirect github.com/google/gofuzz v1.1.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect + github.com/gorilla/handlers v1.5.1 // indirect github.com/hashicorp/go-uuid v1.0.2 // indirect + github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect github.com/jcmturner/aescts/v2 v2.0.0 // indirect github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect github.com/jcmturner/gofork v1.0.0 // indirect github.com/jcmturner/goidentity/v6 v6.0.1 // indirect github.com/jcmturner/rpc/v2 v2.0.3 // indirect + github.com/jessevdk/go-flags v1.5.0 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect + github.com/josharian/intern v1.0.0 // indirect github.com/json-iterator/go v1.1.12 // indirect + github.com/kr/pretty v0.3.0 // indirect + github.com/kr/text v0.2.0 // indirect + github.com/magiconair/properties v1.8.5 // indirect + github.com/mailru/easyjson v0.7.7 // indirect github.com/mattn/go-isatty v0.0.14 // indirect + github.com/mitchellh/go-wordwrap v1.0.0 // indirect github.com/moby/spdystream v0.2.0 // indirect github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/morikuni/aec v1.0.0 // indirect + github.com/oklog/ulid v1.3.1 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect github.com/oschwald/maxminddb-golang v1.8.0 // indirect github.com/pelletier/go-toml v1.9.4 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect + github.com/rogpeppe/go-internal v1.8.1 // indirect + github.com/sanity-io/litter v1.1.0 // indirect github.com/sirupsen/logrus v1.8.1 // indirect + github.com/spf13/afero v1.8.0 // indirect + github.com/spf13/cast v1.4.1 // indirect github.com/spf13/cobra v1.3.0 // indirect + github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/spf13/viper v1.10.1 // indirect + github.com/subosito/gotenv v1.2.0 // indirect + github.com/swaggest/jsonschema-go v0.3.34 // indirect + github.com/swaggest/openapi-go v0.2.18 // indirect + github.com/swaggest/refl v1.0.2 // indirect + github.com/toqueteos/webbrowser v1.2.0 // indirect github.com/x448/float16 v0.8.4 // indirect + go.mongodb.org/mongo-driver v1.8.2 // indirect + golang.org/x/mod v0.5.1 // indirect golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect + golang.org/x/tools v0.1.8 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect google.golang.org/grpc v1.43.0 // indirect google.golang.org/protobuf v1.27.1 // indirect gopkg.in/inf.v0 v0.9.1 // indirect + gopkg.in/ini.v1 v1.66.3 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect k8s.io/klog/v2 v2.30.0 // indirect k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect diff --git a/go.sum b/go.sum index 27add09d..d1818dee 100644 --- a/go.sum +++ b/go.sum @@ -4,6 +4,7 @@ cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMT cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= @@ -16,6 +17,7 @@ cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOY cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= @@ -47,6 +49,7 @@ cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0Zeo cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78 h1:w+iIsaOQNcT7OZ575w+acHgRric5iCyQh+xv+KJ4HB8= @@ -90,9 +93,13 @@ github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5 github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/PuerkitoBio/purell v1.1.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/purell v1.1.1 h1:WEQqlqaGbrPkxLJWfBwQmfEAE1Z7ONdDLqrN38tNFfI= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= +github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 h1:d+Bc7a5rLufV/sSk/8dngufqelfh6jnri85riMAaF/M= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= +github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -100,6 +107,7 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0= github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= +github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= @@ -107,8 +115,17 @@ github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmV github.com/armon/go-metrics v0.3.10/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY= +github.com/asaskevich/govalidator v0.0.0-20200108200545-475eaeb16496/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200428143746-21a406dcc535/go.mod h1:oGkLhpf+kjZl6xBf758TQhh5XrAeiJv/7FRz/2spLIg= +github.com/asaskevich/govalidator v0.0.0-20200907205600-7a23bdc65eef/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= +github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= +github.com/atombender/go-jsonschema v0.9.0 h1:p401YAKXnAURMwNXUB7oJMn6KDAS34IauXnoFk7iPfk= +github.com/atombender/go-jsonschema v0.9.0/go.mod h1:ev1S/jfIbe8uIdBSPPVWB0Pj7NuHTe+JkM2Gw+JaaD8= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= +github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.43.17 h1:jDPBz1UuTxmyRo0eLgaRiro0fiI1zL7lkscqYxoEDLM= github.com/aws/aws-sdk-go v1.43.17/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= @@ -122,6 +139,7 @@ github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJm github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= +github.com/bool64/shared v0.1.3 h1:gj7XZPYa1flQsCg3q9AIju+W2A1jaexK0fdFu2XtaG0= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= @@ -292,6 +310,7 @@ github.com/docker/go-events v0.0.0-20170721190031-9461782956ad/go.mod h1:Uw6Uezg github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= +github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= @@ -322,6 +341,9 @@ github.com/evanphx/json-patch/v5 v5.2.0/go.mod h1:G79N1coSVB93tBe7j6PhzjmR3/2Vvl github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= +github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/felixge/httpsnoop v1.0.2 h1:+nS9g82KMXccJ/wp0zyRW9ZBHFETmMGtkk+2CTTrW4o= +github.com/felixge/httpsnoop v1.0.2/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/form3tech-oss/jwt-go v3.2.2+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/form3tech-oss/jwt-go v3.2.3+incompatible/go.mod h1:pbq4aXjuKjdthFRnoDwaVPLA+WlJuPGy+QneDUgJi2k= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= @@ -338,6 +360,8 @@ github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYis github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/globalsign/mgo v0.0.0-20180905125535-1ca0a4f7cbcb/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= +github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8/go.mod h1:xkRDCp4j0OGD1HRkm4kmhM+pmpv3AKq5SU7GMg4oO/Q= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= @@ -350,15 +374,139 @@ github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7 github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-openapi/analysis v0.0.0-20180825180245-b006789cd277/go.mod h1:k70tL6pCuVxPJOHXQ+wIac1FUrvNkHolPie/cLEU6hI= +github.com/go-openapi/analysis v0.17.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.18.0/go.mod h1:IowGgpVeD0vNm45So8nr+IcQ3pxVtpRoBWb8PVZO0ik= +github.com/go-openapi/analysis v0.19.2/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.4/go.mod h1:3P1osvZa9jKjb8ed2TPng3f0i/UY9snX6gxi44djMjk= +github.com/go-openapi/analysis v0.19.5/go.mod h1:hkEAkxagaIvIP7VTn8ygJNkd4kAYON2rCu0v0ObL0AU= +github.com/go-openapi/analysis v0.19.10/go.mod h1:qmhS3VNFxBlquFJ0RGoDtylO9y4pgTAUNE9AEEMdlJQ= +github.com/go-openapi/analysis v0.19.16/go.mod h1:GLInF007N83Ad3m8a/CbQ5TPzdnGT7workfHwuVjNVk= +github.com/go-openapi/analysis v0.20.0/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/analysis v0.20.1/go.mod h1:BMchjvaHDykmRMsK40iPtvyOfFdMMxlOmQr9FBZk+Og= +github.com/go-openapi/analysis v0.21.2 h1:hXFrOYFHUAMQdu6zwAiKKJHJQ8kqZs1ux/ru1P1wLJU= +github.com/go-openapi/analysis v0.21.2/go.mod h1:HZwRk4RRisyG8vx2Oe6aqeSQcoxRp47Xkp3+K6q+LdY= +github.com/go-openapi/errors v0.17.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.18.0/go.mod h1:LcZQpmvG4wyF5j4IhA73wkLFQg+QJXOQHVjmcZxhka0= +github.com/go-openapi/errors v0.19.2/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.3/go.mod h1:qX0BLWsyaKfvhluLejVpVNwNRdXZhEbTA4kxxpKBC94= +github.com/go-openapi/errors v0.19.6/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.7/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.8/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.19.9/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.1/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/errors v0.20.2 h1:dxy7PGTqEh94zj2E3h1cUmQQWiM1+aeCROfAr02EmK8= +github.com/go-openapi/errors v0.20.2/go.mod h1:cM//ZKUKyO06HSwqAelJ5NsEMMcpa6VpXe8DOa1Mi1M= +github.com/go-openapi/inflect v0.19.0 h1:9jCH9scKIbHeV9m12SmPilScz6krDxKRasNNSNPXu/4= +github.com/go-openapi/inflect v0.19.0/go.mod h1:lHpZVlpIQqLyKwJ4N+YSc9hchQy/i12fJykb83CRBH4= +github.com/go-openapi/jsonpointer v0.17.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= +github.com/go-openapi/jsonpointer v0.18.0/go.mod h1:cOnomiV+CVVwFLk0A/MExoFMjwdsUdVpsRhURCKh+3M= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonpointer v0.19.5 h1:gZr+CIYByUqjcgeLXnQu2gHYQC9o73G2XUeOFYEICuY= github.com/go-openapi/jsonpointer v0.19.5/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= +github.com/go-openapi/jsonreference v0.17.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= +github.com/go-openapi/jsonreference v0.18.0/go.mod h1:g4xxGn04lDIRh0GJb5QlpE3HfopLOL6uZrK/VgnsK9I= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= +github.com/go-openapi/jsonreference v0.19.5/go.mod h1:RdybgQwPxbL4UEjuAruzK1x3nE69AqPYEJeo/TWfEeg= +github.com/go-openapi/jsonreference v0.19.6 h1:UBIxjkht+AWIgYzCDSv2GN+E/togfwXUJFRTWhl2Jjs= +github.com/go-openapi/jsonreference v0.19.6/go.mod h1:diGHMEHg2IqXZGKxqyvWdfWU/aim5Dprw5bqpKkTvns= +github.com/go-openapi/loads v0.17.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.18.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.0/go.mod h1:72tmFy5wsWx89uEVddd0RjRWPZm92WRLhf7AC+0+OOU= +github.com/go-openapi/loads v0.19.2/go.mod h1:QAskZPMX5V0C2gvfkGZzJlINuP7Hx/4+ix5jWFxsNPs= +github.com/go-openapi/loads v0.19.3/go.mod h1:YVfqhUCdahYwR3f3iiwQLhicVRvLlU/WO5WPaZvcvSI= +github.com/go-openapi/loads v0.19.5/go.mod h1:dswLCAdonkRufe/gSUC3gN8nTSaB9uaS2es0x5/IbjY= +github.com/go-openapi/loads v0.19.6/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.19.7/go.mod h1:brCsvE6j8mnbmGBh103PT/QLHfbyDxA4hsKvYBNEGVc= +github.com/go-openapi/loads v0.20.0/go.mod h1:2LhKquiE513rN5xC6Aan6lYOSddlL8Mp20AW9kpviM4= +github.com/go-openapi/loads v0.20.2/go.mod h1:hTVUotJ+UonAMMZsvakEgmWKgtulweO9vYP2bQYKA/o= +github.com/go-openapi/loads v0.21.0 h1:jYtUO4wwP7psAweisP/MDoOpdzsYEESdoPcsWjHDR68= +github.com/go-openapi/loads v0.21.0/go.mod h1:rHYve9nZrQ4CJhyeIIFJINGCg1tQpx2yJrrNo8sf1ws= +github.com/go-openapi/runtime v0.0.0-20180920151709-4f900dc2ade9/go.mod h1:6v9a6LTXWQCdL8k1AO3cvqx5OtZY/Y9wKTgaoP6YRfA= +github.com/go-openapi/runtime v0.19.0/go.mod h1:OwNfisksmmaZse4+gpV3Ne9AyMOlP1lt4sK4FXt0O64= +github.com/go-openapi/runtime v0.19.4/go.mod h1:X277bwSUBxVlCYR3r7xgZZGKVvBd/29gLDlFGtJ8NL4= +github.com/go-openapi/runtime v0.19.15/go.mod h1:dhGWCTKRXlAfGnQG0ONViOZpjfg0m2gUt9nTQPQZuoo= +github.com/go-openapi/runtime v0.19.16/go.mod h1:5P9104EJgYcizotuXhEuUrzVc+j1RiSjahULvYmlv98= +github.com/go-openapi/runtime v0.19.24/go.mod h1:Lm9YGCeecBnUUkFTxPC4s1+lwrkJ0pthx8YvyjCfkgk= +github.com/go-openapi/runtime v0.21.1 h1:/KIG00BzA2x2HRStX2tnhbqbQdPcFlkgsYCiNY20FZs= +github.com/go-openapi/runtime v0.21.1/go.mod h1:aQg+kaIQEn+A2CRSY1TxbM8+sT9g2V3aLc1FbIAnbbs= +github.com/go-openapi/spec v0.17.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.18.0/go.mod h1:XkF/MOi14NmjsfZ8VtAKf8pIlbZzyoTvZsdfssdxcBI= +github.com/go-openapi/spec v0.19.2/go.mod h1:sCxk3jxKgioEJikev4fgkNmwS+3kuYdJtcsZsD5zxMY= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= +github.com/go-openapi/spec v0.19.6/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.8/go.mod h1:Hm2Jr4jv8G1ciIAo+frC/Ft+rR2kQDh8JHKHb3gWUSk= +github.com/go-openapi/spec v0.19.15/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.0/go.mod h1:+81FIL1JwC5P3/Iuuozq3pPE9dXdIEGxFutcFKaVbmU= +github.com/go-openapi/spec v0.20.1/go.mod h1:93x7oh+d+FQsmsieroS4cmR3u0p/ywH649a3qwC9OsQ= +github.com/go-openapi/spec v0.20.3/go.mod h1:gG4F8wdEDN+YPBMVnzE85Rbhf+Th2DTvA9nFPQ5AYEg= +github.com/go-openapi/spec v0.20.4 h1:O8hJrt0UMnhHcluhIdUgCLRWyM2x7QkBXRvOs7m+O1M= +github.com/go-openapi/spec v0.20.4/go.mod h1:faYFR1CvsJZ0mNsmsphTMSoRrNV3TEDoAM7FOEWeq8I= +github.com/go-openapi/strfmt v0.17.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.18.0/go.mod h1:P82hnJI0CXkErkXi8IKjPbNBM6lV6+5pLP5l494TcyU= +github.com/go-openapi/strfmt v0.19.0/go.mod h1:+uW+93UVvGGq2qGaZxdDeJqSAqBqBdl+ZPMF/cC8nDY= +github.com/go-openapi/strfmt v0.19.2/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.3/go.mod h1:0yX7dbo8mKIvc3XSKp7MNfxw4JytCfCD6+bY1AVL9LU= +github.com/go-openapi/strfmt v0.19.4/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.5/go.mod h1:eftuHTlB/dI8Uq8JJOyRlieZf+WkkxUuk0dgdHXr2Qk= +github.com/go-openapi/strfmt v0.19.11/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.0/go.mod h1:UukAYgTaQfqJuAFlNxxMWNvMYiwiXtLsF2VwmoFtbtc= +github.com/go-openapi/strfmt v0.20.2/go.mod h1:43urheQI9dNtE5lTZQfuFJvjYJKPrxicATpEfZwHUNk= +github.com/go-openapi/strfmt v0.21.0/go.mod h1:ZRQ409bWMj+SOgXofQAGTIo2Ebu72Gs+WaRADcS5iNg= +github.com/go-openapi/strfmt v0.21.1 h1:G6s2t5V5kGCHLVbSdZ/6lI8Wm4OzoPFkc3/cjAsKQrM= +github.com/go-openapi/strfmt v0.21.1/go.mod h1:I/XVKeLc5+MM5oPNN7P6urMOpuLXEcNrCX/rPGuWb0k= +github.com/go-openapi/swag v0.17.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= +github.com/go-openapi/swag v0.18.0/go.mod h1:AByQ+nYG6gQg71GINrmuDXCPWdL640yX49/kXLo40Tg= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= +github.com/go-openapi/swag v0.19.7/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.9/go.mod h1:ao+8BpOPyKdpQz3AOJfbeEVpLmWAvlT1IfTe5McPyhY= +github.com/go-openapi/swag v0.19.12/go.mod h1:eFdyEBkTdoAf/9RXBvj4cr1nH7GD8Kzo5HTt47gr72M= +github.com/go-openapi/swag v0.19.13/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.14/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/swag v0.19.15 h1:D2NRCBzS9/pEY3gP9Nl8aDqGUcPFrwG2p+CNFrLyrCM= +github.com/go-openapi/swag v0.19.15/go.mod h1:QYRuS/SOXUCsnplDa677K7+DxSOj6IPNl/eQntq43wQ= +github.com/go-openapi/validate v0.18.0/go.mod h1:Uh4HdOzKt19xGIGm1qHf/ofbX1YQ4Y+MYsct2VUrAJ4= +github.com/go-openapi/validate v0.19.2/go.mod h1:1tRCw7m3jtI8eNWEEliiAqUIcBztB2KDnRCRMUi7GTA= +github.com/go-openapi/validate v0.19.3/go.mod h1:90Vh6jjkTn+OT1Eefm0ZixWNFjhtOH7vS9k0lo6zwJo= +github.com/go-openapi/validate v0.19.10/go.mod h1:RKEZTUWDkxKQxN2jDT7ZnZi2bhZlbNMAuKvKB+IaGx8= +github.com/go-openapi/validate v0.19.12/go.mod h1:Rzou8hA/CBw8donlS6WNEUQupNvUZ0waH08tGe6kAQ4= +github.com/go-openapi/validate v0.19.15/go.mod h1:tbn/fdOwYHgrhPBzidZfJC2MIVvs9GA7monOmWBbeCI= +github.com/go-openapi/validate v0.20.1/go.mod h1:b60iJT+xNNLfaQJUqLI7946tYiFEOuE9E4k54HpKcJ0= +github.com/go-openapi/validate v0.20.3 h1:GZPPhhKSZrE8HjB4eEkoYAZmoWA4+tCemSgINH1/vKw= +github.com/go-openapi/validate v0.20.3/go.mod h1:goDdqVGiigM3jChcrYJxD2joalke3ZXeftD16byIjA4= +github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-stack/stack v1.8.1 h1:ntEHSVwIt7PNXNpgPmVfMrNhLtgjlmnZha2kOpuRiDw= +github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP3XYfe4= +github.com/go-swagger/go-swagger v0.29.0 h1:z3YoZtLvS1Y8TE/PCat1VypcZxM0IgKLt0NvZxQyNl8= +github.com/go-swagger/go-swagger v0.29.0/go.mod h1:Z4GJzI+bHKKkGB2Ji1rawpi3/ldXX8CkzGIa9HAC5EE= +github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= +github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= +github.com/gobuffalo/depgen v0.1.0/go.mod h1:+ifsuy7fhi15RWncXQQKjWS9JPkdah5sZvtHc2RXGlg= +github.com/gobuffalo/envy v1.6.15/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/envy v1.7.0/go.mod h1:n7DRkBerg/aorDM8kbduw5dN3oXGswK5liaSCx4T5NI= +github.com/gobuffalo/flect v0.1.0/go.mod h1:d2ehjJqGOH/Kjqcoz+F7jHTBbmDb38yXA598Hb50EGs= +github.com/gobuffalo/flect v0.1.1/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/flect v0.1.3/go.mod h1:8JCgGVbRjJhVgD6399mQr4fx5rRfGKVzFjbj6RE/9UI= +github.com/gobuffalo/genny v0.0.0-20190329151137-27723ad26ef9/go.mod h1:rWs4Z12d1Zbf19rlsn0nurr75KqhYp52EAGGxTbBhNk= +github.com/gobuffalo/genny v0.0.0-20190403191548-3ca520ef0d9e/go.mod h1:80lIj3kVJWwOrXWWMRzzdhW3DsrdjILVil/SFKBzF28= +github.com/gobuffalo/genny v0.1.0/go.mod h1:XidbUqzak3lHdS//TPu2OgiFB+51Ur5f7CSnXZ/JDvo= +github.com/gobuffalo/genny v0.1.1/go.mod h1:5TExbEyY48pfunL4QSXxlDOmdsD44RRq4mVZ0Ex28Xk= +github.com/gobuffalo/gitgen v0.0.0-20190315122116-cc086187d211/go.mod h1:vEHJk/E9DmhejeLeNt7UVvlSGv3ziL+djtTr3yyzcOw= +github.com/gobuffalo/gogen v0.0.0-20190315121717-8f38393713f5/go.mod h1:V9QVDIxsgKNZs6L2IYiGR8datgMhB577vzTDqypH360= +github.com/gobuffalo/gogen v0.1.0/go.mod h1:8NTelM5qd8RZ15VjQTFkAW6qOMx5wBbW4dSCS3BY8gg= +github.com/gobuffalo/gogen v0.1.1/go.mod h1:y8iBtmHmGc4qa3urIyo1shvOD8JftTtfcKi+71xfDNE= +github.com/gobuffalo/logger v0.0.0-20190315122211-86e12af44bc2/go.mod h1:QdxcLw541hSGtBnhUc4gaNIXRjiDppFGaDqzbrBd3v8= +github.com/gobuffalo/mapi v1.0.1/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/mapi v1.0.2/go.mod h1:4VAGh89y6rVOvm5A8fKFxYG+wIW6LO1FMTG9hnKStFc= +github.com/gobuffalo/packd v0.0.0-20190315124812-a385830c7fc0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packd v0.1.0/go.mod h1:M2Juc+hhDXf/PnmBANFCqx4DM3wRbgDvnVWeG2RIxq4= +github.com/gobuffalo/packr/v2 v2.0.9/go.mod h1:emmyGweYTm6Kdper+iywB6YK5YzuKchGtJQZ0Odn4pQ= +github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/VCm/3ptBN+0= +github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -407,6 +555,7 @@ github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaS github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= @@ -440,6 +589,7 @@ github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= @@ -460,8 +610,11 @@ github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3i github.com/googleapis/gnostic v0.5.1/go.mod h1:6U4PtQXGIEt/Z3h5MAT7FNofLnw9vXk2cUuW7uA/OeU= github.com/googleapis/gnostic v0.5.5 h1:9fHAtK0uDfpveeqqo1hkEZJcFvYXAiCN3UutL8F9xHw= github.com/googleapis/gnostic v0.5.5/go.mod h1:7+EbHbldMins07ALC74bsA81Ovc97DwqyJO1AENw9kA= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= +github.com/gorilla/handlers v1.5.1 h1:9lRY6j8DEeeBT10CvO9hGW0gmky0BprnvDI5vfhUHH4= +github.com/gorilla/handlers v1.5.1/go.mod h1:t8XrUpc4KVXb7HGyJ4/cEnwQiaxrX/hz1Zv/4g96P1Q= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= @@ -511,6 +664,7 @@ github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= @@ -523,6 +677,7 @@ github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/J github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= +github.com/iancoleman/orderedmap v0.2.0 h1:sq1N/TFpYH++aViPcaKjys3bDClUEU7s5B+z6jq8pNA= github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= @@ -546,13 +701,18 @@ github.com/jcmturner/goidentity/v6 v6.0.1/go.mod h1:X1YW3bgtvwAXju7V3LCIMpY0Gbxy github.com/jcmturner/rpc/v2 v2.0.3 h1:7FXXj8Ti1IaVFpSAziCZWNzbNuZmnvw/i6CqLNdWfZY= github.com/jcmturner/rpc/v2 v2.0.3/go.mod h1:VUJYCIDm3PVOEHw8sgt091/20OJjskO/YJki3ELg/Hc= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= +github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= +github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= +github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= @@ -564,12 +724,16 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/karrick/godirwalk v1.8.0/go.mod h1:H5KPZjojv4lE+QYImBI8xVtrBRgYrIVsaRPx4tDPEn4= +github.com/karrick/godirwalk v1.10.3/go.mod h1:RoGL9dQei4vP9ilrpETWE8CLOZ1kiN0LhBygSwrAsHA= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= +github.com/klauspost/compress v1.9.5/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.11.3/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/klauspost/compress v1.11.13/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= +github.com/klauspost/compress v1.13.6/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= @@ -578,6 +742,8 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= +github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= @@ -586,10 +752,19 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls= github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= +github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= +github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.1/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= +github.com/mailru/easyjson v0.7.6/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= +github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= +github.com/markbates/oncer v0.0.0-20181203154359-bf2de49a0be2/go.mod h1:Ld9puTsIW75CHf65OeIOkyKbteujpZVXDpWK6YGZbxE= +github.com/markbates/safe v1.0.1/go.mod h1:nAqgmRi7cY2nqMc92/bSEeQA+R4OheNU2T1kNSCBdG0= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= @@ -620,10 +795,16 @@ github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXx github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= +github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= +github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= @@ -642,6 +823,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= +github.com/montanaflynn/stats v0.0.0-20171201202039-1bf9dbcd8cbe/go.mod h1:wL8QJuTMNUDYhXwkmfOly8iTdp5TEcJFWZD2D7SIkUc= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= @@ -654,6 +836,7 @@ github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWb github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20151202141238-7f8ab55aaf3b/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= @@ -698,23 +881,29 @@ github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mo github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.8.0/go.mod h1:RScLhm78qiWa2gbVCcGkC7tCGdgk3ogry1nUQF8Evvo= github.com/opencontainers/selinux v1.8.2/go.mod h1:MUIHuUEvKB1wtJjQdOyYRgOnLD2xAPP8dBsCoU0KuF8= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/oschwald/geoip2-golang v1.5.0 h1:igg2yQIrrcRccB1ytFXqBfOHCjXWIoMv85lVJ1ONZzw= github.com/oschwald/geoip2-golang v1.5.0/go.mod h1:xdvYt5xQzB8ORWFqPnqMwZpCpgNagttWdoZLlJQzg7s= github.com/oschwald/maxminddb-golang v1.8.0 h1:Uh/DSnGoxsyp/KYbY1AuP0tYEwfs0sCph9p/UMXK/Hk= github.com/oschwald/maxminddb-golang v1.8.0/go.mod h1:RXZtst0N6+FY/3qCNmZMBApR19cdQj43/NM9VkrNAis= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= +github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUruD3k1mMwo= +github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE= github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc= github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM= github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= +github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= @@ -755,19 +944,29 @@ github.com/qdm12/reprint v0.0.0-20200326205758-722754a53494 h1:wSmWgpuccqS2IOfmY github.com/qdm12/reprint v0.0.0-20200326205758-722754a53494/go.mod h1:yipyliwI08eQ6XwDm1fEwKPdF/xdbkiHtrU+1Hg+vc4= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= +github.com/rogpeppe/go-internal v1.1.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.2.2/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= +github.com/rogpeppe/go-internal v1.8.1 h1:geMPLpDpQOgVyCg5z5GoRwLHepNdb71NXb67XFkP+Eg= +github.com/rogpeppe/go-internal v1.8.1/go.mod h1:JeRgkft04UBgHMgCIwADu4Pn6Mtm5d4nPKWu0nJ5d+o= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig= +github.com/sanity-io/litter v1.1.0 h1:BllcKWa3VbZmOZbDCoszYLk7zCsKHz5Beossi8SUcTc= +github.com/sanity-io/litter v1.1.0/go.mod h1:CJ0VCw2q4qKU7LaQr3n7UOSHzgEMgcGco7N/SkZQPjw= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= +github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/sirupsen/logrus v1.4.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= @@ -783,7 +982,10 @@ github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= +github.com/spf13/afero v1.8.0 h1:5MmtuhAgYeU6qpa7w7bP0dv6MBYuup0vekhSpSkoq60= +github.com/spf13/afero v1.8.0/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= @@ -792,16 +994,20 @@ github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJ github.com/spf13/cobra v1.3.0 h1:R7cSvGu+Vv+qX0gW5R/85dx2kmmJT5z5NM8ifdYjdn0= github.com/spf13/cobra v1.3.0/go.mod h1:BrRVncBjOJa/eUcVVm9CE+oC6as8k+VYr4NY7WCi9V4= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/spf13/viper v1.10.0/go.mod h1:SoyBPwAtKDzypXNDFKN5kzH7ppppbGZtls1UpIy5AsM= +github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= +github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/stefanberger/go-pkcs11uri v0.0.0-20201008174630-78d3cae3a980/go.mod h1:AO3tvPzVZ/ayst6UlUKUv6rcPQInYe3IknH3jYhAKu8= github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= @@ -816,19 +1022,33 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.7.1 h1:5TQK59W5E3v0r2duFAb7P95B6hEeOyEnHRa8MjYSMTY= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= +github.com/swaggest/assertjson v1.6.8 h1:1O/9UI5M+2OJI7BeEWKGj0wTvpRXZt5FkOJ4nRkY4rA= +github.com/swaggest/jsonschema-go v0.3.34 h1:f/ErwRNR+Qx/0QTSSIVqAtS9gnHhzBl7IIHO+XKG1GA= +github.com/swaggest/jsonschema-go v0.3.34/go.mod h1:JAF1nm+uIaMOXktuQepmkiRcgQ5yJk4Ccwx9HVt2cXw= +github.com/swaggest/openapi-go v0.2.18 h1:9dTzNe91MoepI5PtHNUgby3R0ZNgTQte+pDh3X5XcDw= +github.com/swaggest/openapi-go v0.2.18/go.mod h1:xUrd0cNiIfhkSIFwxmMmiw3FLegY/MQzSek3Byp4YjU= +github.com/swaggest/refl v1.0.2 h1:VmP8smuDS1EzUPn31++TzMi13CAaVJdlWpIxzj0up88= +github.com/swaggest/refl v1.0.2/go.mod h1:DoiPoBJPYHU6Z9fIA6zXQ9uI6VRL6M8BFX5YFT+ym9g= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= +github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/toqueteos/webbrowser v1.2.0 h1:tVP/gpK69Fx+qMJKsLE7TD8LuGWPnEV71wBN9rrstGQ= +github.com/toqueteos/webbrowser v1.2.0/go.mod h1:XWoZq4cyp9WeUeak7w7LXRUQf1F1ATJMir8RTqb4ayM= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw= github.com/vishvananda/netlink v0.0.0-20181108222139-023a6dafdcdf/go.mod h1:+SR5DhBJrl6ZM7CoCKvpw5BKroDKQ+PJqOg65H/2ktk= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= @@ -839,11 +1059,19 @@ github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM= github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg= +github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= +github.com/xdg-go/scram v1.0.2/go.mod h1:1WAq6h33pAW+iRreB34OORO2Nf7qel3VV3fjBj+hCSs= +github.com/xdg-go/stringprep v1.0.2/go.mod h1:8F9zXuvzgwmyT5DUm4GUfZGDdT3W+LCvS6+da4O5kxM= +github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c/go.mod h1:lB8K/P019DLNhemzwFU4jHLhdvlE6uDZjXFejJXr49I= +github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc/go.mod h1:Jhud4/sHMO4oL310DaZAKk9ZaJ08SJfe+sJh0HrGL1Y= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA= +github.com/yudai/gojsondiff v1.0.0 h1:27cbfqXLVEJ1o8I6v3y9lg8Ydm53EKqHXAOMxEGlCOA= +github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 h1:BHyfKlQyqbsFN5p3IfnEUduWvb9is428/nNb5L3U01M= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -859,6 +1087,18 @@ go.etcd.io/etcd v0.5.0-alpha.5.0.20200910180754-dd1b699fc489/go.mod h1:yVHk9ub3C go.etcd.io/etcd/api/v3 v3.5.1/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= go.etcd.io/etcd/client/pkg/v3 v3.5.1/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= go.etcd.io/etcd/client/v2 v2.305.1/go.mod h1:pMEacxZW7o8pg4CrFE7pquyCJJzZvkvdD2RibOCCCGs= +go.mongodb.org/mongo-driver v1.0.3/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.1.1/go.mod h1:u7ryQJ+DOzQmeO7zB6MHyr8jkEQvC8vH7qLUO4lqsUM= +go.mongodb.org/mongo-driver v1.3.0/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.3.4/go.mod h1:MSWZXKOynuguX+JSvwP8i+58jYCXxbia8HS3gZBapIE= +go.mongodb.org/mongo-driver v1.4.3/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.4/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.4.6/go.mod h1:WcMNYLx/IlOxLe6JRJiv2uXuCz6zBLndR4SoGjYphSc= +go.mongodb.org/mongo-driver v1.5.1/go.mod h1:gRXCHX4Jo7J0IJ1oDQyUxF7jfy19UfxniMS4xxMmUqw= +go.mongodb.org/mongo-driver v1.7.3/go.mod h1:NqaYOwnXWr5Pm7AOpO5QFxKJ503nbMse/R79oO62zWg= +go.mongodb.org/mongo-driver v1.7.5/go.mod h1:VXEWRZ6URJIkUq2SCAyapmhH0ZLRBP+FT4xhp5Zvxng= +go.mongodb.org/mongo-driver v1.8.2 h1:8ssUXufb90ujcIvR6MyE1SchaNj0SFxsakiZgxIyrMk= +go.mongodb.org/mongo-driver v1.8.2/go.mod h1:0sQWfOeY63QTntERDJJ/0SuKK0T1uVSgKCuAROlKEPY= go.mozilla.org/pkcs7 v0.0.0-20200128120323-432b2356ecb1/go.mod h1:SNgMg+EgDFwmvSmLRTNKC5fegJjB7v23qTQ0XLGUNHk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -880,19 +1120,27 @@ golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20181009213950-7c1a557ab941/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190617133340-57b3e21c3d56/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20200302210943-78000ba7a073/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201002170205-7f63de1d35b0/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201112155050-0c6587e931a9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce h1:Roh6XWxHFKrPgC/EQhVubSAGQ6Ozk6IdxHSzt1mR0EI= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -931,9 +1179,12 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= +golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181011144130-49bb7cea24b1/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -942,6 +1193,7 @@ golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73r golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190320064053-1272bf9dcd53/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= @@ -968,6 +1220,7 @@ golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200602114024-627f9648deb9/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= @@ -975,6 +1228,7 @@ golang.org/x/net v0.0.0-20201006153459-a7d1128ccaa0/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= @@ -982,6 +1236,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8= +golang.org/x/net v0.0.0-20210421230115-4e50805a0758/go.mod h1:72T/g9IO56b78aLF+1Kcs5dz7/ng1VjMUvfKvpfy+jM= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1009,6 +1264,7 @@ golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190412183630-56d357773e84/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1026,12 +1282,16 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190321052220-f7bb7a8bee54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1093,6 +1353,7 @@ golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1100,7 +1361,9 @@ golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210420072515-93ed5bcd2bfe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210426230700-d19ff857e887/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1120,6 +1383,7 @@ golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= @@ -1145,16 +1409,22 @@ golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGm golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20190125232054-d66bd3c5d5a6/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190329151228-23e29df326fe/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190416151739-9c9e1878f421/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190420181800-aa740d480789/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190531172133-b3315ee88b7d/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190617190820-da514acc4774/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= @@ -1196,12 +1466,15 @@ golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.8 h1:P1HhGGuLW4aAclzjtmJdf0mJOjVUZUzOTqkAkWL+l6w= +golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -1288,7 +1561,9 @@ google.golang.org/genproto v0.0.0-20201110150050-8816d57aaa9a/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -1381,6 +1656,8 @@ gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.66.2/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/ini.v1 v1.66.3 h1:jRskFVxYaMGAMUbN0UZ7niA9gzL9B49DOqE78vg0k3w= +gopkg.in/ini.v1 v1.66.3/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/jcmturner/goidentity.v3 v3.0.0 h1:1duIyWiTaYvVx3YX2CYtpJbUFd7/UuPYCfgXtQ3VTbI= gopkg.in/jcmturner/goidentity.v3 v3.0.0/go.mod h1:oG2kH0IvSYNIu80dVAyu/yoefjq1mNfM5bm88whjWx4= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= @@ -1401,6 +1678,7 @@ gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/http/client_factory.go b/http/client_factory.go index 0f5b5175..45ff7365 100644 --- a/http/client_factory.go +++ b/http/client_factory.go @@ -4,8 +4,8 @@ import ( "crypto/tls" "strings" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" ) // NewClient creates a new HTTP client with the given configuration. diff --git a/http/client_impl.go b/http/client_impl.go index fc724219..96c57795 100644 --- a/http/client_impl.go +++ b/http/client_impl.go @@ -10,10 +10,10 @@ import ( "net/http" "net/url" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" "github.com/gorilla/schema" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) type client struct { diff --git a/http/handler_factory.go b/http/handler_factory.go index 55567298..32f989ec 100644 --- a/http/handler_factory.go +++ b/http/handler_factory.go @@ -3,7 +3,7 @@ package http import ( goHttp "net/http" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/log" ) // NewServerHandler creates a new simplified HTTP handler that decodes JSON requests and encodes JSON responses. diff --git a/http/handler_impl.go b/http/handler_impl.go index 1349ec50..afcb093a 100644 --- a/http/handler_impl.go +++ b/http/handler_impl.go @@ -10,8 +10,8 @@ import ( "strconv" "strings" - log2 "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + log2 "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) type serverResponse struct { diff --git a/http/integration_test.go b/http/integration_test.go index 5568ec80..af7ecebc 100644 --- a/http/integration_test.go +++ b/http/integration_test.go @@ -15,13 +15,13 @@ import ( "testing" "time" - "go.containerssh.io/libcontainerssh/config" - http2 "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/service" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + http2 "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/service" ) type Request struct { diff --git a/http/server.go b/http/server.go index 1241aef6..01304a70 100644 --- a/http/server.go +++ b/http/server.go @@ -1,7 +1,7 @@ package http import ( - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/service" ) // Server is an interface that specifies the minimum requirements for the server. diff --git a/http/server_factory.go b/http/server_factory.go index 25c10d44..a9aa9afd 100644 --- a/http/server_factory.go +++ b/http/server_factory.go @@ -5,8 +5,8 @@ import ( goHttp "net/http" "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" ) // NewServer creates a new HTTP server with the given configuration and calling the provided handler. diff --git a/http/server_impl.go b/http/server_impl.go index 6cbc7ab3..8b541950 100644 --- a/http/server_impl.go +++ b/http/server_impl.go @@ -10,9 +10,9 @@ import ( goHttp "net/http" "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/service" ) type server struct { diff --git a/internal/agentforward/AgentForward.go b/internal/agentforward/AgentForward.go index fb8efd85..2e7cd6fb 100644 --- a/internal/agentforward/AgentForward.go +++ b/internal/agentforward/AgentForward.go @@ -3,8 +3,8 @@ package agentforward import ( "io" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" ) // AgentForward is a network connection forwarding interface that uses the ContainerSSH Agent protocol diff --git a/internal/agentforward/agentForwardImpl.go b/internal/agentforward/agentForwardImpl.go index 8b8445cc..9f620246 100644 --- a/internal/agentforward/agentForwardImpl.go +++ b/internal/agentforward/agentForwardImpl.go @@ -6,9 +6,9 @@ import ( "io" "sync" - protocol "go.containerssh.io/libcontainerssh/agentprotocol" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" + protocol "go.containerssh.io/libcontainerssh/agentprotocol" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" ) type agentForward struct { diff --git a/internal/auditlog/codec/abstract.go b/internal/auditlog/codec/abstract.go index c758748d..2f0d5fbb 100644 --- a/internal/auditlog/codec/abstract.go +++ b/internal/auditlog/codec/abstract.go @@ -3,8 +3,8 @@ package codec import ( "io" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" ) // Encoder is a module that is responsible for receiving audit log messages and writing them to a writer. diff --git a/internal/auditlog/codec/asciinema/encoder.go b/internal/auditlog/codec/asciinema/encoder.go index f283f04c..4a14f6f6 100644 --- a/internal/auditlog/codec/asciinema/encoder.go +++ b/internal/auditlog/codec/asciinema/encoder.go @@ -6,11 +6,11 @@ import ( "io" "net" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" - "go.containerssh.io/libcontainerssh/log" - messageCodes "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" + "go.containerssh.io/libcontainerssh/log" + messageCodes "go.containerssh.io/libcontainerssh/message" ) type encoder struct { diff --git a/internal/auditlog/codec/asciinema/encoder_test.go b/internal/auditlog/codec/asciinema/encoder_test.go index 415f2364..9a7978c4 100644 --- a/internal/auditlog/codec/asciinema/encoder_test.go +++ b/internal/auditlog/codec/asciinema/encoder_test.go @@ -8,11 +8,11 @@ import ( "testing" "time" - "go.containerssh.io/libcontainerssh/auditlog/message" - asciinema2 "go.containerssh.io/libcontainerssh/internal/auditlog/codec/asciinema" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/log" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/auditlog/message" + asciinema2 "go.containerssh.io/libcontainerssh/internal/auditlog/codec/asciinema" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/log" ) type writer struct { diff --git a/internal/auditlog/codec/asciinema/new.go b/internal/auditlog/codec/asciinema/new.go index 6f2ea365..33b22f99 100644 --- a/internal/auditlog/codec/asciinema/new.go +++ b/internal/auditlog/codec/asciinema/new.go @@ -1,9 +1,9 @@ package asciinema import ( - "go.containerssh.io/libcontainerssh/internal/auditlog/codec" - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" + "go.containerssh.io/libcontainerssh/log" ) // NewEncoder Creates an encoder that writes in the Asciicast v2 format diff --git a/internal/auditlog/codec/binary/decode.go b/internal/auditlog/codec/binary/decode.go index 94cc8a22..3c64e019 100644 --- a/internal/auditlog/codec/binary/decode.go +++ b/internal/auditlog/codec/binary/decode.go @@ -5,10 +5,10 @@ import ( "fmt" "io" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec" "github.com/fxamacker/cbor" "github.com/mitchellh/mapstructure" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec" ) // NewDecoder Creates a decoder for the CBOR+GZIP audit log format. diff --git a/internal/auditlog/codec/binary/encode.go b/internal/auditlog/codec/binary/encode.go index 961ca09d..1cb603ae 100644 --- a/internal/auditlog/codec/binary/encode.go +++ b/internal/auditlog/codec/binary/encode.go @@ -5,11 +5,11 @@ import ( "fmt" "net" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" "github.com/fxamacker/cbor" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" ) // NewEncoder creates an encoder that encodes messages in CBOR+GZIP format as documented diff --git a/internal/auditlog/codec/binary/pipeline_test.go b/internal/auditlog/codec/binary/pipeline_test.go index f8865d5e..5b89fae8 100644 --- a/internal/auditlog/codec/binary/pipeline_test.go +++ b/internal/auditlog/codec/binary/pipeline_test.go @@ -5,11 +5,11 @@ import ( "sync" "testing" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" ) func createPipeline() (codec.Encoder, codec.Decoder) { diff --git a/internal/auditlog/codec/none/encode.go b/internal/auditlog/codec/none/encode.go index d8ef70aa..d1c1489d 100644 --- a/internal/auditlog/codec/none/encode.go +++ b/internal/auditlog/codec/none/encode.go @@ -1,9 +1,9 @@ package none import ( - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" ) // NewEncoder creates an encoder that swallows everything. This can be used as a dummy encoder to not consume CPU. diff --git a/internal/auditlog/codec/proxy.go b/internal/auditlog/codec/proxy.go index e2b4af0a..1f80a4f0 100644 --- a/internal/auditlog/codec/proxy.go +++ b/internal/auditlog/codec/proxy.go @@ -3,7 +3,7 @@ package codec import ( "io" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" ) // NewStorageWriterProxy Creates a storage writer that proxies to a traditional writer and drops the metadata. diff --git a/internal/auditlog/compatibility_test.go b/internal/auditlog/compatibility_test.go index d22a3eda..2435001d 100644 --- a/internal/auditlog/compatibility_test.go +++ b/internal/auditlog/compatibility_test.go @@ -3,13 +3,13 @@ package auditlog_test import ( "testing" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage/file" - "go.containerssh.io/libcontainerssh/log" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage/file" + "go.containerssh.io/libcontainerssh/log" ) func TestDecodingOldAuditLogs(t *testing.T) { diff --git a/internal/auditlog/factory.go b/internal/auditlog/factory.go index 36eafbfd..182fb2cc 100644 --- a/internal/auditlog/factory.go +++ b/internal/auditlog/factory.go @@ -4,18 +4,18 @@ import ( "fmt" "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec/asciinema" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" - noneCodec "go.containerssh.io/libcontainerssh/internal/auditlog/codec/none" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage/file" - noneStorage "go.containerssh.io/libcontainerssh/internal/auditlog/storage/none" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage/s3" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec/asciinema" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" + noneCodec "go.containerssh.io/libcontainerssh/internal/auditlog/codec/none" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage/file" + noneStorage "go.containerssh.io/libcontainerssh/internal/auditlog/storage/none" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage/s3" - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" + "go.containerssh.io/libcontainerssh/log" ) // New Creates a new audit logging pipeline based on the provided configuration. diff --git a/internal/auditlog/generate/format/format.go b/internal/auditlog/generate/format/format.go index 26279200..782b6d4d 100644 --- a/internal/auditlog/generate/format/format.go +++ b/internal/auditlog/generate/format/format.go @@ -5,8 +5,8 @@ import ( "text/tabwriter" "text/template" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" ) type context struct { diff --git a/internal/auditlog/intercept.go b/internal/auditlog/intercept.go index 2680878b..ec516e4e 100644 --- a/internal/auditlog/intercept.go +++ b/internal/auditlog/intercept.go @@ -3,7 +3,7 @@ package auditlog import ( "io" - "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/auditlog/message" ) type interceptingReader struct { @@ -36,18 +36,18 @@ func (i *interceptingWriter) Write(p []byte) (n int, err error) { type interceptingReadWriteCloser struct { backend io.ReadWriteCloser - reader interceptingReader - writer interceptingWriter + reader interceptingReader + writer interceptingWriter } -func (i interceptingReadWriteCloser) Read(p []byte) (int, error ) { +func (i interceptingReadWriteCloser) Read(p []byte) (int, error) { return i.reader.Read(p) } -func (i interceptingReadWriteCloser) Write(p []byte) (int, error ) { +func (i interceptingReadWriteCloser) Write(p []byte) (int, error) { return i.writer.Write(p) } func (i interceptingReadWriteCloser) Close() error { return i.backend.Close() -} \ No newline at end of file +} diff --git a/internal/auditlog/logger.go b/internal/auditlog/logger.go index f1cc172c..87c601f0 100644 --- a/internal/auditlog/logger.go +++ b/internal/auditlog/logger.go @@ -5,7 +5,7 @@ import ( "io" "net" - "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/auditlog/message" ) // Logger is a top level audit logger. @@ -79,7 +79,7 @@ type Connection interface { // channel-specific audit logger. OnNewChannelSuccess(channelID message.ChannelID, channelType string) Channel - // OnRequestTCPReverseForward creates an audit log message for requesting the server to listen + // OnRequestTCPReverseForward creates an audit log message for requesting the server to listen // on a host and port for incoming connections. OnRequestTCPReverseForward(bindHost string, bindPort uint32) diff --git a/internal/auditlog/logger_empty.go b/internal/auditlog/logger_empty.go index 306d09a3..9a335d3d 100644 --- a/internal/auditlog/logger_empty.go +++ b/internal/auditlog/logger_empty.go @@ -5,7 +5,7 @@ import ( "io" "net" - "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/auditlog/message" ) type empty struct{} diff --git a/internal/auditlog/logger_impl.go b/internal/auditlog/logger_impl.go index a50962cd..6b9fbe51 100644 --- a/internal/auditlog/logger_impl.go +++ b/internal/auditlog/logger_impl.go @@ -7,12 +7,12 @@ import ( "sync" "time" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" + "go.containerssh.io/libcontainerssh/log" ) type loggerImplementation struct { @@ -304,13 +304,13 @@ func (l *loggerConnection) OnGlobalRequestUnknown(requestType string) { func (l *loggerConnection) OnGlobalRequestDecodeFailed(requestID uint64, requestType string, payload []byte, reason error) { l.log(message.Message{ ConnectionID: l.connectionID, - Timestamp: time.Now().UnixNano(), - MessageType: message.TypeGlobalRequestDecodeFailed, + Timestamp: time.Now().UnixNano(), + MessageType: message.TypeGlobalRequestDecodeFailed, Payload: message.PayloadGlobalRequestDecodeFailed{ - RequestID: requestID, + RequestID: requestID, RequestType: requestType, - Payload: payload, - Reason: reason.Error(), + Payload: payload, + Reason: reason.Error(), }, }) } diff --git a/internal/auditlog/logger_test.go b/internal/auditlog/logger_test.go index 284f94e2..28eaf5e3 100644 --- a/internal/auditlog/logger_test.go +++ b/internal/auditlog/logger_test.go @@ -11,15 +11,15 @@ import ( "testing" "time" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auditlog" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage/file" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/log" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auditlog" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage/file" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/log" ) func newConnectionID() message.ConnectionID { diff --git a/internal/auditlog/storage/file/new.go b/internal/auditlog/storage/file/new.go index 2e737200..712180d8 100644 --- a/internal/auditlog/storage/file/new.go +++ b/internal/auditlog/storage/file/new.go @@ -7,10 +7,10 @@ import ( "path" "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/log" ) // NewStorage Create a file storage that stores testdata in a local directory. The file storage cannot store metadata. diff --git a/internal/auditlog/storage/file/struct.go b/internal/auditlog/storage/file/struct.go index 603e79d2..f08ec256 100644 --- a/internal/auditlog/storage/file/struct.go +++ b/internal/auditlog/storage/file/struct.go @@ -9,7 +9,7 @@ import ( "strings" "sync" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" ) type fileStorage struct { diff --git a/internal/auditlog/storage/s3/list.go b/internal/auditlog/storage/s3/list.go index 8968412a..238f08ce 100644 --- a/internal/auditlog/storage/s3/list.go +++ b/internal/auditlog/storage/s3/list.go @@ -6,7 +6,7 @@ import ( "github.com/aws/aws-sdk-go/aws" awsS3 "github.com/aws/aws-sdk-go/service/s3" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" ) func (q *uploadQueue) List() (<-chan storage.Entry, <-chan error) { diff --git a/internal/auditlog/storage/s3/new.go b/internal/auditlog/storage/s3/new.go index 6d066744..52863036 100644 --- a/internal/auditlog/storage/s3/new.go +++ b/internal/auditlog/storage/s3/new.go @@ -12,10 +12,10 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" ) // NewStorage Creates a storage driver for an S3-compatible object storage. diff --git a/internal/auditlog/storage/s3/queue.go b/internal/auditlog/storage/s3/queue.go index 6dfae862..95cacece 100644 --- a/internal/auditlog/storage/s3/queue.go +++ b/internal/auditlog/storage/s3/queue.go @@ -11,9 +11,9 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/session" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) var minPartSize = uint(5 * 1024 * 1024) diff --git a/internal/auditlog/storage/s3/upload.go b/internal/auditlog/storage/s3/upload.go index 24ab955a..e725df3c 100644 --- a/internal/auditlog/storage/s3/upload.go +++ b/internal/auditlog/storage/s3/upload.go @@ -7,7 +7,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/service/s3" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/message" ) func (q *uploadQueue) initializeMultiPartUpload(s3Connection *s3.S3, name string, metadata queueEntryMetadata) (*string, error) { diff --git a/internal/auditlog/storage/s3/upload_test.go b/internal/auditlog/storage/s3/upload_test.go index 0323e8d5..2e663f8c 100644 --- a/internal/auditlog/storage/s3/upload_test.go +++ b/internal/auditlog/storage/s3/upload_test.go @@ -15,15 +15,15 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" awsS3 "github.com/aws/aws-sdk-go/service/s3" - "go.containerssh.io/libcontainerssh/config" - auditLogStorage "go.containerssh.io/libcontainerssh/internal/auditlog/storage" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage/s3" - "go.containerssh.io/libcontainerssh/log" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/docker/go-connections/nat" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + auditLogStorage "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage/s3" + "go.containerssh.io/libcontainerssh/log" ) type minio struct { diff --git a/internal/auditlog/storage/s3/writer.go b/internal/auditlog/storage/s3/writer.go index a2a93788..768139f5 100644 --- a/internal/auditlog/storage/s3/writer.go +++ b/internal/auditlog/storage/s3/writer.go @@ -3,7 +3,7 @@ package s3 import ( "io" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage" ) func newMonitoringWriter( diff --git a/internal/auditlogintegration/factory.go b/internal/auditlogintegration/factory.go index 2105a2fa..49899618 100644 --- a/internal/auditlogintegration/factory.go +++ b/internal/auditlogintegration/factory.go @@ -3,11 +3,11 @@ package auditlogintegration import ( "fmt" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auditlog" - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auditlog" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" ) // New creates a new handler based on the application config and the required dependencies. If audit logging is not diff --git a/internal/auditlogintegration/handler.go b/internal/auditlogintegration/handler.go index 664791d8..86aa5c0d 100644 --- a/internal/auditlogintegration/handler.go +++ b/internal/auditlogintegration/handler.go @@ -6,10 +6,10 @@ import ( "net" "sync" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/internal/auditlog" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/internal/auditlog" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/metadata" ) type handler struct { diff --git a/internal/auditlogintegration/handler_factory.go b/internal/auditlogintegration/handler_factory.go index 86b7735f..9d98f061 100644 --- a/internal/auditlogintegration/handler_factory.go +++ b/internal/auditlogintegration/handler_factory.go @@ -1,8 +1,8 @@ package auditlogintegration import ( - "go.containerssh.io/libcontainerssh/internal/auditlog" - "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/auditlog" + "go.containerssh.io/libcontainerssh/internal/sshserver" ) // NewHandler creates a new audit logging handler that logs all events as configured, and passes request to a provided backend. diff --git a/internal/auditlogintegration/handler_networkconnection.go b/internal/auditlogintegration/handler_networkconnection.go index 7ba05d6d..010db210 100644 --- a/internal/auditlogintegration/handler_networkconnection.go +++ b/internal/auditlogintegration/handler_networkconnection.go @@ -3,12 +3,12 @@ package auditlogintegration import ( "context" - "go.containerssh.io/libcontainerssh/auditlog/message" - publicAuth "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/internal/auditlog" - internalAuth "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/auditlog/message" + publicAuth "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/internal/auditlog" + internalAuth "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/metadata" ) type networkConnectionHandler struct { diff --git a/internal/auditlogintegration/handler_sessionchannel.go b/internal/auditlogintegration/handler_sessionchannel.go index 30a10ffc..22abe971 100644 --- a/internal/auditlogintegration/handler_sessionchannel.go +++ b/internal/auditlogintegration/handler_sessionchannel.go @@ -3,8 +3,8 @@ package auditlogintegration import ( "context" - "go.containerssh.io/libcontainerssh/internal/auditlog" - "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/auditlog" + "go.containerssh.io/libcontainerssh/internal/sshserver" ) type sessionChannelHandler struct { @@ -142,9 +142,9 @@ func (s *sessionChannelHandler) OnX11Request( cookie, screen, &reverseHandlerProxy{ - backend: reverseHandler, + backend: reverseHandler, connectionHandler: s.connectionHandler, - channelType: sshserver.ChannelTypeX11, + channelType: sshserver.ChannelTypeX11, }, ) } diff --git a/internal/auditlogintegration/handler_sshconnection.go b/internal/auditlogintegration/handler_sshconnection.go index 40ba0a96..277ce3eb 100644 --- a/internal/auditlogintegration/handler_sshconnection.go +++ b/internal/auditlogintegration/handler_sshconnection.go @@ -4,10 +4,10 @@ import ( "context" "io" - "go.containerssh.io/libcontainerssh/auditlog/message" - "go.containerssh.io/libcontainerssh/internal/auditlog" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/auditlog/message" + "go.containerssh.io/libcontainerssh/internal/auditlog" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/metadata" ) type sshConnectionHandler struct { diff --git a/internal/auditlogintegration/integration_test.go b/internal/auditlogintegration/integration_test.go index 55db26b1..37183b32 100644 --- a/internal/auditlogintegration/integration_test.go +++ b/internal/auditlogintegration/integration_test.go @@ -9,19 +9,19 @@ import ( "testing" "time" - "go.containerssh.io/libcontainerssh/auditlog/message" - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" - "go.containerssh.io/libcontainerssh/internal/auditlog/storage/file" - "go.containerssh.io/libcontainerssh/internal/auditlogintegration" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/geoip" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" - message2 "go.containerssh.io/libcontainerssh/message" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/auditlog/message" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auditlog/codec/binary" + "go.containerssh.io/libcontainerssh/internal/auditlog/storage/file" + "go.containerssh.io/libcontainerssh/internal/auditlogintegration" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/geoip" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + message2 "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" ) diff --git a/internal/auth/authentication.go b/internal/auth/authentication.go index ed769d0e..fb5d8770 100644 --- a/internal/auth/authentication.go +++ b/internal/auth/authentication.go @@ -3,8 +3,8 @@ package auth import ( - "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/metadata" ) // AuthenticationType is the root type for all authentication and authorization methods. This type is extended for each diff --git a/internal/auth/authentication_factory.go b/internal/auth/authentication_factory.go index c7c47776..f8aeb08b 100644 --- a/internal/auth/authentication_factory.go +++ b/internal/auth/authentication_factory.go @@ -3,10 +3,10 @@ package auth import ( "fmt" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/service" ) // NewPasswordAuthenticator returns a password authenticator as configured, and if needed a backing service that needs diff --git a/internal/auth/authorization.go b/internal/auth/authorization.go index 94ebc917..be46a7ee 100644 --- a/internal/auth/authorization.go +++ b/internal/auth/authorization.go @@ -3,7 +3,7 @@ package auth import ( - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) // AuthzProvider provides a method to verify the authenticated username against the username provided by the user. diff --git a/internal/auth/handler_impl.go b/internal/auth/handler_impl.go index ca248fee..9187cee8 100644 --- a/internal/auth/handler_impl.go +++ b/internal/auth/handler_impl.go @@ -50,17 +50,20 @@ func (p *authzHandler) OnRequest(request http.ServerRequest, response http.Serve response.SetStatus(500) response.SetBody( auth.ResponseBody{ - ConnectionAuthenticatedMetadata: requestObject.ConnectionAuthenticatedMetadata, - Success: false, + DynamicMetadata: meta.DynamicMetadata, + AuthenticatedUsername: meta.AuthenticatedUsername, + Success: false, }, ) return nil } else { response.SetBody( auth.ResponseBody{ - ConnectionAuthenticatedMetadata: meta, - Success: success, - }) + DynamicMetadata: meta.DynamicMetadata, + AuthenticatedUsername: meta.AuthenticatedUsername, + Success: success, + }, + ) } return nil } @@ -85,16 +88,20 @@ func (p *passwordHandler) OnRequest(request http.ServerRequest, response http.Se response.SetStatus(500) response.SetBody( auth.ResponseBody{ - ConnectionAuthenticatedMetadata: meta, - Success: false, - }) + DynamicMetadata: meta.DynamicMetadata, + AuthenticatedUsername: meta.AuthenticatedUsername, + Success: false, + }, + ) return nil } else { response.SetBody( auth.ResponseBody{ - ConnectionAuthenticatedMetadata: meta, - Success: success, - }) + DynamicMetadata: meta.DynamicMetadata, + AuthenticatedUsername: meta.AuthenticatedUsername, + Success: success, + }, + ) } return nil } @@ -118,17 +125,20 @@ func (p *pubKeyHandler) OnRequest(request http.ServerRequest, response http.Serv response.SetStatus(500) response.SetBody( auth.ResponseBody{ - ConnectionAuthenticatedMetadata: meta, - Success: false, + DynamicMetadata: meta.DynamicMetadata, + AuthenticatedUsername: meta.AuthenticatedUsername, + Success: false, }, ) return nil } else { response.SetBody( auth.ResponseBody{ - ConnectionAuthenticatedMetadata: meta, - Success: success, - }) + DynamicMetadata: meta.DynamicMetadata, + AuthenticatedUsername: meta.AuthenticatedUsername, + Success: success, + }, + ) } return nil } diff --git a/internal/auth/kerberos_factory.go b/internal/auth/kerberos_factory.go index 07e3063f..297643f8 100644 --- a/internal/auth/kerberos_factory.go +++ b/internal/auth/kerberos_factory.go @@ -7,10 +7,10 @@ import ( "github.com/containerssh/gokrb5/v8/iana/nametype" "github.com/containerssh/gokrb5/v8/keytab" "github.com/containerssh/gokrb5/v8/types" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) func NewKerberosClient( diff --git a/internal/auth/kerberos_impl.go b/internal/auth/kerberos_impl.go index c3c3ee4f..0f1bcec5 100644 --- a/internal/auth/kerberos_impl.go +++ b/internal/auth/kerberos_impl.go @@ -15,12 +15,12 @@ import ( krb5svc "github.com/containerssh/gokrb5/v8/service" "github.com/containerssh/gokrb5/v8/spnego" "github.com/containerssh/gokrb5/v8/types" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/ssh" - internalSsh "go.containerssh.io/libcontainerssh/internal/ssh" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/ssh" + internalSsh "go.containerssh.io/libcontainerssh/internal/ssh" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "gopkg.in/jcmturner/goidentity.v3" ) diff --git a/internal/auth/kerberos_test.go b/internal/auth/kerberos_test.go index 37826c6c..804f1204 100644 --- a/internal/auth/kerberos_test.go +++ b/internal/auth/kerberos_test.go @@ -7,15 +7,15 @@ import ( "os" "testing" - configuration "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" "github.com/stretchr/testify/assert" + configuration "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" @@ -92,9 +92,11 @@ func TestKerberosPasswordAuth(t *testing.T) { }, ), ConnectionID: "asdf", - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, }, Username: "foo", }, @@ -114,9 +116,11 @@ func TestKerberosPasswordAuth(t *testing.T) { }, ), ConnectionID: "asdf", - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, }, Username: "foo", }, @@ -144,9 +148,11 @@ func TestKerberosNoPassword(t *testing.T) { }, ), ConnectionID: "asdf", - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, }, Username: "foo", }, @@ -166,9 +172,11 @@ func TestKerberosNoPassword(t *testing.T) { }, ), ConnectionID: "asdf", - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, }, Username: "foo", }, @@ -205,9 +213,11 @@ func TestKerberosGSSAPIAuth(t *testing.T) { }, ), ConnectionID: "asdf", - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, }, ), gssClient, @@ -233,9 +243,11 @@ func TestKerberosGSSAPIAuth(t *testing.T) { }, ), ConnectionID: "asdf", - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, }, ), gssClient, @@ -261,9 +273,11 @@ func TestKerberosGSSAPIAuth(t *testing.T) { }, ), ConnectionID: "asdf", - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, }, ), gssClient, diff --git a/internal/auth/oauth2.go b/internal/auth/oauth2.go index 5dc48b9e..4c92c6ad 100644 --- a/internal/auth/oauth2.go +++ b/internal/auth/oauth2.go @@ -4,7 +4,7 @@ import ( "context" "time" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) // OAuth2Client is the client supporting OAuth2-based authentication. It only supports keyboard-interactive diff --git a/internal/auth/oauth2_factory.go b/internal/auth/oauth2_factory.go index 0c218d1d..e22965b2 100644 --- a/internal/auth/oauth2_factory.go +++ b/internal/auth/oauth2_factory.go @@ -4,13 +4,13 @@ import ( "fmt" goHttp "net/http" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/internal/auth/oauth2" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/internal/auth/oauth2" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/service" ) func NewOAuth2Client(cfg config.AuthOAuth2ClientConfig, logger log.Logger, collector metrics.Collector) ( diff --git a/internal/auth/oauth2_github.go b/internal/auth/oauth2_github.go index b92328dc..84afc8b1 100644 --- a/internal/auth/oauth2_github.go +++ b/internal/auth/oauth2_github.go @@ -8,12 +8,12 @@ import ( "strings" "time" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" ) //region AuthGitHubConfig diff --git a/internal/auth/oauth2_impl.go b/internal/auth/oauth2_impl.go index b696560c..326856de 100644 --- a/internal/auth/oauth2_impl.go +++ b/internal/auth/oauth2_impl.go @@ -5,9 +5,9 @@ import ( "fmt" "strings" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" ) type oauth2Client struct { diff --git a/internal/auth/oauth2_oidc.go b/internal/auth/oauth2_oidc.go index 214bfb67..7b76ea71 100644 --- a/internal/auth/oauth2_oidc.go +++ b/internal/auth/oauth2_oidc.go @@ -4,11 +4,11 @@ import ( "context" "time" - "go.containerssh.io/libcontainerssh/config" - http2 "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/config" + http2 "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" ) //region Config diff --git a/internal/auth/server.go b/internal/auth/server.go index 6987af28..99bdd0b1 100644 --- a/internal/auth/server.go +++ b/internal/auth/server.go @@ -1,10 +1,10 @@ package auth import ( - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) // NewServer returns a complete HTTP server that responds to the authentication requests. diff --git a/internal/auth/webhook_client_context.go b/internal/auth/webhook_client_context.go index 0cad3536..9932e19d 100644 --- a/internal/auth/webhook_client_context.go +++ b/internal/auth/webhook_client_context.go @@ -1,7 +1,7 @@ package auth import ( - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) type webhookClientContext struct { diff --git a/internal/auth/webhook_client_factory.go b/internal/auth/webhook_client_factory.go index e64aed3f..c872886a 100644 --- a/internal/auth/webhook_client_factory.go +++ b/internal/auth/webhook_client_factory.go @@ -1,10 +1,10 @@ package auth import ( - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" ) // NewWebhookClient creates a new HTTP authentication client. diff --git a/internal/auth/webhook_client_impl.go b/internal/auth/webhook_client_impl.go index b8566940..5abfbd89 100644 --- a/internal/auth/webhook_client_impl.go +++ b/internal/auth/webhook_client_impl.go @@ -8,12 +8,12 @@ import ( "strings" "time" - "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" ) type webhookClient struct { @@ -132,7 +132,14 @@ loop: lastError = client.authServerRequest(url, authRequest, authResponse) if lastError == nil { authenticatedMeta := meta.Authenticated("") - authenticatedMeta.Merge(authResponse.ConnectionAuthenticatedMetadata) + authenticatedMeta.Merge(metadata.ConnectionAuthenticatedMetadata{ + ConnectionAuthPendingMetadata: metadata.ConnectionAuthPendingMetadata{ + ConnectionMetadata: metadata.ConnectionMetadata{ + DynamicMetadata: authResponse.DynamicMetadata, + }, + }, + AuthenticatedUsername: authResponse.AuthenticatedUsername, + }) client.logAuthResponse(logger, method, authResponse, lastLabels, authenticatedMeta.RemoteAddress.IP) return &webhookClientContext{ @@ -303,7 +310,14 @@ loop: lastError = client.authServerRequest(url, authzRequest, authResponse) if lastError == nil { authenticatedMeta := meta.Authenticated("") - authenticatedMeta.Merge(authResponse.ConnectionAuthenticatedMetadata) + authenticatedMeta.Merge(metadata.ConnectionAuthenticatedMetadata{ + ConnectionAuthPendingMetadata: metadata.ConnectionAuthPendingMetadata{ + ConnectionMetadata: metadata.ConnectionMetadata{ + DynamicMetadata: authResponse.DynamicMetadata, + }, + }, + AuthenticatedUsername: authResponse.AuthenticatedUsername, + }) client.logAuthzResponse(authenticatedMeta, logger, authResponse, lastLabels) return &webhookClientContext{ authenticatedMeta, diff --git a/internal/auth/webhook_test.go b/internal/auth/webhook_test.go index abd09125..b322d1ff 100644 --- a/internal/auth/webhook_test.go +++ b/internal/auth/webhook_test.go @@ -8,16 +8,16 @@ import ( "github.com/stretchr/testify/assert" - auth3 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/service" + auth3 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/service" ) type handler struct { diff --git a/internal/authintegration/handler.go b/internal/authintegration/handler.go index 61a1d770..cda3a834 100644 --- a/internal/authintegration/handler.go +++ b/internal/authintegration/handler.go @@ -4,11 +4,11 @@ import ( "context" "net" - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" ) // Behavior dictates how when the authentication requests are passed to the backends. diff --git a/internal/authintegration/handler_factory.go b/internal/authintegration/handler_factory.go index 0062affd..7c1ced39 100644 --- a/internal/authintegration/handler_factory.go +++ b/internal/authintegration/handler_factory.go @@ -3,12 +3,12 @@ package authintegration import ( "fmt" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/service" ) // New creates a new handler that authenticates the users with passwords and public keys. diff --git a/internal/authintegration/integration_test.go b/internal/authintegration/integration_test.go index 5939d87b..2d0aa3e2 100644 --- a/internal/authintegration/integration_test.go +++ b/internal/authintegration/integration_test.go @@ -6,20 +6,20 @@ import ( "testing" "time" - publicAuth "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/authintegration" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/service" "github.com/stretchr/testify/assert" + publicAuth "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/authintegration" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/service" "golang.org/x/crypto/ssh" ) diff --git a/internal/backend/handler.go b/internal/backend/handler.go index 20df0218..fe53bbfd 100644 --- a/internal/backend/handler.go +++ b/internal/backend/handler.go @@ -7,19 +7,19 @@ import ( "sync" "time" - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - internalConfig "go.containerssh.io/libcontainerssh/internal/config" - "go.containerssh.io/libcontainerssh/internal/docker" - "go.containerssh.io/libcontainerssh/internal/kubernetes" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/security" - "go.containerssh.io/libcontainerssh/internal/sshproxy" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + internalConfig "go.containerssh.io/libcontainerssh/internal/config" + "go.containerssh.io/libcontainerssh/internal/docker" + "go.containerssh.io/libcontainerssh/internal/kubernetes" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/security" + "go.containerssh.io/libcontainerssh/internal/sshproxy" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" ) type handler struct { diff --git a/internal/backend/handler_factory.go b/internal/backend/handler_factory.go index 142fd700..f730490a 100644 --- a/internal/backend/handler_factory.go +++ b/internal/backend/handler_factory.go @@ -3,11 +3,11 @@ package backend import ( "sync" - "go.containerssh.io/libcontainerssh/config" - internalConfig "go.containerssh.io/libcontainerssh/internal/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + internalConfig "go.containerssh.io/libcontainerssh/internal/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" ) // New creates a new backend handler. diff --git a/internal/backend/integration_test.go b/internal/backend/integration_test.go index ed8125f6..5e705627 100644 --- a/internal/backend/integration_test.go +++ b/internal/backend/integration_test.go @@ -6,16 +6,16 @@ import ( "net" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/backend" - "go.containerssh.io/libcontainerssh/internal/geoip" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/service" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/backend" + "go.containerssh.io/libcontainerssh/internal/geoip" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/service" "golang.org/x/crypto/ssh" ) diff --git a/internal/config/appconfig_tags_test.go b/internal/config/appconfig_tags_test.go index d198f518..8bef1a96 100644 --- a/internal/config/appconfig_tags_test.go +++ b/internal/config/appconfig_tags_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - configuration "go.containerssh.io/libcontainerssh/config" + configuration "go.containerssh.io/libcontainerssh/config" ) // TestOperatorCompatibility is a test that tries to create compatibility with the Kubernetes operator diff --git a/internal/config/client_factory.go b/internal/config/client_factory.go index 672267df..a3cbb1f5 100644 --- a/internal/config/client_factory.go +++ b/internal/config/client_factory.go @@ -1,10 +1,10 @@ package config import ( - "go.containerssh.io/libcontainerssh/config" - http2 "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + http2 "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" ) // MetricNameConfigBackendRequests is the number of requests to the config server diff --git a/internal/config/client_impl.go b/internal/config/client_impl.go index 92fc7d66..fa38a4bb 100644 --- a/internal/config/client_impl.go +++ b/internal/config/client_impl.go @@ -5,12 +5,12 @@ import ( "errors" "time" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" ) type client struct { @@ -52,7 +52,13 @@ loop: lastError = c.configServerRequest(&request, &response) if lastError == nil { c.logConfigResponse(logger) - return response.Config, response.ConnectionAuthenticatedMetadata, nil + return response.Config, metadata.ConnectionAuthenticatedMetadata{ + ConnectionAuthPendingMetadata: metadata.ConnectionAuthPendingMetadata{ + ConnectionMetadata: metadata.ConnectionMetadata{ + DynamicMetadata: response.DynamicMetadata, + }, + }, + }, nil } reason := c.getReason(lastError) lastLabels = append(lastLabels, metrics.Label("reason", reason)) diff --git a/internal/config/compat.go b/internal/config/compat.go index b8fee174..ae2cc41b 100644 --- a/internal/config/compat.go +++ b/internal/config/compat.go @@ -1,9 +1,9 @@ package config import ( - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) // fixCompatibility moves deprecated options to their new places and issues warnings. diff --git a/internal/config/compatibility_test.go b/internal/config/compatibility_test.go index d78060a8..7f5b57d2 100644 --- a/internal/config/compatibility_test.go +++ b/internal/config/compatibility_test.go @@ -6,12 +6,12 @@ import ( "os" "testing" - configuration "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/config" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" "github.com/stretchr/testify/assert" + configuration "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/config" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) // Test04Compatibility tests if a configuration file for ContainerSSH version 0.4 can be read. diff --git a/internal/config/docker_test.go b/internal/config/docker_test.go index f77e5f79..e5f20057 100644 --- a/internal/config/docker_test.go +++ b/internal/config/docker_test.go @@ -5,11 +5,11 @@ import ( "encoding/json" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/structutils" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/structutils" "gopkg.in/yaml.v3" ) diff --git a/internal/config/handler.go b/internal/config/handler.go index 7ab823ea..207325a9 100644 --- a/internal/config/handler.go +++ b/internal/config/handler.go @@ -1,7 +1,7 @@ package config import ( - "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/config" ) // RequestHandler is a generic interface for simplified configuration request handling. diff --git a/internal/config/handler_factory.go b/internal/config/handler_factory.go index 549f0a49..23d15597 100644 --- a/internal/config/handler_factory.go +++ b/internal/config/handler_factory.go @@ -3,8 +3,8 @@ package config import ( goHttp "net/http" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/log" ) // NewHandler creates a HTTP handler that forwards calls to the provided h config request handler. diff --git a/internal/config/handler_impl.go b/internal/config/handler_impl.go index 2663169e..541540be 100644 --- a/internal/config/handler_impl.go +++ b/internal/config/handler_impl.go @@ -1,9 +1,9 @@ package config import ( - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/log" ) type handler struct { diff --git a/internal/config/http_test.go b/internal/config/http_test.go index 6a279fff..c3e00ea1 100644 --- a/internal/config/http_test.go +++ b/internal/config/http_test.go @@ -10,14 +10,14 @@ import ( "github.com/docker/docker/api/types/container" "github.com/stretchr/testify/assert" - configuration "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/config" - "go.containerssh.io/libcontainerssh/internal/geoip" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" - service2 "go.containerssh.io/libcontainerssh/service" + configuration "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/config" + "go.containerssh.io/libcontainerssh/internal/geoip" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/metadata" + service2 "go.containerssh.io/libcontainerssh/service" ) func TestHTTP(t *testing.T) { @@ -68,9 +68,11 @@ func TestHTTP(t *testing.T) { }, ), ConnectionID: connectionID, - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, }, ClientVersion: "", Username: "foo", @@ -79,7 +81,7 @@ func TestHTTP(t *testing.T) { }, ) assert.NoError(t, err) - assert.Equal(t, "yourcompany/yourimage", cfg.Docker.Execution.Launch.ContainerConfig.Image) + assert.Equal(t, "yourcompany/yourimage", cfg.Docker.Execution.DockerLaunchConfig.ContainerConfig.Image) lifecycle.Stop(context.Background()) err = lifecycle.Wait() @@ -101,9 +103,9 @@ func (m *myConfigReqHandler) OnConfig( request configuration.Request, ) (config configuration.AppConfig, err error) { config.Backend = "docker" - config.Docker.Execution.Launch.ContainerConfig = &container.Config{} + config.Docker.Execution.DockerLaunchConfig.ContainerConfig = &container.Config{} if request.Username == "foo" { - config.Docker.Execution.Launch.ContainerConfig.Image = "yourcompany/yourimage" + config.Docker.Execution.DockerLaunchConfig.ContainerConfig.Image = "yourcompany/yourimage" } return config, err } diff --git a/internal/config/io_test.go b/internal/config/io_test.go index f8c70699..78d224fc 100644 --- a/internal/config/io_test.go +++ b/internal/config/io_test.go @@ -5,13 +5,13 @@ import ( "context" "testing" - configuration "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/config" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/log" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/stretchr/testify/assert" + configuration "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/config" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/log" ) func TestSaveLoadYAML(t *testing.T) { diff --git a/internal/config/kubernetes_test.go b/internal/config/kubernetes_test.go index dd11f1fc..31f7d175 100644 --- a/internal/config/kubernetes_test.go +++ b/internal/config/kubernetes_test.go @@ -6,11 +6,11 @@ import ( "os" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/structutils" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/structutils" "gopkg.in/yaml.v3" ) diff --git a/internal/config/loader.go b/internal/config/loader.go index 3cc446a6..e277fc4f 100644 --- a/internal/config/loader.go +++ b/internal/config/loader.go @@ -3,8 +3,8 @@ package config import ( "context" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/metadata" ) // Loader is a utility to load and update an existing configuration structure. diff --git a/internal/config/loader_http.go b/internal/config/loader_http.go index 7cc80c4f..f4e674f7 100644 --- a/internal/config/loader_http.go +++ b/internal/config/loader_http.go @@ -3,11 +3,11 @@ package config import ( "context" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/metadata" ) // NewHTTPLoader loads configuration from HTTP servers for specific connections. diff --git a/internal/config/loader_reader.go b/internal/config/loader_reader.go index 415ce6e8..17e020c5 100644 --- a/internal/config/loader_reader.go +++ b/internal/config/loader_reader.go @@ -6,10 +6,10 @@ import ( "fmt" "io" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/metadata" "gopkg.in/yaml.v3" ) diff --git a/internal/config/metrics_test.go b/internal/config/metrics_test.go index abe79edc..959439d0 100644 --- a/internal/config/metrics_test.go +++ b/internal/config/metrics_test.go @@ -3,9 +3,9 @@ package config_test import ( "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/structutils" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/structutils" ) func TestListenDefault(t *testing.T) { diff --git a/internal/config/saver.go b/internal/config/saver.go index 22a75dc7..5eed4b01 100644 --- a/internal/config/saver.go +++ b/internal/config/saver.go @@ -1,7 +1,7 @@ package config import ( - "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/config" ) // ConfigSaver is a utility to store configuration diff --git a/internal/config/saver_writer.go b/internal/config/saver_writer.go index a569ec1b..b8582c14 100644 --- a/internal/config/saver_writer.go +++ b/internal/config/saver_writer.go @@ -5,8 +5,8 @@ import ( "fmt" "io" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" "gopkg.in/yaml.v3" ) diff --git a/internal/config/server.go b/internal/config/server.go index 96db04ce..c380eb08 100644 --- a/internal/config/server.go +++ b/internal/config/server.go @@ -1,10 +1,10 @@ package config import ( - "go.containerssh.io/libcontainerssh/config" - http2 "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + http2 "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) // NewServer returns a complete HTTP server that responds to the configuration requests. diff --git a/internal/docker/conformance_test.go b/internal/docker/conformance_test.go index 08f2eca6..ff7c4d4a 100644 --- a/internal/docker/conformance_test.go +++ b/internal/docker/conformance_test.go @@ -4,14 +4,14 @@ import ( "net" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/docker" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/docker" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" ) func TestConformance(t *testing.T) { diff --git a/internal/docker/docker.go b/internal/docker/docker.go index d98c3ea6..a082280e 100644 --- a/internal/docker/docker.go +++ b/internal/docker/docker.go @@ -4,8 +4,8 @@ import ( "context" "io" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" ) // dockerClientFactory creates a dockerClient based on a configuration diff --git a/internal/docker/docker_impl.go b/internal/docker/docker_impl.go index 53cf5122..93f7fe92 100644 --- a/internal/docker/docker_impl.go +++ b/internal/docker/docker_impl.go @@ -12,15 +12,15 @@ import ( "sync" "time" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) type dockerV20ClientFactory struct { @@ -47,7 +47,7 @@ func (f *dockerV20ClientFactory) getDockerClient(ctx context.Context, config con } func (f *dockerV20ClientFactory) get(ctx context.Context, config config.DockerConfig, logger log.Logger) (dockerClient, error) { - if config.Execution.Launch.ContainerConfig == nil || config.Execution.Launch.ContainerConfig.Image == "" { + if config.Execution.DockerLaunchConfig.ContainerConfig == nil || config.Execution.DockerLaunchConfig.ContainerConfig.Image == "" { return nil, message.NewMessage(message.EDockerConfigError, "no image name specified") } @@ -78,11 +78,11 @@ type dockerV20Client struct { } func (d *dockerV20Client) getImageName() string { - return d.config.Execution.Launch.ContainerConfig.Image + return d.config.Execution.DockerLaunchConfig.ContainerConfig.Image } func (d *dockerV20Client) hasImage(ctx context.Context) (bool, error) { - image := d.config.Execution.Launch.ContainerConfig.Image + image := d.config.Execution.DockerLaunchConfig.ContainerConfig.Image d.logger.Debug(message.NewMessage(message.MDockerImageList, "Checking if image %s exists locally...", image)) var lastError error loop: @@ -110,7 +110,7 @@ loop: } func (d *dockerV20Client) pullImage(ctx context.Context) error { - image, err := getCanonicalImageName(d.config.Execution.Launch.ContainerConfig.Image) + image, err := getCanonicalImageName(d.config.Execution.DockerLaunchConfig.ContainerConfig.Image) if err != nil { return err } @@ -171,7 +171,7 @@ func (d *dockerV20Client) createContainer( ) (dockerContainer, error) { logger := d.logger logger.Debug(message.NewMessage(message.MDockerContainerCreate, "Creating container...")) - containerConfig := d.config.Execution.Launch.ContainerConfig + containerConfig := d.config.Execution.DockerLaunchConfig.ContainerConfig newConfig, err := d.createConfig(containerConfig, labels, env, tty, cmd) if err != nil { return nil, err @@ -185,10 +185,10 @@ loop: body, lastError = d.dockerClient.ContainerCreate( ctx, newConfig, - d.config.Execution.Launch.HostConfig, - d.config.Execution.Launch.NetworkConfig, - d.config.Execution.Launch.Platform, - d.config.Execution.Launch.ContainerName, + d.config.Execution.DockerLaunchConfig.HostConfig, + d.config.Execution.DockerLaunchConfig.NetworkConfig, + d.config.Execution.DockerLaunchConfig.Platform, + d.config.Execution.DockerLaunchConfig.ContainerName, ) if lastError == nil { return &dockerV20Container{ diff --git a/internal/docker/factory.go b/internal/docker/factory.go index ca6b6772..d50e872f 100644 --- a/internal/docker/factory.go +++ b/internal/docker/factory.go @@ -5,12 +5,12 @@ import ( "reflect" "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/structutils" - log2 "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/structutils" + log2 "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) // New creates a new NetworkConnectionHandler for a specific client. diff --git a/internal/docker/handler_channel.go b/internal/docker/handler_channel.go index 1ae1e39f..17f47b0c 100644 --- a/internal/docker/handler_channel.go +++ b/internal/docker/handler_channel.go @@ -7,10 +7,10 @@ import ( "io" "strings" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/unixutils" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/unixutils" + "go.containerssh.io/libcontainerssh/message" ) type channelHandler struct { diff --git a/internal/docker/handler_network.go b/internal/docker/handler_network.go index 00da3c6c..9772d082 100644 --- a/internal/docker/handler_network.go +++ b/internal/docker/handler_network.go @@ -7,13 +7,13 @@ import ( "strings" "sync" - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/agentforward" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/agentforward" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" ) type networkHandler struct { diff --git a/internal/docker/handler_ssh.go b/internal/docker/handler_ssh.go index 01937853..fb6de87b 100644 --- a/internal/docker/handler_ssh.go +++ b/internal/docker/handler_ssh.go @@ -5,11 +5,11 @@ import ( "fmt" "io" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/agentforward" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/agentforward" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" ) diff --git a/internal/docker/http.go b/internal/docker/http.go index 1260ee83..02a30302 100644 --- a/internal/docker/http.go +++ b/internal/docker/http.go @@ -6,7 +6,7 @@ import ( "net/http" "strings" - "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/config" ) func getHTTPClient(config config.DockerConfig) (*http.Client, error) { diff --git a/internal/geoip/dummy/constructor.go b/internal/geoip/dummy/constructor.go index 0658d7b2..aff3f1a0 100644 --- a/internal/geoip/dummy/constructor.go +++ b/internal/geoip/dummy/constructor.go @@ -1,7 +1,7 @@ package dummy import ( - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" ) // New creates a dummy provider that always responds with "XX" diff --git a/internal/geoip/factory.go b/internal/geoip/factory.go index e7a08034..86c1fe69 100644 --- a/internal/geoip/factory.go +++ b/internal/geoip/factory.go @@ -3,10 +3,10 @@ package geoip import ( "fmt" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" - "go.containerssh.io/libcontainerssh/internal/geoip/oschwald" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" + "go.containerssh.io/libcontainerssh/internal/geoip/oschwald" ) // New creates a new lookup provider based on the configuration. diff --git a/internal/geoip/integration_test.go b/internal/geoip/integration_test.go index 4ad5e8d4..d6500c6a 100644 --- a/internal/geoip/integration_test.go +++ b/internal/geoip/integration_test.go @@ -6,10 +6,10 @@ import ( "path" "testing" - "go.containerssh.io/libcontainerssh/config" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/geoip" + "go.containerssh.io/libcontainerssh/internal/geoip" ) func TestMaxMind(t *testing.T) { diff --git a/internal/geoip/oschwald/constructor.go b/internal/geoip/oschwald/constructor.go index c1a1e30a..49815cf3 100644 --- a/internal/geoip/oschwald/constructor.go +++ b/internal/geoip/oschwald/constructor.go @@ -1,8 +1,8 @@ package oschwald import ( - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" backend "github.com/oschwald/geoip2-golang" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" ) // New creates a new GeoIP lookup provider using Oschwald's backend. diff --git a/internal/health/health.go b/internal/health/health.go index 8d622cf7..20198885 100644 --- a/internal/health/health.go +++ b/internal/health/health.go @@ -3,11 +3,11 @@ package health import ( "fmt" - "go.containerssh.io/libcontainerssh/config" - http2 "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/config" + http2 "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/service" ) // New creates a new HTTP health service on port 23074 diff --git a/internal/health/health_test.go b/internal/health/health_test.go index b813d700..dba6ae7b 100644 --- a/internal/health/health_test.go +++ b/internal/health/health_test.go @@ -1,10 +1,10 @@ package health_test import ( - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/health" - "go.containerssh.io/libcontainerssh/log" - service2 "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/health" + "go.containerssh.io/libcontainerssh/log" + service2 "go.containerssh.io/libcontainerssh/service" "testing" "time" diff --git a/internal/kubernetes/New.go b/internal/kubernetes/New.go index 9f9cc754..5377a32d 100644 --- a/internal/kubernetes/New.go +++ b/internal/kubernetes/New.go @@ -5,11 +5,11 @@ import ( "net" "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) func New( diff --git a/internal/kubernetes/channelHandler.go b/internal/kubernetes/channelHandler.go index 678e2c1f..9c04e57a 100644 --- a/internal/kubernetes/channelHandler.go +++ b/internal/kubernetes/channelHandler.go @@ -7,10 +7,10 @@ import ( "io" "strings" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/unixutils" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/unixutils" + "go.containerssh.io/libcontainerssh/message" ) type channelHandler struct { diff --git a/internal/kubernetes/conformance_test.go b/internal/kubernetes/conformance_test.go index 94f87dba..4cdccc9e 100644 --- a/internal/kubernetes/conformance_test.go +++ b/internal/kubernetes/conformance_test.go @@ -4,14 +4,14 @@ import ( "net" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/kubernetes" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/kubernetes" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" ) func TestConformance(t *testing.T) { diff --git a/internal/kubernetes/kubernetesClientFactory.go b/internal/kubernetes/kubernetesClientFactory.go index f76064b0..08c0a064 100644 --- a/internal/kubernetes/kubernetesClientFactory.go +++ b/internal/kubernetes/kubernetesClientFactory.go @@ -3,8 +3,8 @@ package kubernetes import ( "context" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" ) // kubernetesClientFactory creates a kubernetesClient based on a configuration diff --git a/internal/kubernetes/kubernetesClientFactoryImpl.go b/internal/kubernetes/kubernetesClientFactoryImpl.go index 9931d833..dd927640 100644 --- a/internal/kubernetes/kubernetesClientFactoryImpl.go +++ b/internal/kubernetes/kubernetesClientFactoryImpl.go @@ -3,10 +3,10 @@ package kubernetes import ( "context" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" core "k8s.io/api/core/v1" "k8s.io/client-go/kubernetes" "k8s.io/client-go/kubernetes/scheme" diff --git a/internal/kubernetes/kubernetesClientImpl.go b/internal/kubernetes/kubernetesClientImpl.go index d5b81a89..e45c31bd 100644 --- a/internal/kubernetes/kubernetesClientImpl.go +++ b/internal/kubernetes/kubernetesClientImpl.go @@ -5,11 +5,11 @@ import ( "sync" "time" - containerSSHConfig "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + containerSSHConfig "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" core "k8s.io/api/core/v1" meta "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/client-go/kubernetes" diff --git a/internal/kubernetes/kubernetesExecutionImpl.go b/internal/kubernetes/kubernetesExecutionImpl.go index 09753b0f..753b236c 100644 --- a/internal/kubernetes/kubernetesExecutionImpl.go +++ b/internal/kubernetes/kubernetesExecutionImpl.go @@ -10,10 +10,10 @@ import ( "strconv" "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" "k8s.io/client-go/tools/remotecommand" "k8s.io/client-go/util/exec" ) diff --git a/internal/kubernetes/kubernetesPodImpl.go b/internal/kubernetes/kubernetesPodImpl.go index e10ded05..92e4b0f4 100644 --- a/internal/kubernetes/kubernetesPodImpl.go +++ b/internal/kubernetes/kubernetesPodImpl.go @@ -7,10 +7,10 @@ import ( "sync" "time" - config2 "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + config2 "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" core "k8s.io/api/core/v1" kubeErrors "k8s.io/apimachinery/pkg/api/errors" meta "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/internal/kubernetes/networkHandler.go b/internal/kubernetes/networkHandler.go index d27f904a..4010d300 100644 --- a/internal/kubernetes/networkHandler.go +++ b/internal/kubernetes/networkHandler.go @@ -7,13 +7,13 @@ import ( "strings" "sync" - "go.containerssh.io/libcontainerssh/auth" - publicConfig "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/internal/agentforward" + "go.containerssh.io/libcontainerssh/auth" + publicConfig "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/agentforward" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" ) type networkHandler struct { @@ -162,4 +162,4 @@ func (n *networkHandler) OnShutdown(shutdownContext context.Context) { n.OnDisconnect() case <-n.done: } -} \ No newline at end of file +} diff --git a/internal/kubernetes/sshConnectionHandler.go b/internal/kubernetes/sshConnectionHandler.go index 92cc9181..9c304a34 100644 --- a/internal/kubernetes/sshConnectionHandler.go +++ b/internal/kubernetes/sshConnectionHandler.go @@ -5,11 +5,11 @@ import ( "fmt" "io" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/agentforward" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/agentforward" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" ) diff --git a/internal/metrics/collector_factory.go b/internal/metrics/collector_factory.go index ee87344d..4c74069b 100644 --- a/internal/metrics/collector_factory.go +++ b/internal/metrics/collector_factory.go @@ -3,7 +3,7 @@ package metrics import ( "sync" - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" ) // New creates the metric collector. diff --git a/internal/metrics/collector_impl.go b/internal/metrics/collector_impl.go index 6ef43862..6a3e6636 100644 --- a/internal/metrics/collector_impl.go +++ b/internal/metrics/collector_impl.go @@ -4,7 +4,7 @@ import ( "bytes" "sync" - "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" + "go.containerssh.io/libcontainerssh/internal/geoip/geoipprovider" ) type collector struct { diff --git a/internal/metrics/counter_test.go b/internal/metrics/counter_test.go index d168ce3f..73accd37 100644 --- a/internal/metrics/counter_test.go +++ b/internal/metrics/counter_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/metrics" ) // TestCounter tests the functionality of counters diff --git a/internal/metrics/countergeo_test.go b/internal/metrics/countergeo_test.go index 06c7a174..d0bdfd09 100644 --- a/internal/metrics/countergeo_test.go +++ b/internal/metrics/countergeo_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/metrics" ) // TestCounterGeo tests the functionality of the Geo counter diff --git a/internal/metrics/gauge_test.go b/internal/metrics/gauge_test.go index 12113458..b6a3955c 100644 --- a/internal/metrics/gauge_test.go +++ b/internal/metrics/gauge_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/metrics" ) func TestGauge(t *testing.T) { diff --git a/internal/metrics/gaugegeo_test.go b/internal/metrics/gaugegeo_test.go index 154bcab8..487c6514 100644 --- a/internal/metrics/gaugegeo_test.go +++ b/internal/metrics/gaugegeo_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/metrics" ) func TestGaugeGeo(t *testing.T) { diff --git a/internal/metrics/server.go b/internal/metrics/server.go index a0bde0a3..3b109881 100644 --- a/internal/metrics/server.go +++ b/internal/metrics/server.go @@ -1,10 +1,10 @@ package metrics import ( - "go.containerssh.io/libcontainerssh/config" - http2 "go.containerssh.io/libcontainerssh/http" - "go.containerssh.io/libcontainerssh/log" - messageCodes "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + http2 "go.containerssh.io/libcontainerssh/http" + "go.containerssh.io/libcontainerssh/log" + messageCodes "go.containerssh.io/libcontainerssh/message" ) // NewServer creates a new metrics server based on the configuration. It MAY return nil if the server is disabled. diff --git a/internal/metrics/server_test.go b/internal/metrics/server_test.go index 4ee1c707..02b44278 100644 --- a/internal/metrics/server_test.go +++ b/internal/metrics/server_test.go @@ -9,13 +9,13 @@ import ( "strings" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/service" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/service" - "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/metrics" ) func TestFetchMetrics(t *testing.T) { diff --git a/internal/metricsintegration/factory.go b/internal/metricsintegration/factory.go index 70f6c3e9..4a1f3394 100644 --- a/internal/metricsintegration/factory.go +++ b/internal/metricsintegration/factory.go @@ -1,9 +1,9 @@ package metricsintegration import ( - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" ) func NewHandler( diff --git a/internal/metricsintegration/handler.go b/internal/metricsintegration/handler.go index 8cac78b6..100b97a2 100644 --- a/internal/metricsintegration/handler.go +++ b/internal/metricsintegration/handler.go @@ -5,11 +5,11 @@ import ( "net" "sync" - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/metadata" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/metadata" ) type metricsHandler struct { diff --git a/internal/metricsintegration/integration_test.go b/internal/metricsintegration/integration_test.go index 19b778bd..c6dd7cb4 100644 --- a/internal/metricsintegration/integration_test.go +++ b/internal/metricsintegration/integration_test.go @@ -6,16 +6,16 @@ import ( "net" "testing" - publicAuth "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/metricsintegration" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/metadata" "github.com/stretchr/testify/assert" - "go.containerssh.io/libcontainerssh/message" + publicAuth "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/metricsintegration" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" ) @@ -57,9 +57,11 @@ func testAuthSuccessful( }, ), ConnectionID: sshserver.GenerateConnectionID(), - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, } networkHandler, connectionMeta, err := handler.OnNetworkConnection(connectionMeta) @@ -107,9 +109,11 @@ func testAuthFailed( }, ), ConnectionID: sshserver.GenerateConnectionID(), - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, } assert.Equal(t, float64(1), metricsCollector.GetMetric(metricsintegration.MetricNameConnections)[0].Value) diff --git a/internal/security/handler_factory.go b/internal/security/handler_factory.go index 27239a4f..e47bb18a 100644 --- a/internal/security/handler_factory.go +++ b/internal/security/handler_factory.go @@ -3,9 +3,9 @@ package security import ( "fmt" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" ) // New creates a new security backend proxy. diff --git a/internal/security/handler_network.go b/internal/security/handler_network.go index 27553425..a63a84c5 100644 --- a/internal/security/handler_network.go +++ b/internal/security/handler_network.go @@ -4,12 +4,12 @@ import ( "context" "sync" - auth2 "go.containerssh.io/libcontainerssh/auth" - config2 "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" + auth2 "go.containerssh.io/libcontainerssh/auth" + config2 "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/metadata" ) type networkHandler struct { diff --git a/internal/security/handler_network_test.go b/internal/security/handler_network_test.go index 6564cab6..77d1d513 100644 --- a/internal/security/handler_network_test.go +++ b/internal/security/handler_network_test.go @@ -8,12 +8,12 @@ import ( "sync" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/message" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" ) @@ -57,9 +57,11 @@ func createChannelMetadata(i int) metadata.ChannelMetadata { }, ), ConnectionID: "asdf", - Metadata: nil, - Environment: nil, - Files: nil, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: nil, + Environment: nil, + Files: nil, + }, }, ClientVersion: "", Username: "test", diff --git a/internal/security/handler_session.go b/internal/security/handler_session.go index 64942887..a139b077 100644 --- a/internal/security/handler_session.go +++ b/internal/security/handler_session.go @@ -3,10 +3,10 @@ package security import ( "context" - config2 "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + config2 "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) type sessionHandler struct { diff --git a/internal/security/handler_session_test.go b/internal/security/handler_session_test.go index fb025ba1..e5b48d07 100644 --- a/internal/security/handler_session_test.go +++ b/internal/security/handler_session_test.go @@ -6,10 +6,10 @@ import ( "sync" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" ) func TestEnvRequest(t *testing.T) { diff --git a/internal/security/handler_ssh.go b/internal/security/handler_ssh.go index 382005db..794f56c0 100644 --- a/internal/security/handler_ssh.go +++ b/internal/security/handler_ssh.go @@ -4,11 +4,11 @@ import ( "context" "sync" - config2 "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + config2 "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" ) diff --git a/internal/ssh/enums.go b/internal/ssh/enums.go index 51a8ce21..9cc31c0e 100644 --- a/internal/ssh/enums.go +++ b/internal/ssh/enums.go @@ -4,14 +4,14 @@ type RequestType string const ( // Channel - RequestTypeEnv RequestType = "env" - RequestTypePty RequestType = "pty-req" - RequestTypeShell RequestType = "shell" - RequestTypeExec RequestType = "exec" - RequestTypeSubsystem RequestType = "subsystem" - RequestTypeWindow RequestType = "window-change" - RequestTypeSignal RequestType = "signal" - RequestTypeX11 RequestType = "x11-req" + RequestTypeEnv RequestType = "env" + RequestTypePty RequestType = "pty-req" + RequestTypeShell RequestType = "shell" + RequestTypeExec RequestType = "exec" + RequestTypeSubsystem RequestType = "subsystem" + RequestTypeWindow RequestType = "window-change" + RequestTypeSignal RequestType = "signal" + RequestTypeX11 RequestType = "x11-req" // Global RequestTypeReverseForward RequestType = "tcpip-forward" diff --git a/internal/sshproxy/New.go b/internal/sshproxy/New.go index de18e108..8ff8ffe2 100644 --- a/internal/sshproxy/New.go +++ b/internal/sshproxy/New.go @@ -4,10 +4,10 @@ import ( "net" "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" ) func New( diff --git a/internal/sshproxy/conformance_test.go b/internal/sshproxy/conformance_test.go index 7810aaa0..3cebaef8 100644 --- a/internal/sshproxy/conformance_test.go +++ b/internal/sshproxy/conformance_test.go @@ -4,14 +4,14 @@ import ( "net" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/geoip/dummy" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/internal/sshproxy" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/geoip/dummy" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/internal/sshproxy" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" ) func TestConformance(t *testing.T) { diff --git a/internal/sshproxy/networkConnectionHandler.go b/internal/sshproxy/networkConnectionHandler.go index 22cb6565..bf9d5b46 100644 --- a/internal/sshproxy/networkConnectionHandler.go +++ b/internal/sshproxy/networkConnectionHandler.go @@ -7,17 +7,17 @@ import ( "sync" "time" - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/internal/metrics" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/internal/metrics" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" - "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/sshserver" ) type networkConnectionHandler struct { diff --git a/internal/sshproxy/sshChannelHandler.go b/internal/sshproxy/sshChannelHandler.go index f15910c6..ff44f9e2 100644 --- a/internal/sshproxy/sshChannelHandler.go +++ b/internal/sshproxy/sshChannelHandler.go @@ -6,23 +6,23 @@ import ( "io" "sync" - "go.containerssh.io/libcontainerssh/internal/sshserver" - ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" "golang.org/x/crypto/ssh" ) type sshChannelHandler struct { lock *sync.Mutex - backingChannel ssh.Channel + backingChannel ssh.Channel connectionHandler *sshConnectionHandler - requests <-chan *ssh.Request - session sshserver.SessionChannel - started bool - logger log.Logger - done chan struct{} - exited bool + requests <-chan *ssh.Request + session sshserver.SessionChannel + started bool + logger log.Logger + done chan struct{} + exited bool ssh *sshConnectionHandler } @@ -376,9 +376,9 @@ func (s *sshChannelHandler) OnX11Request( defer s.lock.Unlock() payload := ssh2.X11RequestPayload{ SingleConnection: singleConnection, - Protocol: protocol, - Cookie: cookie, - Screen: screen, + Protocol: protocol, + Cookie: cookie, + Screen: screen, } if err := s.sendRequest("x11-req", payload); err != nil { err := message.WrapUser( diff --git a/internal/sshproxy/sshConnectionHandler.go b/internal/sshproxy/sshConnectionHandler.go index 57ef06cd..c9ca1af3 100644 --- a/internal/sshproxy/sshConnectionHandler.go +++ b/internal/sshproxy/sshConnectionHandler.go @@ -6,11 +6,11 @@ import ( "io" "sync" - ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/AbstractNetworkConnectionHandler.go b/internal/sshserver/AbstractNetworkConnectionHandler.go index d416d5b3..27e9ee81 100644 --- a/internal/sshserver/AbstractNetworkConnectionHandler.go +++ b/internal/sshserver/AbstractNetworkConnectionHandler.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - publicAuth "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/metadata" + publicAuth "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/metadata" ) // AbstractNetworkConnectionHandler is an empty implementation for the NetworkConnectionHandler interface. diff --git a/internal/sshserver/AbstractSSHConnectionHandler.go b/internal/sshserver/AbstractSSHConnectionHandler.go index d26e6cba..e1e32f2e 100644 --- a/internal/sshserver/AbstractSSHConnectionHandler.go +++ b/internal/sshserver/AbstractSSHConnectionHandler.go @@ -3,8 +3,8 @@ package sshserver import ( "context" - messageCodes "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + messageCodes "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" ) @@ -19,8 +19,8 @@ type AbstractSSHConnectionHandler struct { // a channel. func (a *AbstractSSHConnectionHandler) OnUnsupportedGlobalRequest(_ uint64, _ string, _ []byte) {} - -func (s *AbstractSSHConnectionHandler) OnFailedDecodeGlobalRequest(_ uint64, _ string, _ []byte, _ error) {} +func (s *AbstractSSHConnectionHandler) OnFailedDecodeGlobalRequest(_ uint64, _ string, _ []byte, _ error) { +} // OnUnsupportedChannel is called when a new channel is requested of an unsupported type. This gives the implementer // the ability to log unsupported channel requests. diff --git a/internal/sshserver/AbstractSessionChannelHandler.go b/internal/sshserver/AbstractSessionChannelHandler.go index 2cf3adc2..17e66121 100644 --- a/internal/sshserver/AbstractSessionChannelHandler.go +++ b/internal/sshserver/AbstractSessionChannelHandler.go @@ -156,4 +156,4 @@ func (s *AbstractSessionChannelHandler) OnX11Request( reverseHandler ReverseForward, ) error { return fmt.Errorf("not supported") -} \ No newline at end of file +} diff --git a/internal/sshserver/ConformanceTestBackendFactory.go b/internal/sshserver/ConformanceTestBackendFactory.go index 93a348a8..4ff6b3aa 100644 --- a/internal/sshserver/ConformanceTestBackendFactory.go +++ b/internal/sshserver/ConformanceTestBackendFactory.go @@ -3,7 +3,7 @@ package sshserver import ( "testing" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/log" ) // ConformanceTestBackendFactory is a method to creating a network connection conformanceTestHandler for testing purposes. diff --git a/internal/sshserver/New.go b/internal/sshserver/New.go index 0393f365..f388cc57 100644 --- a/internal/sshserver/New.go +++ b/internal/sshserver/New.go @@ -3,8 +3,8 @@ package sshserver import ( "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" ) // New creates a new SSH server ready to be run. It may return an error if the configuration is invalid. diff --git a/internal/sshserver/NewTestClient.go b/internal/sshserver/NewTestClient.go index 1029d67c..76c42ea9 100644 --- a/internal/sshserver/NewTestClient.go +++ b/internal/sshserver/NewTestClient.go @@ -1,7 +1,7 @@ package sshserver import ( - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/log" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/NewTestServer.go b/internal/sshserver/NewTestServer.go index a5125ba2..ab5d55e0 100644 --- a/internal/sshserver/NewTestServer.go +++ b/internal/sshserver/NewTestServer.go @@ -5,11 +5,11 @@ import ( "fmt" "testing" - config2 "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/service" + config2 "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/service" ) // NewTestServer is a simplified API to start and stop a test server. diff --git a/internal/sshserver/Server.go b/internal/sshserver/Server.go index 8cce17ba..a541590e 100644 --- a/internal/sshserver/Server.go +++ b/internal/sshserver/Server.go @@ -1,7 +1,7 @@ package sshserver import ( - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/service" ) // Server is the main SSH server interface, compatible with the Service library. It should always be used in conjunction diff --git a/internal/sshserver/Server_test.go b/internal/sshserver/Server_test.go index 1af99e95..505d2632 100644 --- a/internal/sshserver/Server_test.go +++ b/internal/sshserver/Server_test.go @@ -13,16 +13,16 @@ import ( "testing" "time" - "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/internal/structutils" - "go.containerssh.io/libcontainerssh/internal/test" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/service" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/internal/structutils" + "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/service" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/channelWrapper.go b/internal/sshserver/channelWrapper.go index 03d8dd2f..f7be8150 100644 --- a/internal/sshserver/channelWrapper.go +++ b/internal/sshserver/channelWrapper.go @@ -6,9 +6,9 @@ import ( "io" "sync" - ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" - "go.containerssh.io/libcontainerssh/log" - messageCodes "go.containerssh.io/libcontainerssh/message" + ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" + "go.containerssh.io/libcontainerssh/log" + messageCodes "go.containerssh.io/libcontainerssh/message" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/conformanceTestHandler.go b/internal/sshserver/conformanceTestHandler.go index 596cd713..ea64c8cd 100644 --- a/internal/sshserver/conformanceTestHandler.go +++ b/internal/sshserver/conformanceTestHandler.go @@ -1,7 +1,7 @@ package sshserver import ( - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) type conformanceTestHandler struct { diff --git a/internal/sshserver/conformanceTestSuite.go b/internal/sshserver/conformanceTestSuite.go index f6cb5133..9400ce12 100644 --- a/internal/sshserver/conformanceTestSuite.go +++ b/internal/sshserver/conformanceTestSuite.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/log" ) type conformanceTestSuite struct { diff --git a/internal/sshserver/handler.go b/internal/sshserver/handler.go index e9c2651b..1cc4296b 100644 --- a/internal/sshserver/handler.go +++ b/internal/sshserver/handler.go @@ -5,10 +5,10 @@ import ( "fmt" "io" - "go.containerssh.io/libcontainerssh/auth" - auth2 "go.containerssh.io/libcontainerssh/internal/auth" - message2 "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/auth" + auth2 "go.containerssh.io/libcontainerssh/internal/auth" + message2 "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" "golang.org/x/crypto/ssh" ) @@ -197,7 +197,7 @@ type ReverseForward interface { // path is the container-based path to the unix socket that is being forwarded NewChannelUnix(path string) (ForwardChannel, uint64, error) // NewChannelX11 requests the opening of an X11 channel - // + // // originatorAddress is the address that initiated the X11 request // originatorPort is the port that originated the X11 request NewChannelX11(originatorAddress string, originatorPort uint32) (ForwardChannel, uint64, error) @@ -274,7 +274,7 @@ type SSHConnectionHandler interface { // OnRequestCancelTCPReverseForward is called when a request to cancel an existing tcp port forwarding is received // // bindHost is the interface of the forwarding to be cancelled - // bindPort is the port of the forwarding to be cancelled + // bindPort is the port of the forwarding to be cancelled OnRequestCancelTCPReverseForward(bindHost string, bindPort uint32) error // OnDirectStreamLocal is called when a new forwarding channel is opened to connect and forward data to a unix socket within a container diff --git a/internal/sshserver/networkConnectionWrapper.go b/internal/sshserver/networkConnectionWrapper.go index 59496b77..f81369bb 100644 --- a/internal/sshserver/networkConnectionWrapper.go +++ b/internal/sshserver/networkConnectionWrapper.go @@ -3,7 +3,7 @@ package sshserver import ( "context" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) // HACK: check HACKS.md "OnHandshakeSuccess conformanceTestHandler" diff --git a/internal/sshserver/rejection.go b/internal/sshserver/rejection.go index 7beb9eba..ea949166 100644 --- a/internal/sshserver/rejection.go +++ b/internal/sshserver/rejection.go @@ -3,7 +3,7 @@ package sshserver import ( "fmt" - message2 "go.containerssh.io/libcontainerssh/message" + message2 "go.containerssh.io/libcontainerssh/message" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/reverseForwardHandlerImpl.go b/internal/sshserver/reverseForwardHandlerImpl.go index 98b95e7f..e64d2fd1 100644 --- a/internal/sshserver/reverseForwardHandlerImpl.go +++ b/internal/sshserver/reverseForwardHandlerImpl.go @@ -1,8 +1,8 @@ package sshserver import ( - ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" - "go.containerssh.io/libcontainerssh/log" + ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" + "go.containerssh.io/libcontainerssh/log" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/serverImpl.go b/internal/sshserver/serverImpl.go index 42adcdca..aead04a6 100644 --- a/internal/sshserver/serverImpl.go +++ b/internal/sshserver/serverImpl.go @@ -10,14 +10,14 @@ import ( "sync" "time" - protocol "go.containerssh.io/libcontainerssh/agentprotocol" - "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/config" - ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" - "go.containerssh.io/libcontainerssh/log" - messageCodes "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/metadata" - "go.containerssh.io/libcontainerssh/service" + protocol "go.containerssh.io/libcontainerssh/agentprotocol" + "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/config" + ssh2 "go.containerssh.io/libcontainerssh/internal/ssh" + "go.containerssh.io/libcontainerssh/log" + messageCodes "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/service" "golang.org/x/crypto/ssh" ) @@ -541,9 +541,11 @@ func (s *serverImpl) handleConnection(conn net.Conn) { connectionMeta := metadata.ConnectionMetadata{ RemoteAddress: metadata.RemoteAddress(*addr), ConnectionID: connectionID, - Metadata: map[string]metadata.Value{}, - Environment: map[string]metadata.Value{}, - Files: map[string]metadata.BinaryValue{}, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{}, + Environment: map[string]metadata.Value{}, + Files: map[string]metadata.BinaryValue{}, + }, } handlerNetworkConnection, connectionMeta, err := s.handler.OnNetworkConnection(connectionMeta) diff --git a/internal/sshserver/serverImpl_unix.go b/internal/sshserver/serverImpl_unix.go index 6ee03933..d684ce70 100644 --- a/internal/sshserver/serverImpl_unix.go +++ b/internal/sshserver/serverImpl_unix.go @@ -6,7 +6,7 @@ package sshserver import ( "syscall" - messageCodes "go.containerssh.io/libcontainerssh/message" + messageCodes "go.containerssh.io/libcontainerssh/message" ) func (s *serverImpl) socketControl(_, _ string, conn syscall.RawConn) error { diff --git a/internal/sshserver/serverImpl_windows.go b/internal/sshserver/serverImpl_windows.go index 155148b5..a24a951d 100644 --- a/internal/sshserver/serverImpl_windows.go +++ b/internal/sshserver/serverImpl_windows.go @@ -6,7 +6,7 @@ package sshserver import ( "syscall" - messageCodes "go.containerssh.io/libcontainerssh/message" + messageCodes "go.containerssh.io/libcontainerssh/message" ) func (s *serverImpl) socketControl(_, _ string, conn syscall.RawConn) error { diff --git a/internal/sshserver/shutdownCloser.go b/internal/sshserver/shutdownCloser.go index 8ddae8dc..c596b4bc 100644 --- a/internal/sshserver/shutdownCloser.go +++ b/internal/sshserver/shutdownCloser.go @@ -11,4 +11,4 @@ type shutdownCloser struct { func (s *shutdownCloser) OnShutdown(_ context.Context) { _ = s.closer.Close() -} \ No newline at end of file +} diff --git a/internal/sshserver/shutdown_test.go b/internal/sshserver/shutdown_test.go index 4f58b7ae..5e0b3893 100644 --- a/internal/sshserver/shutdown_test.go +++ b/internal/sshserver/shutdown_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "go.containerssh.io/libcontainerssh/internal/sshserver" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/internal/sshserver" + "go.containerssh.io/libcontainerssh/log" ) func TestProperShutdown(t *testing.T) { diff --git a/internal/sshserver/testAuthenticationHandler.go b/internal/sshserver/testAuthenticationHandler.go index 09437873..2e0de835 100644 --- a/internal/sshserver/testAuthenticationHandler.go +++ b/internal/sshserver/testAuthenticationHandler.go @@ -3,7 +3,7 @@ package sshserver import ( "context" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) // testAuthenticationHandler is a conformanceTestHandler that authenticates and passes authentication to the configured backend. diff --git a/internal/sshserver/testAuthenticationNetworkHandler.go b/internal/sshserver/testAuthenticationNetworkHandler.go index fd5685d4..11e370f8 100644 --- a/internal/sshserver/testAuthenticationNetworkHandler.go +++ b/internal/sshserver/testAuthenticationNetworkHandler.go @@ -5,9 +5,9 @@ import ( "context" "fmt" - auth2 "go.containerssh.io/libcontainerssh/auth" - "go.containerssh.io/libcontainerssh/internal/auth" - "go.containerssh.io/libcontainerssh/metadata" + auth2 "go.containerssh.io/libcontainerssh/auth" + "go.containerssh.io/libcontainerssh/internal/auth" + "go.containerssh.io/libcontainerssh/metadata" ) type testAuthenticationNetworkHandler struct { diff --git a/internal/sshserver/testClientConnectionImpl.go b/internal/sshserver/testClientConnectionImpl.go index 35a0db29..a99ebf81 100644 --- a/internal/sshserver/testClientConnectionImpl.go +++ b/internal/sshserver/testClientConnectionImpl.go @@ -1,8 +1,8 @@ package sshserver import ( - "go.containerssh.io/libcontainerssh/log" - messageCodes "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/log" + messageCodes "go.containerssh.io/libcontainerssh/message" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/testClientImpl.go b/internal/sshserver/testClientImpl.go index 8870b719..486eb018 100644 --- a/internal/sshserver/testClientImpl.go +++ b/internal/sshserver/testClientImpl.go @@ -5,8 +5,8 @@ import ( "fmt" "net" - "go.containerssh.io/libcontainerssh/log" - messageCodes "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/log" + messageCodes "go.containerssh.io/libcontainerssh/message" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/testClientSessionImpl.go b/internal/sshserver/testClientSessionImpl.go index 66d746d3..889bb691 100644 --- a/internal/sshserver/testClientSessionImpl.go +++ b/internal/sshserver/testClientSessionImpl.go @@ -9,8 +9,8 @@ import ( "sync" "time" - "go.containerssh.io/libcontainerssh/log" - messageCodes "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/log" + messageCodes "go.containerssh.io/libcontainerssh/message" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/testHandlerImpl.go b/internal/sshserver/testHandlerImpl.go index 984770be..118db6c8 100644 --- a/internal/sshserver/testHandlerImpl.go +++ b/internal/sshserver/testHandlerImpl.go @@ -4,7 +4,7 @@ import ( "context" "net" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) // testHandlerImpl is a conformanceTestHandler implementation that fakes a "real" backend. diff --git a/internal/sshserver/testNetworkHandlerImpl.go b/internal/sshserver/testNetworkHandlerImpl.go index 7630be1f..95ad6b25 100644 --- a/internal/sshserver/testNetworkHandlerImpl.go +++ b/internal/sshserver/testNetworkHandlerImpl.go @@ -4,7 +4,7 @@ import ( "context" "net" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) type testNetworkHandlerImpl struct { diff --git a/internal/sshserver/testSSHHandler.go b/internal/sshserver/testSSHHandler.go index 936a223a..17ac6c25 100644 --- a/internal/sshserver/testSSHHandler.go +++ b/internal/sshserver/testSSHHandler.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" - message2 "go.containerssh.io/libcontainerssh/message" + message2 "go.containerssh.io/libcontainerssh/message" "golang.org/x/crypto/ssh" ) diff --git a/internal/sshserver/testServerImpl.go b/internal/sshserver/testServerImpl.go index e71bcbd1..dfd727e8 100644 --- a/internal/sshserver/testServerImpl.go +++ b/internal/sshserver/testServerImpl.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - config2 "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/service" + config2 "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/service" ) type testServerImpl struct { diff --git a/internal/sshserver/testSessionChannel.go b/internal/sshserver/testSessionChannel.go index 83e77d34..77efcb9d 100644 --- a/internal/sshserver/testSessionChannel.go +++ b/internal/sshserver/testSessionChannel.go @@ -8,7 +8,7 @@ import ( "io" "strings" - "go.containerssh.io/libcontainerssh/internal/unixutils" + "go.containerssh.io/libcontainerssh/internal/unixutils" ) type testSessionChannel struct { diff --git a/internal/structutils/copy_test.go b/internal/structutils/copy_test.go index ef627793..37b90b9e 100644 --- a/internal/structutils/copy_test.go +++ b/internal/structutils/copy_test.go @@ -3,8 +3,8 @@ package structutils_test import ( "testing" - "go.containerssh.io/libcontainerssh/internal/structutils" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/internal/structutils" ) type copyTest struct { diff --git a/internal/structutils/defaults_test.go b/internal/structutils/defaults_test.go index 89f2fe9c..5d7dcd57 100644 --- a/internal/structutils/defaults_test.go +++ b/internal/structutils/defaults_test.go @@ -3,8 +3,8 @@ package structutils_test import ( "testing" - "go.containerssh.io/libcontainerssh/internal/structutils" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/internal/structutils" ) type defaultTest struct { diff --git a/internal/structutils/merge_test.go b/internal/structutils/merge_test.go index 2ae8a067..280db091 100644 --- a/internal/structutils/merge_test.go +++ b/internal/structutils/merge_test.go @@ -3,8 +3,8 @@ package structutils_test import ( "testing" - "go.containerssh.io/libcontainerssh/internal/structutils" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/internal/structutils" ) type mergeTest struct { diff --git a/internal/test/kerberos_test.go b/internal/test/kerberos_test.go index ff9ea02b..81b3ba27 100644 --- a/internal/test/kerberos_test.go +++ b/internal/test/kerberos_test.go @@ -6,7 +6,7 @@ import ( "github.com/containerssh/gokrb5/v8/client" "github.com/containerssh/gokrb5/v8/config" - "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/internal/test" ) var krbConf = ` diff --git a/internal/test/kubernetes_test.go b/internal/test/kubernetes_test.go index c35b2745..77037abe 100644 --- a/internal/test/kubernetes_test.go +++ b/internal/test/kubernetes_test.go @@ -3,7 +3,7 @@ package test_test import ( "testing" - "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/internal/test" "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" ) diff --git a/internal/test/port_test.go b/internal/test/port_test.go index 70ec5ce8..417cf64f 100644 --- a/internal/test/port_test.go +++ b/internal/test/port_test.go @@ -5,7 +5,7 @@ import ( "net" "testing" - "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/internal/test" ) func TestPortAllocation(t *testing.T) { diff --git a/internal/test/s3_test.go b/internal/test/s3_test.go index db8f71ca..6d6b498c 100644 --- a/internal/test/s3_test.go +++ b/internal/test/s3_test.go @@ -9,7 +9,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" - "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/internal/test" ) func TestS3(t *testing.T) { diff --git a/internal/test/ssh_test.go b/internal/test/ssh_test.go index 90618a1a..5b7fd5d1 100644 --- a/internal/test/ssh_test.go +++ b/internal/test/ssh_test.go @@ -5,7 +5,7 @@ import ( "net" "testing" - "go.containerssh.io/libcontainerssh/internal/test" + "go.containerssh.io/libcontainerssh/internal/test" "golang.org/x/crypto/ssh" ) diff --git a/internal/unixutils/shellwords_test.go b/internal/unixutils/shellwords_test.go index 381720a5..35a36ec4 100644 --- a/internal/unixutils/shellwords_test.go +++ b/internal/unixutils/shellwords_test.go @@ -3,8 +3,8 @@ package unixutils_test import ( "testing" - "go.containerssh.io/libcontainerssh/internal/unixutils" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/internal/unixutils" ) func TestParseCMD(t *testing.T) { diff --git a/log/golog_test.go b/log/golog_test.go index 85bf7d5a..1cb221d6 100644 --- a/log/golog_test.go +++ b/log/golog_test.go @@ -5,9 +5,9 @@ import ( goLog "log" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/log" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/log" ) func TestGoLog(t *testing.T) { diff --git a/log/logger.go b/log/logger.go index b90bb9f7..1d4efc62 100644 --- a/log/logger.go +++ b/log/logger.go @@ -1,8 +1,8 @@ package log import ( - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/message" ) // Logger The logger interface provides logging facilities on various levels. diff --git a/log/logger_factory.go b/log/logger_factory.go index 7c2237e2..c463a82e 100644 --- a/log/logger_factory.go +++ b/log/logger_factory.go @@ -4,8 +4,8 @@ import ( "io" "os" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/message" ) // NewLogger creates a standard logger pipeline. diff --git a/log/logger_impl.go b/log/logger_impl.go index 73b23aa7..bd1c6e11 100644 --- a/log/logger_impl.go +++ b/log/logger_impl.go @@ -1,8 +1,8 @@ package log import ( - "go.containerssh.io/libcontainerssh/config" - messageCodes "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + messageCodes "go.containerssh.io/libcontainerssh/message" ) type logger struct { diff --git a/log/logger_test.go b/log/logger_test.go index 431293fb..471d98f0 100644 --- a/log/logger_test.go +++ b/log/logger_test.go @@ -6,11 +6,11 @@ import ( "fmt" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/message" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/log" ) func TestLogLevelFiltering(t *testing.T) { diff --git a/log/test_logger.go b/log/test_logger.go index 20d609c1..deb14498 100644 --- a/log/test_logger.go +++ b/log/test_logger.go @@ -3,7 +3,7 @@ package log import ( "testing" - "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/config" ) // NewTestLogger creates a logger for testing purposes. diff --git a/log/test_main.go b/log/test_main.go index 125d1187..1cdae513 100644 --- a/log/test_main.go +++ b/log/test_main.go @@ -12,7 +12,7 @@ import ( "testing" "time" - "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/config" ) var testLoggerActive = false diff --git a/log/writer.go b/log/writer.go index 453bd9b3..99705dc5 100644 --- a/log/writer.go +++ b/log/writer.go @@ -3,8 +3,8 @@ package log import ( "io" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/message" ) // Writer is a specialized writer to write a line of log messages. diff --git a/log/writer_file.go b/log/writer_file.go index 672dc95a..45dd62d0 100644 --- a/log/writer_file.go +++ b/log/writer_file.go @@ -4,8 +4,8 @@ import ( "os" "sync" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/message" ) func newFileWriter(filename string, format config.LogFormat) (Writer, error) { diff --git a/log/writer_filehandle.go b/log/writer_filehandle.go index 17fa3c09..a1a4e927 100644 --- a/log/writer_filehandle.go +++ b/log/writer_filehandle.go @@ -8,8 +8,8 @@ import ( "sync" "time" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/message" ) func newFileHandleWriter(fh io.Writer, format config.LogFormat, lock *sync.Mutex) *fileHandleWriter { diff --git a/log/writer_gotest.go b/log/writer_gotest.go index af3bba20..0256e8be 100644 --- a/log/writer_gotest.go +++ b/log/writer_gotest.go @@ -4,8 +4,8 @@ import ( "runtime" "testing" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/message" ) func newGoTest(t *testing.T) Writer { diff --git a/log/writer_stdout.go b/log/writer_stdout.go index f379c9a0..2f162432 100644 --- a/log/writer_stdout.go +++ b/log/writer_stdout.go @@ -4,7 +4,7 @@ import ( "io" "sync" - "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/config" ) // newStdoutWriter creates a log writer that writes to the stdout (io.Writer) in the specified format. diff --git a/log/writer_syslog.go b/log/writer_syslog.go index 3cacce83..c4f13ab5 100644 --- a/log/writer_syslog.go +++ b/log/writer_syslog.go @@ -9,8 +9,8 @@ import ( "sync" "time" - "go.containerssh.io/libcontainerssh/config" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/config" + "go.containerssh.io/libcontainerssh/message" ) func newSyslogWriter(config config.SyslogConfig, format config.LogFormat) (Writer, error) { diff --git a/main.go b/main.go index 421e1caa..6c7c4b50 100644 --- a/main.go +++ b/main.go @@ -14,12 +14,12 @@ import ( "syscall" "time" - "go.containerssh.io/libcontainerssh/config" - internalConfig "go.containerssh.io/libcontainerssh/internal/config" - "go.containerssh.io/libcontainerssh/internal/health" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/config" + internalConfig "go.containerssh.io/libcontainerssh/internal/config" + "go.containerssh.io/libcontainerssh/internal/health" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/service" ) // Main is a helper function to start a standard ContainerSSH instance. It should be used as the outer-most function diff --git a/message/docker.go b/message/docker.go index adc0142c..378e78de 100644 --- a/message/docker.go +++ b/message/docker.go @@ -198,4 +198,4 @@ const EDockerAgentFailed = "DOCKER_AGENT_FAILED" // MDockerAgentLog indicates a log message from the ContainerSSH agent running within a user container. // Note that the agent is normally run with the users credentials and as such all log output is to be considered UNTRUSTED and should only be used for debugging purposes -const MDockerAgentLog = "DOCKER_AGENT_LOG" \ No newline at end of file +const MDockerAgentLog = "DOCKER_AGENT_LOG" diff --git a/message/kubernetes.go b/message/kubernetes.go index bbd8f737..3ed922bc 100644 --- a/message/kubernetes.go +++ b/message/kubernetes.go @@ -115,4 +115,4 @@ const EKubernetesAgentFailed = "KUBERNETES_AGENT_FAILED" // MKubernetesAgentLog indicates a log message from the ContainerSSH agent running within a user container. // Note that the agent is normally run with the users credentials and as such all log output is to be considered UNTRUSTED and should only be used for debugging purposes -const MKubernetesAgentLog = "KUBERNETES_AGENT_LOG" \ No newline at end of file +const MKubernetesAgentLog = "KUBERNETES_AGENT_LOG" diff --git a/message/security.go b/message/security.go index 8430e171..6ec4a80c 100644 --- a/message/security.go +++ b/message/security.go @@ -39,4 +39,4 @@ const ESecurityMaxSessions = "SECURITY_MAX_SESSIONS" const ESecurityForwardingRejected = "SECURITY_FORWARDING_REJECTED" -const ESecurityReverseForwardingRejected = "SECURITY_REVERSE_FORWARDING_REJECTED" \ No newline at end of file +const ESecurityReverseForwardingRejected = "SECURITY_REVERSE_FORWARDING_REJECTED" diff --git a/metadata/common.go b/metadata/common.go index a5878a22..37a68831 100644 --- a/metadata/common.go +++ b/metadata/common.go @@ -18,13 +18,11 @@ type BinaryValue struct { // Value contains the binary data for the current value. // // required: true - // in: body // swagger:strfmt: byte Value []byte `json:"value"` // Sensitive indicates that the metadata value contains sensitive data and should not be transmitted to // servers unnecessarily. // // required: false - // in: body Sensitive bool `json:"sensitive"` } diff --git a/metadata/connection.go b/metadata/connection.go index 7464c9fe..a341ee0f 100644 --- a/metadata/connection.go +++ b/metadata/connection.go @@ -11,7 +11,7 @@ import ( // RemoteAddress is an overlay for net.TCPAddr to provide JSON marshalling and unmarshalling. // -//swagger:type string +// swagger:type string type RemoteAddress net.TCPAddr // String returns a string representation of this address. @@ -79,46 +79,61 @@ func (r *RemoteAddress) UnmarshalText(input []byte) error { return nil } -// ConnectionMetadata holds a metadata structure passed around with a metadata. Its main purpose is to allow an -// authentication or authorization module to configure data exposed to the configuration server or the backend. +// DynamicMetadata contains the fields that can be returned in a webhook. // -// swagger:model ConnectionMetadata -type ConnectionMetadata struct { - // RemoteAddress is the IP address and port of the user trying to authenticate. - // - // required: true - // in: body - RemoteAddress RemoteAddress `json:"remoteAddress"` - - // ConnectionID is an opaque ID to identify the SSH connection in question. - // - // required: true - // in: body - ConnectionID string `json:"connectionId"` - - // Metadata is a set of key-value pairs that carry additional information from the authentication and configuration - // system to the backends. Backends can expose this information as container labels, environment variables, or - // other places. +// swagger:model DynamicMetadata +type DynamicMetadata struct { + // Metadata carries additional information from the authentication and configuration system to the backends. + // Backends can expose this information as container labels, environment variables, or other places. The return + // format is the name for the metadata value as a key, and a structure for the value that has a field to indicate + // if the field is sensitive, and its value. Sensitive fields may not be exposed to subsequent webhooks. // // required: false // in: body + // example: {"token":{"value":"somevalue","sensitive":true}} Metadata map[string]Value `json:"metadata,omitempty"` // Environment is a set of key-value pairs provided by the authentication or configuration system and may be - // exposed by the backend. + // exposed by the backend. The return format is the name for the metadata value as a key, and a structure for the + // value that has a field to indicate if the field is sensitive, and its value. Sensitive fields may not be exposed + // to subsequent webhooks. // // required: false // in: body + // example: {"HOME":{"value":"/home/user","sensitive":false}} Environment map[string]Value `json:"environment,omitempty"` // Files is a key-value pair of file names and their content set by the authentication or configuration system - // and consumed by the backend. + // and consumed by the backend. The return format is the name for the metadata value as a key, and a structure for + // the value that has a field to indicate if the field is sensitive, and its value. Sensitive fields may not be + // exposed to subsequent webhooks. // // required: false // in: body + // example: {"/tmp/foo":{"value":"base-64 encoded file contents","sensitive":true}} Files map[string]BinaryValue `json:"files,omitempty"` } +// ConnectionMetadata holds a metadata structure passed around with a metadata. Its main purpose is to allow an +// authentication or authorization module to configure data exposed to the configuration server or the backend. +// +// swagger:model ConnectionMetadata +type ConnectionMetadata struct { + // RemoteAddress is the IP address and port of the user trying to authenticate. + // + // swagger:ignore + RemoteAddress RemoteAddress `json:"remoteAddress"` + + // ConnectionID is an opaque ID to identify the SSH connection in question. + // + // required: true + // in: body + // minLength: 5 + ConnectionID string `json:"connectionId"` + + DynamicMetadata `json:",inline"` +} + func (meta ConnectionMetadata) StartAuthentication( clientVersion string, username string, @@ -134,6 +149,11 @@ func (meta ConnectionMetadata) StartAuthentication( // NewTestMetadata provides a metadata set useful for testing. func NewTestMetadata() ConnectionMetadata { return ConnectionMetadata{ + DynamicMetadata: DynamicMetadata{ + Metadata: map[string]Value{}, + Environment: map[string]Value{}, + Files: map[string]BinaryValue{}, + }, RemoteAddress: RemoteAddress( net.TCPAddr{ IP: net.ParseIP("127.0.0.1"), @@ -141,9 +161,6 @@ func NewTestMetadata() ConnectionMetadata { }, ), ConnectionID: "0123456789ABCDEF", - Metadata: map[string]Value{}, - Environment: map[string]Value{}, - Files: map[string]BinaryValue{}, } } @@ -154,18 +171,18 @@ func NewTestMetadata() ConnectionMetadata { type ConnectionAuthPendingMetadata struct { ConnectionMetadata `json:",inline"` - // ClientVersion contains the version string the connecting client sent if any. May be empty if the client did not - // provide a client version. + // ClientVersion contains the version string the connecting client sent. // - // required: false - // in: body + // required: true + // example: SSH-2.0-some-client + // pattern: ^SSH-2.0- ClientVersion string `json:"clientVersion"` // Username is the username provided on login by the client. This may, but must not necessarily match the // authenticated username. // // required: true - // in: body + // example: foo Username string `json:"username"` } @@ -195,15 +212,14 @@ func (c ConnectionAuthPendingMetadata) AuthFailed() ConnectionAuthenticatedMetad // ConnectionAuthenticatedMetadata is a variant of ConnectionMetadata which is used once the authentication has been // completed. It contains the AuthenticatedUsername provided by the authentication system. +// +// swagger:model ConnectionAuthenticatedMetadata type ConnectionAuthenticatedMetadata struct { ConnectionAuthPendingMetadata `json:",inline"` // AuthenticatedUsername contains the username that was actually verified. This may differ from LoginUsername when, // for example OAuth2 or Kerberos authentication is used. This field is empty until the authentication phase is // completed. - // - // required: false - // in: body AuthenticatedUsername string `json:"authenticatedUsername,omitempty"` } diff --git a/metadata/connection_test.go b/metadata/connection_test.go index 3efd49b7..99771240 100644 --- a/metadata/connection_test.go +++ b/metadata/connection_test.go @@ -5,7 +5,7 @@ import ( "net" "testing" - "go.containerssh.io/libcontainerssh/metadata" + "go.containerssh.io/libcontainerssh/metadata" ) func TestMarshalRemoteAddress(t *testing.T) { @@ -51,14 +51,16 @@ func TestMarshalConnectionMetadata(t *testing.T) { Port: 2222, }, ConnectionID: "asdf", - Metadata: map[string]metadata.Value{ - "test": { - Value: "testing", - Sensitive: true, + DynamicMetadata: metadata.DynamicMetadata{ + Metadata: map[string]metadata.Value{ + "test": { + Value: "testing", + Sensitive: true, + }, }, + Environment: nil, + Files: nil, }, - Environment: nil, - Files: nil, } data, err := json.Marshal(meta) diff --git a/service.go b/service.go index 25fb2704..c357c9f0 100644 --- a/service.go +++ b/service.go @@ -1,7 +1,7 @@ package libcontainerssh import ( - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/service" ) // Service is the core ContainerSSH service. diff --git a/service/lifecycle_test.go b/service/lifecycle_test.go index f2ade02a..c7c37556 100644 --- a/service/lifecycle_test.go +++ b/service/lifecycle_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/service" ) func TestLifecycle(t *testing.T) { diff --git a/service/pool_factory.go b/service/pool_factory.go index 375412d3..408c2172 100644 --- a/service/pool_factory.go +++ b/service/pool_factory.go @@ -3,7 +3,7 @@ package service import ( "sync" - "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/log" ) // NewPool creates a new service pool that can be used to run and manage multiple services in parallel. diff --git a/service/pool_impl.go b/service/pool_impl.go index 3785fc76..98edae58 100644 --- a/service/pool_impl.go +++ b/service/pool_impl.go @@ -4,8 +4,8 @@ import ( "context" "sync" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/message" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/message" ) type pool struct { diff --git a/service/pool_test.go b/service/pool_test.go index b7ffa385..6975cb36 100644 --- a/service/pool_test.go +++ b/service/pool_test.go @@ -5,9 +5,9 @@ import ( "sync" "testing" - "go.containerssh.io/libcontainerssh/log" - "go.containerssh.io/libcontainerssh/service" "github.com/stretchr/testify/assert" + "go.containerssh.io/libcontainerssh/log" + "go.containerssh.io/libcontainerssh/service" ) func TestEmptyPool(t *testing.T) { diff --git a/service/service_test.go b/service/service_test.go index 0dd7bb80..5fc082a6 100644 --- a/service/service_test.go +++ b/service/service_test.go @@ -3,7 +3,7 @@ package service_test import ( "errors" - "go.containerssh.io/libcontainerssh/service" + "go.containerssh.io/libcontainerssh/service" ) type testService struct {