@@ -781,7 +781,7 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
781781 // Read the app signing key from the DB. We store it hex encoded
782782 // since the config table uses strings for the value and we
783783 // don't want to deal with automatic encoding issues.
784- appSigningKeyStr , err := tx .GetAppSigningKey (ctx )
784+ appSecurityKeyStr , err := tx .GetAppSecurityKey (ctx )
785785 if err != nil && ! xerrors .Is (err , sql .ErrNoRows ) {
786786 return xerrors .Errorf ("get app signing key: %w" , err )
787787 }
@@ -794,26 +794,26 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
794794 // generated automatically on failure. Any workspace app token
795795 // smuggling operations in progress may fail, although with a
796796 // 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 {}))
799799 _ , err := rand .Read (b )
800800 if err != nil {
801801 return xerrors .Errorf ("generate fresh app signing key: %w" , err )
802802 }
803803
804- appSigningKeyStr = hex .EncodeToString (b )
805- err = tx .UpsertAppSigningKey (ctx , appSigningKeyStr )
804+ appSecurityKeyStr = hex .EncodeToString (b )
805+ err = tx .UpsertAppSecurityKey (ctx , appSecurityKeyStr )
806806 if err != nil {
807807 return xerrors .Errorf ("insert freshly generated app signing key to database: %w" , err )
808808 }
809809 }
810810
811- appSigningKey , err := workspaceapps .KeyFromString (appSigningKeyStr )
811+ appSecurityKey , err := workspaceapps .KeyFromString (appSecurityKeyStr )
812812 if err != nil {
813813 return xerrors .Errorf ("decode app signing key from database: %w" , err )
814814 }
815815
816- options .AppSigningKey = appSigningKey
816+ options .AppSecurityKey = appSecurityKey
817817 return nil
818818 }, nil )
819819 if err != nil {
0 commit comments