mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
repo-updater: init encryption and decrypt external service on read (#14652)
Co-authored-by: Tomás Senart <tomas@sourcegraph.com>
This commit is contained in:
parent
69708e86cb
commit
e7490b0283
@ -1403,7 +1403,7 @@ func scanExternalService(svc *ExternalService, s scanner) error {
|
||||
&svc.ID,
|
||||
&svc.Kind,
|
||||
&svc.DisplayName,
|
||||
&svc.Config,
|
||||
&secret.StringValue{S: &svc.Config},
|
||||
&svc.CreatedAt,
|
||||
&dbutil.NullTime{Time: &svc.UpdatedAt},
|
||||
&dbutil.NullTime{Time: &svc.DeletedAt},
|
||||
|
||||
@ -30,6 +30,7 @@ import (
|
||||
"github.com/sourcegraph/sourcegraph/internal/httpcli"
|
||||
"github.com/sourcegraph/sourcegraph/internal/logging"
|
||||
"github.com/sourcegraph/sourcegraph/internal/ratelimit"
|
||||
"github.com/sourcegraph/sourcegraph/internal/secret"
|
||||
"github.com/sourcegraph/sourcegraph/internal/trace"
|
||||
"github.com/sourcegraph/sourcegraph/internal/tracer"
|
||||
"github.com/sourcegraph/sourcegraph/schema"
|
||||
@ -49,6 +50,11 @@ func Main(enterpriseInit EnterpriseInit) {
|
||||
tracer.Init()
|
||||
trace.Init(true)
|
||||
|
||||
err := secret.Init()
|
||||
if err != nil {
|
||||
log.Fatalf("Failed to initialize secrets encryption: %v", err)
|
||||
}
|
||||
|
||||
clock := func() time.Time { return time.Now().UTC() }
|
||||
|
||||
// Syncing relies on access to frontend and git-server, so wait until they started up.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user