Project: SPIRE (Provisioning / Key Management)
File: plugin_agent_workloadattestor_windows.md

The `windows` plugin generates Windows-based selectors for workloads calling the agent. It does so by opening an access token associated with the workload process. The system is then interrogated to retrieve user and group account information from that access token. | Configuration | Description | Default | |--||| | `discoverworkloadpath` | If true, the workload path will be discovered by the plugin and used to provide additional selectors | false | | `workloadsizelimit` | The limit of workload binary sizes when calculating certain selectors (e.g. sha256). If zero, no limit is enforced. If negative, never calculate the hash. | 0 | | Selector | Value | ||-| | `windows:usersid` | The security identifier (SID) that identifies the user running the workload (e.g. `windows:usersid:S-1-5-21-759542327-988462579-1707944338-1003`) | | `windows:username` | The user name of the user running the workload (e.g. `windows:username:computer-or-domain\myuser`) | | `windows:groupsid:segroupenabled:true` | The security identifier (SID) that identifies an enabled group associated with the access token from the workload process (e.g. `windows:groupsid:segroupenabled:true:S-1-5-21-759542327-988462579-1707944338-1004`) | | `windows:groupsid:segroupenabled:false` | The security identifier (SID) that identifies a not enabled group associated with the access token from the workload process (e.g. `windows:groupsid:segroupenabled:false:S-1-5-32-544`) | | `windows:groupname:segroupenabled:true` | The group name of an enabled group associated with the access token from the workload process (e.g. `windows:groupname:segroupenabled:true:computer-or-domain\mygroup`) | | `windows:groupname:segroupenabled:false` | The group name of a not enabled group associated with the access token from the workload process (e.g. `windows:groupname:segroupenabled:false:computer-or-domain\mygroup`) | Workload path enabled selectors (available when configured with `discoverworkloadpath = true`): | Selector | Value | ||--| | `windows:path` | The path to the workload binary (e.g. `windows:path:C:\Program Files\nginx\nginx.exe`) | | `windows:sha256` | The SHA256 digest of the workload binary (e.g. `windows:sha256:3a6eb0790f39ac87c94f3856b2dd2c5d110e6811602261a9a923d3bb23adc8b7`) | Security Considerations: Malicious workloads could cause the SPIRE agent to do expensive work calculating a sha256 for large workload binaries, causing a denial-of-service. Defenses against this are: disabling calculation entirely by setting `workloadsizelimit` to a negative value use `workloadsizelimit` to enforce a limit on the binary size the plugin is willing to hash. However, the same attack could be performed by spawning a bunch of processes under the limit. The workload API does not yet support rate limiting, but when it does, this attack can be mitigated by using rate limiting in conjunction with non-negative `workloadsizelimit`. An enabled group in a token is a group that has the attribute. User and group account names are expressed using the . This plugin does not require any configuration setting. It can be added in the following way in the agent configuration file: ```hcl WorkloadAttestor "windows" { } ``` This plugin is only supported on Windows.