Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -951,9 +951,16 @@ func applyAuthConfig(fc *FileConfig, cfg *servicecfg.Config) error {
// Only override session recording configuration if either field is
// specified in file configuration.
if fc.Auth.hasCustomSessionRecording() {
var encryption *types.SessionRecordingEncryptionConfig
if fc.Auth.SessionRecordingEncryption != nil && fc.Auth.SessionRecordingEncryption.Value {
encryption = &types.SessionRecordingEncryptionConfig{
Enabled: true,
}
}
cfg.Auth.SessionRecordingConfig, err = types.NewSessionRecordingConfigFromConfigFile(types.SessionRecordingConfigSpecV2{
Mode: fc.Auth.SessionRecording,
ProxyChecksHostKeys: fc.Auth.ProxyChecksHostKeys,
Encryption: encryption,
})
if err != nil {
return trace.Wrap(err)
Expand Down
6 changes: 5 additions & 1 deletion lib/config/fileconf.go
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,9 @@ type Auth struct {
// determines if the proxy will check the host key of the client or not.
ProxyChecksHostKeys *types.BoolOption `yaml:"proxy_checks_host_keys,omitempty"`

// SessionRecordingEncryption enables or disables encryption of session recordings.
SessionRecordingEncryption *types.BoolOption `yaml:"session_recording_encryption,omitempty"`

// LicenseFile is a path to the license file. The path can be either absolute or
// relative to the global data dir
LicenseFile string `yaml:"license_file,omitempty"`
Expand Down Expand Up @@ -873,7 +876,8 @@ func (a *Auth) hasCustomNetworkingConfig() bool {
func (a *Auth) hasCustomSessionRecording() bool {
empty := Auth{}
return a.SessionRecording != empty.SessionRecording ||
a.ProxyChecksHostKeys != empty.ProxyChecksHostKeys
a.ProxyChecksHostKeys != empty.ProxyChecksHostKeys ||
a.SessionRecordingEncryption != empty.SessionRecordingEncryption
}

// CAKeyParams configures how CA private keys will be created and stored.
Expand Down
Loading