On in-model constraints, external constraints, and IDs #2101
-
Apologies for the delay, but I wanted to separate this out from PR review, @iMichaela. I thought it would be better to separate this explanation into a discussion post. So in regards to #2090, you as a NIST maintainer posed some valid concerns without further explanation.
So I will talk a little bit about the benefits of constraint IDs, how software can use them for NIST, FedRAMP, and other use cases, and why it is beneficial to all of us with my desired roadmap for core OSCAL models. RefresherNIST, not just FedRAMP, uses the constraints mechanism to programmatically and declaratively define data requirements. Modern data schemas tools, XML Schema 1.1 and JSON Schema Draft 7 respectively, only support of subset of completeness and integrity checking requirements with minimal robustness. Everyone should be using Metaschema, even if it does not serialize in those schema types; it is more robust. Given years of work on this architecture, I thought that was a given with NIST maintainers and did not need discussion, but it bears repeating. Per the Metaschema specification, different constraint types have a
So all constraint types have this optional Developer ExperienceAdding or changing constraints and developer flowOne of the key benefits of giving each constraint an ID is for out-of-band communication between developers and for a sole developer editing the models. As it stands, you must known of one multiple possible locations relative to the model in Collision Detection During Development and TestingAs it pertains to the previous point and the following point, it is in our interest to give each constraint a stable ID during development for external constraints. If not, reliably detecting two similar or identical constraints and determining their precedence becomes very impractical without stable IDs. Our ability to work with the community and allow them to maintain their own independent constraints is complicated by the fact multiple constraint violations cannot be disambiguated without a specific stable identifier. User ExperienceAnalysis and filtering of stable IDsWhen constraints are violated and a conformant Metaschema processor outputs the default or optional custom As it stands today, in the metaschema-framework community implementation of Because the IDs are not stable, like we as community can support with intentionally defined Realistic Testing with Minimal Viable Sample DocumentsRelated to the above, NIST or any other entity should be able to test document instances against their respective models with the minimal data required. A SSP or POAM is a complex document, and maintaining full documents for testing to surpress errors unrelated to the specific scope of testing and filtered output adds burden, for NIST maintainers and FedRAMP maintainers. FedRAMP details challenges around whole document maintenance for test harnesses in this decision record, and the ability to filter on constraint by a stable ID and the number of constraint violations is not scalable otherwise. Long-term Goals Dependent on Stable IDsSelf-Documenting Constraints like the ModelsOne of the boons of NIST's architecture for model and documentation maintenance is to provide inline documentation for the fields, flags, and assemblies of models across modules and generating the documentation site directly from these inline documentation fields. Similarly, we can do so with constraints. (As it stands, separate of Collision Detection and Filtering Allow Migration to External ConstraintsTo sum up all the benefits above, the most important long-term benefit based on the capabilities with stable IDs is our ability, NIST and the larger community, to incrementally externalize all RMF-based constraints, FedRAMP constraints, and all other use-case-specific constraints to be independent from the core models. Doing so would give all community users, regardless of one or multiple use cases, to more effectively pick and choose which set of constraints and requirements they meet at runtime. If they remain inside each respectively model, one can only extend or customize for a use case by making pull requests to the NIST models in usnistgov/OSCAL, rebuild tooling, rinse and repeat. Without the ability to filter test outputs and detect collisions as we (and I mean as a community) externalize constraints, we further risk that work and further hinder a long-term goal for "minimalist core, but flexible requirements per use-case" approach you and others have expressed desire for. I formalized this goal in #2050 as part of a long-term roadmap, but stable identifiers are a necessary prerequisite to derisk the development process. That, or the community will need to publish derivative models elsewhere and thoroughly test only in production use cases without due care in advance. I think we all want to avoid that, and we all have this shared long-term vision. ConclusionI tried to break down the short-term benefits into developer experience, user experience, and long-term capabilities for which this work is a dependency. I hope this explanation clarifies much of the detail and can help you make a decision on accepting the PR. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
I think that adding formal name field on all constraints would be another great addition. The benefits of having identifiers present for constraints will help all organizations that leverage the constraints directly to develop oscal content. |
Beta Was this translation helpful? Give feedback.
-
@aj-stein-gsa - Thank you for the explanation. I would like to clarify that NIST (core) OSCAL is defining constraints but we are not using IDs for the constraints today. NIST generates the OSCAL schemas and the promise and encouragement form day one of OSCAL release was to chose the format of choice. 80% of our adopters prefer JSON so pushing them to use metaschema (XML format) will do nothing but derail their current adoption process. Encouraging and providing other mechanisms for consuming a minimum number of core constraints with an ability to enforce domain specific constraints under specific namespaces is a better direction coming from NIST and we are looking forward to working with the community to mature the concept and implement best approach. |
Beta Was this translation helpful? Give feedback.
-
I am supper excited we have consensus in terms of taking the constraints out of the models and better identifying the core ones, vs RMF ones, vs FedRAMP ones. Unfortunately, we have very different opinions of how to do it and the global community's perspective will be crucial. NIST is committed to support all OSCAL adopters (JSON, YAML, XML) not just XML/Metaschema ones, because this is the promise we made when we launched OSCAL and the reason for NIST team developing the Metaschema as the internal mean of delivering consistent XML, JSON and YAML schemas from one central set of definitions. |
Beta Was this translation helpful? Give feedback.
-
I do not have time to entertain any argument with you over your understanding of my understanding of Metaschema. I stated that it is used to define JSON, and XML schemas from a single source which defines OSCAL schemas, and I disagree with your statement that everyone needs to use Metaschema definition files if they want to use OSCAL. THIS IS A DISCUSSION ABOUT CONSTRAINTS' IDs (PERIOD). I would appreciate it if you keep the dialog focused on the technical issues of the topic at hand. |
Beta Was this translation helpful? Give feedback.
Well, it would seem re #2090 (comment) you are going to merge the related change in, aside from this technical explanation. I will mark this thread resolved for now.