Files
teleport/lib/service/servicecfg/ssh.go
T
Zac Bergquist 2ae9d770fc Refactor tctl's dependencies (#22693)
* Move configuration from lib/service to lib/service/servicecfg

The new servicecfg package will hold only configuration for services.
This will allow other packages (like tctl and tsh) to depend on
servicecfg without pulling in all of lib/service (which has a number
of platform-specific details).

This is the first step towards being able to build tctl for Windows.

* Move PAM and BPF config into servicecfg

This breaks a compile-time dependency on BPF/PAM for tctl.
2023-03-09 17:48:36 +00:00

66 lines
2.1 KiB
Go

// Copyright 2023 Gravitational, Inc
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package servicecfg
import (
"github.com/gravitational/teleport/lib/limiter"
"github.com/gravitational/teleport/lib/services"
"github.com/gravitational/teleport/lib/sshutils/x11"
"github.com/gravitational/teleport/lib/utils"
)
// SSHConfig configures Teleport's SSH service.
type SSHConfig struct {
Enabled bool
Addr utils.NetAddr
Namespace string
Shell string
Limiter limiter.Config
Labels map[string]string
CmdLabels services.CommandLabels
PermitUserEnvironment bool
// PAM holds PAM configuration for Teleport.
PAM *PAMConfig
// PublicAddrs affects the SSH host principals and DNS names added to the SSH and TLS certs.
PublicAddrs []utils.NetAddr
// BPF holds BPF configuration for Teleport.
BPF *BPFConfig
// RestrictedSession holds kernel objects restrictions for Teleport.
RestrictedSession *RestrictedSessionConfig
// AllowTCPForwarding indicates that TCP port forwarding is allowed on this node
AllowTCPForwarding bool
// IdleTimeoutMessage is sent to the client when a session expires due to
// the inactivity timeout expiring. The empty string indicates that no
// timeout message will be sent.
IdleTimeoutMessage string
// X11 holds x11 forwarding configuration for Teleport.
X11 *x11.ServerConfig
// AllowFileCopying indicates whether this node is allowed to handle
// remote file operations via SCP or SFTP.
AllowFileCopying bool
// DisableCreateHostUser disables automatic user provisioning on this
// SSH node.
DisableCreateHostUser bool
}