Added audit activities when secret variables are upserted

Added audit activities when secret variables are created or updated
through the `PUT /api/latest/fleet/spec/secret_variables` endpoint.
This commit is contained in:
Juan Fernandez
2026-07-16 18:54:04 -04:00
committed by GitHub
parent e28a8c76f9
commit 0d3a3bdc95
15 changed files with 219 additions and 45 deletions
+3 -1
View File
@@ -7441,7 +7441,9 @@ software:
t.Setenv("FLEET_SECRET_FOO", "someValue")
// The base mock provides ValidateEmbeddedSecretsFunc (used by scripts/batch),
// so leave it alone; only the secret-upload func needs a stub here.
ds.UpsertSecretVariablesFunc = func(ctx context.Context, secretVariables []fleet.SecretVariable) error { return nil }
ds.UpsertSecretVariablesFunc = func(ctx context.Context, secretVariables []fleet.SecretVariable) (created []string, updated []string, err error) {
return nil, nil, nil
}
ds.UpsertSecretVariablesFuncInvoked = false
yml := writeYAML(t, teamYAML(` name_template: "iPad $FLEET_SECRET_FOO"`))