Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust direction prop constraint and other related constraints for interconnection and other network components #2077

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/metaschema/oscal_implementation-common_metaschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<!ENTITY allowed-values-component_inventory-item_property-name SYSTEM "./shared-constraints/allowed-values-component_inventory-item_property-name.ent">
<!ENTITY allowed-values-component_component_link-rel SYSTEM "./shared-constraints/allowed-values-component_component_link-rel.ent">
<!ENTITY allowed-values-component-type SYSTEM "./shared-constraints/allowed-values-component-type.ent">
<!ENTITY allowed-values-property-name-networked-components SYSTEM "./shared-constraints/allowed-values-property-name-networked-components.ent">
]>
<METASCHEMA xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://csrc.nist.gov/ns/oscal/metaschema/1.0" xsi:schemaLocation="http://csrc.nist.gov/ns/oscal/metaschema/1.0 ../../build/metaschema-xslt/support/metaschema/schema/xml/metaschema.xsd" abstract="yes">
Expand Down Expand Up @@ -192,10 +193,11 @@
<enum value="isa-title">Title of the Interconnection Security Agreement (ISA).</enum>
<enum value="isa-date">Date of the Interconnection Security Agreement (ISA).</enum>
<enum value="isa-remote-system-name">The name of the remote interconnected system.</enum>
<enum value="ipv4-address">An Internet Protocol Version 4 interconnection address</enum>
<enum value="ipv6-address">An Internet Protocol Version 6 interconnection address</enum>
<enum value="direction">An Internet Protocol Version 6 interconnection address</enum>
&allowed-values-property-name-networked-components;
</allowed-values>
<allowed-values target="[@type=('service', 'software')]/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per discussion in #1913 and refining the issue as posed by the comment in #1913 (comment), I am not sure why leveraged system typed components would not have similar need for like software and service, but I wanted to leave that open to interpretation here during the PR review.

Suggested change
<allowed-values target="[@type=('service', 'software')]/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name">
<allowed-values target="[@type=('service', 'software', 'system')]/prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal')]/@name">

&allowed-values-property-name-networked-components;
</allowed-values>
<allowed-values target="prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name=('ipv4-address','ipv6-address')]/@class">
<enum value="local">The identified IP address is for this system.</enum>
<enum value="remote">The identified IP address is for the remote system to which this system is connected.</enum>
Expand All @@ -213,6 +215,7 @@
<matches target="prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='isa-date']/@value" datatype="date-time"/>
<matches target="prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='ipv4-address']/@value" datatype="ip-v4-address" />
<matches target="prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='ipv6-address']/@value" datatype="ip-v6-address" />
<matches target="prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='uri']/@value" datatype="uri" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not explicitly requested in #1913 (comment), but it standards to reason we make sure it is a URI, not just a string value for a prop with the .[@name="uri"]. Open question: the documentation string defines this as a URI, we are sure we do not mean a URL to access the interconnect with a given scheme/authority, host, path, or is it really just an identifier. I think some (Brian and Michaela know this detail), but URIs and URLs are related in terms of type signature. In Metaschema, they would use the same type.

<allowed-values target="prop[has-oscal-namespace('http://csrc.nist.gov/ns/oscal') and @name='direction']/@value">
<enum value="incoming">Data from the remote system flows into this system.</enum>
<enum value="outgoing">Data from this system flows to the remote system.</enum>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<enum value="ipv4-address">The Internet Protocol Version 4 address is for an interconnection, service, or software component.</enum>
<enum value="ipv6-address">The Internet Protocol Version 6 address is for an interconnection, service, or software component.</enum>
<enum value="direction">The direction categorizes the network connectivity of an interconnection, service, or software component.</enum>
<enum value="uri">A Uniform Resource Identifier (URI) is for an interconnection, service, or software component.</enum>