Rename internal AllowlistEntry field to Command

Signed-off-by: Peter Engelbert <pmengelbert@gmail.com>
This commit is contained in:
Peter Engelbert
2026-02-26 12:52:05 -05:00
parent 9d685325ed
commit c24c1e8c2e
3 changed files with 12 additions and 5 deletions

View File

@@ -115,12 +115,12 @@ const (
// the logical AND of all checks corresponding to the specified fields within
// the entry.
type AllowlistEntry struct {
// Name matching is performed by first resolving the absolute path of both
// Command matching is performed by first resolving the absolute path of both
// the plugin and the name in the allowlist entry using `exec.LookPath`. It
// will be called on both, and the resulting strings must be equal. If
// either call to `exec.LookPath` results in an error, the `Name` check
// either call to `exec.LookPath` results in an error, the `Command` check
// will be considered a failure.
Name string
Command string
}
// AliasOverride stores the alias definitions.

View File

@@ -121,7 +121,14 @@ type AllowlistEntry struct {
// will be called on both, and the resulting strings must be equal. If
// either call to `exec.LookPath` results in an error, the `Name` check
// will be considered a failure.
// Deprecated: use Command instead
Name string `json:"name"`
// Name matching is performed by first resolving the absolute path of both
// the plugin and the name in the allowlist entry using `exec.LookPath`. It
// will be called on both, and the resulting strings must be equal. If
// either call to `exec.LookPath` results in an error, the `Name` check
// will be considered a failure.
Command string `json:"command"`
}
// AliasOverride stores the alias definitions.

View File

@@ -2978,8 +2978,8 @@ users:
return &config.Preference{
CredentialPluginPolicy: config.CredentialPluginPolicy("Allowlist"),
CredentialPluginAllowlist: []config.AllowlistEntry{
{Name: "bar"},
{Name: "baz"},
{Command: "bar"},
{Command: "baz"},
},
}, nil
}