@@ -781,7 +781,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
781
781
// Read the app signing key from the DB. We store it hex encoded
782
782
// since the config table uses strings for the value and we
783
783
// don't want to deal with automatic encoding issues.
784
- appSigningKeyStr ,err := tx .GetAppSigningKey (ctx )
784
+ appSecurityKeyStr ,err := tx .GetAppSecurityKey (ctx )
785
785
if err != nil && ! xerrors .Is (err ,sql .ErrNoRows ) {
786
786
return xerrors .Errorf ("get app signing key: %w" ,err )
787
787
}
@@ -794,26 +794,26 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
794
794
// generated automatically on failure. Any workspace app token
795
795
// smuggling operations in progress may fail, although with a
796
796
// helpful error.
797
- if decoded ,err := hex .DecodeString (appSigningKeyStr );err != nil || len (decoded )!= len (workspaceapps.SigningKey {}) {
798
- b := make ([]byte ,len (workspaceapps.SigningKey {}))
797
+ if decoded ,err := hex .DecodeString (appSecurityKeyStr );err != nil || len (decoded )!= len (workspaceapps.SecurityKey {}) {
798
+ b := make ([]byte ,len (workspaceapps.SecurityKey {}))
799
799
_ ,err := rand .Read (b )
800
800
if err != nil {
801
801
return xerrors .Errorf ("generate fresh app signing key: %w" ,err )
802
802
}
803
803
804
- appSigningKeyStr = hex .EncodeToString (b )
805
- err = tx .UpsertAppSigningKey (ctx ,appSigningKeyStr )
804
+ appSecurityKeyStr = hex .EncodeToString (b )
805
+ err = tx .UpsertAppSecurityKey (ctx ,appSecurityKeyStr )
806
806
if err != nil {
807
807
return xerrors .Errorf ("insert freshly generated app signing key to database: %w" ,err )
808
808
}
809
809
}
810
810
811
- appSigningKey ,err := workspaceapps .KeyFromString (appSigningKeyStr )
811
+ appSecurityKey ,err := workspaceapps .KeyFromString (appSecurityKeyStr )
812
812
if err != nil {
813
813
return xerrors .Errorf ("decode app signing key from database: %w" ,err )
814
814
}
815
815
816
- options .AppSigningKey = appSigningKey
816
+ options .AppSecurityKey = appSecurityKey
817
817
return nil
818
818
},nil )
819
819
if err != nil {