@@ -163,21 +163,6 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
163
163
var (
164
164
cfg = new (codersdk.DeploymentValues )
165
165
opts = cfg .Options ()
166
- // For the develop.sh script, it is helpful to make this key deterministic.
167
- devAppSecurityKey string
168
- )
169
- opts .Add (
170
- // This should be temporary until we support sending this over to the
171
- // proxy via some authenticated api call.
172
- clibase.Option {
173
- Name : "App Security Key (Development Only)" ,
174
- Description : "Used to override the app security key stored in the database. This should never be used in production." ,
175
- Flag : "dangerous-dev-app-security-key" ,
176
- Default : "" ,
177
- Value : clibase .StringOf (& devAppSecurityKey ),
178
- Annotations : clibase.Annotations {}.Mark ("secret" , "true" ),
179
- Hidden : true ,
180
- },
181
166
)
182
167
serverCmd := & clibase.Cmd {
183
168
Use : "server" ,
@@ -636,12 +621,12 @@ func (r *RootCmd) Server(newAPI func(context.Context, *coderd.Options) (*coderd.
636
621
}
637
622
}
638
623
639
- if devAppSecurityKey != "" {
640
- _ , err := workspaceapps .KeyFromString (devAppSecurityKey )
624
+ if cfg . Dangerous . DevAppSecurityKey . Value () != "" {
625
+ _ , err := workspaceapps .KeyFromString (cfg . Dangerous . DevAppSecurityKey . Value () )
641
626
if err != nil {
642
627
return xerrors .Errorf ("invalid dev app security key: %w" , err )
643
628
}
644
- err = tx .UpsertAppSecurityKey (ctx , devAppSecurityKey )
629
+ err = tx .UpsertAppSecurityKey (ctx , cfg . Dangerous . DevAppSecurityKey . Value () )
645
630
if err != nil {
646
631
return xerrors .Errorf ("Insert dev app security key: %w" , err )
647
632
}
0 commit comments