diff --git a/.github/workflows/xspec-tests.yml b/.github/workflows/xspec-tests.yml new file mode 100644 index 0000000000..dc3cffd2c2 --- /dev/null +++ b/.github/workflows/xspec-tests.yml @@ -0,0 +1,65 @@ +name: OSCAL XSpec Test Suite +on: + push: + branches: + - main + - develop + - "feature-*" + - "release-*" + paths: + - /src + - "**.xsl" + - "**.xpl" + - "**.xspec" + pull_request: + branches: + - main + - develop + - "feature-*" + - "release-*" + paths: + - /src + - "**.xsl" + - "**.xpl" + - "**.xspec" + workflow_call: {} +jobs: + xspec-tests: + name: Run XSpec tests + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Login to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - name: Pull the correct image + shell: bash + # Produces a tagged image oscal-common-env:selected + run: ./build/pull-oscal-env-dockerfile.sh "${{ github.head_ref || github.ref_name }}" + - name: Run XSpec tests + shell: bash + run: | + set -o pipefail # propagate return code + docker run \ + -v $(pwd):/oscal \ + -e TEST_DIR=/oscal/xspec \ + oscal-common-env:selected \ + /oscal/src/utils/util/resolver-pipeline/testing/test.sh \ + | tee summary.csv || { + if [ "$?" = 83 ]; then + # For now we only fail when tests fail to compile + echo "Some test suites failed to compile, failing..." + exit 1 + fi + } + - name: Upload artifacts + uses: actions/upload-artifact@v3 + with: + name: xspec-output + path: | + xspec/*.html + summary.csv diff --git a/.gitignore b/.gitignore index d12a8f4df0..bc48dcc7c9 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,5 @@ node_modules/ /docs/scratch-dir /.skipbuild /.runbuild + +/summary.csv diff --git a/build/build-oscal-env-dockerfile.sh b/build/build-oscal-env-dockerfile.sh new file mode 100755 index 0000000000..9b3b94034d --- /dev/null +++ b/build/build-oscal-env-dockerfile.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash +# Build and tag the oscal-common-env dockerfile +# +# By default the tag is the sanitized branch name, but can be overidden +# by an argument. + +set -Eeuo pipefail + +IMAGE="csd773/oscal-common-env" +BRANCH=$(git branch --show-current) +BRANCH_SANITIZED=${BRANCH/\//_} + +TAG="${1:-$BRANCH_SANITIZED}" + +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)" + +docker build \ + --label "branch=${BRANCH}" \ + --label "commit_sha=$(git rev-parse HEAD)" \ + --label "dirty=$(git diff --quiet && echo 'false' || echo 'true')" \ + --label "maintainer=oscal@nist.gov" \ + --label "author=$(git config user.email)" \ + --platform linux/amd64 \ + -f "$SCRIPT_DIR/Dockerfile" \ + -t "$IMAGE:$TAG" \ + "$SCRIPT_DIR" + +echo "Built and tagged $IMAGE:$TAG, to push run:" +echo " docker push $IMAGE:$TAG" diff --git a/build/metaschema b/build/metaschema index d3d53940dc..70085548fe 160000 --- a/build/metaschema +++ b/build/metaschema @@ -1 +1 @@ -Subproject commit d3d53940dc748ab2f07749d6867d0012e5d427a5 +Subproject commit 70085548fec75de999eebb480a0be7d7b1abdada diff --git a/build/pull-oscal-env-dockerfile.sh b/build/pull-oscal-env-dockerfile.sh new file mode 100755 index 0000000000..332c131d11 --- /dev/null +++ b/build/pull-oscal-env-dockerfile.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Pull the oscal-common-env from the registry using a defined set of tags, and +# retag the first working image with a new tag. +# This is intended to be used in CI/CD environments where rebuilding the +# oscal-common-env would be expensive, but an escape hatch to allow for a +# "special" image for a run is preferred. + +set -Eeuo pipefail + +# Allow the user to override the "branch" name (note that this still sanitizes the input) +if [ "${1-}" ]; then + BRANCH=${1} +else + BRANCH=$(git branch --show-current) +fi + +# Docker tags cannot have "/" in them +SANITIZED_BRANCH=${BRANCH/\//_} + +TAGS=("${SANITIZED_BRANCH}" "develop") + +SOURCE_IMAGE="csd773/oscal-common-env" + +# the output image and tag to write to +OUTPUT_IMAGE="oscal-common-env" +OUTPUT_TAG="selected" +OUTPUT_REF="${OUTPUT_IMAGE}:${OUTPUT_TAG}" + +for TAG in "${TAGS[@]}"; do + REF="${SOURCE_IMAGE}:${TAG}" + docker pull "${REF}" && { + docker tag "${REF}" "${OUTPUT_REF}" + echo "Successsfully pulled ${REF} and retagged it as ${OUTPUT_REF}" + exit 0 + } || echo "Pulling tag ${REF} failed..." +done + +echo "Failed to pull any images in" +exit 1 diff --git a/src/release/content-upgrade/json-prop-to-props.xsl b/src/release/content-upgrade/json-prop-to-props.xsl new file mode 100644 index 0000000000..d986a18aa1 --- /dev/null +++ b/src/release/content-upgrade/json-prop-to-props.xsl @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/specifications/profile-resolution/.gitignore b/src/specifications/profile-resolution/.gitignore new file mode 100644 index 0000000000..c3dbbe3538 --- /dev/null +++ b/src/specifications/profile-resolution/.gitignore @@ -0,0 +1,2 @@ +!oscal-specs_share.xpr +requirement-tests/output-actual/ \ No newline at end of file diff --git a/src/specifications/profile-resolution/example-set.xspec b/src/specifications/profile-resolution/example-set.xspec new file mode 100644 index 0000000000..3a9945b3b0 --- /dev/null +++ b/src/specifications/profile-resolution/example-set.xspec @@ -0,0 +1,128 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/specifications/profile-resolution/lib/build-examples-xspec.xsl b/src/specifications/profile-resolution/lib/build-examples-xspec.xsl new file mode 100644 index 0000000000..68ea425445 --- /dev/null +++ b/src/specifications/profile-resolution/lib/build-examples-xspec.xsl @@ -0,0 +1,111 @@ + + + + + + + + + + autogenerated { current-dateTime() } following model in example-set.xspec + href="lib/xspec-test-dev.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron" + type="text/css" href="lib/xspec-oxygen.css" + { replace(document-uri(/),'.*/','') } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | + + + + + + + + + + + + + + + + + + + + + + + + + + + + [spec] + + + + + + + + + + + + + + { $req-id} + + + + + + + [Section {@rid}] + + diff --git a/src/specifications/profile-resolution/lib/build-reqs-xspec.xsl b/src/specifications/profile-resolution/lib/build-reqs-xspec.xsl new file mode 100644 index 0000000000..f4aaa279fb --- /dev/null +++ b/src/specifications/profile-resolution/lib/build-reqs-xspec.xsl @@ -0,0 +1,94 @@ + + + + + + + + autogenerated { current-dateTime() } following model in example-set.xspec + href="lib/xspec-test-dev.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron" + type="text/css" href="lib/xspec-oxygen.css" + { replace(document-uri(/),'.*/','') } + + + + + + + + + + + + + + + + + + + + + | + + + + + + + + + + + + + + + + + + + + [dev] + + + + + + + + + + { replace(.,'^PENDING:?\s*','') } + + + + Example { $basename }.xml - {.} + { ancestor::req[1]/@id } + + + + + + + + + + [Section {@rid}] + + diff --git a/src/specifications/profile-resolution/lib/build-testharness.xsl b/src/specifications/profile-resolution/lib/build-testharness.xsl new file mode 100644 index 0000000000..6564fb9b40 --- /dev/null +++ b/src/specifications/profile-resolution/lib/build-testharness.xsl @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Section {@rid}] + + diff --git a/src/specifications/profile-resolution/lib/build-xspec.xsl b/src/specifications/profile-resolution/lib/build-xspec.xsl new file mode 100644 index 0000000000..c3468468c1 --- /dev/null +++ b/src/specifications/profile-resolution/lib/build-xspec.xsl @@ -0,0 +1,111 @@ + + + + + + + + + + autogenerated { current-dateTime() } following model in example-set.xspec + href="lib/xspec-test-dev.sch" type="application/xml" schematypens="http://purl.oclc.org/dsdl/schematron" + type="text/css" href="lib/xspec-oxygen.css" + { replace(document-uri(/),'.*/','') } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + | + + + + + + + + + + + + + requirement-tests/{$filename} + + + + + + + { @id } + + + + + + + + [Section {@rid}] + + diff --git a/src/specifications/profile-resolution/html-to-specml.xsl b/src/specifications/profile-resolution/lib/html-to-specml.xsl similarity index 100% rename from src/specifications/profile-resolution/html-to-specml.xsl rename to src/specifications/profile-resolution/lib/html-to-specml.xsl diff --git a/src/specifications/profile-resolution/lib/illustrate-resolution.xsl b/src/specifications/profile-resolution/lib/illustrate-resolution.xsl new file mode 100644 index 0000000000..9eccf19845 --- /dev/null +++ b/src/specifications/profile-resolution/lib/illustrate-resolution.xsl @@ -0,0 +1,331 @@ + + + + + + + + + + + + + + + + + + +
+ +
+
+ +
+
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +

