Description
Describe the bug
When attempting to relate a "service" component to a "system" component using the using the //component[@type='service']/link[@rel='provided-by']/@href]
field, the oscal-cli
returns an error, even though the "system" component's UUID is referenced properly.
The UUID value is valid as confirmed by:
//component[@type='system' and @uuid=//component[@type='service']/link[@rel='provided-by']/@href]
OSCAL CLI to validate the following code snippet ...
<component uuid="11111111-2222-4000-8000-009000100001" type="system">
<title>Awesome Cloud PaaS</title>
<description><p></p></description>
<status state="operational"/>
</component>
<component uuid="11111111-2222-4000-8000-009000500001" type="service">
<title>Authorized Service Provided by Leveraged System</title>
<description><p></p></description>
<link href="11111111-2222-4000-8000-009000100001" rel="provided-by"/>
<status state="operational"/>
</component>
the oscal-cli
produces the following error ...
[ERROR] [/system-security-plan/system-implementation[1]/component[3]/link[1]] Key reference [11111111-2222-4000-8000-009000100001] not found in index 'index-system-implementation-component-uuid-software' for item at path '/system-security-plan/system-implementation[1]/component[3]/link[1]'
Who is the bug affecting
SSP Authors who are trying to link "service" components to the "system" component that provides those services.
What is affected by this bug
OSCAL Content, Documentation, Metaschema
How do we replicate this issue
Run the latest OSCAL cli against this file:
valid-SSP.zip
using:
oscal-cli validate valid-SSP.xml
Observe error pasted above
Edit the file to pre-pend a hashtag (#
) to the UUID value in the link/@href
and re-run the OSCAL CLI.
Observe the same error.
Expected behavior (i.e. solution)
No error - valid content.
Other comments
NOTE 1: This appears to be caused by an incorrect index as defined in the OSCAL SSP Metaschema.
https://github.com/usnistgov/OSCAL/blob/v1.1.2/src/metaschema/oscal_ssp_metaschema.xml#L640-L642
NOTE 2: The documentation is unclear as to whether this value should include a leading hashtag (#) in //component[@type='service']/link[@rel='provided-by']/@href
.
The documentation and metaschema definition seem to suggest the hashtag should not be present; however, when observing a similar use case in the NIST SP 800-53 catalog, the hashtag is present when a link/@href
is used to relate one control to another control in the same file. Also a leading hashtag is consistent with a URI fragment.
Revisions
No response
Metadata
Metadata
Assignees
Type
Projects
Status