usnistgov / OSCAL

Open Security Controls Assessment Language (OSCAL)
https://pages.nist.gov/OSCAL/
Other
667 stars 181 forks source link

Versioning mechanism for OSCAL schemas #57

Closed anweiss closed 5 years ago

anweiss commented 7 years ago

Not sure if this has already been solidified. Using this as a starting point for a discussion on an appropriate versioning mechanism for all OSCAL schemas. Some thoughts below:

david-waltermire commented 6 years ago

Part of moving to a more production-oriented footing is to start to version our schema. We should address this as a user story following completion of issue #120.

wendellpiez commented 5 years ago

Now our documentation pipeline is in order (#120) we are in a position to move forward with this.

Currently, both catalog and profile models provide two ways of declaring a schema version:

  1. Each has an attribute at the top level @schema-version. Currently it is not validated; but a particular schema could provide a fixed value for that documents valid to that schema. So a validating parser would detect a discrepancy if a different schema is used. Neither the catalog nor the profile schema has a hard-coded value like this as of yet. Alternatively, this value could be left free for validation outside the schema in/by a local process or Schematron.
  2. Additionally, document metadata can describe a binding to a metaschema (including a nominal version number), which should correspond to the schema in use. These values could also be interrogated and validated (using Schematron or another mechanism that can compare values in multiple files).

NB: the Metaschema does not yet support versioning or binding schema versions to metaschema versions. This could be a useful feature.

However, the more important part of this problem is defining the policy on which these mechanisms depend - what should be the version numbers and how and when they should increment.

Needed: some discussion of these policies and how much we should implement for Milestone 1.

iMichaela commented 5 years ago

5/23/2019

No update at this time.

david-waltermire commented 5 years ago

Also discuss how this will affect schema naming (see issue #49).

david-waltermire commented 5 years ago

We discussed the following path forward the other day.

What needs to be done follows:

wendellpiez commented 5 years ago

@david-waltermire-nist should the field oscal-version inside metadata be required?

I am making it required until you say it should be optional.

david-waltermire commented 5 years ago

This is done.

wendellpiez commented 5 years ago

Reopening -- I don't think the second half is done -- seeing to it that this value appears in the generated schemas.

wendellpiez commented 5 years ago

Added an element schema-version to the Metaschema.

Its value is propagated to XML and JSON schemas as described above.

It can also be cross-checked against the value of oscal-version in catalog and profile metadata.

Making PR.

david-waltermire commented 5 years ago

PR #415 wrapped up the remaining work. Closing.