In { name(child::*) } { $href }

+
+ +
+
+
+ +
No document found at { $href }
+
+
+ + +
+ + + +

Importing { @href }

+
+ + + + + + + +

Profile { document-uri(/) => replace('.*/','') }

+
+ +
+
+ + + { /document-uri(.) } + { $where => replace('.+/','') => replace('\.xml$','_RESOLVED.xml') } + output-expected/{ $resolvedname } +

Result { $resultpath }

+
+ +
+
+ + + + + + + + + + + + +
+ +
+ + +
+
+ +
+
+ + +
+
+ + +
+
+
+ + + +
+ +
+
+
+ + + +
+ +
+
+
+ + + +
+ +
+
+
+ + + +
+ +
+
+
+ + + +
+ +
+
+
+ + + + +

{ name() }

+
+ + +

{ name() }

+
+ + +

+ import + + + +

+
+ + + + + + + +

with-id { . }

+
+ + +

set-parameter { @param-id }

+
+ + +

alter { @control-id }

+
+ + +

{ local-name() } { @id }

+
+ + +

{ local-name() } { @id }

+
+ + +

resource { @uuid }

+
+ + +

insert { @type } { @id-ref }

+
+ + +

combine { @method }

+
+ + +

{ local-name() } { . }

+
+ + + + ID_{ parent::*/(@id,@param-id)[1] }-{ local-name(.) } +

{ local-name() } { . }

+
+ + +

rlink { @href }

+
+ + +

title

+
+ + +

{ local-name(.) } { @name } { @id } { [1 to count(child::*) ] ! '▮' }

+
+ + + +

{ local-name(.) } { @name }{ @value }

+
+ + +

{ local-name() } { (1 to count(child::*)) ! '▮' }

+
+ + +
+

with child controls { . }

+
+
+ + +
+

{ replace(local-name(.),'\-',' ') } { . }

+
+
+ + + + + + + +
\ No newline at end of file diff --git a/src/specifications/profile-resolution/lib/oscal-expected.sch b/src/specifications/profile-resolution/lib/oscal-expected.sch new file mode 100644 index 0000000000..719b7fa7d7 --- /dev/null +++ b/src/specifications/profile-resolution/lib/oscal-expected.sch @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + Link corresponds to no resource in this document. + + + + Resource has no links. + + + + \ No newline at end of file diff --git a/src/specifications/profile-resolution/lib/oscal-profile-test-helper.xsl b/src/specifications/profile-resolution/lib/oscal-profile-test-helper.xsl new file mode 100644 index 0000000000..44eb91412b --- /dev/null +++ b/src/specifications/profile-resolution/lib/oscal-profile-test-helper.xsl @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ... + + + + ... + + + + ... + + + + ... + + + + + + + + + + + + diff --git a/src/specifications/profile-resolution/lib/reqs-md-punchlist.xsl b/src/specifications/profile-resolution/lib/reqs-md-punchlist.xsl new file mode 100644 index 0000000000..327b870b08 --- /dev/null +++ b/src/specifications/profile-resolution/lib/reqs-md-punchlist.xsl @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + + + - [{ if (eg/@href != '') then 'x' else ' ' }] + + + + + [test { @href ! ('`' || . || '`')} + + ] + + + `{.}` + + + + + + `{ @id }` + + + + + + + + + + + + + * + + + + * + + + + + + + + + { replace(.,'\s+',' ') } + + + + [Section {@rid}] + + + diff --git a/src/specifications/profile-resolution/lib/spec-checkup.sch b/src/specifications/profile-resolution/lib/spec-checkup.sch new file mode 100644 index 0000000000..955268021f --- /dev/null +++ b/src/specifications/profile-resolution/lib/spec-checkup.sch @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + section is too deep + + + + + + + + + + Requirement id '' is not distinct + No test is given for requirement "" + Requirement marked 'pending' + + + + + + + Requirement id '' is not found in specification + Requirement has no testing indicated + + + + + + + + + + + or + , + + + + + + + + + + + + + + and + , + + + + + + + + diff --git a/src/specifications/profile-resolution/specml-html-hugo-uswds.xsl b/src/specifications/profile-resolution/lib/specml-html-hugo-uswds.xsl similarity index 97% rename from src/specifications/profile-resolution/specml-html-hugo-uswds.xsl rename to src/specifications/profile-resolution/lib/specml-html-hugo-uswds.xsl index f02f0a2799..68a2eb8d7c 100644 --- a/src/specifications/profile-resolution/specml-html-hugo-uswds.xsl +++ b/src/specifications/profile-resolution/lib/specml-html-hugo-uswds.xsl @@ -28,6 +28,7 @@ + diff --git a/src/specifications/profile-resolution/specml-html-preview.xsl b/src/specifications/profile-resolution/lib/specml-html-preview.xsl similarity index 64% rename from src/specifications/profile-resolution/specml-html-preview.xsl rename to src/specifications/profile-resolution/lib/specml-html-preview.xsl index c98065bec8..b7bab0f301 100644 --- a/src/specifications/profile-resolution/specml-html-preview.xsl +++ b/src/specifications/profile-resolution/lib/specml-html-preview.xsl @@ -24,10 +24,16 @@ - +
@@ -43,14 +49,25 @@ body {{ line-height: 140%; font-family: "Cambria", serif }} * {{ box-sizing: border-box }} -aside.toc {{ position: fixed; overflow-y: scroll; max-width: 36%; top: 1em; bottom: 0px; font-family: { $display-font } }} +aside.navpanel {{ position: fixed; overflow-y: scroll; max-width: 36%; top: 1em; bottom: 0px; font-family: { $display-font } }} + +aside.navpanel div.rqrmts * {{ margin: 0em }} + +.req {{ background-color: pink; padding: 0.2em; font-size: 110%; margin-top: 0.2em !important }} +div.rqrmts .req {{ font-size: 90%; border-top: thin solid red; border-bottom: thin solid red }} +.req.should {{ background-color: peachpuff; border-top: thin solid orange; border-bottom: thin solid orange }} +.req.may {{ background-color: cornsilk; border-top: thin solid gold; border-bottom: thin solid gold }} +.req.recommended {{ background-color: mintcream; border-top: thin solid blue; border-bottom: thin solid blue }} + +span.reqlabel {{ background-color: mintcream; color: forestgreen; margin-right: 0.4em; padding: 0.1em; border: thin solid green }} + .toc ul {{ list-style: none; padding-left: 1em }} main {{ margin-left: 40%; max-width: 48em }} details {{ margin-top: 1.5em }} -details details {{ margin-left: 2em; border-left: thin solid black; padding-left: 1em }} +details details {{ border-left: thin solid black; padding-left: 1em }} summary > * {{ display: inline }} @@ -69,6 +86,8 @@ a {{ color: inherit }} a.linked {{ color: inherit }} .toc a {{ text-decoration: none }} +span.req {{ color: royalblue }} +span.req:hover {{ background-color: beige }} .example {{ padding: 0.5em; border: thin dotted black; margin-top: 1em }} .example > *:first-child {{ margin-top: 0em }} @@ -85,7 +104,52 @@ a.linked {{ color: inherit }} + + + + + + + + + + + + + +
+ + +
+
+ + + + + + + + + + + + + + + + + +

+ + + + + + +

