-
Notifications
You must be signed in to change notification settings - Fork 119
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
BED-4907: Edge type shortcuts #895
Open
brandonshearin
wants to merge
6
commits into
main
Choose a base branch
from
BED-4907
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I realize this PR is still a draft but I have a concern with the proposed solution here. If, for example, a user ran the following cypher via the UI what is the expected result?
And what happens if they wanted to query this relationship later?
|
brandonshearin
changed the title
draft: BED-4907: Edge type shortcuts
BED-4907: Edge type shortcuts
Oct 4, 2024
brandonshearin
changed the title
BED-4907: Edge type shortcuts
wip: BED-4907: Edge type shortcuts
Oct 4, 2024
brandonshearin
changed the title
wip: BED-4907: Edge type shortcuts
BED-4907: Edge type shortcuts
Oct 4, 2024
brandonshearin
added
work in progress
This pull request is a work in progress and should not be merged
enhancement
New feature or request
api
A pull request containing changes affecting the API code.
and removed
work in progress
This pull request is a work in progress and should not be merged
labels
Oct 7, 2024
elikmiller
requested changes
Oct 8, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see my previous comments!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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: