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

Add Validation Component Constraints #1158

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Gabeblis
Copy link
Contributor

@Gabeblis Gabeblis commented Feb 12, 2025

Committer Notes

Purpose

The purpose of this PR is to add the Validation Component constraints from issue #1156.

Changes

Added 4 constraints:

  • component-has-proof-of-compliance-link
  • component-has-valid-proof-of-compliance-link
  • component-has-validation-reference
  • validation-reference-has-correct-format

All Submissions:

By submitting a pull request, you are agreeing to provide this contribution under the CC0 1.0 Universal public domain dedication.

@Gabeblis Gabeblis self-assigned this Feb 12, 2025
@Gabeblis Gabeblis requested a review from a team as a code owner February 12, 2025 14:42
@Gabeblis Gabeblis linked an issue Feb 12, 2025 that may be closed by this pull request
18 tasks
@Gabeblis Gabeblis force-pushed the constraints/issue-1156 branch 2 times, most recently from 0d89a8e to 95003ff Compare February 12, 2025 15:01
kyhu65867
kyhu65867 previously approved these changes Feb 12, 2025
@aj-stein-gsa aj-stein-gsa self-requested a review February 12, 2025 16:14
@wandmagic
Copy link

wandmagic commented Feb 12, 2025

<index name="index-system-implementation-component-uuid-validation" target="component[@type='validation']">
        <key-field target="@uuid"/>
      </index>
      <index-has-key name="index-system-implementation-component-uuid-validation" target="component/link[@rel='validated-by']">
        <key-field target="concat('#', @href)"/>
      </index-has-key>
      <index-has-key name="index-system-implementation-component-uuid-validation" target="component/link[@rel='proof-of-compliance']">
        <key-field target="concat('#', @href)"/>
      </index-has-key>
  We either have to campaign to get the index changed upstream
  
  or link to another component by using the RAW UUID

@aj-stein-gsa
Copy link
Contributor

  We either have to campaign to get the index changed upstream
  
  or link to another component by using the RAW UUID

And where did this bit come from, @wandmagic?

@wandmagic
Copy link

  We either have to campaign to get the index changed upstream
  
  or link to another component by using the RAW UUID

And where did this bit come from, @wandmagic?

I just wrote it, it would be a fix if component uuid links are indeed supposed to be prefixed with a hash since i believe the upstream constraint is broken

Copy link
Contributor

@aj-stein-gsa aj-stein-gsa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry it took a while for me to figure this one and not update sooner in the day, @Gabeblis. Apologies. So I reviewed the information at hand, our out-of-band example SSP in Google Drive we are using to coordinate the work, and the upstream NIST documentation.

For now, and I can adjust the AC in the issue, for now we should adjust rel[@link="proof-of-compliance"] to align with upstream documentation and use rel[@link="validation-details"], like so. This approach can work around a conflicting upstream constraint, while also more closely aligning by name with other associated props.

<component uuid="11111111-0000-4000-a000-000000000001" type="hardware">
   <title>Product Name</title>
   <description>
      <p>Describe the product's function.</p>
   </description>
   <link rel="validation" href="#22222222-0000-4000-a000-000000000002" />
   <status state="operational" />
</component>
<component uuid="22222222-0000-4000-a000-000000000002" type="validation">
   <title>Validation Name</title>
   <description>
      <p>Describe the validation.</p>
   </description>
   <prop name="validation-type" value="fips-140-2" />
   <prop name="validation-reference" value="xxxx" />
   <link rel="validation-details" href="https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/xxxx" />
   <status state="operational" />
</component>

Whether or not the original link[@rel] is more appropriately named, I will file an upstream issue and stick with that for now, let's move forward with this approach.

@wandmagic
Copy link

I am sorry it took a while for me to figure this one and not update sooner in the day, @Gabeblis. Apologies. So I reviewed the information at hand, our out-of-band example SSP in Google Drive we are using to coordinate the work, and the upstream NIST documentation.

For now, and I can adjust the AC in the issue, for now we should adjust rel[@link="proof-of-compliance"] to align with upstream documentation and use rel[@link="validation-details"], like so. This approach can work around a conflicting upstream constraint, while also more closely aligning by name with other associated props.

