emit administers and supervises relationship source fields#406
Merged
Conversation
populate the raw pre-pipeline fields the Entity Store v2 relationship maintainers consume
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the org-data identity integration generators (Okta, Entra ID, Active Directory) to emit relationship source fields used by the Entity Store v2 administers and supervises maintainers, so downstream ingest pipelines can build *.entity.relationships.* for realistic development/test data.
Changes:
- Okta: emits top-level
supervises[]for managers and addsevent.idto user/device docs. - Entra ID: emits
azure_ad.directReports[](expanded Graph-style objects) for managers. - Active Directory: emits
managedObjects/directReports(plus snake_case variants) and mirrors relationship extraction shapes foradministers/supervises, including deterministic Windows device naming for resolvable host FQDNs.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/commands/org_data/integrations/okta_integration.ts |
Adds supervises source array and event.id on user/device discovery docs. |
src/commands/org_data/integrations/entra_id_integration.ts |
Adds azure_ad.directReports source data for manager → report relationships. |
src/commands/org_data/integrations/active_directory_integration.ts |
Emits AD relationship source fields and generates resolvable administers/supervises relationship shapes. |
Comment on lines
133
to
137
| mobilePhone: mobilePhone, | ||
| businessPhones: [businessPhone], | ||
| accountEnabled: true, | ||
| ...(directReports.length > 0 && { directReports }), | ||
| }, |
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.
Summary
Updates the
org-datacommand's identity integrations to emit the raw source fields that the Entity Store v2 relationship maintainers (administersandsupervises) consume. Each generator writes the pre-pipeline shape; the integration ingest pipelines then build*.entity.relationships.*.Active Directory (
active_directory_integration.ts) — now populates both relationships:administers(user → host and user -> user): managers reference their direct reports' Windows computer DNs viamanagedObjects/managed_objects. Host targets use the FQDNhost.name(cn.toLowerCase() + "." + domain) so they resolve to the device entity'shost:<FQDN>EUID.supervises(user → user): direct report user DNs viadirectReports/direct_reports.managerId === employee.oktaUserIdkey (consistent across all three integrations).administersfor the ~15% of machines that manage other computers.Okta (
okta_integration.ts) — emits the raw top-levelsupervises[]array of{ user_id, email, username }for managers. Also addsevent.idto user/device docs so they're extracted by the entity store.Entra ID (
entra_id_integration.ts) — emits rawazure_ad.directReports[]as expanded Graph objects{ id, displayName, userPrincipalName, mail }for managers.Why
The
administers([#272943]) andsupervises([#266369], research [#274248]) Entity Store maintainers need realistic source data to develop and test against. These generators feed the integration ingest pipelines, which build the relationship fields andraw_identifiersthe maintainers resolve to canonical EUIDs.Relationship resolvability
supervises(user→user)user.email,user.id(Okta id),user.name(login)supervises(user→user)user.email(mail),user.id(GUID),user.name(UPN)administers(user→host)id(DN) +name(FQDN)host:<FQDN>EUIDsupervises(user→user)id(DN),name(CN)Maintainer resolution priority:
user.email→user.id→user.name.Test plan
yarn start org-data --integrations okta— verifysupervises[]on user docs andevent.idpresentyarn start org-data --integrations entra_id— verifyazure_ad.directReports[]on user docsyarn start org-data --integrations active_directory— verifymanagedObjects/directReports(+ snake_case) and FQDN host namesuser.entity.relationships.{supervises,administers}and that the maintainers resolve Okta/Entra targets to EUIDsNotes / follow-ups
supervisesremains unresolvable until the Beats AD input resolves DNs → mail/sAMAccountName/objectSID; do not rely on it yet.directReportsexpand caps at 20 reports per manager (accepted edge case).