Skip to content

Commit

Permalink
Remove static key
Browse files Browse the repository at this point in the history
  • Loading branch information
hulto committed Jul 1, 2024
1 parent d1f0a84 commit d2f4b52
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions tavern/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,6 @@ import (

const REDACTED = "[REDACTED]"

// !!!! DANGER !!!!!
// This is the default static key set to ensure compatability between server and client
// in debug builds. This key must be changed in order to protect data. We're still in the
// process of implementing app layer crypto and this is temporary. Do not rely on the
// app layer crypto without changing this default.
const EnvImixEncryptKeyDefault = "I Don't care how small the room is I cast fireball"

var (
// EnvEnableTestData if set will populate the database with test data.
// EnvEnableTestRunAndExit will start the application, but exit immediately after.
Expand Down Expand Up @@ -206,13 +199,6 @@ func (cfg *Config) IsTestRunAndExitEnabled() bool {
return EnvEnableTestRunAndExit.String() != ""
}

func (cfg *Config) GetEncryptKey() []byte {
if EnvImixEncryptKey.String() == REDACTED {
return []byte(EnvImixEncryptKeyDefault)
}
return []byte(EnvImixEncryptKey.String())
}

// ConfigureHTTPServer enables the configuration of the Tavern HTTP server. The endpoint field will be
// overwritten with Tavern's HTTP handler when Tavern is run.
func ConfigureHTTPServerFromEnv(options ...func(*http.Server)) func(*Config) {
Expand Down

0 comments on commit d2f4b52

Please sign in to comment.