+
+
    @@ -111,10 +175,14 @@ a.linked {{ color: inherit }} - + + + + + @@ -151,7 +219,6 @@ a.linked {{ color: inherit }}

    Source (profile):

    -

    Intermediate (catalog):

    diff --git a/src/specifications/profile-resolution/specml-html-static.xsl b/src/specifications/profile-resolution/lib/specml-html-static.xsl similarity index 100% rename from src/specifications/profile-resolution/specml-html-static.xsl rename to src/specifications/profile-resolution/lib/specml-html-static.xsl diff --git a/src/specifications/profile-resolution/specml-html-xslt1.xsl b/src/specifications/profile-resolution/lib/specml-html-xslt1.xsl similarity index 90% rename from src/specifications/profile-resolution/specml-html-xslt1.xsl rename to src/specifications/profile-resolution/lib/specml-html-xslt1.xsl index 3228178bdf..249f3160c6 100644 --- a/src/specifications/profile-resolution/specml-html-xslt1.xsl +++ b/src/specifications/profile-resolution/lib/specml-html-xslt1.xsl @@ -100,7 +100,13 @@ - + + + + + + +
      @@ -143,7 +149,21 @@ - + + + + + + + + + + + + + + + diff --git a/src/specifications/profile-resolution/specml-html-xslt3.xsl b/src/specifications/profile-resolution/lib/specml-html-xslt3.xsl similarity index 100% rename from src/specifications/profile-resolution/specml-html-xslt3.xsl rename to src/specifications/profile-resolution/lib/specml-html-xslt3.xsl diff --git a/src/specifications/profile-resolution/lib/specml-tidy-config.xml b/src/specifications/profile-resolution/lib/specml-tidy-config.xml new file mode 100644 index 0000000000..672af71c06 --- /dev/null +++ b/src/specifications/profile-resolution/lib/specml-tidy-config.xml @@ -0,0 +1,9 @@ + + + Basic whitespace cleanup + + + +
      +

      Importing catalogs/abc-mixed-up_catalog.xml

      +

      In catalog catalogs/abc-mixed-up_catalog.xml

      +
      +
      + +
      +

      catalog

      +
      +
      +
      + +
      +

      group

      +
      +
      +

      title Group B of C

      +
      +
      +
      +
      +
      + +
      +

      control b2

      +
      +
      +

      title Control B2

      +
      +
      +
      +
      +
      +
      +

      part statementb2-stmt

      +
      +
      +
      +
      + +
      +

      control b1

      +
      +
      +

      title Control B1

      +
      +
      +
      +
      +
      +
      +

      part statementb1-stmt

      +
      +
      +
      +
      + +
      +

      control b3

      +
      +
      +

      title Control B3

      +
      +
      +
      +
      +
      +
      +

      part statementb3-stmt

      +
      +
      +
      +
      +
      + +
      +

      group

      +
      +
      +

      title Group A of C

      +
      +
      +
      +
      +
      + +
      +

      control a3

      +
      +
      +

      title Control A3

      +
      +
      +
      +
      +
      +
      +

      param a3_prm1

      +
      +
      +

      label A3 Parameter 1

      +
      +
      +
      +
      +
      +
      +

      part statementa3-stmt

      +
      +
      +
      +
      + +
      +

      control a2

      +
      +
      +

      title Control A2

      +
      +
      +
      +
      +
      +
      +

      part statementa2-stmt

      +
      +
      +
      +
      + +
      +

      control a1

      +
      +
      +

      title Control A1

      +
      +
      +
      +
      +
      +
      +

      param a1_prm1

      +
      +
      +

      label A1 Parameter 1

      +
      +
      +
      +
      +
      +
      +

      part statementa1-stmt

      +
      +
      +
      +
      +
      + +
      +

      group

      +
      +
      +

      title Group C of C

      +
      +
      +
      +
      +
      + +
      +

      control c3

      +
      +
      +

      title Control C3

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      + +
      +

      control c3.a

      +
      +
      +

      title Control C3-A

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      + +
      +

      control c3.a-1

      +
      +
      +

      title Control C3-A-1

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      +
      +
      +
      + +
      +

      control c1

      +
      +
      +

      title Control C1

      +
      +
      +
      +
      +
      +
      +

      part statementc1-stmt

      +
      +
      +
      +
      + +
      +

      control c2

      +
      +
      +

      title Control C2

      +
      +
      +
      +
      +
      +
      +

      part statementc2-stmt

      +
      +
      +
      +
      +
      +
      +
      +
      +

      Profile req-include-all-asis.xml

      +
      +
      + +
      +

      profile

      +
      +
      +
      + +
      +

      importcatalogs/abc-mixed-up_catalog.xml

      +
      +
      +
      +
      +

      include-all

      +
      +
      +
      +
      + +
      +

      merge

      +
      +
      +
      +
      +

      as-is true

      +
      +
      +
      +
      +
      +
      +
      +

      Result output-expected/req-include-all-asis_RESOLVED.xml

      +
      +
      + +
      +

      catalog

      +
      +
      +
      + +
      +

      group

      +
      +
      +

      title Group B of C

      +
      +
      +
      +
      +
      + +
      +

      control b2

      +
      +
      +

      title Control B2

      +
      +
      +
      +
      +
      +
      +

      part statementb2-stmt

      +
      +
      +
      +
      + +
      +

      control b1

      +
      +
      +

      title Control B1

      +
      +
      +
      +
      +
      +
      +

      part statementb1-stmt

      +
      +
      +
      +
      + +
      +

      control b3

      +
      +
      +

      title Control B3

      +
      +
      +
      +
      +
      +
      +

      part statementb3-stmt

      +
      +
      +
      +
      +
      + +
      +

      group

      +
      +
      +

      title Group A of C

      +
      +
      +
      +
      +
      + +
      +

      control a3

      +
      +
      +

      title Control A3

      +
      +
      +
      +
      +
      +
      +

      param a3_prm1

      +
      +
      +

      label A3 Parameter 1

      +
      +
      +
      +
      +
      +
      +

      part statementa3-stmt

      +
      +
      +
      +
      + +
      +

      control a2

      +
      +
      +

      title Control A2

      +
      +
      +
      +
      +
      +
      +

      part statementa2-stmt

      +
      +
      +
      +
      + +
      +

      control a1

      +
      +
      +

      title Control A1

      +
      +
      +
      +
      +
      +
      +

      param a1_prm1

      +
      +
      +

      label A1 Parameter 1

      +
      +
      +
      +
      +
      +
      +

      part statementa1-stmt

      +
      +
      +
      +
      +
      + +
      +

      group

      +
      +
      +

      title Group C of C

      +
      +
      +
      +
      +
      + +
      +

      control c3

      +
      +
      +

      title Control C3

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      + +
      +

      control c3.a

      +
      +
      +

      title Control C3-A

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      + +
      +

      control c3.a-1

      +
      +
      +

      title Control C3-A-1

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      +
      +
      +
      + +
      +

      control c1

      +
      +
      +

      title Control C1

      +
      +
      +
      +
      +
      +
      +

      part statementc1-stmt

      +
      +
      +
      +
      + +
      +

      control c2

      +
      +
      +

      title Control C2

      +
      +
      +
      +
      +
      +
      +

      part statementc2-stmt

      +
      +
      +
      +
      +
      +
      +
      + + \ No newline at end of file diff --git a/src/specifications/profile-resolution/requirement-tests/illustrations/req-include-by-id-view.html b/src/specifications/profile-resolution/requirement-tests/illustrations/req-include-by-id-view.html new file mode 100644 index 0000000000..5e4084d0fd --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/illustrations/req-include-by-id-view.html @@ -0,0 +1,487 @@ + + + + + + + + +
      +

      Importing catalogs/abc-simple_catalog.xml

      +

      In catalog catalogs/abc-simple_catalog.xml

      +
      +
      + +
      +

      catalog

      +
      +
      +
      + +
      +

      group

      +
      +
      +

      title Group A of C

      +
      +
      +
      +
      +
      + +
      +

      control a1

      +
      +
      +

      title Control A1

      +
      +
      +
      +
      +
      +
      +

      param a1_prm1

      +
      +
      +

      label A1 Parameter 1

      +
      +
      +
      +
      +
      +
      +

      part statementa1-stmt

      +
      +
      +
      +
      + +
      +

      control a2

      +
      +
      +

      title Control A2

      +
      +
      +
      +
      +
      +
      +

      part statementa2-stmt

      +
      +
      +
      +
      + +
      +

      control a3

      +
      +
      +

      title Control A3

      +
      +
      +
      +
      +
      +
      +

      param a3_prm1

      +
      +
      +

      label A3 Parameter 1

      +
      +
      +
      +
      +
      +
      +

      part statementa3-stmt

      +
      +
      +
      +
      +
      + +
      +

      group

      +
      +
      +

      title Group B of C

      +
      +
      +
      +
      +
      + +
      +

      control b1

      +
      +
      +

      title Control B1

      +
      +
      +
      +
      +
      +
      +

      part statementb1-stmt

      +
      +
      +
      +
      + +
      +

      control b2

      +
      +
      +

      title Control B2

      +
      +
      +
      +
      +
      +
      +

      part statementb2-stmt

      +
      +
      +
      +
      + +
      +

      control b3

      +
      +
      +

      title Control B3

      +
      +
      +
      +
      +
      +
      +

      part statementb3-stmt

      +
      +
      +
      +
      +
      + +
      +

      group

      +
      +
      +

      title Group C of C

      +
      +
      +
      +
      +
      + +
      +

      control c1

      +
      +
      +

      title Control C1

      +
      +
      +
      +
      +
      +
      +

      part statementc1-stmt

      +
      +
      +
      +
      + +
      +

      control c2

      +
      +
      +

      title Control C2

      +
      +
      +
      +
      +
      +
      +

      part statementc2-stmt

      +
      +
      +
      +
      + +
      +

      control c3

      +
      +
      +

      title Control C3

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      + +
      +

      control c3.a

      +
      +
      +

      title Control C3-A

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      + +
      +

      control c3.a-1

      +
      +
      +

      title Control C3-A-1

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +

      Profile req-include-by-id.xml

      +
      +
      + +
      +

      profile

      +
      +
      +
      + +
      +

      importcatalogs/abc-simple_catalog.xml

      +
      +
      +
      + +
      +

      include-controls

      +
      +
      +

      with child controls yes

      +
      +
      +
      +
      +
      +
      +

      with-id a1

      +
      +
      +
      +
      +

      with-id b1

      +
      +
      +
      +
      +

      with-id c1

      +
      +
      +
      +
      +

      with-id c3

      +
      +
      +
      +
      +
      +
      +
      +
      +

      Result output-expected/req-include-by-id_RESOLVED.xml

      +
      +
      + +
      +

      catalog

      +
      +
      +
      + +
      +

      control a1

      +
      +
      +

      title Control A1

      +
      +
      +
      +
      +
      +
      +

      param a1_prm1

      +
      +
      +

      label A1 Parameter 1

      +
      +
      +
      +
      +
      +
      +

      part statementa1-stmt

      +
      +
      +
      +
      + +
      +

      control b1

      +
      +
      +

      title Control B1

      +
      +
      +
      +
      +
      +
      +

      part statementb1-stmt

      +
      +
      +
      +
      + +
      +

      control c1

      +
      +
      +

      title Control C1

      +
      +
      +
      +
      +
      +
      +

      part statementc1-stmt

      +
      +
      +
      +
      + +
      +

      control c3

      +
      +
      +

      title Control C3

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      + +
      +

      control c3.a

      +
      +
      +

      title Control C3-A

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      + +
      +

      control c3.a-1

      +
      +
      +

      title Control C3-A-1

      +
      +
      +
      +
      +
      +
      +

      part statementc3-stmt

      +
      +
      +
      +
      +
      +
      +
      +
      + + \ No newline at end of file diff --git a/src/specifications/profile-resolution/requirement-tests/keep-everything-twice.xml b/src/specifications/profile-resolution/requirement-tests/keep-everything-twice.xml new file mode 100644 index 0000000000..7452b3f9f4 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/keep-everything-twice.xml @@ -0,0 +1,17 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/output-actual/req-include-all-asis_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-actual/req-include-all-asis_RESOLVED.xml new file mode 100644 index 0000000000..4be608d978 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-actual/req-include-all-asis_RESOLVED.xml @@ -0,0 +1,106 @@ + + + + Test Profile + 2022-06-14T16:44:05.310572-04:00 + 1.0 + TODO: Not implemented yet + + + + + Group B of C + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      +
      + + Group A of C + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      +
      + + Group C of C + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-actual/req-include-all-flat_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-actual/req-include-all-flat_RESOLVED.xml new file mode 100644 index 0000000000..d9e8500563 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-actual/req-include-all-flat_RESOLVED.xml @@ -0,0 +1,94 @@ + + + + Test Profile + 2022-04-18T15:24:19.2090219-04:00 + 1.0 + 1.0.0 + + + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/keep-everything-twice_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/keep-everything-twice_RESOLVED.xml new file mode 100644 index 0000000000..7f603bcf77 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/keep-everything-twice_RESOLVED.xml @@ -0,0 +1,178 @@ + + + + Test Profile + 2022-04-25T16:32:27.0669689-04:00 + 1.0 + 1.0.0 + + + + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-chained-all-asis_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-chained-all-asis_RESOLVED.xml new file mode 100644 index 0000000000..5e00340e8a --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-chained-all-asis_RESOLVED.xml @@ -0,0 +1,104 @@ + + + + Test Profile + 2022-04-18T15:24:15.880015-04:00 + 1.0 + 1.0.0 + + + + + Group B of C + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      +
      + + Group A of C + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      +
      + + Group C of C + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-chained-deepA_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-chained-deepA_RESOLVED.xml new file mode 100644 index 0000000000..8c843136a6 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-chained-deepA_RESOLVED.xml @@ -0,0 +1,81 @@ + + + + Test Profile + 2022-04-25T15:47:00.2942155-04:00 + 1.0 + 1.0.0 + + + + Group B of C + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      +
      + + Group A of C + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      +
      + + Group C of C + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-circular_import_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-circular_import_RESOLVED.xml new file mode 100644 index 0000000000..90d7c81aef --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-circular_import_RESOLVED.xml @@ -0,0 +1,12 @@ + + + + Test Profile + 2022-04-18T15:24:16.5210188-04:00 + 1.0 + 1.0.0 + + + Import of href="req-circular_importer.xml" fails - circular import + diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-import-by-resource_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-import-by-resource_RESOLVED.xml new file mode 100644 index 0000000000..5764fb3933 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-import-by-resource_RESOLVED.xml @@ -0,0 +1,103 @@ + + + + Test Profile + 2022-04-18T15:24:17.90803-04:00 + 1.0 + 1.0.0 + + + + Group B of C + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      +
      + + Group A of C + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      +
      + + Group C of C + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-all-asis_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-all-asis_RESOLVED.xml new file mode 100644 index 0000000000..d618bc1891 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-all-asis_RESOLVED.xml @@ -0,0 +1,103 @@ + + + + Test Profile + 2022-02-15T13:27:39.019088-05:00 + 1.0 + 1.0.0 + + + + Group B of C + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      +
      + + Group A of C + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      +
      + + Group C of C + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-all-flat_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-all-flat_RESOLVED.xml new file mode 100644 index 0000000000..0b2ae6a52d --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-all-flat_RESOLVED.xml @@ -0,0 +1,94 @@ + + + + Test Profile + 2022-02-15T16:39:33.396588-05:00 + 1.0 + 1.0.0 + + + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-by-id_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-by-id_RESOLVED.xml new file mode 100644 index 0000000000..d392c4d5d3 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-by-id_RESOLVED.xml @@ -0,0 +1,56 @@ + + + + Test Profile + 2022-04-19T15:51:51.3807658-04:00 + 1.0 + 1.0.0 + + + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-by-match-empty_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-by-match-empty_RESOLVED.xml new file mode 100644 index 0000000000..519a5c30e3 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-by-match-empty_RESOLVED.xml @@ -0,0 +1,11 @@ + + + + Test Profile + 2022-04-19T16:10:50.306097-04:00 + 1.0 + 1.0.0 + + + diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-by-match_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-by-match_RESOLVED.xml new file mode 100644 index 0000000000..57215dbe01 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-by-match_RESOLVED.xml @@ -0,0 +1,52 @@ + + + + Test Profile + 2022-04-19T16:07:09.7400721-04:00 + 1.0 + 1.0.0 + + + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude1_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude1_RESOLVED.xml new file mode 100644 index 0000000000..01d7ff07eb --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude1_RESOLVED.xml @@ -0,0 +1,42 @@ + + + + Test Profile + 2022-04-20T11:25:08.5989517-04:00 + 1.0 + 1.0.0 + + + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude2_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude2_RESOLVED.xml new file mode 100644 index 0000000000..2611d1817a --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude2_RESOLVED.xml @@ -0,0 +1,28 @@ + + + + Test Profile + 2022-04-20T11:27:11.0114457-04:00 + 1.0 + 1.0.0 + + + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude3_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude3_RESOLVED.xml new file mode 100644 index 0000000000..3a26a74414 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude3_RESOLVED.xml @@ -0,0 +1,25 @@ + + + + Test Profile + 2022-04-20T11:29:12.5084741-04:00 + 1.0 + 1.0.0 + + + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude4_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude4_RESOLVED.xml new file mode 100644 index 0000000000..31f7820633 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude4_RESOLVED.xml @@ -0,0 +1,25 @@ + + + + Test Profile + 2022-04-25T16:18:40.4891642-04:00 + 1.0 + 1.0.0 + + + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude5_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude5_RESOLVED.xml new file mode 100644 index 0000000000..f192200e80 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-include-exclude5_RESOLVED.xml @@ -0,0 +1,25 @@ + + + + Test Profile + 2022-04-25T16:20:19.1426274-04:00 + 1.0 + 1.0.0 + + + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-loose-params1_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-loose-params1_RESOLVED.xml new file mode 100644 index 0000000000..73059434a8 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-loose-params1_RESOLVED.xml @@ -0,0 +1,54 @@ + + + + Test Profile + 2022-06-13T13:51:15.3863601-04:00 + 1.0 + TODO: Not implemented yet + + + + + +

      When referenced from anywhere, this should float through.

      + + + +

      If Control C2 is missing, should be floating free.

      + + + Group of Controls + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      Making reference to a parameter in another control, like this: .

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc. +

      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-loose-params2_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-loose-params2_RESOLVED.xml new file mode 100644 index 0000000000..75a0a99b89 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-loose-params2_RESOLVED.xml @@ -0,0 +1,51 @@ + + + + Test Profile + 2022-06-14T10:12:38.6256557-04:00 + 1.0 + TODO: Not implemented yet + + + + + +

      When referenced from anywhere, this should float through.

      + + + +

      If Control C2 is missing, should be floating free.

      + + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      Making reference to a parameter in another control, like this: .

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc. +

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-merge-usefirst1_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-merge-usefirst1_RESOLVED.xml new file mode 100644 index 0000000000..83e45b7bb5 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-merge-usefirst1_RESOLVED.xml @@ -0,0 +1,94 @@ + + + + Test Profile + 2022-06-13T14:18:05.6425797-04:00 + 1.0 + TODO: Not implemented yet + + + + + Group A of C + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      +
      + + Group B of C + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      +
      + + Group C of C + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      +
      + + Group B of C + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      +
      + + Group A of C + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      +
      + + Group C of C + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-merge-usefirst2_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-merge-usefirst2_RESOLVED.xml new file mode 100644 index 0000000000..4e697d24e5 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-merge-usefirst2_RESOLVED.xml @@ -0,0 +1,98 @@ + + + + Test Profile + 2022-06-13T14:20:25.5347906-04:00 + 1.0 + TODO: Not implemented yet + + + + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +
      +
      + + Control A3 + + + + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B2 + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-modify-alter-remove-match1_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-modify-alter-remove-match1_RESOLVED.xml new file mode 100644 index 0000000000..d03e52fe08 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-modify-alter-remove-match1_RESOLVED.xml @@ -0,0 +1,65 @@ + + + + Test Profile + 2022-06-15T10:30:30.4321464-04:00 + 1.0 + TODO: Not implemented yet + + + + + Control A3 + + + + + + Control A2 + + + + Control A1 + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C2 + + +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-modify-alter-remove-match2_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-modify-alter-remove-match2_RESOLVED.xml new file mode 100644 index 0000000000..9ed7b5da62 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-modify-alter-remove-match2_RESOLVED.xml @@ -0,0 +1,77 @@ + + + + Test Profile + 2022-06-15T16:22:58.1586252-04:00 + 1.0 + TODO: Not implemented yet + + + + + + A.a value + + + + + + Control A1 + + + a1.a value + + + +

      A1 aaaaa aaaaaaaaaa

      +

      Parameter A.a is set: +

      +

      Parameter a1.a is set: +

      +
      +
      + + Control A2 + + + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +

      Parameter A.b is set: +

      +
      +
      + + Control A3 + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      + + Control A4 + + + + + +

      A4 aaaaa aaaaaaaaaa

      +
      +
      + + Control A5 + + + + + +

      A5 aaaaa aaaaaaaaaa

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-structure-asis1_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-structure-asis1_RESOLVED.xml new file mode 100644 index 0000000000..6ee6467c1d --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-structure-asis1_RESOLVED.xml @@ -0,0 +1,111 @@ + + + + Test Profile + 2022-06-14T10:31:48.9825185-04:00 + 1.0 + TODO: Not implemented yet + + + + + Group A of C + + Control A1 + + + a1.a value + + + +

      A1 aaaaa aaaaaaaaaa

      +

      Parameter A.a is set: +

      +

      Parameter a1.a is set: +

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +

      Parameter A.b is set: +

      +
      +
      + + Control A3 + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      +
      + + Group B of C + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control B2 + + + +

      B2 bbb bbbbbbbbbbb bbbbbbbbbbbb.

      +

      Also, we refer to a citation.

      +
      +
      + + Control B3 + + +

      B3 bbbb bbbbbbb bbbb.

      +
      +
      +
      + + Group C of C + +

      Group C of C contains subgroups CA and CB.

      +
      + + Group CA + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +

      We cite a document with an anchor: ... citation ....

      +
      +
      + + Control C2 + + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      +
      +
      + + + + A citation to an out of line document. + + + + + A citation to an out of line document. + + + +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-structure-asis2_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-structure-asis2_RESOLVED.xml new file mode 100644 index 0000000000..ea2300e158 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-structure-asis2_RESOLVED.xml @@ -0,0 +1,97 @@ + + + + Test Profile + 2022-06-14T10:33:37.4077081-04:00 + 1.0 + TODO: Not implemented yet + + + + + Group A of C + + Control A1 + + + a1.a value + + + +

      A1 aaaaa aaaaaaaaaa

      +

      Parameter A.a is set: +

      +

      Parameter a1.a is set: +

      +
      +
      + + Control A2 + + +

      A2 aaa aaaaaaaaaa aaaaaaaaaaaaa

      +

      Parameter A.b is set: +

      +
      +
      + + Control A3 + + +

      A3 aaaaa aaaaaaaaaa

      +
      +
      +
      + + Group C of C + +

      Group C of C contains subgroups CA and CB.

      +
      + + Group CA + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +

      We cite a document with an anchor: ... citation ....

      +
      +
      + + Control C2 + + + +

      C2 cccccccc ccccccccccccccccc.

      +
      +
      +
      + + Group CB + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      +
      + + + + A citation to an out of line document. + + + +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-child-controls-no_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-child-controls-no_RESOLVED.xml new file mode 100644 index 0000000000..76b78502ff --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-child-controls-no_RESOLVED.xml @@ -0,0 +1,42 @@ + + + + Test Profile + 2022-04-19T16:25:49.1221541-04:00 + 1.0 + 1.0.0 + + + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-child-controls-none_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-child-controls-none_RESOLVED.xml new file mode 100644 index 0000000000..3d9c352467 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-child-controls-none_RESOLVED.xml @@ -0,0 +1,42 @@ + + + + Test Profile + 2022-04-19T16:27:33.9704261-04:00 + 1.0 + 1.0.0 + + + + Control A1 + + + + + +

      A1 aaaaa aaaaaaaaaa

      +
      +
      + + Control B1 + + +

      B1 bbbb bbbbbbb.

      +
      +
      + + Control C1 + + +

      C1 ccccc ccc ccccccccccccccccc.

      +
      +
      + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-no1_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-no1_RESOLVED.xml new file mode 100644 index 0000000000..5605cb1acb --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-no1_RESOLVED.xml @@ -0,0 +1,24 @@ + + + + Test Profile + 2022-04-26T17:10:21.286142-04:00 + 1.0 + 1.0.0 + + + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-none_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-none_RESOLVED.xml new file mode 100644 index 0000000000..229f9cabd2 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-none_RESOLVED.xml @@ -0,0 +1,25 @@ + + + + Test Profile + 2022-04-26T17:19:59.7102091-04:00 + 1.0 + 1.0.0 + + + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-yes1_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-yes1_RESOLVED.xml new file mode 100644 index 0000000000..90cd98f27f --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-yes1_RESOLVED.xml @@ -0,0 +1,32 @@ + + + + Test Profile + 2022-04-26T17:11:18.9602994-04:00 + 1.0 + 1.0.0 + + + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      + + Control C3-A-1 + + +

      C3 A-1 ccccc cccccccccccccc.

      +
      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-yes2_RESOLVED.xml b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-yes2_RESOLVED.xml new file mode 100644 index 0000000000..813f9ac4b9 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/output-expected/req-with-parent-controls-yes2_RESOLVED.xml @@ -0,0 +1,25 @@ + + + + Test Profile + 2022-04-26T17:11:18.9602994-04:00 + 1.0 + 1.0.0 + + + + Control C3 + + +

      C3 ccccc cccccccccccccc.

      +
      + + Control C3-A + + +

      C3 A ccccc cccccccccccccc.

      +
      +
      +
      +
      diff --git a/src/specifications/profile-resolution/requirement-tests/req-broken-import.xml b/src/specifications/profile-resolution/requirement-tests/req-broken-import.xml new file mode 100644 index 0000000000..86c6a6cfd8 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-broken-import.xml @@ -0,0 +1,17 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-chained-all-asis.xml b/src/specifications/profile-resolution/requirement-tests/req-chained-all-asis.xml new file mode 100644 index 0000000000..a10fcb9a17 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-chained-all-asis.xml @@ -0,0 +1,18 @@ + + + + + Test Profile + 2022-04-18T15:14:17.679398100-04:00 + 1.0 + 1.0.0 + + + + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-chained-deepA.xml b/src/specifications/profile-resolution/requirement-tests/req-chained-deepA.xml new file mode 100644 index 0000000000..bd62a69304 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-chained-deepA.xml @@ -0,0 +1,29 @@ + + + + + Test Profile + 2022-04-18T15:14:17.679398100-04:00 + 1.0 + 1.0.0 + + + + + a1 + b1 + c1 + c3 + + + + + a3 + b3 + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-circular_import.xml b/src/specifications/profile-resolution/requirement-tests/req-circular_import.xml new file mode 100644 index 0000000000..ff0a12a7b3 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-circular_import.xml @@ -0,0 +1,17 @@ + + + + + + Test Profile + 2020-05-30T14:39:39.562-04:00 + 1.0 + 1.0.0 + + + + a1 + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-circular_importer.xml b/src/specifications/profile-resolution/requirement-tests/req-circular_importer.xml new file mode 100644 index 0000000000..8e766511ac --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-circular_importer.xml @@ -0,0 +1,17 @@ + + + + + + Test Profile + 2020-05-30T14:39:39.562-04:00 + 1.0 + 1.0.0 + + + + a1 + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-import-by-resource.xml b/src/specifications/profile-resolution/requirement-tests/req-import-by-resource.xml new file mode 100644 index 0000000000..f943f2a5a4 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-import-by-resource.xml @@ -0,0 +1,22 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + true + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-all-asis.xml b/src/specifications/profile-resolution/requirement-tests/req-include-all-asis.xml new file mode 100644 index 0000000000..69d1c64cf6 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-all-asis.xml @@ -0,0 +1,17 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-all-flat.xml b/src/specifications/profile-resolution/requirement-tests/req-include-all-flat.xml new file mode 100644 index 0000000000..0ef0dc3d57 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-all-flat.xml @@ -0,0 +1,14 @@ + + + + + Test Profile + 2022-02-15T13:33:09.325121-05:00 + 1.0 + 1.0.0 + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-by-id.xml b/src/specifications/profile-resolution/requirement-tests/req-include-by-id.xml new file mode 100644 index 0000000000..f6a0a7a1ca --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-by-id.xml @@ -0,0 +1,20 @@ + + + + + + Test Profile + 2020-05-30T14:39:45.684-04:00 + 1.0 + 1.0.0 + + + + a1 + b1 + c1 + c3 + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-by-match-empty.xml b/src/specifications/profile-resolution/requirement-tests/req-include-by-match-empty.xml new file mode 100644 index 0000000000..2e08675d5a --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-by-match-empty.xml @@ -0,0 +1,18 @@ + + + + + + Test Profile + 2020-05-30T14:39:47.217-04:00 + 1.0 + 1.0.0 + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-by-match.xml b/src/specifications/profile-resolution/requirement-tests/req-include-by-match.xml new file mode 100644 index 0000000000..ae3eebf018 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-by-match.xml @@ -0,0 +1,18 @@ + + + + + + Test Profile + 2020-05-30T14:39:47.217-04:00 + 1.0 + 1.0.0 + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-exclude1.xml b/src/specifications/profile-resolution/requirement-tests/req-include-exclude1.xml new file mode 100644 index 0000000000..16127a2df0 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-exclude1.xml @@ -0,0 +1,21 @@ + + + + + + Test Profile + 2020-05-30T14:39:47.217-04:00 + 1.0 + 1.0.0 + + + + + + + + a1 + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-exclude2.xml b/src/specifications/profile-resolution/requirement-tests/req-include-exclude2.xml new file mode 100644 index 0000000000..f8bb596091 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-exclude2.xml @@ -0,0 +1,20 @@ + + + + + + Test Profile + 2020-05-30T14:39:47.217-04:00 + 1.0 + 1.0.0 + + + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-exclude3.xml b/src/specifications/profile-resolution/requirement-tests/req-include-exclude3.xml new file mode 100644 index 0000000000..45c32f4187 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-exclude3.xml @@ -0,0 +1,22 @@ + + + + + + Test Profile + 2020-05-30T14:39:47.217-04:00 + 1.0 + 1.0.0 + + + + + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-exclude4.xml b/src/specifications/profile-resolution/requirement-tests/req-include-exclude4.xml new file mode 100644 index 0000000000..ad8bf1a3f3 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-exclude4.xml @@ -0,0 +1,22 @@ + + + + + + Test Profile + 2020-05-30T14:39:47.217-04:00 + 1.0 + 1.0.0 + + + + + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-include-exclude5.xml b/src/specifications/profile-resolution/requirement-tests/req-include-exclude5.xml new file mode 100644 index 0000000000..55609abb5a --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-include-exclude5.xml @@ -0,0 +1,25 @@ + + + + + + Test Profile + 2020-05-30T14:39:47.217-04:00 + 1.0 + 1.0.0 + + + + + + + + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-loose-params1.xml b/src/specifications/profile-resolution/requirement-tests/req-loose-params1.xml new file mode 100644 index 0000000000..9b36f9fea0 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-loose-params1.xml @@ -0,0 +1,20 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + c2 + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-loose-params2.xml b/src/specifications/profile-resolution/requirement-tests/req-loose-params2.xml new file mode 100644 index 0000000000..54098dd455 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-loose-params2.xml @@ -0,0 +1,20 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + c2 + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-merge-keep1.xml b/src/specifications/profile-resolution/requirement-tests/req-merge-keep1.xml new file mode 100644 index 0000000000..9300226a17 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-merge-keep1.xml @@ -0,0 +1,21 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-merge-keep2.xml b/src/specifications/profile-resolution/requirement-tests/req-merge-keep2.xml new file mode 100644 index 0000000000..9300226a17 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-merge-keep2.xml @@ -0,0 +1,21 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-merge-usefirst1.xml b/src/specifications/profile-resolution/requirement-tests/req-merge-usefirst1.xml new file mode 100644 index 0000000000..3eb6817e8f --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-merge-usefirst1.xml @@ -0,0 +1,21 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-merge-usefirst2.xml b/src/specifications/profile-resolution/requirement-tests/req-merge-usefirst2.xml new file mode 100644 index 0000000000..6ba138bd28 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-merge-usefirst2.xml @@ -0,0 +1,20 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-missing-resource.xml b/src/specifications/profile-resolution/requirement-tests/req-missing-resource.xml new file mode 100644 index 0000000000..1f4f255edd --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-missing-resource.xml @@ -0,0 +1,22 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + true + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-modify-alter-remove-match1.xml b/src/specifications/profile-resolution/requirement-tests/req-modify-alter-remove-match1.xml new file mode 100644 index 0000000000..ed3296fde0 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-modify-alter-remove-match1.xml @@ -0,0 +1,36 @@ + + + + + Test Profile + 2022-02-15T13:33:09.325121-05:00 + 1.0 + 1.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-modify-alter-remove-match2.xml b/src/specifications/profile-resolution/requirement-tests/req-modify-alter-remove-match2.xml new file mode 100644 index 0000000000..b0c075292f --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-modify-alter-remove-match2.xml @@ -0,0 +1,37 @@ + + + + + Test Profile + 2022-02-15T13:33:09.325121-05:00 + 1.0 + 1.0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-spoofing-resource.xml b/src/specifications/profile-resolution/requirement-tests/req-spoofing-resource.xml new file mode 100644 index 0000000000..4261620265 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-spoofing-resource.xml @@ -0,0 +1,22 @@ + + + ]> + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + + true + + + &spoof; + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-structure-asis1.xml b/src/specifications/profile-resolution/requirement-tests/req-structure-asis1.xml new file mode 100644 index 0000000000..6b504ebadb --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-structure-asis1.xml @@ -0,0 +1,20 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + c3 + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-structure-asis2.xml b/src/specifications/profile-resolution/requirement-tests/req-structure-asis2.xml new file mode 100644 index 0000000000..a485bdb1be --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-structure-asis2.xml @@ -0,0 +1,21 @@ + + + + + Test Profile + 2022-02-14T17:44:59.245623-05:00 + 1.0 + 1.0.0 + + + + + c3 + + + + + true + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-with-child-controls-no.xml b/src/specifications/profile-resolution/requirement-tests/req-with-child-controls-no.xml new file mode 100644 index 0000000000..4223dd4b53 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-with-child-controls-no.xml @@ -0,0 +1,20 @@ + + + + + + Test Profile + 2020-05-30T14:39:45.684-04:00 + 1.0 + 1.0.0 + + + + a1 + b1 + c1 + c3 + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-with-child-controls-none.xml b/src/specifications/profile-resolution/requirement-tests/req-with-child-controls-none.xml new file mode 100644 index 0000000000..3874fd3cb0 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-with-child-controls-none.xml @@ -0,0 +1,20 @@ + + + + + + Test Profile + 2020-05-30T14:39:45.684-04:00 + 1.0 + 1.0.0 + + + + a1 + b1 + c1 + c3 + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-no1.xml b/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-no1.xml new file mode 100644 index 0000000000..6925264970 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-no1.xml @@ -0,0 +1,17 @@ + + + + + + Test Profile + 2022-04-26T16:46:04.8198642-04:00 + 1.0 + 1.0.0 + + + + c3 + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-none.xml b/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-none.xml new file mode 100644 index 0000000000..e911c6ef89 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-none.xml @@ -0,0 +1,17 @@ + + + + + + Test Profile + 2022-04-26T17:19:08.8113625-04:00 + 1.0 + 1.0.0 + + + + c3.a + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-yes1.xml b/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-yes1.xml new file mode 100644 index 0000000000..eefb32678e --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-yes1.xml @@ -0,0 +1,17 @@ + + + + + + Test Profile + 2022-04-26T17:09:44.5371952-04:00 + 1.0 + 1.0.0 + + + + c3.a + + + diff --git a/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-yes2.xml b/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-yes2.xml new file mode 100644 index 0000000000..6c73c9c3a5 --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/req-with-parent-controls-yes2.xml @@ -0,0 +1,17 @@ + + + + + + Test Profile + 2022-04-26T17:09:44.5371952-04:00 + 1.0 + 1.0.0 + + + + c3.a + + + diff --git a/src/specifications/profile-resolution/requirement-tests/spoofed-resource.xml b/src/specifications/profile-resolution/requirement-tests/spoofed-resource.xml new file mode 100644 index 0000000000..31b577d67e --- /dev/null +++ b/src/specifications/profile-resolution/requirement-tests/spoofed-resource.xml @@ -0,0 +1,4 @@ + + + + diff --git a/src/specifications/profile-resolution/requirements-extract.xsl b/src/specifications/profile-resolution/requirements-extract.xsl new file mode 100644 index 0000000000..0ae67df614 --- /dev/null +++ b/src/specifications/profile-resolution/requirements-extract.xsl @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + pending + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/specifications/profile-resolution/resolution-testing.xml b/src/specifications/profile-resolution/resolution-testing.xml new file mode 100644 index 0000000000..f6955e9e33 --- /dev/null +++ b/src/specifications/profile-resolution/resolution-testing.xml @@ -0,0 +1,403 @@ + + + + + + + + + It is strongly RECOMMENDED that implementations execute the following steps in the order that they are provided here (import, merge, modify). + PENDING test design + + + Tools MUST resolve URIs by following Section 5 of RFC3986, with the exception of URI Fragments (URIs that start with "#"). URI Fragments MUST instead be resolved as defined in Internal References. + relative URI + + + Tools MUST acquire resources at the resolved URI by following Section 5 of RFC3986, with the exception of URI Fragments (URIs that start with "#"). URI Fragments MUST instead be acquired as defined in Internal References. + via internal reference to resource/rlink + + + For the purposes of resolving URIs using the above specification, the Base URI MUST be considered to be the absolute URI of the containing profile. + URI base corresponds to document URI + + + In the case that acquiring a resource fails, the tool MUST cease processing and provide an error. In order to ensure profile resolution results in the same catalog regardless of which tool resolves it, all imports must successfully resolve. While this may cause inconvenience if resources are frequently not available, it ensures interoperability. + PENDING rebase over latest from galtm missing resource + + + In the context of the Import Phase, internal references will only appear as a reference to a profile or catalog that is in the resources section of the source. When tools encounter such a reference, they MUST locate the object in resources with the matching UUID value, and resolve the resource. By OSCAL model requirements, a given resource can have zero to many rlink objects and zero to one base64 objects; however, it must have at least one of the two present. Tools can assume that any of these each resolves to the same underlying OSCAL object, although potentially in different serialization formats. For deterministic resolution of these backmatter OSCAL objects, tools need to adhere to the following requirements: + + + + Tools MAY use any of the rlink or base64 objects present in the resource. + PENDING test design (support for either/both base64 and rlink) + + + Tools MAY verify that each above objects resolves to the same underlying OSCAL object. If there are OSCAL Model content differences between the resolved objects, the tool SHOULD provide a warning. + PENDING test design (correspondence of base64 and rlink-nominated objects) + + + When a rlink is encountered and is to be resolved, it MUST be resolved by using a HTTP request to retrieve a byte stream. + PENDING test design (retrieval) + + + When a base64 is encountered and is to be resolved, it MUST be considered a Byte Stream. + PENDING test design (base64 integrity) + + + Regardless of its source, the Byte Stream MUST be decoded based on the algorithm defined in Section 4 RFC 4648. + PENDING test design (base64 integrity) + + + If the object fetched cannot be found or is not a valid OSCAL object, the tool MUST cease processing and provide an error. + PENDING rebase over latest from galtm + PENDING rebase over latest from galtm + + + If the resource acquired is an OSCAL Profile, the tool MUST apply this specification to resolve it, then continue processing having imported the resulting catalog. + PENDING chained profiles + + + When a profile imports a profile, the subordinate profile SHOULD be resolved first into a catalog using this specification, before it is imported. + PENDING chained profiles + PENDING [bug repair] chained profile merged with controls from its own source catalog + + + If a processor encounters a circular import as described above (self-imports are inherently circular), the processor MUST cease processing and generate an error. + PENDING circular import detection + + + Note that this occurs even if the same catalog is imported multiple times: each distinct import collects controls into a separate selection + PENDING chained profiles + + + The control inclusions are combined and collapsed in the next phase of processing + PENDING chained profiles + + + When an import provides the include-all directive, ALL controls and groups in the referenced document (including nested controls) MUST be included. + + + + + When an import provides the include-controls directive, with a with-id child, all controls in the referenced document whose id match one of the listed id values MUST be included. + + + + When an import provides the include-controls directive, with a matching child, all controls in the referenced document whose id matches one of the listed pattern values (Glob matching) MUST be included. + + + + If a matching object is provided with no pattern, it MUST be treated as matching nothing. While not providing a pattern is technically valid, resolution tool implementers should be aware that it is generally undesirable, and warnings or notices to the user may be appropriate. + + + + A with-child-controls: yes directive on an include-controls indicates that all descendant controls of the included control MUST also be included. + + + + A with-child-controls: no directive on an include-controls indicates that ONLY the matching control is included, any descendant children MUST NOT be included. + + + + If no with-child-controls is provided, the processor MUST consider the directive as being equivalent to one having with-child-controls:no. + + + + A with-parent-controls: yes directive on an include-controls indicates that all parent controls of the included control MUST also be included. + PR https://github.com/usnistgov/OSCAL/pull/1207 + PR https://github.com/usnistgov/OSCAL/pull/1207 + + + A with-parent-controls: no directive on an include-controls indicates that ONLY the matching control is included, any parent MUST NOT be included. + PENDING PR https://github.com/usnistgov/OSCAL/pull/1207 + + + If no with-parent-controls is provided, the processor MUST consider the directive as being equivalent to one having with-parent-controls:yes. + Neither setting is given + + + Any control designated to be both included and excluded, MUST be excluded. This holds irrespective of the specificity of the selection for inclusion or exclusion. + + + + + + When exclude-controls has at least one with-ids or matching directive, the processor MUST follow the same rules as defined in the relevant sections above for these directives, but exclude instead of include any controls. All optional features (with-child-controls, etc.) also apply to exclusion directives. + + + + A given import may have any number of inclusion statements and any number of exclusion statements. Their effect is cumulative; any control that is included (or excluded) more than once MUST be considered to be included (or excluded) only once. In other words, a given control being included or excluded more than once has no effect. Exclusion still takes priority over inclusion (see above). + + + + All loose params from both imported documents and the profile source MUST be included. These params will be kept in the final output if the document contains any references to them, and discarded otherwise. See Pruning and Ordering. + + + + It is RECOMMENDED that tools apply the "combine" directive to the intermediate generated by the Import phase first, then apply the "structuring" directive. + PENDING is this testable? + + + Note that "merge: combine" is deprecated, and MUST be considered undefined behavior when encountered. + PENDING specification + + + If no merge directive is given in the profile, or if a merge is given without a combine, merge conflicts MUST be treated as if method: keep was given. + + + + When a merge is indicated by method:keep, or when no merge directive is given, the keepcombination rule is used. Any control with the same distinctive ID Distinct ID of ObjectsMUST NOT not merged. (They are kept.) + + + + + Processors SHOULD provide a warning under the merge:keep directive when duplicate controls are detected. + + + + + The processor MAY throw an error and cease processing (short-circuiting a certain future error) when duplicate controls are detected under the merge:keep directive. + + + + + When the "use-first"combination rule is applied, and controls that share a distinctive ID are found, the first control encountered MUST be kept, the rest MUST be discarded. "First" MUST be determined by a top-down, depth-first traversal of the source profile's import hierarchy. + + + + + Optionally, one of three "structuring" directives can be included as a child of merge: flat, as-isand custom. When one of these appears, it is the selected structuring directive. If more than one appears, processors MUST generate an error and cease processing. + PENDING how do we test this? + + + If no merge directive is given in the profile, or if a merge is given without a structuring directive, structuring the output MUST be treated as if the structuring directive flat was given. For example, a profile with no merge directive: + + + + Profiles with the "flat" merge directive MUST be resolved as unstructured catalogs, with no grouping or nesting of controls. + + + + Unstructured catalog output MUST be produced by adhering to the following requirements: + + + All included controls are output to the target as a flat list directly under "catalog". + + + + Any included "loose params" are output to the target as a flat list directly under "catalog". + + + + Any groups are discarded. + + + + + Processors MUST handle the as-is directive by adhering to the following requirements: + + + All included controls are output to the target, keeping the structure of the groups and nested controls. Any group that holds an included control MUST appear in the output with all of its non-control children intact. If an included control has a parent control that was not included, that control's output location is "up-leveled", or made equal to the non-included parent. This applies recursively until the control is directly under either "catalog" or another included control. + + + Any included "loose params" are output to the target as a flat list directly under "catalog". + + + A groupobject given under custom MUST result in a group with the exact same content (excluding insert-controls) in the target catalog. + + + If the ID of the group matches the ID of a group that has been included during the import phase, all contents inside the group, including title, param, prop and part objects MUST be copied into the target, appearing in the same order as in the source. + + + When processing the control selection of a custom element, the behavior defined in this section MUST be followed to generate the output. + + + In the case that a control selection matches none of the included controls, it MUST be ignored. + + + In the case that a control selection matches none of the included controls, a warning SHOULD be provided. + + + If no such parameter is found, a warning SHOULD be issued. + + + If no such parameter is found, processing MUST still continue. + + + For the following objects inside the source: class, depends-on, label, usage, values, select; the object MUST be copied into the target from the source, first removing any existing objects with the same name. + + + For the following objects inside the source: props, links, constraints, guidelines; the contents of the object MUST be added to the contents of the target object of the same name. If no such object exists in the target, it is created. + + + For the following objects inside the source: prop, link; the object MUST be copied into the target from the source, first removing any existing objects with the same distinctive ID. (Distinct ID of Objects). + + + If more than one set-parameter directive is given for the same parameter, all MUST BE applied, in the sequence given in the profile. + + + An add directive with no by-id child MUST be considered an implicit binding, and will apply to the control as a whole. + + + The contents of an implicitly bound add directive MUST be added to the control contents in the target, either after its title when position is starting, or at the end if its position is ending, or if no valid position is given. + + + When an add directive is implicitly bound, the position values before and after MUST be treated like starting and ending, respectively. + + + After processing an implicitly bound add directive, the control contents MUST be sorted to appear in the required order: a new prop appears after any prop already in the control, when position is ending, or not given, or before any prop in the control when position is starting. + + + An add directive with a by-id child MUST be considered an explicit binding, and applies to only a single object inside the control. + + + When an add directive is explicitly bound, the value of the by-id child MUST correspond to the value of an id on an object inside the control, and not the control itself. + + + If by-id does not correspond to such a value, the add directive MUST be considered inoperative and ignored. + + + An inoperative add directive MAY result in a warning. + + + When position has a value of startingor ending, the contents of the source MUST be added inside the target, either at the start or end of its contents, respectively. + + + When position has a value of before or after, the contents of the source MUST be added outside the target, either directly before or after it, respectively. + + + Profile resolution tools MUST be able to correctly handle add directives targetting nested controls. This includes directives that target a child control as well as directives that target a parent control and modify the child. + + + An object inside the control MUST be removed from the output if and only if it meets all of the criteria given by the child objects of the remove directive. + + + + The remove directive criteria by-id MUST match an object if and only if its value is identical to the id value of that object. + + + + The remove directive criteria name-ref MUST match an object if and only if its value is identical to the value of that object's name child. + + + + The remove directive criteria ns-ref MUST match an object if and only if its value is identical to the value of that object's ns child. + + + The remove directive criteria class-ref MUST match an object if and only if its value is identical to the value of that object's class child. + + + The remove directive criteria item-name MUST match an object if and only if its value is identical to the value of that object's serialized name. + + + + In serialization formats that use arrays of objects in the OSCAL model, an object's name MUST be referenced as singular form of its containing parent array. + + + The output's backmatter MUST be generated by copying in each resource object from the backmatters of the imported catalogs/profiles in top-to-bottom order, then by copying in each resource object from the backmatter of the source profile itself. These objects MUST be processed in the order they are defined in each respective document. + + + If a given resource has the same uuid as a resource that has already been added, the previous resource MUST be removed, and the more recent one added, unless superseded by other requirements. + + + A resource with a child prop of name:keep and value:always MUST NOT be replaced by the addition of another resource, unless the new resource also has a child prop of name:keep and value:always. + + + Tools MAY check for pruning conditions Pruning and Ordering as resources are added as long as the final result is the same as if the pruning had taken place at the end of all resource addition. + + + The output catalog's metadata MUST have a unique top-level UUID (metadata:uuid). This UUID MAY be generated as seen fit by the tool, as long as it is reasonable to assume it is globally unique. It is RECOMMENDED that tools use a Version 4 UUID as specified in Section 4 of RFC 4122. + + + The value of metadata:version in the target MUST be set with a string that identifies the version of that document. + + + The metadata:version SHOULD be used to track updates to this specific output document. + + + The value of metadata:oscal-version in the target MUST be set with a string that identifies the version of OSCAL used by this tool to resolve the profile (ex. 1.0.0). This value MUST be determined by compiling the oscal-versions from each imported document and the source profile, and taking the most recent minor version. If this version is more recent than what the resolution tool is using, then the value of oscal-version MUST be the version that the tool used internally. + PENDING https://github.com/usnistgov/OSCAL/issues/1313 + + + If any of the above OSCAL versions (imported document versions, source profile version, tool version) are of a different major version (the first digit differs), the tool SHOULD provide an error and cease processing. + + + The value of metadata:last-modified in the target MUST be set with a valid timestamp representing the time the profile resolution completed. + PENDING develop an external (XPath) test + + + A child prop object with name:source-profile MUST be created. The value object of this prop SHOULD be set with a valid URI that points to the profile that resulted in this catalog. + + + If there are privacy or security concerns, the value object of this prop MAY be set to anything, in which case the simple existence of the source-profile property indicates that this is a resolved profile. + + + A child prop object with name:resolution-tool SHOULD be created. The value object of this prop in the target SHOULD be set with a string that represents the tool that was used to resolve this catalog. + + + For any metadata:roles or metadata:parties that exist in the source catalogs, if they have a prop child with name:keep and value:always, they are to be copied as is into the output metadata. + + + The processor SHOULD prune the resulting output catalog by removing unused objects. + + + + Any object that has a child prop with a name of "keep" and a value of "always" MUST NOT be pruned. + + + + If an object was explicitly included in the Including Controls, it MUST NOT be pruned. + PENDING How to test? isn't this just selection semantics + + + If an object was referenced in a custom section of the source profile, it MUST NOT be pruned. + PENDING clarification + + + If an object was referenced in the modify section of the source profile, it MUST NOT be pruned. Any objects removed in that section are still removed. + PENDING clarification + + + If the object appears in a reference anywhere in the final result catalog, except in other objects that also meet all other pruning criteria, it MUST NOT be removed. A reference to a given object exists if #{distinctiveID} appears anywhere, where {distinctiveID} is the distinctive ID of the object Distinct ID of Objects. + PENDING clarification + + + Tools MUST reorder the output catalog into canonical order Order of objects in serialization, except where this specification provides different ordering requirements. + PENDING how do we test? + + + For the objects control, param, and group, distinctiveness MUST be determined by the value of the "id" child object. + PENDING how do we test? Query outputs for duplicate IDs? Example docs? + + + For the object resource, distinctiveness MUST be determined by the value of the "uuid" Backmatter Resolution. + PENDING how do we test? Query outputs for duplicate UUIDs? Example docs? + + + Profile Resolution tools SHOULD be able to handle source profiles, imported catalogs, and imported profiles that are serialized in XML, JSON, or YAML. + PENDING how do we test? + + + A different serialization format of any given input MUST NOT result in a differing output catalog. + PENDING how do we test? + + + The final Catalog output, if using XML, MUST be valid as defined by the XML model documentation for the OSCAL Catalog. See the complete XML reference for model requirements. + PENDING how do we test? + + + The final Catalog output, if using JSON, MUST be valid as defined by the JSON model documentation for the OSCAL Catalog. See the complete JSON reference for model requirements. + PENDING how do we test? + + + The final Catalog output, if using YAML, MUST be valid as defined by the JSON model documentation for the OSCAL Catalog. + PENDING how do we test? + + + When the output format is XML, tools MUST use the OSCAL canonical order as described above. When using the YAML or JSON formats, order conveys no meaning, and is not considered important. + PENDING how do we test this? + + diff --git a/src/specifications/profile-resolution/spec-checkup.sch b/src/specifications/profile-resolution/spec-checkup.sch deleted file mode 100644 index bf2c4034a6..0000000000 --- a/src/specifications/profile-resolution/spec-checkup.sch +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - section is too deep - - - diff --git a/src/specifications/profile-resolution/unit-tests.xsd b/src/specifications/profile-resolution/unit-tests.xsd new file mode 100644 index 0000000000..c746b134a0 --- /dev/null +++ b/src/specifications/profile-resolution/unit-tests.xsd @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Generation succeeded. + + + + + Generation resulted in failure caused by some error. + + + + + + + + + + Content is XML. + + + + + Content is JSON. + + + + + Content is YAML. + + + + + + + + + + The actual content matched the expectect content. + + + + + The actual content did not match the expectect content. + + + + + + + + + + Validation succeeded. + + + + + Validation resulted in failure caused by some content defect or error. + + + + + diff --git a/src/utils/util/resolver-pipeline/oscal-profile-test-helper.xsl b/src/utils/util/resolver-pipeline/oscal-profile-test-helper.xsl index a423068823..612b5507db 100644 --- a/src/utils/util/resolver-pipeline/oscal-profile-test-helper.xsl +++ b/src/utils/util/resolver-pipeline/oscal-profile-test-helper.xsl @@ -3,7 +3,8 @@ xmlns:opr="http://csrc.nist.gov/ns/oscal/profile-resolution" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="#all" - xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0"> + xpath-default-namespace="http://csrc.nist.gov/ns/oscal/1.0" + default-mode="scrubbing">