Skip to content

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 [email protected]

@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

@anmaxvl anmaxvl force-pushed the security-policy-test-utilities branch from d390d07 to f3ed7f0 Compare March 9, 2022 18:44
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 <[email protected]>
@anmaxvl anmaxvl force-pushed the security-policy-test-utilities branch from f3ed7f0 to 22bb051 Compare March 9, 2022 19:50
@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 <[email protected]>
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