Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SHA-256 in Windows workload attestor plugin #3100

Merged

Conversation

nweedon-u
Copy link
Contributor

@nweedon-u nweedon-u commented May 23, 2022

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality
Adding capabilities to the Windows workload attestor.

Description of change
Add the following to the Windows workload attestor to bring it into feature parity with the Unix workload attestor:

  • discover_workload_path configuration option
  • workload_size_limit configuration option
  • windows:path workload path selector
  • windows:sha256 workload path selector

Which issue this PR fixes
fixes #2980

nweedon-u and others added 2 commits May 5, 2022 15:19
Add the following to the Windows workload attestor to bring it into feature parity with the Unix workload attestor:
- `discover_workload_path` configuration option
- `workload_size_limit` configuration option
- `windows:path` workload path selector
- `windows:sha256` workload path selector

Signed-off-by: Niall Weedon <niall.weedon@unity3d.com>
@nweedon-u nweedon-u marked this pull request as ready for review May 23, 2022 14:47
Copy link
Collaborator

@MarcosDY MarcosDY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!!!
I just added some comments

Signed-off-by: Niall Weedon <niall.weedon@unity3d.com>
@nweedon-u
Copy link
Contributor Author

Thanks for the review @MarcosDY! I have updated the PR with your suggestions. :)

@nweedon-u nweedon-u requested a review from MarcosDY May 24, 2022 11:17
Copy link
Collaborator

@MarcosDY MarcosDY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great!!! just some minor comments

doc/plugin_agent_workloadattestor_windows.md Outdated Show resolved Hide resolved
Signed-off-by: Niall Weedon <niall.weedon@unity3d.com>
@nweedon-u nweedon-u requested a review from MarcosDY May 26, 2022 15:57
@nweedon-u
Copy link
Contributor Author

looks great!!! just some minor comments

Thanks! Should be good to go. :)

@MarcosDY MarcosDY added this to the 1.3.1 milestone May 31, 2022
Copy link
Collaborator

@MarcosDY MarcosDY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -60,12 +82,28 @@ func (p *Plugin) Attest(ctx context.Context, req *workloadattestorv1.AttestReque
selectorValues = addSelectorValueIfNotEmpty(selectorValues, "group_name", group)
}

// obtaining the workload process path and digest are behind a config flag
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this is true for the unix attestor but I'm not sure that there are extra permissions requirements in Windows (i.e. the QueryFullProcessImageName function needs that the handle must be created with the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right, which we have).

I still think that this should be behind a config flag due to the cost of calculating the SHA256 digest, that may not be needed by everyone. But looks like this comment needs to be updated.

@MarcosDY MarcosDY merged commit 58c144e into spiffe:main Jun 1, 2022
stevend-uber pushed a commit to stevend-uber/spire that referenced this pull request Oct 16, 2023
* Support SHA-256 in Windows workload attestor plugin (spiffe#2980)

Add the following to the Windows workload attestor to bring it into feature parity with the Unix workload attestor:
- `discover_workload_path` configuration option
- `workload_size_limit` configuration option
- `windows:path` workload path selector
- `windows:sha256` workload path selector

Signed-off-by: Niall Weedon <niall.weedon@unity3d.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows support: add a sha256 selector to the "windows" workload attestor plugin
3 participants