Use lowercase property names per OpenGraph convention (#27)#28
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Linked Issue
Closes #27
Note
Convention/interop conformance change, included at the maintainer's explicit request. Property names are case-sensitive in BloodHound; aligning to the schema's lowercase convention makes Cypher queries and the UI reference standard keys.
Root Cause
Node properties were written in PascalCase (
Identifier,KeyType,Modulus, …), inconsistent with the BloodHound OpenGraph convention of lowercase property names and with the collector's own already-correct reservedname/displaynameproperties.Fix Description
Rename every emitted node property to lowercase, using snake_case for multi-word keys:
identifier,version,source,usage,creation_time,key_hash,key_type,cb_key,count,q,seed,modulus,private_exponent,public,generator,bit_length,cb_modulus,cb_prime1,cb_prime2,cb_public_exp,prime1,prime2,public_exponent,key_size,d,x,y. TheGetPropertylookup used to derive the key-material node label was updated in lockstep (KeyType→key_type), so the name fallback still resolves. Only property keys changed; all property values are unchanged.How Verified
Static: a sweep of all
SetProperty/GetPropertykeys shows every key is now lowercase, and the singleGetProperty("key_type", …)matches its setter so the key-materialname/displaynamederivation is preserved. The key-type value strings ("RSA Public Key", etc.) are confirmed unchanged.go build ./...,go vet ./...,go test ./..., andgofmt -l parse.go(no output) all pass.Test Coverage
Existing:
go test ./...(TestCrossCollectorOutputFile) passes. The property-key rename is a literal substitution inParseResults, whose full execution requires a live LDAP source; no behavior other than key casing changed.Scope of Change
parse.goNotes
The README Cypher examples reference node/edge kinds only, not these properties, so no documentation change was required.