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

Add helper functions for generating security policy and setup CRI tests #1309

Merged
merged 2 commits into from
Mar 10, 2022

Conversation

anmaxvl
Copy link
Contributor

@anmaxvl anmaxvl commented Feb 28, 2022

Split dev tool logic to create security policy into several helper
functions, which can be reused in other places, e.g., integration tests.
Create a small helpers package under internal/tools/securitypolicy,
which hosts the above functions. Another option would be to put these
functions into securitypolicy package, however the dev-tool does
network requests, which didn't look like a good dependency to add for
the securitypolicy package itself, since creating a policy by itself
doesn't require any network access, given that caller knows all the
necessary information, mainly root hashes.

Add simple integration tests for running a pod with container and
security policy passed via annotations.

Signed-off-by: Maksim An maksiman@microsoft.com

@anmaxvl anmaxvl requested a review from a team as a code owner February 28, 2022 06:12
Copy link
Contributor

@msscotb msscotb left a comment

Choose a reason for hiding this comment

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

lgtm

Split dev tool logic to create security policy into several helper
functions, which can be reused in other places, e.g., integration tests.
Create a small helpers package under internal/tools/securitypolicy,
which hosts the above functions. Another option would be to put these
functions into securitypolicy package, however the dev-tool does
network requests, which didn't look like a good dependency to add for
the securitypolicy package itself, since creating a policy by itself
doesn't require any network access, given that caller knows all the
necessary information, mainly root hashes.

Add simple integration tests for running a pod with container and
security policy passed via annotations.

Signed-off-by: Maksim An <maksiman@microsoft.com>
@anmaxvl anmaxvl force-pushed the security-policy-test-utilities branch from f3ed7f0 to 22bb051 Compare March 9, 2022 19:50
Signed-off-by: Maksim An <maksiman@microsoft.com>
@anmaxvl anmaxvl merged commit 24ccf48 into microsoft:master Mar 10, 2022
@anmaxvl anmaxvl deleted the security-policy-test-utilities branch March 10, 2022 03:07
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
…ts (microsoft#1309)

Split dev tool logic to create security policy into several helper
functions, which can be reused in other places, e.g., integration tests.
Create a small helpers package under internal/tools/securitypolicy,
which hosts the above functions. Another option would be to put these
functions into securitypolicy package, however the dev-tool does
network requests, which didn't look like a good dependency to add for
the securitypolicy package itself, since creating a policy by itself
doesn't require any network access, given that caller knows all the
necessary information, mainly root hashes.

Add simple integration tests for running a pod with container and
security policy passed via annotations.

Signed-off-by: Maksim An <maksiman@microsoft.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.

3 participants