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

Develop OSCAL Modular Approach Strategy #316

Closed
2 tasks
brian-ruf opened this issue Feb 21, 2019 · 11 comments
Closed
2 tasks

Develop OSCAL Modular Approach Strategy #316

brian-ruf opened this issue Feb 21, 2019 · 11 comments
Assignees

Comments

@brian-ruf
Copy link
Contributor

brian-ruf commented Feb 21, 2019

User Story:

As an OSCAL Specification Designer, I need to define the OSCAL specification such that I can re-use model information in more than one schema, as well as allow stakeholders to extend OSCAL without violating the core syntax. To accomplish this approach, we need to design a strategy around modularizing models.

Goals:

Dependencies:

This depends on a cleaner understanding of what is "in-scope" for the OSCAL specification.
This also depends on establishing a formal baseline for the OSCAL metaschema capabilities.

Acceptance Criteria

  • A strategy is documented that describes specific modularity features to be developed in OSCAL.
  • Organizations adopting OSCAL, such as FedRAMP, can clearly understand how to extend OSCAL to meet unique information needs while ensuring the integrity of the core OSCAL specification within files that use the extensions.
@david-waltermire david-waltermire changed the title OSCAL Modular Approach Develop OSCAL Modular Approach Strategy Feb 21, 2019
@wendellpiez
Copy link
Contributor

wendellpiez commented Feb 25, 2019

Actually there are two issues here:

  • Developers need to know how to produce a new schema with new elements for their applications - as @brianrufgsa has done for FedRAMP's SSP - by using the metaschema infrastructure. Among other things this means documenting and perhaps refining current support for modularity.

  • Developers also need to know how to introduce and manage new semantics without introducing new elements. So you can use one of our metaschemas (for the appropriate layer) but with new flag values and/or other (schema-valid) indicators to distinguish your data points (values or chunks).

The second approach is called "extension by restriction" and permits developers to develop without having to retool at lower levels. It is consistent with what we are building with Schematron and the declarations model, to support consistency-checking (for semantic integrity) without having to add new elements or structures to the schema. This is a clean and lightweight approach that has worked well in the context of standard tag sets such as DITA or JATS, which span broad application domains.

Both these approaches probably need to be documented and demonstrated.

@wendellpiez
Copy link
Contributor

I have ideas about how to extend the functionality. It should be possible to make the design for including a Metadata module (or an Attachments or Back Matter module) more like the design for prose. In other words you have a way to say "root of assembly defined in imported module goes here" and forget about the rest.

A question however is whether to keep the present capability to include and hence override definitions one at a time. Having both features may be unwanted complexity.

I need a sounding board, at least @david-waltermire-nist or @brianrufgsa or both.

@wendellpiez
Copy link
Contributor

Sprint 18 Progress Feb 28 2019

@brianrufgsa and I can make some more progress on this once his model is stable and we have shareable data. (I think I have a better idea of requirements and a design to address them.)

@iMichaela
Copy link
Contributor

02/28/2018

@brianrufgsa and @wendellpiez will meet next week to work on this issue.

@wendellpiez
Copy link
Contributor

WIP is here: https://github.com/wendellpiez/OSCAL/tree/feature-metaschema-d3

Changes include a couple of improvements described in #267.

@wendellpiez
Copy link
Contributor

Sprint 18 progress March 7 2019

Work on retooling the modularity functionality of the metaschema is proceeding in my repo (linked above). The new model is much simpler to use and explain.

Next up is to make the modifications to the catalog and profile metaschemas, produce new artifacts for those models (schemas, converter XSLTs, docs) using the tools, and examine and test these outputs.

There is a cross-dependency here on Issue #286, since one of the processes to be updated is the documentation pipeline.

% complete: 60% - design and testing of new version is mostly done; testing, review and acceptance remains. Will need @david-waltermire-nist and @brianrufgsa at least for that final phase.

@brian-ruf
Copy link
Contributor Author

3/7/2019 - We have exceeded the acceptance criteria with actual implementation.
@brianrufgsa and @david-waltermire-nist need to review, test, and validate the changes.
Setting up meeting for 3/13.

@wendellpiez
Copy link
Contributor

wendellpiez commented Mar 8, 2019

Basically the story here is, I cannot make a design without testing it, and I can't test it without building it, so I apologize :-), but since the solution I want to offer does not add complexity but removes it, I thought it would be better and faster to make my proposal in the form of a PoC.

However, nothing is rolled out into catalog or profile schemas yet -- no changes to metaschemas except the testing metaschema. XSLTs have been updated for production of XML and JSON schemas and conversion utilities, but not tested. The Schema Docs production pipeline has not yet been updated (but the code is modular all I have to do is drop it in).

For purposes of review, we could examine and discuss the test metaschema (here: https://github.com/wendellpiez/OSCAL/blob/feature-metaschema-d3/schema/demo/oscal-test-metaschema.xml). Or (since there's not much to see) I could simply sketch the changes, which are pretty easy to summarize:

  • No more @show-as='xml json' since its semantics haven't been worked out for the current docs design. We can put it back when we need it.
  • No more need for stating @group-as on fields and assemblies references where it can be determined statically by looking at the definition.
  • Much simpler definitions importing. Having imported a metaschema module (no further configuration), you get any/all of the definitions in the imported module. Any 'orphan' definitions (never picked for an assembly by some definition descending from the root definition) are left out of the schema. Definitions take precedence in ascending order: all imports appear first, then all local definitions, any of which can override earlier definitions given earlier in any module. (And same thing All The Way Down.)

@david-waltermire-nist @brianrufgsa @anweiss feel free to examine or ask questions in advance of next discussion of this issue.

@brian-ruf
Copy link
Contributor Author

brian-ruf commented Mar 13, 2019

These are the notes from today's meeting between @david-waltermire-nist, @brianrufgsa , and @wendellpiez.

Metaschemas:
We see the following core and supporting Metaschemas:
Core:

  • Catalog (to be included in the milestone release)
  • Profile (to be included in the milestone release)
  • Implementation (to be released later)
  • Assessment (to be drafted later)
  • Assessment Results (to be drafted later)

Supporting (Modular across multiple Core metaschemas. All included in the milestone release) :

  • Metadata (document properties, roles, etc.)
  • Resources (references, attachments)
  • Prose (more of a data type, but treated as modular)

Prose Includes

  • Markup/down
  • Paragraphs, Line-breaks
  • Tables
  • Bold, Italics
  • Lists
  • Headers
  • Code Blocks
  • Links
  • Images

The following activities are needed

  1. Create/revise individual metaschemas
  2. Integrate metaschemas
  3. Update examples and content
  4. Document models and integrations

Resource Details:

  • ID
  • href (pointer) OR content (structured or Base64)
  • type (normal ref, informational ref, artifact, etc.)
  • mime-type
  • bibliographic information
    • name
    • date
    • version
    • description

General Structure of an OSCAL File

  • Metadata at top
  • Layer-specific content in the middle
  • Resources at bottom (References and attachments)

@wendellpiez
Copy link
Contributor

wendellpiez commented Mar 14, 2019

In addition, Wednesday's meeting revealed a couple of requirements for schema documentation, namely that when a metaschema imports definitions from another metaschema, it also needs to be able to qualify definitions with (a) language regarding usage (in the context of the new schema) and (b) examples in new contexts.

Additionally, we identified a couple of other nice-to-haves for schema documentation: a definition for an element or construct should say which elements (assemblies) use it; and imported definitions should identify the metaschema in which they are defined.

@david-waltermire
Copy link
Contributor

3/18/2019

This issue has been completed.

wendellpiez added a commit to wendellpiez/OSCAL that referenced this issue Mar 26, 2019
anweiss pushed a commit to anweiss/OSCAL that referenced this issue Apr 2, 2019
* Feature metaschema d2 next (usnistgov#277)

* Patched with changes from feature-metaschema-d2
* Moving testing schema into schema/demo dir for more robust testing of (portable, replicable) metaschema infrastructure
* Cleanup and refactoring metaschema production for demo
* Patched with changes from feature-metaschema-d2
* Cleanup and refactoring metaschema production for demo
* More adjustments and documentation of metaschema
* Adjustments to metaschema notes doc
* Now supporting namespace assignment per metaschema
* Better support for modular metaschemas
* Metaschema support for namespaces, acquired (imported) models
* Scrubbing old prose modules
* Metaschema XML documentation now respecting namespaces in XML artifacts
* Minor tweaks to comments
* More improvements in view of namespaces. JSON examples not yet working.
* Better handling of examples now
* Removing unneeded test files
* Correcting syntax error
* Adjustments in demo metaschema
* Added draft metadata to SP800-53 profiles; also new SP800-53 catalog with (draft) metadata.
* Adding Markdown-conversion and JSON-handling code
* 'Hardening' markdown conversion
* Adding placeholder files for new catalog and profile metaschemas with namespace support - nb namespaces assigned have not been changed. But namespace support in the metaschema infrastructure can be tested.
* Cleaning up catalog and profile schemas (with namespaces) and examples
* Updated demo schema readme
* Tighter co-occurrence testing

* First half of Issue usnistgov#284 -extening prose to permits h1-h6 plus simple tables. (usnistgov#308)

Appears correct to visual review.

* Update NIST 800-53 YAML catalog (usnistgov#315)

- Update naming convention
- Update README to mention YAML catalog
- Remove old catalog
- Fixes usnistgov#265

* This includes the SSP Metaschema and the SSP XML Schema. (usnistgov#309)

* Removed 'show-docs' attribute from metaschema definitions, as inconsistent with new schema docs design.

* Constraints governing the metaschema now adjusted for improved and easier import functionality, with corresponding changes to test metaschema

* XSD and JSON schema generation now upgraded to new simpler metaschema modularization model per usnistgov#316

* JSON Schema production supports new modularization design.

* Upgrading Metaschema infrastructure to produce schemas and converters with new import logic

* Clean up and prep for fresh run of schema documentation into new site configuration

* Fresh run of catalog schema docs

* Configuration changes towards site preview, with cleanup

* Pulling autogenerated docs from .gitignore (for testing)

* Adding placeholder files back for navigation

* Adding new layout file

* Fixed small bug in subnav production

* WIP towards splitting XML- and JSON-oriented documentation

* Rearranging docs results

* Now adding JSON docs in a separate collection (subdirectory) - still WIP

* Moving generated documentation for handling by Jekyll

* Latest efforts at site navigation reconfiguration

* Navigation is functional again

* Further along towards presentable schema docs - crosslinks and working nav

* Updated element-map XSLT producing an element map from a metaschema (towards a navigation widget) - also adding missing markdown home pages for JSON schema docs

* Now added links from properties (elements/attributes) to the objects (elements) that may contain them.

* More improvements; also exposing a bug in XML formatting (in schema docs examples)

* Adding new page for OSCAL prose

* Improvements to content

* Small changes to header and contents

* More small edits to content

* Renamed resource

* More adjustments to contents; code presentation adjustment in XML schema docs

* More touchups on docs (prose)

* Preventing Jekyll from double-escaping code blocks

* Repairing support for Boolean values on flags and fields; improvements to XML->JSON casting

* First half of Issue usnistgov#284 -extening prose to permits h1-h6 plus simple tables. (usnistgov#308)

Appears correct to visual review.

* This includes the SSP Metaschema and the SSP XML Schema. (usnistgov#309)

* Removed 'show-docs' attribute from metaschema definitions, as inconsistent with new schema docs design.

* Constraints governing the metaschema now adjusted for improved and easier import functionality, with corresponding changes to test metaschema

* XSD and JSON schema generation now upgraded to new simpler metaschema modularization model per usnistgov#316

* JSON Schema production supports new modularization design.

* Upgrading Metaschema infrastructure to produce schemas and converters with new import logic

* Repairing support for Boolean values on flags and fields; improvements to XML->JSON casting

* Repaired bugs in import resolution; now circular imports will fail, while recursive assembly definitions will not.

* Updates to catalog metaschema with simpler import; removed 'declarations' element.

* Working towards updated catalog and profile schemas

* Updating actual XSDs this time

* Cleanup after latest git confusion

* Adding in test files, proto SSP schema

* More improvements to metaschema modules including 'assets' metaschema module.

* Tweak to examples readme

* Removing out of date YAML file (with case problems on the name)

* Many changes to copy, and some to organization, responding to internal review.

* Small vital adjustment in home page copy

* Bug fixes to element map

* Further adjustment of home page copy

* Correcting errors in titles of SP800-53 baseline profiles

* Adjustments to schemas, catalogs and profiles reflecting rework in metadata and back matter (resources) modeling

* Rearranging, refactoring, reordering ...

* Improvements to Resources page including updated links.

* Improvements to site navigation and copy

* Removed 'sketch' tools directory (to off site)

* Rearranging library components for metaschema docs processing

* Oops, adding the files back where they belong ...

* Adding profile schema documentation

* Fresh run of catalog schema docs, now with elements from modules

* More incremental improvements to schema docs and navigation

* Updating conversion scripts and documentation that uses them

* Including missing files for catalog schema docs

* More improvements to site contents (community pages); HTML=>markdown XSLT improvements

* More adjustments to copy
@david-waltermire david-waltermire added this to the OSCAL 1.0 M1 milestone May 8, 2019
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

No branches or pull requests

4 participants