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

ContainedBy Property Bug #10

Closed
Tw1sm opened this issue Oct 22, 2024 · 0 comments · Fixed by #11
Closed

ContainedBy Property Bug #10

Tw1sm opened this issue Oct 22, 2024 · 0 comments · Fixed by #11
Assignees
Labels
bug Something isn't working

Comments

@Tw1sm
Copy link
Collaborator

Tw1sm commented Oct 22, 2024

If an object's container is not resolved by adds.py processing, the resulting JSON file will have objects with the ContainedBy attribute set to null or []. At a minimum, null is causing users_*.json files to fail ingestion in BHCE 6.0.0 with this error

bloodhound-1  | {"level":"error","time":"2024-10-21T20:11:10.277709133Z","message":"Error decoding ein.User object: json: cannot unmarshal array into Go struct field User.ContainedBy of type ein.TypedPrincipal"}

This error is also seen with Groups, but I'm not seeing it cause the groups_*.json file to fail ingestion.

Fix

The ContainedBy attribute should be a dict, instead of a list. I was able to resolve the error by manually setting the attribute in JSON files to "ContainedBy": {}

@Tw1sm Tw1sm added the bug Something isn't working label Oct 22, 2024
@Tw1sm Tw1sm self-assigned this Oct 22, 2024
@Tw1sm Tw1sm linked a pull request Oct 22, 2024 that will close this issue
@Tw1sm Tw1sm closed this as completed in #11 Oct 22, 2024
@Tw1sm Tw1sm closed this as completed in c837f2a Oct 22, 2024
Tw1sm added a commit that referenced this issue Dec 17, 2024
* set containedby to empty dict by default for output JSON

* add table for blog links

* version & changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant