Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Describe your changes in detail
i added two new edges to our schema in cue, ALL_AD_ATTACKS and ALL_AZ_ATTACKS.
this change tweaks the logic of the cypher emitter when it is converting SQL AST->cypher string. when emitting for a relationship pattern in
formatRelationshipPattern
, if the provided AST node has the graph.Kind of "ALL_AD_ATTACKS" or "ALL_AZ_ATTACKS", then that graph.Kind is replaced with the full expansion of pathfinding edges defined in cue. the pre built queries now utilize these two edges.for example, when a user provides the query:
match p = ()-[:ALL_AD_ATTACKS]->() return p
it gets translated to the following cypher:
match p = ()-[:Owns|GenericAll|GenericWrite|WriteOwner|WriteDacl|MemberOf|ForceChangePassword|AllExtendedRights|AddMember|HasSession|Contains|GPLink|AllowedToDelegate|TrustedBy|AllowedToAct|AdminTo|CanPSRemote|CanRDP|ExecuteDCOM|HasSIDHistory|AddSelf|DCSync|ReadLAPSPassword|ReadGMSAPassword|DumpSMSAPassword|SQLAdmin|AddAllowedToAct|WriteSPN|AddKeyCredentialLink|SyncLAPSPassword|WriteAccountRestrictions|WriteGPLink|GoldenCert|ADCSESC1|ADCSESC3|ADCSESC4|ADCSESC5|ADCSESC6a|ADCSESC6b|ADCSESC7|ADCSESC9a|ADCSESC9b|ADCSESC10a|ADCSESC10b|ADCSESC13|DCFor|SyncedToEntraUser]->() return p
Motivation and Context
This PR addresses: BED-4907
Why is this change required? What problem does it solve?
we want to have edge type shortcuts for common cypher statements that are currently very laborious to craft.
How Has This Been Tested?
Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.
unit tests have been added to poke different ways that the emitter expands the new edge kinds
Screenshots (optional):
Types of changes
Checklist: