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

Issue #860 identifier scoping documentation #941

Conversation

Rene2mt
Copy link
Contributor

@Rene2mt Rene2mt commented May 25, 2021

Committer Notes

Issue 860 updating OSCAL model descriptions where needed to clarify the scope and uniqueness of identifiers used within the OSCAL models.

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.

@david-waltermire david-waltermire changed the base branch from main to develop June 6, 2021 16:03
@david-waltermire david-waltermire linked an issue Jun 7, 2021 that may be closed by this pull request
6 tasks
@Rene2mt Rene2mt force-pushed the 860-identifier-scoping-documentation branch from a265451 to 3959c9c Compare July 1, 2021 11:03
Copy link
Contributor

@brian-ruf brian-ruf left a comment

Choose a reason for hiding this comment

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

I reviewed this at the request of @iMichaela, but paused my review based on a fundamental observation. I believe many of these descriptions do not fully describe the scope.

For example, while it's true that each document-level UUID is ONLY document scoped, many other identifiers are both document scoped and intended to be visible by downstream documents as a result of import statements.

I suggest this be re-worked. Consider borrowing from programming parlance describing variable scope, such as "local" describing an identifier that is only intended to be used within the document itself and "global" describing an identifier that is intended to be used both within the document itself as well as by any document importing that document.
There are only certain allowed import paths, so "global" would be constrained by import possibilities.

NOTE: After five months I am a little rusty, but if there are any identifiers that are exposed to some documents through import statements, while they are not exposed to other documents despite being imported, we may need a more granular expression of scope beyond just "local" and "global".

Ideally, I believe scope should reflect these concepts (as examples, not necessarily in this format):

Defining Model Identifier Catalog Profile Component SSP AP AR POA&M
Catalog uuid X
Catalog control-id X X X X X X X
SSP Component uuid X X X X X
AP Subject uuid X X
AR Subject uuid X

Known import paths, which would constrain "global" include:

  • Catalog -> Profile -> Component Definition
  • Catalog -> Profile -> SSP -> POA&M
  • Catalog -> Profile -> SSP -> AP -> AR

Finally, while I haven't been in the working sessions in the past several months and don't know if there was discussion/consensus on terminology, I am not certain "document" is the best term to use to talk about scope. Consider using "model".

@Rene2mt Rene2mt force-pushed the 860-identifier-scoping-documentation branch from 6153b64 to 108b86e Compare September 2, 2021 16:13
@Rene2mt
Copy link
Contributor Author

Rene2mt commented Sep 2, 2021

Thanks for the inputs. Please review the latest two commits to see the latest WIP ( 81dfc3c and 108b86e ). These commits just have changes for identifier descriptions in just two of the metaschemas but additional changes will be made and committed once we confirm we are on the right track:

  • oscal_metadata_metaschema.xml
  • oscal_catalog_metaschema.xml

As I reviewed the identifier descriptions in these metaschemas, I focused on clarifying

  1. Uniqueness of the Identifier - I added "global" or "local" to describe the "uniqueness" of identifiers. By default, identifiers of type uuid are globally unique, but it thinks its still good to call out explicitly. Other identifiers (e.g. of type token) are often unclear, so I focused on these to make sure it was clearly stated.
  2. Scope (of use) - I added some verbiage to indicate if the identifier was "cross-instance" scoped or just "instance" scoped.
  3. Consistency - I made sure the descriptions specified what should happen to the identifier when revisions are made (e.g., should remain consistent across revisions or should change with each revision).

``

@david-waltermire
Copy link
Contributor

How about something like this:

<!-- identifier declarations -->
<description>A <em>machine-oriented</em>, <em>globally unique</em> identifier with a <em>cross-instance</em> scope that can be used to reference this defined resource elsewhere in this or another OSCAL instance. This UUID should be assigned <em>per-subject</em>, which means it should be consistently used to identify the same subject across revisions of the document.</description>
<remarks>
    <!-- UUID -->
    <p>Type: machine-oriented</p>
    <p>Uniqueness: globally-unique</p>
    <p>Scope: cross-instance - Provides an identifier that can be used to refer to this concept in OSCAL APs, ARs, and POAMs.</p>
    <p>Consistency: per-subject</p>
    <p>Additional Information:</p>
</remarks>

and for references:

<!-- identifier references -->
<description>Something similar to the above that incorporates key words</description>
<remarks>
    <!-- UUID -->
    <p>Type: machine-oriented</p>
    <p>Source: cross-instance - References an identifier from the SSP referenced in the assessment plan's <code>import-ssp</code> directive.</p>
    <p>Additional Information:</p>
