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

Component definition tutorial issue #854 #935

Closed
wants to merge 23 commits into from

Conversation

Rene2mt
Copy link
Contributor

@Rene2mt Rene2mt commented May 21, 2021

Committer Notes

Component definition tutorial ready for review.

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Have you squashed any non-relevant commits and commit messages? [instructions]
  • Do all automated CI/CD checks pass?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you included examples of how to use your new feature(s)?
  • Have you updated all OSCAL website and readme documentation affected by the changes you made? Changes to the OSCAL website can be made in the docs/content directory of your branch.

@@ -0,0 +1,335 @@
---
title: Creating a Component Definition
description: A tutorial on creating an OSCAL component definition.
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if adding "file" after 'component definition' would not help with better distinguishing between 'component definition model' (OSCAL model) and 'component definition file' (OSCAL content).


A component definition describes how a given implementation of a component or sets of components (e.g., hardware, software, service, policy, process, or procedure) can support specific controls. Product and Service Vendors, Capability Owners, Policy and Process Owners, and others can create component definitions that readily serve as inputs for a System Security Plan (SSP), helping describe how components might satisfy controls. It is important to note that component definitions do not describe actual implementations. Component definitions serve as references with content that can be used (e.g., in the SSP OSCAL model) to develop comprehensive and consistent control implementations within an SSP.

