Skip to content

Commit

Permalink
yml: remove KES v0.13.5 and v0.14.0 config migration (#260)
Browse files Browse the repository at this point in the history
This commit removes the already deprecated configuration
formats for KES <= v0.14.0.

Now, the KES server no longer supports config files
written before KES v0.14.0. However, most KES deployments
still use Hashicorp Vault as KMS backend and version before
v0.17.0 contain a serious Vault SDK consistency bug.

Signed-off-by: Andreas Auernhammer <hi@aead.dev>
  • Loading branch information
aead committed Aug 1, 2022
1 parent d73dbff commit cb3aad5
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 522 deletions.
14 changes: 0 additions & 14 deletions internal/yml/config.go
Expand Up @@ -153,20 +153,6 @@ func unmarshalServerConfig(b []byte) (*ServerConfig, error) {
if _, ok := errV0170.(*yaml.TypeError); !ok {
return nil, err
}

var configV0140 serverConfigV0140
if errV0140 := yaml.Unmarshal(b, &configV0140); errV0140 != nil {
if _, ok := errV0140.(*yaml.TypeError); !ok {
return nil, err
}

var configV0135 serverConfigV0135
if errV0135 := yaml.Unmarshal(b, &configV0135); errV0135 != nil {
return nil, err
}
return configV0135.migrate(), nil
}
return configV0140.migrate(), nil
}
return configV0170.migrate(), nil
}
Expand Down
4 changes: 1 addition & 3 deletions internal/yml/server-config_test.go
Expand Up @@ -9,9 +9,7 @@ import "testing"
var readServerConfigTests = []struct {
File string
}{
{File: "testdata/config_v0.13.0.yml"}, // 0
{File: "testdata/config_v0.14.0.yml"}, // 1
{File: "testdata/config_v0.17.0.yml"}, // 2
{File: "testdata/config_v0.17.0.yml"}, // 0
}

func TestReadServerConfig(t *testing.T) {
Expand Down
192 changes: 0 additions & 192 deletions internal/yml/server-config_v0.13.5.go

This file was deleted.

0 comments on commit cb3aad5

Please sign in to comment.