</remarks>

@Rene2mt Rene2mt force-pushed the 860-identifier-scoping-documentation branch from 108b86e to dcb2078 Compare October 14, 2021 17:19
@Rene2mt Rene2mt force-pushed the 860-identifier-scoping-documentation branch from 2ac2a43 to d94974a Compare October 27, 2021 18:33
@Rene2mt Rene2mt force-pushed the 860-identifier-scoping-documentation branch from ae91eef to ac6ca8c Compare December 2, 2021 18:56
@Rene2mt Rene2mt force-pushed the 860-identifier-scoping-documentation branch from 2682d45 to a9bc10a Compare December 9, 2021 20:58
@Rene2mt Rene2mt force-pushed the 860-identifier-scoping-documentation branch from a9bc10a to 724b2cd Compare January 6, 2022 19:43
@Rene2mt Rene2mt force-pushed the 860-identifier-scoping-documentation branch from 1267406 to 394d324 Compare January 13, 2022 23:15
> **NOTE**: While UUIDs are used as machine-oriented identifiers catering to use cases where automated processing is desired, they are not ideal for wildcard matching scenarios. UUIDs should only be used when exact matches are expected.


The [OSCAL Reference Index](/reference/latest/complete/xml-index/#/@uuid) provides a complete listing of UUIDs in OSCAL. References to these identifiers typically follow a naming convention of the object type followed by “-uuid”. For example, see the reference index for [location-uuid](/reference/latest/complete/xml-index/#/location-uuid).
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 a link to the XML index. The JSON index should be referenced as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added JSON index. Will be in next commit.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that this is true. Because OSCAL is extensible, I could have my own UUIDs. Perhaps something like

Suggested change
The [OSCAL Reference Index](/reference/latest/complete/xml-index/#/@uuid) provides a complete listing of UUIDs in OSCAL. References to these identifiers typically follow a naming convention of the object type followed by “-uuid”. For example, see the reference index for [location-uuid](/reference/latest/complete/xml-index/#/location-uuid).
The [OSCAL Reference Index](/reference/latest/complete/xml-index/#/@uuid) provides a listing of UUIDs in the core OSCAL model. References to these identifiers typically follow a naming convention of the object type followed by “-uuid”. For example, see the reference index for [location-uuid](/reference/latest/complete/xml-index/#/location-uuid).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

valid point. Updating locally and will include with my next commit

Copy link
Contributor

Choose a reason for hiding this comment

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

This will get crowded with brad's recommendation. It seems we single space between sentences and there is an additional space at "followed by “-uuid”. For example," between the period and for. I noticed this when re-reading locally.

Copy link
Contributor

@aj-stein-nist aj-stein-nist left a comment

Choose a reason for hiding this comment

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

Some initial feedback, more to come. I see Dave is adding a lot too, so I wanted to get this in the mix. Will give it more reviews a few times over before I say I am done done. :-)

The [OSCAL Reference Index](/reference/latest/complete/xml-index/#/@id) provides a comprehensive listing of the *`human-oriented`* IDs in OSCAL. References to these IDs are typically named according to the referenced object type (e.g., control) followed by “-id”, as seen here in the [Reference Index](/reference/latest/complete/xml-index/#/@control-id).

### **Uniqueness**
OSCAL identifier uniqueness are categorized as *`locally-unique`* or *`globally-unique`*. As implied by the category name, *`locally-unique`* identifiers must be unique within the current document whereas *`globally-unique`* identifiers are guaranteed to be unique across all other identifiers. OSCAL’s *`machine-oriented`* UUID identifiers are always *`globally-unique`*. *`Human-oriented`* identifiers must be defined and managed organizationally and are more susceptible to identifier duplication or collisions. Thus, *`human-oriented`* identifiers are less likely to be *`globally-unique`*.
Copy link
Contributor

Choose a reason for hiding this comment

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

identifiers are guaranteed to be unique across all other identifier

Does this mean over all time? Maybe be overly obvious and say that?

Copy link
Contributor

Choose a reason for hiding this comment

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

They aren't really unique. They're unlikely to be duplicated accidently with reasonable assumptions of time and usage, but nothing stops me using something you've already used (either because I didn't know better - maybe I copied an example and didn't realise what it all meant; or maliciously).

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree per you review of my review. I meant more in the aspirational view that they should not be reused intentionally by developers unless in clear case; UUIDs are presumed to not be reusable. In a previous part of my review, I thought somewhere here, I added a link to the explanation of how UUIDs should be used for this reason.

I guess your point stands, maybe it is better not to muddy the waters! I'll resolve this one for now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we'll create a follow on issue for this item

docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved

#### Human-Oriented

OSCAL generally implements *`human-oriented`* identifiers as Token data types, which are non-colonized names (add link to data type). These *`human-oriented`* identifiers have the benefit of allowing authors to incorporate semantics that support readability and processing by humans. For example, control identifiers in a catalog may use a nomenclature that is familiar to the intended audience, allowing them to quickly determine what security control is being referred to, simply by its ID.
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking: Additional feedback: I am not sure we clarify on the data type page even why they are different and why that matters. I will open up a separate issue, but we might want to remove that part.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, I moved the larger discussion into #1105.

As for the content here, my recommendation below: OSCAL generally provides the token data to enable human-oriented identifiers. These human-oriented identifiers ..."

docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/_index.md Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
> **NOTE**: While UUIDs are used as machine-oriented identifiers catering to use cases where automated processing is desired, they are not ideal for wildcard matching scenarios. UUIDs should only be used when exact matches are expected.


The [OSCAL Reference Index](/reference/latest/complete/xml-index/#/@uuid) provides a complete listing of UUIDs in OSCAL. References to these identifiers typically follow a naming convention of the object type followed by “-uuid”. For example, see the reference index for [location-uuid](/reference/latest/complete/xml-index/#/location-uuid).
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure that this is true. Because OSCAL is extensible, I could have my own UUIDs. Perhaps something like

Suggested change
The [OSCAL Reference Index](/reference/latest/complete/xml-index/#/@uuid) provides a complete listing of UUIDs in OSCAL. References to these identifiers typically follow a naming convention of the object type followed by “-uuid”. For example, see the reference index for [location-uuid](/reference/latest/complete/xml-index/#/location-uuid).
The [OSCAL Reference Index](/reference/latest/complete/xml-index/#/@uuid) provides a listing of UUIDs in the core OSCAL model. References to these identifiers typically follow a naming convention of the object type followed by “-uuid”. For example, see the reference index for [location-uuid](/reference/latest/complete/xml-index/#/location-uuid).

The [OSCAL Reference Index](/reference/latest/complete/xml-index/#/@id) provides a comprehensive listing of the *`human-oriented`* IDs in OSCAL. References to these IDs are typically named according to the referenced object type (e.g., control) followed by “-id”, as seen here in the [Reference Index](/reference/latest/complete/xml-index/#/@control-id).

### **Uniqueness**
OSCAL identifier uniqueness are categorized as *`locally-unique`* or *`globally-unique`*. As implied by the category name, *`locally-unique`* identifiers must be unique within the current document whereas *`globally-unique`* identifiers are guaranteed to be unique across all other identifiers. OSCAL’s *`machine-oriented`* UUID identifiers are always *`globally-unique`*. *`Human-oriented`* identifiers must be defined and managed organizationally and are more susceptible to identifier duplication or collisions. Thus, *`human-oriented`* identifiers are less likely to be *`globally-unique`*.
Copy link
Contributor

Choose a reason for hiding this comment

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

They aren't really unique. They're unlikely to be duplicated accidently with reasonable assumptions of time and usage, but nothing stops me using something you've already used (either because I didn't know better - maybe I copied an example and didn't realise what it all meant; or maliciously).

OSCAL identifier uniqueness are categorized as *`locally-unique`* or *`globally-unique`*. As implied by the category name, *`locally-unique`* identifiers must be unique within the current document whereas *`globally-unique`* identifiers are guaranteed to be unique across all other identifiers. OSCAL’s *`machine-oriented`* UUID identifiers are always *`globally-unique`*. *`Human-oriented`* identifiers must be defined and managed organizationally and are more susceptible to identifier duplication or collisions. Thus, *`human-oriented`* identifiers are less likely to be *`globally-unique`*.

### **Scope**
Identifiers are declared so that data items in OSCAL instances can be referenced accurately and consistently. In the most basic instance, references are made to data items in the same OSCAL instance, but because OSCAL supports instance importing, there are scenarios where data items in an external / imported OSCAL instance need to be referenced as well. Identifiers that are only intended for use within the same OSCAL instance are categorized as *`instance`* scope, but identifiers that can be referenced (from other OSCAL instances) are considered *`cross-instance`* scoped. While *`human-oriented`* identifiers might not be globally unique, they may be *`cross-instance`* scoped. In these cases, the appropriate import attribute (e.g. import, import-component-definitions, import-profile, import-ssp, and import-ap) should be used (similar to a namespacing) to deconflict identifiers with the same values in the associated OSCAL instances. This would allow for the same control IDs to be used and referenced in a profile and its imported catalog(s) for example. The tables below provides a summary of OSCAL unique identifier scoping.
Copy link
Contributor

Choose a reason for hiding this comment

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

Links to the import types might be useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I reworked the scope section quite a bit locally, adding an svg diagram illustrating the relationship between OSCAL instances. Links to import types would be useful...I'll go ahead and add them as well.

docs/content/reference/latest/assessment-plan/_index.md Outdated Show resolved Hide resolved
Copy link
Contributor

@aj-stein-nist aj-stein-nist left a comment

Choose a reason for hiding this comment

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

Some more feedback, hope this helps. I am free to talk today if you want to work on it together.


#### Human-Oriented

A *`human-oriented`* identifier incorporates semantics that support readability and processing by humans. OSCAL implements *`human-oriented`* identifiers as Token data types, which are non-colonized names (add link to data type). For example, control identifiers in a catalog may use a nomenclature that is familiar to the intended audience, allowing them to quickly determine what security control is being referred to, simply by its identifier value.
Copy link
Contributor

Choose a reason for hiding this comment

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

In some places we say it is a "token" data type and other places we capitalize and say a "Token" data type. We should be consistent, I am not sure what the team has agreed upon.

Copy link
Contributor

Choose a reason for hiding this comment

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

Dave said we should keep them lower case. This still might need to be fixed, @Rene2mt.

> **NOTE**: While UUIDs are used as machine-oriented identifiers catering to use cases where automated processing is desired, they are not ideal for wildcard matching scenarios. UUIDs should only be used when exact matches are expected.


The [OSCAL Reference Index](/reference/latest/complete/xml-index/#/@uuid) provides a complete listing of UUIDs in OSCAL. References to these identifiers typically follow a naming convention of the object type followed by “-uuid”. For example, see the reference index for [location-uuid](/reference/latest/complete/xml-index/#/location-uuid).
Copy link
Contributor

Choose a reason for hiding this comment

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

This will get crowded with brad's recommendation. It seems we single space between sentences and there is an additional space at "followed by “-uuid”. For example," between the period and for. I noticed this when re-reading locally.

docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
docs/content/concepts/identifier-use/_index.md Outdated Show resolved Hide resolved
@Rene2mt Rene2mt force-pushed the 860-identifier-scoping-documentation branch from e570bd2 to 0973b64 Compare January 25, 2022 21:51
@david-waltermire david-waltermire merged commit 9228c6e into usnistgov:release-1.0 Jan 25, 2022
david-waltermire added a commit that referenced this pull request Jan 26, 2022
- Revised the identifier use documentation to provide better descriptions of the different types of human- and machine-oriented identifiers used in OSCAL to include information about their uniqueness and scope.
- Updated OSCAL src/metaschema documentation to provide more information for each identifier declaration about its scope, uniqueness, and how it may be cross-referenced.

Co-authored-by: David Waltermire <[email protected]>
Co-authored-by: Brad Hards <[email protected]>
Co-authored-by: Alexander Stein <[email protected]>
iMichaela pushed a commit to iMichaela/OSCAL that referenced this pull request Apr 7, 2022
- Revised the identifier use documentation to provide better descriptions of the different types of human- and machine-oriented identifiers used in OSCAL to include information about their uniqueness and scope.
- Updated OSCAL src/metaschema documentation to provide more information for each identifier declaration about its scope, uniqueness, and how it may be cross-referenced.

Co-authored-by: David Waltermire <[email protected]>
Co-authored-by: Brad Hards <[email protected]>
Co-authored-by: Alexander Stein <[email protected]>
Rene2mt added a commit to Rene2mt/OSCAL that referenced this pull request May 17, 2022
- Revised the identifier use documentation to provide better descriptions of the different types of human- and machine-oriented identifiers used in OSCAL to include information about their uniqueness and scope.
- Updated OSCAL src/metaschema documentation to provide more information for each identifier declaration about its scope, uniqueness, and how it may be cross-referenced.

Co-authored-by: David Waltermire <[email protected]>
Co-authored-by: Brad Hards <[email protected]>
Co-authored-by: Alexander Stein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants