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 component-has-authentication-method Constraint #927

Merged
merged 9 commits into from
Nov 27, 2024

Conversation

Gabeblis
Copy link
Contributor

@Gabeblis Gabeblis commented Nov 22, 2024

Committer Notes

Purpose

This PR introduces a new constraint called component-has-authentication-method, which ensures that appropriate components dealing with leveraged systems, interconnections, and authorized services include the authentication-method property with a cardinality of 1 or greater.

Changes

Added Constraint:

  • component-has-authentication-method: Validates that the authentication-method prop is present (cardinality >= 1) in components meeting any of the following criteria:
    • A system component with a leveraged-authorization-uuid property, representing a leveraged system.
    • A service component with an external implementation point and without a leveraged-authorization-uuid property, indicating a non-authorized service of a leveraged system or a service provided by an external system.
    • An interconnection component.
    • A service component with an internal implementation point and a direction property, indicating external connectivity.
    • A software component with an asset type of cli and a direction property indicating boundary communication.

Test Data

  • Invalid Test Data File: Demonstrates cases where components meeting the above criteria are missing the authentication-method property.

  • Valid Test Data File: Demonstrates successful cases where all relevant components include the authentication-method property.

Added YAML Files

  • 2 YAML Files: Included pass and fail YAML files

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 force-pushed the constraints/issue-924 branch from b829bc6 to 7ac54e5 Compare November 22, 2024 15:59
wandmagic
wandmagic previously approved these changes Nov 22, 2024
@Gabeblis
Copy link
Contributor Author

@wandmagic Any idea why the tests are failing here when they weren't yesterday?

@wandmagic
Copy link
Collaborator

@wandmagic Any idea why the tests are failing here when they weren't yesterday?

were they passing yesterday? it looks like a red X

@wandmagic
Copy link
Collaborator

   AssertionError: Positive test failed: Test failed with the following errors:
   component-has-authentication-method: invalid results received. 50% passing. Expected: pass_count "all", fail_count "none". Actual: 1 pass, 1 fail.

@Gabeblis
Copy link
Contributor Author

   AssertionError: Positive test failed: Test failed with the following errors:
   component-has-authentication-method: invalid results received. 50% passing. Expected: pass_count "all", fail_count "none". Actual: 1 pass, 1 fail.

Yeah they all pass locally, and they passed yesterday. Nothing changed. Not sure why it says 50% now

@wandmagic
Copy link
Collaborator

   AssertionError: Positive test failed: Test failed with the following errors:
   component-has-authentication-method: invalid results received. 50% passing. Expected: pass_count "all", fail_count "none". Actual: 1 pass, 1 fail.

Yeah they all pass locally, and they passed yesterday. Nothing changed. Not sure why it says 50% now

that is odd, passes locally for me too!
i'll dig deeper into this it seems like an execution error

wandmagic
wandmagic previously approved these changes Nov 22, 2024
wandmagic
wandmagic previously approved these changes Nov 25, 2024
Copy link

@kyhu65867 kyhu65867 left a comment

Choose a reason for hiding this comment

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

Looks good :)

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.

Looks good

@Gabeblis Gabeblis merged commit 80eb99c into GSA:develop Nov 27, 2024
6 checks passed
@Gabeblis Gabeblis deleted the constraints/issue-924 branch November 27, 2024 15:36
@Gabeblis Gabeblis mentioned this pull request Nov 29, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants