Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Renamed to exec to execute, and cleanup 🧼
Daniel Hougaard4a2a5f42a89a
diff --git a/cli/packages/cmd/agent.go b/cli/packages/cmd/agent.goindex 14acfa6abe..34c70e3819 100644--- a/cli/packages/cmd/agent.go+++ b/cli/packages/cmd/agent.go@@ -74,10 +74,10 @@ type Template struct {Config struct { // Configurations for the templatePollingInterval string `yaml:"polling-interval"` // How often to poll for changes in the secret- Exec struct {+ Execute struct {Command string `yaml:"command"` // Command to execute once the template has been renderedTimeout int64 `yaml:"timeout"` // Timeout for the command- } `yaml:"exec"` // Command to execute once the template has been rendered+ } `yaml:"execute"` // Command to execute once the template has been rendered} `yaml:"config"`}@@ -262,7 +262,6 @@ type TokenManager struct {}func NewTokenManager(fileDeposits []Sink, templates []Template, clientIdPath string, clientSecretPath string, newAccessTokenNotificationChan chan bool, removeClientSecretOnRead bool, exitAfterAuth bool) *TokenManager {- log.Info().Msgf("Token manager done, templates: %+v", templates[0])return &TokenManager{filePaths: fileDeposits,templates: templates,@@ -451,9 +450,6 @@ func (tm *TokenManager) WriteTokenToFiles() {}func (tm *TokenManager) WriteTemplateToFile(bytes *bytes.Buffer, template *Template) {-- log.Info().Msgf("template engine started...")-if err := WriteBytesToFile(bytes, template.DestinationPath); err != nil {log.Error().Msgf("template engine: unable to write secrets to path because %s. Will try again on next cycle", err)return@@ -482,8 +478,8 @@ func (tm *TokenManager) MonitorSecretChanges(secretTemplate Template, sigChan chvar currentEtag stringvar firstRun = true- execTimeout := secretTemplate.Config.Exec.Timeout- execCommand := secretTemplate.Config.Exec.Command+ execTimeout := secretTemplate.Config.Execute.Timeout+ execCommand := secretTemplate.Config.Execute.Commandfor {token := tm.GetToken()@@ -612,7 +608,8 @@ var agentCmd = &cobra.Command{go tm.ManageTokenLifecycle()- for _, template := range agentConfig.Templates {+ for i, template := range agentConfig.Templates {+ log.Info().Msgf("template engine started for template %v...", i+1)go tm.MonitorSecretChanges(template, sigChan)}