In this tutorial, we will walk through the process of creating an [OSCAL component definition model](/documentation/schema/implementation-layer/component/) for MongoDB. Our goal is to provide standard control implementations for the benefit of system owners and SSP authors. As potential components in systems that may need to meet the OMB A-130 Authorization to Operate requirements, the component definition in this tutorial will demonstrate proper implementation of a couple [NIST SP 800-53 rev 5 controls](https://github.com/usnistgov/oscal-content/tree/master/nist.gov/SP800-53/rev5/xml) deemed necessary for high / moderate / low impact systems. While this example focuses on NIST controls, the same approach could be used for any cybersecurity frameworks and their respective controls. We'll presume the MongoDB component can partially or fully satisfy the following controls:
Copy link
Contributor

Choose a reason for hiding this comment

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

A hyperlink to the MongoDB product's page could be useful. (e.g https://docs.mongodb.com/)


For simplicity of this tutorial, we will only discuss certain data structures in the sections that follow and identify how they can be used to represent our component definition.

## Defining the Component Definition’s Metadata
Copy link
Contributor

@iMichaela iMichaela May 25, 2021

Choose a reason for hiding this comment

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

This title has a different structure than the "Component", and "Control-implementations".
Maybe making the titles for Metadata, Component, Control-implementations one 'header level down:

level 3 subsection as oppose to

level 2 which is the "Creating an OSCAL Component Definition Model"

would help structuring the content.

Similar for Protocol (sub-component of 'Component"

The "Catalog tutorial" uses different header levels.


## The Final Component Definition

Combining all the content described in this tutorial, we can produce this final component definition model. Having these implementation details readily available in an OSCAL component definition means they can be referenced in an OSCAL SSP and should give SSP authors helpful content for their control implementation statements.
Copy link
Contributor

Choose a reason for hiding this comment

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

the statement reads: "means they can be referenced in an OSCAL SSP". I think the information is used to populate the SSP not to just reference it.

{{< tabs XML >}}
{{% tab %}}
{{< highlight xml "linenos=table" >}}
<?xml version="1.0" encoding="UTF-8"?>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can the final example be validated? Should the tutorial indicate it? If not, should the tutorial explain why?

iMichaela
iMichaela previously approved these changes May 25, 2021
Copy link
Contributor

@iMichaela iMichaela left a comment

Choose a reason for hiding this comment

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

Please see the comments I inserted. They are not PR blockers, but I would appreciate it if you review and consider them. Pls let me know if you want to discuss them.

@Rene2mt Rene2mt dismissed stale reviews from iMichaela and ghost via fb7247d May 25, 2021 21:09
@iMichaela
Copy link
Contributor

@Rene2mt Is the PR ready for the final review, or still a WIP?

@Rene2mt Rene2mt changed the title WIP component definition tutorial issue #854 Component definition tutorial issue #854 May 25, 2021
@Rene2mt
Copy link
Contributor Author

Rene2mt commented May 25, 2021

@Rene2mt Is the PR ready for the final review, or still a WIP?

Yes, this PR is ready for final review


### Defining the Component Definition’s Metadata

Most OSCAL models have a standard metadata syntax, therefore, this is not covered extensively in this tutorial. There are a few considerations however when authoring metadata for a component definition, such as the `<role>`, `<location>`, and `<party>` elements illustrated in lines 9-18 below.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an XML-specific reference. Can you generalize this to work with any of the XML, JSON, or YAML examples below?

Comment on lines 126 to 129
<location uuid="0db91129-35ed-474f-a25e-c3ff1e2cb9dc">
<address />
<url>https://www.mongodb.com</url>
</location>
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't appear to be a physical location, which is what the location is intended for. A link would be a better way to make this association. Need to figure out what a good `rel would be for this.

Comment on lines 130 to 132
<party uuid="ef7c799a-c50e-49ab-83e0-515e989e6df1" type="prepared-for">
<name>MongoDB</name>
</party>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think this matches the intended purpose of "prepared-for", which should be associated as a responsible-role maybe? We should talk more about how to capture the semantics of this in a better way.

Copy link
Contributor

Choose a reason for hiding this comment

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

The type needs to be a "person" or "organization". This party should be the OSCAL project or something similar.

</component-definition>
{{< /highlight >}}

The [`<role>`](/reference/latest/component-definition/xml-reference/#/component-definition/metadata/role) element defines a function assumed or expected to be assumed by a party in a specific situation. Common examples include [component definition authors](/concepts/layer/implementation/component-definition/#component-definition-authors) (e.g., Product and Service Vendors, Capability Owners, Policy and Process Owners, Standards Bodies and Validation Bodies) and [component definition consumers](/concepts/layer/implementation/component-definition/#component-definition-consumers) (e.g., System Owners and SSP Authors). This element has a required `@id` attribute which expects an [NCName data type](/reference/datatypes/#ncname). The `<location>` element can be used to associate the metadata with a location, including physical addresses and urls. The `<location>` element has a `@uuid` attribute which requires a UUID. Lastly, the `<party>` element represents either a person or organization that serves as the responsible entity. There are prescribed types, including *"prepared-for"*, *"prepared-by"*, and *"approved-by"*.
Copy link
Contributor

Choose a reason for hiding this comment

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

URLS are not intended to be locations. Similar issue for prepared-for. See above. We should discuss a better way to capture this.

Comment on lines 155 to 157
"locations": [{
"uuid": "0db91129-35ed-474f-a25e-c3ff1e2cb9dc",
"address": "",
"url": "https://www.mongodb.com"
}],
"parties": [{
"uuid": "ef7c799a-c50e-49ab-83e0-515e989e6df1",
"type": "prepared-for",
"name": "MongoDB"
}]
Copy link
Contributor

Choose a reason for hiding this comment

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

See above.

}
{{< /highlight >}}

The [`roles`](/reference/latest/component-definition/json-reference/#/component-definition/metadata/roles) property provides a grouping of `role` objects that each define a function assumed or expected to be assumed by a party in a specific situation. Common examples include [component definition authors](/concepts/layer/implementation/component-definition/#component-definition-authors) (e.g., Product and Service Vendors, Capability Owners, Policy and Process Owners, Standards Bodies and Validation Bodies) and [component definition consumers](/concepts/layer/implementation/component-definition/#component-definition-consumers) (e.g., System Owners and SSP Authors). This element has a required `id` property which expects an [NCName data type](/reference/datatypes/#ncname). The `locations` grouping can be used to associate the metadata with any number of locations, including physical addresses and urls. Each `location` object has an `uuid` property. Lastly, the `parties` grouping property represents either persons or organizations that serves as the responsible entities. There are prescribed types, including *"prepared-for"*, *"prepared-by"*, and *"approved-by"*.
Copy link
Contributor

Choose a reason for hiding this comment

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

See above.

Comment on lines 187 to 183
locations:
- uuid: 0db91129-35ed-474f-a25e-c3ff1e2cb9dc
address: ''
url: https://www.mongodb.com
parties:
- uuid: ef7c799a-c50e-49ab-83e0-515e989e6df1
type: prepared-for
name: MongoDB
Copy link
Contributor

Choose a reason for hiding this comment

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

See above.


{{< /highlight >}}

The `roles` item provides a grouping of `role` objects that each define a function assumed or expected to be assumed by a party in a specific situation. Common examples include [component definition authors](/concepts/layer/implementation/component-definition/#component-definition-authors) (e.g., Product and Service Vendors, Capability Owners, Policy and Process Owners, Standards Bodies and Validation Bodies) and [component definition consumers](/concepts/layer/implementation/component-definition/#component-definition-consumers) (e.g., System Owners and SSP Authors). This element has a required `id` property which expects an [NCName data type](/reference/datatypes/#ncname). The `locations` grouping can be used to associate the metadata with any number of locations, including physical addresses and urls. Each `location` object has an `uuid` property. Lastly, the `parties` grouping item represents either persons or organizations that serves as the responsible entities. There are prescribed types, including *"prepared-for"*, *"prepared-by"*, and *"approved-by"*.
Copy link
Contributor

Choose a reason for hiding this comment

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

See above.

<responsible-role role-id="supplier">
<party-uuid>ef7c799a-c50e-49ab-83e0-515e989e6df1</party-uuid>
</responsible-role>
<protocol name="Transmission Control" />
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe represent this as an empty <protocol/> element? The name here isn't really discussed until the next section. Same for the other formats.

Comment on lines 319 to 321
<port-range start="27017" end="27017" transport="TCP" />
<port-range start="27018" end="27018" transport="TCP" />
<port-range start="27019" end="27019" transport="TCP" />
Copy link
Contributor

Choose a reason for hiding this comment

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

You should demonstrate using the name and title elements within a protocol. There should be an individual protocol for each port. The names should probably be mongod, shardsrv, and configsrv or something similar. The title would then be a human readable name for these services.

david-waltermire added a commit to david-waltermire/OSCAL that referenced this pull request Aug 27, 2021
Linked the tutorial in the learn and concepts sections of the website.
david-waltermire added a commit to david-waltermire/OSCAL that referenced this pull request Aug 27, 2021
Linked the tutorial in the learn and concepts sections of the website.
@david-waltermire
Copy link
Contributor

This PR has been replaced by PR #1015.

david-waltermire added a commit to david-waltermire/OSCAL that referenced this pull request Aug 27, 2021
Linked the tutorial in the learn and concepts sections of the website.
david-waltermire added a commit that referenced this pull request Aug 27, 2021
- Addressed issue #854 creating a tutorial based on component definition content from PR #935.
- Linked the tutorial in the learn and concepts sections of the website.
- Adjusting deployment workflows.
- Adding new website GitHub actions workflow.
- Adjusting workflows to decompose specific activities.

Co-authored-by: Rene Tshiteya <[email protected]>
Co-authored-by: Rene2mt <[email protected]>
david-waltermire added a commit that referenced this pull request Sep 7, 2021
- Addressed issue #854 creating a tutorial based on component definition content from PR #935.
- Linked the tutorial in the learn and concepts sections of the website.
- Adjusting deployment workflows.
- Adding new website GitHub actions workflow.
- Adjusting workflows to decompose specific activities.

Co-authored-by: Rene Tshiteya <[email protected]>
Co-authored-by: Rene2mt <[email protected]>
@david-waltermire david-waltermire added this to the OSCAL 1.0.1 milestone Jan 30, 2022
@david-waltermire david-waltermire linked an issue Jan 30, 2022 that may be closed by this pull request
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tutorial: Use of components vs capabilities in a component definition
3 participants