policy: fix setting the policy path from agent config

Fix setting the image service policy path when there
is a policy path in the agent config.

Fixes #8049

Signed-off-by: Matthew Arnold <mattarno@uk.ibm.com>
This commit is contained in:
Matthew Arnold
2023-09-25 14:20:38 +01:00
parent b588c1128c
commit 7fc822896c

View File

@@ -53,7 +53,7 @@ impl ImageService {
let mut image_client = ImageClient::default();
if !AGENT_CONFIG.image_policy_file.is_empty() {
image_client.config.file_paths.sigstore_config = AGENT_CONFIG.image_policy_file.clone();
image_client.config.file_paths.policy_path = AGENT_CONFIG.image_policy_file.clone();
}
if !AGENT_CONFIG.simple_signing_sigstore_config.is_empty() {
image_client.config.file_paths.sigstore_config =