fix(coderd): mark provisioner daemon psk as secret (#12322)

* fix(coderd): mark provisioner daemon psk as secret

Marks provisioner daemon PSK with the secret annotation.
This ensures it will be scrubbed from API requests to
/api/v2/deployment/config.

* make gen
This commit is contained in:
Cian Johnston
2024-02-27 16:33:32 +00:00
committed by GitHub
parent 19baca55da
commit b9e2d0a400
5 changed files with 6 additions and 5 deletions

View File

@ -27,6 +27,7 @@ func TestDeploymentValues(t *testing.T) {
cfg.PostgresURL.Set(hi)
cfg.SCIMAPIKey.Set(hi)
cfg.ExternalTokenEncryptionKeys.Set("the_random_key_we_never_expected,an_other_key_we_never_unexpected")
cfg.Provisioner.DaemonPSK = "provisionersftw"
client := coderdtest.New(t, &coderdtest.Options{
DeploymentValues: cfg,
@ -46,6 +47,7 @@ func TestDeploymentValues(t *testing.T) {
require.Empty(t, scrubbed.Values.PostgresURL.Value())
require.Empty(t, scrubbed.Values.SCIMAPIKey.Value())
require.Empty(t, scrubbed.Values.ExternalTokenEncryptionKeys.Value())
require.Empty(t, scrubbed.Values.Provisioner.DaemonPSK.Value())
}
func TestDeploymentStats(t *testing.T) {