Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check a FedRAMP document's metadata for fedramp-version to identify requirements used #789

Closed
9 tasks done
Tracked by #804
aj-stein-gsa opened this issue Oct 18, 2024 · 20 comments · Fixed by #800
Closed
9 tasks done
Tracked by #804
Assignees
Labels
enhancement New feature or request scope: constraints

Comments

@aj-stein-gsa
Copy link
Contributor

aj-stein-gsa commented Oct 18, 2024

This is a ...

fix - something needs to be different

This relates to ...

  • the FedRAMP OSCAL Validations

User Story

As a creator or maintainer of an FedRAMP digital authorization package with its documents in OSCAL, I would like validations to check for the existence of a specific property in the metadata with a name of fedramp-version and only permit value that is a specific release tag for a given OSCAL version.

Goals

  • Give tool developers and digital package maintainers a specific field to define which version of FedRAMP automation requirements are used with the package

Dependencies

No response

Acceptance Criteria

  • All FedRAMP Documents Related to OSCAL Adoption (https://github.com/GSA/fedramp-automation) affected by the changes in this issue have been updated.
  • A Pull Request (PR) that
    • implements an allowed-values constraint with level ERROR if the prop of name fedramp-version at /*/metadata/prop[@name='fedramp-version']) does not have a valid value (for now: fedramp-3.0.0rc1-oscal-1.1.2); it should not allow alternatives
    • implements an expect constraint with level ERROR if the prop of name fedramp-version is not present in the document.
    • Positive test cases with the prop correctly defined
    • Negative test cases with the prop incorrectly defined or missing
  • TBD: A related PR to add documentation about this new requirement to the automate.fedramp.gov website

Other information

No response

@aj-stein-gsa
Copy link
Contributor Author

aj-stein-gsa commented Oct 18, 2024

I apologize for the delays, @DimitriZhurkin, I am very tardy in writing up this issue for you to work on this constraint tomorrow.

@DimitriZhurkin
Copy link

@aj-stein-gsa, is fedramp-3.0.0rc1-oscal-1.1.2 a fixed value?

Are we going to update this value in the SSP template every time there's a new version?

@aj-stein-gsa
Copy link
Contributor Author

@aj-stein-gsa, is fedramp-3.0.0rc1-oscal-1.1.2 a fixed value?

Are we going to update this value in the SSP template every time there's a new version?

I think that warrants discussion, but probably. We should have a few controlled releases a year, and this should be part of commits that are right before a final release as we make them. We have to discuss out of band data eventually, but we must defer that for now. I will update issues and discuss that next week. This is the second case where it comes up.

@DimitriZhurkin
Copy link

I apologize, I should've put it a little differently.

Which of the following should we be checking:

  • The existence of the prop
  • A fixed value
  • A value pattern

@aj-stein-gsa
Copy link
Contributor Author

aj-stein-gsa commented Oct 18, 2024

Which of the following should we be checking:

  • The existence of the prop
  • A fixed value
  • A value pattern

@DimitriZhurkin, ok it seems we need an allowed-value prop and an expect prop separately, make the two separate constraints (the first and second in your list from the above comment, not the third) in their respective files. I will clarify the goals and AC requirements in the issue above when I return from a quick break.

@aj-stein-gsa aj-stein-gsa moved this from 🔖 Ready to 🏗 In progress in FedRAMP Automation Oct 18, 2024
@DimitriZhurkin
Copy link

@aj-stein-gsa, do you have a specific location for the <fedramp-version> prop in mind?

Here's how I put it in ssp-all-VALID.xml (third from the bottom):

  <metadata>
    <title>Enhanced Example System Security Plan</title>
    <published>2024-08-01T14:30:00Z</published>
    <last-modified>2024-08-01T14:30:00Z</last-modified>
    <version>1.1</version>
    <fedramp-version>fedramp-3.0.0rc1-oscal-1.1.2</fedramp-version>
    <oscal-version>1.0.0</oscal-version>
    <document-id scheme="https://example.com/identifiers">SSP-2024-002</document-id>

@DimitriZhurkin
Copy link

Probably more importantly, we'll need to add <fedramp-version> to Metaschema. Currently, it throws a validation error.

@DimitriZhurkin
Copy link

Sorry, not Metaschema, but rather SSP, SAR, SAP, and POAM XSDs.

But first we'd need to decide on the placement (position) of <fedramp-version> inside <metadata>.

@DimitriZhurkin
Copy link

Took liberty to tweak the SSP XSD to include <fedramp-version> (see attached; had to change its extension from xsd to txt).

With that XSD, ssp-all-VALID.xml does pass validation In Oxygen.

oscal_ssp_schema.txt

@aj-stein-gsa
Copy link
Contributor Author

aj-stein-gsa commented Oct 18, 2024

@aj-stein-gsa, do you have a specific location for the <fedramp-version> prop in mind?

Sorry, it seems I should have not said the following words without code formatting, property -> prop.

<system-security-plan>
  <metadata>
    <title>Enhanced Example System Security Plan</title>
    <published>2024-08-01T14:30:00Z</published>
    <last-modified>2024-08-01T14:30:00Z</last-modified>
    <version>1.1</version>
    <fedramp-version>fedramp-3.0.0rc1-oscal-1.1.2</fedramp-version>
    <oscal-version>1.0.0</oscal-version>
    <document-id scheme="https://example.com/identifiers">SSP-2024-002</document-id>
   <!-- See below: -->
   <prop name="fedramp-version" value="3.0.0rc1-oscal-1.1.2`"/>

Does this help, @DimitriZhurkin?

@aj-stein-gsa
Copy link
Contributor Author

Also, apologies, I got around to updating the acceptance criteria in the ticket. I hope that helps.

@DimitriZhurkin
Copy link

Perfect, thank you!

I actually initially thought that you had meant <prop name="fedramp-version" value="fedramp-3.0.0rc1-oscal-1.1.2">FedRAMP Version</prop>.

But then I looked at the <metadata> section and didn't see any <prop> elements.

Sorry for misunderstanding.

@aj-stein-gsa
Copy link
Contributor Author

No worries I hope that helps.

@DimitriZhurkin
Copy link

Terribly sorry to be a pain, but the <prop> element might not work.

When I add the following to oscal_ssp_schema.xsd

         <xs:element name="prop"
                      type="oscal-metadata-fedramp-version-FIELD"
                      minOccurs="1"
                      maxOccurs="1"/>

I get this validation error:

Two elements in the content model have the same name <prop> but different types.
This violates the constraint Element Declarations Consistent.

The error is valid, since there's already a <prop> element declared in the XSD:

         <xs:element name="prop"
                      type="oscal-metadata-property-ASSEMBLY"
                      minOccurs="0"
                      maxOccurs="unbounded"/>

@DimitriZhurkin
Copy link

If we do not modify oscal_ssp_schema.xsd, I think it works fine.

@vmangat
Copy link

vmangat commented Oct 21, 2024

The OSCAL model already includes a "props" field in metadata that is an array of props. The constraints needs to make sure that SSP, SAP, SAR and POAM artifacts have populated one prop called "fedramp-version" in the array.
This will indicate to FedRAMP what version of the specs this file conforms to.
The valid values will be one of the FedRAMP published versions of its specifications that are being accepted at any given time.
The valid value is driven by the FedRAMP versioning scheme tag.

@aj-stein-gsa
Copy link
Contributor Author

As asked on #800, please update the checklist items for final review so the relevant tasks can be reviewed and we can mark this issue as "Ready to Ship" and you can move onto a new task, @DimitriZhurkin.

@aj-stein-gsa aj-stein-gsa moved this from 🏗 In progress to 👀 In review in FedRAMP Automation Oct 23, 2024
@DimitriZhurkin
Copy link

Done.

@aj-stein-gsa
Copy link
Contributor Author

aj-stein-gsa commented Oct 23, 2024

@DimitriZhurkin, ok, but you left the goal unchecked. You think the constraint and documentation do not meet the goal's objective?

@DimitriZhurkin
Copy link

Done.

@aj-stein-gsa aj-stein-gsa moved this from 👀 In review to 🚢 Ready to Ship in FedRAMP Automation Oct 24, 2024
@github-project-automation github-project-automation bot moved this from 🚢 Ready to Ship to ✅ Done in FedRAMP Automation Nov 7, 2024
@aj-stein-gsa aj-stein-gsa moved this from ✅ Done to 🚢 Ready to Ship in FedRAMP Automation Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request scope: constraints
Projects
Status: 🚢 Ready to Ship
Development

Successfully merging a pull request may close this issue.

3 participants