From a389287d808d563beffc04f08015d78010f1da8e Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Sun, 15 Jan 2023 20:12:18 +0100 Subject: [PATCH] Disable secret encryption until its fixed (#1549) #1475, #1541, #1544 --- cmd/server/server.go | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/cmd/server/server.go b/cmd/server/server.go index 3d86565ab1..08aa707897 100644 --- a/cmd/server/server.go +++ b/cmd/server/server.go @@ -44,14 +44,14 @@ import ( "github.com/woodpecker-ci/woodpecker/server/logging" "github.com/woodpecker-ci/woodpecker/server/model" "github.com/woodpecker-ci/woodpecker/server/plugins/config" - "github.com/woodpecker-ci/woodpecker/server/plugins/encryption" - encryptedStore "github.com/woodpecker-ci/woodpecker/server/plugins/encryption/wrapper/store" "github.com/woodpecker-ci/woodpecker/server/pubsub" "github.com/woodpecker-ci/woodpecker/server/router" "github.com/woodpecker-ci/woodpecker/server/router/middleware" "github.com/woodpecker-ci/woodpecker/server/store" "github.com/woodpecker-ci/woodpecker/server/web" "github.com/woodpecker-ci/woodpecker/version" + // "github.com/woodpecker-ci/woodpecker/server/plugins/encryption" + // encryptedStore "github.com/woodpecker-ci/woodpecker/server/plugins/encryption/wrapper/store" ) func run(c *cli.Context) error { @@ -262,13 +262,6 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) { // forge server.Config.Services.Forge = f - // encryption - encryptedSecretStore := encryptedStore.NewSecretStore(v) - err := encryption.Encryption(c, v).WithClient(encryptedSecretStore).Build() - if err != nil { - log.Fatal().Err(err).Msg("could not create encryption service") - } - // services server.Config.Services.Queue = setupQueue(c, v) server.Config.Services.Logs = logging.New() @@ -277,7 +270,17 @@ func setupEvilGlobals(c *cli.Context, v store.Store, f forge.Forge) { log.Error().Err(err).Msg("could not create pubsub service") } server.Config.Services.Registries = setupRegistryService(c, v) - server.Config.Services.Secrets = setupSecretService(c, encryptedSecretStore) + + // TODO(1544): fix encrypted store + // // encryption + // encryptedSecretStore := encryptedStore.NewSecretStore(v) + // err := encryption.Encryption(c, v).WithClient(encryptedSecretStore).Build() + // if err != nil { + // log.Fatal().Err(err).Msg("could not create encryption service") + // } + // server.Config.Services.Secrets = setupSecretService(c, encryptedSecretStore) + server.Config.Services.Secrets = setupSecretService(c, v) + server.Config.Services.Environ = setupEnvironService(c, v) server.Config.Services.Membership = setupMembershipService(c, f)