You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[confcom] Adding fragment support for VN2 (Azure#8700)
* bugfix to have it so users can specify args without command in vn2 yaml
* adding more cases for specifying entrypoint and command
* adding replacement for special env var
* adding mount for workload identities and checking normalized yaml
* update docs so multiple containers in a single tar file is not recommended or valid
* fixing broken test
* adding args to let vn2 use fragments
* updating version number and history
* updating test for different env var value in public container
* updating another env var
Copy file name to clipboardExpand all lines: src/confcom/azext_confcom/README.md
+25-17Lines changed: 25 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,22 +181,7 @@ Users just need to make a tar file by using the `docker save` command above, inc
181
181
When generating security policy without using `--tar` argument, the confcom extension CLI tool attemps to fetch the image remotely if it is not locally available.
182
182
However, the CLI tool does not attempt to fetch remotely if `--tar` argument is used.
183
183
184
-
Example 11: The process used in example 10 can also be used to save multiple images into the same tar file. See the following example:
185
-
186
-
```bash
187
-
docker save ImageTag1 ImageTag2 ImageTag3 -o file.tar
188
-
```
189
-
190
-
Disconnect from network and delete the local image from the docker daemon.
191
-
Use the following command to generate CCE policy for the image.
192
-
193
-
```bash
194
-
az confcom acipolicygen -a .\sample-template-input.json --tar .\file.tar
195
-
```
196
-
197
-
Note that multiple images saved to the tar file is only available using the docker-archive format for tar files. OCI does not support multi-image tar files at this time.
198
-
199
-
Example 12: If it is necessary to put images in their own tarballs, an external file can be used that maps images to their respective tarball paths. See the following example:
184
+
Example 11: If it is necessary to put images in their own tarballs, an external file can be used that maps images to their respective tarball paths. See the following example:
200
185
201
186
```bash
202
187
docker save image:tag1 -o file1.tar
@@ -221,7 +206,7 @@ Use the following command to generate CCE policy for the image.
221
206
az confcom acipolicygen -a .\sample-template-input.json --tar .\tar_mappings.json
222
207
```
223
208
224
-
Example 13: Some use cases necessitate the use of regular expressions to allow for environment variables where either their values are secret, or unknown at policy-generation time. For these cases, the workflow below can be used:
209
+
Example 12: Some use cases necessitate the use of regular expressions to allow for environment variables where either their values are secret, or unknown at policy-generation time. For these cases, the workflow below can be used:
225
210
226
211
Create parameters in the ARM Template for each environment variable that has an unknown or secret value such as:
227
212
@@ -292,6 +277,29 @@ Use the following command to generate and print a security policy for an AKS pod
292
277
az confcom acipolicygen --virtual-node-yaml ./pod.yaml --print-policy
293
278
```
294
279
280
+
To generate a security policy using a policy config file for Virtual Node, the `scenario` field must be equal to `"vn2"`. This looks like:
This `scenario` field adds the necessary environment variables and mount values to containers in the config file.
298
+
299
+
### Workload Identity
300
+
301
+
To use workload identities with VN2, the associated label [described here](https://learn.microsoft.com/en-us/azure/aks/workload-identity-overview?tabs=dotnet#pod-labels) must be present. Having this will add the requisite environment variables and mounts to each container's policy.
302
+
295
303
> [!NOTE]
296
304
> The `acipolicygen` command is specific to generating policies for ACI-based containers. For generating security policies for the [Confidential Containers on AKS](https://learn.microsoft.com/en-us/azure/aks/confidential-containers-overview) feature, use the `katapolicygen` command.
0 commit comments