Skip to content

Commit 2b404d1

Browse files
committed
fixup! move cipher to dbcrypt package
1 parent 82e7b35 commit 2b404d1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

enterprise/coderd/coderd.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import (
3232
"github.com/coder/coder/v2/coderd/rbac"
3333
agplschedule "github.com/coder/coder/v2/coderd/schedule"
3434
"github.com/coder/coder/v2/codersdk"
35-
"github.com/coder/coder/v2/cryptorand"
3635
"github.com/coder/coder/v2/enterprise/coderd/license"
3736
"github.com/coder/coder/v2/enterprise/coderd/proxyhealth"
3837
"github.com/coder/coder/v2/enterprise/coderd/schedule"
@@ -65,7 +64,7 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
6564

6665
ctx, cancelFunc := context.WithCancel(ctx)
6766

68-
externalTokenCipher := &atomic.Pointer[cryptorand.Cipher]{}
67+
externalTokenCipher := &atomic.Pointer[dbcrypt.Cipher]{}
6968
options.Database = dbcrypt.New(options.Database, &dbcrypt.Options{
7069
ExternalTokenCipher: externalTokenCipher,
7170
})
@@ -372,7 +371,7 @@ type Options struct {
372371
// Whether to block non-browser connections.
373372
BrowserOnly bool
374373
SCIMAPIKey []byte
375-
ExternalTokenEncryption cryptorand.Cipher
374+
ExternalTokenEncryption dbcrypt.Cipher
376375

377376
// Used for high availability.
378377
ReplicaSyncUpdateInterval time.Duration
@@ -400,7 +399,7 @@ type API struct {
400399
ctx context.Context
401400
cancel context.CancelFunc
402401

403-
externalTokenCipher *atomic.Pointer[cryptorand.Cipher]
402+
externalTokenCipher *atomic.Pointer[dbcrypt.Cipher]
404403

405404
// Detects multiple Coder replicas running at the same time.
406405
replicaManager *replicasync.Manager

0 commit comments

Comments
 (0)