feat: improve credential domain reconciliation for low-trust sources#325
Merged
Merged
Conversation
**Added:** - Introduced `reconcile_low_trust_credential_domain` to correct credential domains when the source is low-trust and a more accurate domain is found in user state - Added helper function `is_low_trust_realm_inferred_credential_source` to identify sources with unreliable domain information - Added unit tests for `reconcile_low_trust_credential_domain` covering correct, unchanged, and ambiguous cases **Changed:** - Updated credential processing in discovery polling to attempt domain reconciliation for low-trust sources, logging when a correction is made - Enhanced credential parsing to reconcile low-trust domains using both state and newly parsed users, with warning log on correction
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #325 +/- ##
=======================================
Coverage 78.85% 78.85%
=======================================
Files 438 438
Lines 125532 125609 +77
=======================================
+ Hits 98983 99049 +66
- Misses 26549 26560 +11
🚀 New features to boost your workflow:
|
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.
Key Changes:
Added:
reconcile_low_trust_credential_domainidentifies and corrects domains forcredentials extracted from sources such as
sysvol_script,description_field,and similar, using directory-attested user records
is_low_trust_realm_inferred_credential_sourceto identifysuch sources
high-trust cases
Changed:
attempts to correct domains for credentials from low-trust sources by
consulting user records before further processing
detailed context (username, source, old and new domain)