Class ExecCredentialPluginPolicy
Application-controlled policy for kubeconfig exec credential plugins.
Inherited Members
Namespace: k8s
Assembly: KubernetesClient.dll
Syntax
public sealed class ExecCredentialPluginPolicy
Properties
AllowAll
Allows any exec plugin. This is the default for compatibility.
Declaration
public static ExecCredentialPluginPolicy AllowAll { get; }
Property Value
| Type | Description |
|---|---|
| ExecCredentialPluginPolicy |
DenyAll
Prevents all exec plugins from running.
Declaration
public static ExecCredentialPluginPolicy DenyAll { get; }
Property Value
| Type | Description |
|---|---|
| ExecCredentialPluginPolicy |
Methods
Allowlist(params string[])
Allows command basenames or absolute executable paths. The list must not be empty.
Declaration
public static ExecCredentialPluginPolicy Allowlist(params string[] commands)
Parameters
| Type | Name | Description |
|---|---|---|
| string[] | commands | Approved basenames or absolute paths. Relative paths and invalid entries are rejected. |
Returns
| Type | Description |
|---|---|
| ExecCredentialPluginPolicy | An immutable allowlist policy. |
Remarks
Commands match if their text is identical or if both resolve to the same executable using PATH. Resolution does not follow symlinks or support shell globs. Environment variables that can redirect executable resolution or inject code are rejected. Other kubeconfig-supplied environment variables are allowed. Plugin arguments are not restricted.