<component uuid="11111111-0000-4000-a000-000000000001" type="hardware">
   <title>Product Name</title>
   <description>
      <p>Describe the product's function.</p>
   </description>
   <link rel="validation" href="#22222222-0000-4000-a000-000000000002" />
   <status state="operational" />
</component>
<component uuid="22222222-0000-4000-a000-000000000002" type="validation">
   <title>Validation Name</title>
   <description>
      <p>Describe the validation.</p>
   </description>
   <prop name="validation-type" value="fips-140-2" />
   <prop name="validation-reference" value="xxxx" />
   <link rel="validation-details" href="https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/xxxx" />
   <status state="operational" />
</component>

Whether or not the original link[@rel] is more appropriately named, I will file an upstream issue and stick with that for now, let's move forward with this approach.

yes this is better than conforming to the broken upstream constraint

@Gabeblis Gabeblis force-pushed the constraints/issue-1156 branch 2 times, most recently from 19a7514 to 85b37fe Compare February 13, 2025 14:15
@Gabeblis
Copy link
Contributor Author

I am sorry it took a while for me to figure this one and not update sooner in the day, @Gabeblis. Apologies. So I reviewed the information at hand, our out-of-band example SSP in Google Drive we are using to coordinate the work, and the upstream NIST documentation.

For now, and I can adjust the AC in the issue, for now we should adjust rel[@link="proof-of-compliance"] to align with upstream documentation and use rel[@link="validation-details"], like so. This approach can work around a conflicting upstream constraint, while also more closely aligning by name with other associated props.

<component uuid="11111111-0000-4000-a000-000000000001" type="hardware">
   <title>Product Name</title>
   <description>
      <p>Describe the product's function.</p>
   </description>
   <link rel="validation" href="#22222222-0000-4000-a000-000000000002" />
   <status state="operational" />
</component>
<component uuid="22222222-0000-4000-a000-000000000002" type="validation">
   <title>Validation Name</title>
   <description>
      <p>Describe the validation.</p>
   </description>
   <prop name="validation-type" value="fips-140-2" />
   <prop name="validation-reference" value="xxxx" />
   <link rel="validation-details" href="https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/xxxx" />
   <status state="operational" />
</component>

Whether or not the original link[@rel] is more appropriately named, I will file an upstream issue and stick with that for now, let's move forward with this approach.

I implemented your suggested approach, and the doc-available function doesn't seem to like this URL: https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/4811. Not sure if you have any insight as to why that might be

@aj-stein-gsa
Copy link
Contributor

I implemented your suggested approach, and the doc-available function doesn't seem to like this URL: https://csrc.nist.gov/projects/cryptographic-module-validation-program/certificate/4811. Not sure if you have any insight as to why that might be

One of the things I noticed from our use of GHA daily over the last few years is problem with egress traffic (from GHA to the outside hosts, that means in github.com even but also nist.gov and anywhere outside the network of the GHA runner) has occassional drops or blocking.

Sometimes, that could be the cause of filtering on the GHA side. Other times, especially with csrc.nist.gov and other DOC hosts, I know they have a centralized hosting system that has network problems or maintenance windows (we used to check links upstream in OSCAL on a schedule; you'd be surprised that link failures en masse happened with that every few days).

Let's re-run the test and see what happens.

aj-stein-gsa
aj-stein-gsa previously approved these changes Feb 14, 2025
@aj-stein-gsa
Copy link
Contributor

@Gabeblis rebase and we can merge this PR in, thank you, and nice work as always.

Rene2mt
Rene2mt previously approved these changes Feb 19, 2025
Copy link
Member

@Rene2mt Rene2mt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs a rebase, but aside from that, this is good to go.

@Gabeblis Gabeblis dismissed stale reviews from Rene2mt and aj-stein-gsa via 4ca3185 February 19, 2025 16:35
@Gabeblis Gabeblis force-pushed the constraints/issue-1156 branch from 85b37fe to 4ca3185 Compare February 19, 2025 16:35
Copy link
Member

@Rene2mt Rene2mt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create constraints for "validation" components
5 participants