feat: collect msDS-aADObjectID for users and groups - BED-9245 - #308
feat: collect msDS-aADObjectID for users and groups - BED-9245#308martinsohn wants to merge 1 commit into
Conversation
WalkthroughThe LDAP property model now includes ChangesAAD object ID LDAP support
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
test/unit/LdapPropertyTests.cs (1)
129-129: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd coverage for trimming and blank values.
The group and user fixtures use already trimmed, non-empty values. The assertions verify uppercase output, but they do not exercise
Trim()or theIsNullOrWhiteSpaceomission path inAddAADObjectIDProperty. Add one input with surrounding whitespace and one whitespace-only input. Assert the normalized value in the first case and the absence ofaadobjectidin the second case.Also applies to: 140-142, 326-326, 363-365
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/unit/LdapPropertyTests.cs` at line 129, Add test coverage in the group and user LDAP property fixtures around the existing msds-aadobjectid cases: include a value with surrounding whitespace and assert it is trimmed and normalized, then include a whitespace-only value and assert aadobjectid is omitted. Apply the same coverage to the referenced fixture cases while preserving the existing uppercase assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@test/unit/LdapPropertyTests.cs`:
- Line 129: Add test coverage in the group and user LDAP property fixtures
around the existing msds-aadobjectid cases: include a value with surrounding
whitespace and assert it is trimmed and normalized, then include a
whitespace-only value and assert aadobjectid is omitted. Apply the same coverage
to the referenced fixture cases while preserving the existing uppercase
assertions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b91909b6-7174-4ebb-ab82-07c20d294057
📒 Files selected for processing (4)
src/CommonLib/Enums/LDAPProperties.cssrc/CommonLib/LdapQueries/CommonProperties.cssrc/CommonLib/Processors/LdapPropertyProcessor.cstest/unit/LdapPropertyTests.cs
Description
Collects
msDS-aADObjectIDfor users and groups in Microsoft Entra Domain Services and emits the normalized value asaadobjectid.Motivation and Context
BloodHound uses
aadobjectidto correlate Microsoft Entra ID identities with their synchronized Entra DS counterparts.This PR is part of: BED-9245
How Has This Been Tested?
dotnet test test/unit/CommonLibTest.csproj: 430 of 431 tests passed.ConvertFileTimeToUnixEpoch_ValidTimestamp_ValidUnixEpoch.aadobjectidin the lab collection for 5 users and 7 groups.Screenshots (if appropriate):
N/A
Types of changes
Checklist:
Summary by CodeRabbit