Skip to content

Commit

Permalink
blueprint-reference: add json tailoring
Browse files Browse the repository at this point in the history
Add an initial json tailoring description and example for the blueprint
reference.
  • Loading branch information
kingsleyzissou committed Aug 6, 2024
1 parent 1b3f285 commit a1abf50
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion docs/user-guide/01-blueprint-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1243,6 +1243,46 @@ unselected = [ "grub2_password" ]
</TabItem>
</Tabs>

### OpenSCAP JSON Tailoring

The OpenSCAP team has developed a [json schema](https://github.com/ComplianceAsCode/schemas/blob/b91c8e196a8cc515e0cc7f10b2c5a02b4179c0e5/tailoring/schema.json)
as an abstraction to the standard XML tailoring file. This approach helps simplify the process of tailoring an OpenSCAP profile.
A basic example can be found [here](https://github.com/ComplianceAsCode/schemas/blob/b91c8e196a8cc515e0cc7f10b2c5a02b4179c0e5/tailoring/example-basic.json_tailoring).

Both the `profile_id` and the `filepath` options are required and the `profile_id` needs to match the `profile_id` used in the json tailoring file.

Note: users will need to use [custom files](#Files) to save the json tailoring file to the image. The generated xml tailoring file is saved to
the image as `/oscap_data/tailoring.xml`.

<Tabs values={tabValuesOnPremiseOnly} >
<TabItem value="on-premises" >
```toml
[customizations.openscap]
datastream = "/usr/share/xml/scap/ssg/content/ssg-rhel8-ds.xml"
profile_id = "xccdf_org.ssgproject.content_profile_cis"

[customizations.openscap.json_tailoring]
profile_id = "name-of-profile-used-in-json-tailoring-file"
filepath = "/some/path/tailoring-file.json"

[[customizations.files]]
path = "/some/path/tailoring-file.json"
data = "<json-tailoring-file-contents>"
```
</TabItem>
<TabItem value="hosted" >
```
ℹ️ - Currently not supported
```
</TabItem>
<TabItem value="bootc" >
```
ℹ️ - Currently not supported
```
</TabItem>
</Tabs>


#### FIPS 🔵 🟤 {#fips}

Enables/disables the system FIPS mode (disabled by default).
Expand Down Expand Up @@ -1498,7 +1538,7 @@ name = "example-system-fips-mode"
description = "A FIPS enabled base system"
version = "0.0.1"

[ostree]
[ostree]

ref= "test/edge"
url= "http://example.com/repo"
Expand Down

0 comments on commit a1abf50

Please sign in to comment.