Skip to content

feat: improve credential domain reconciliation for low-trust sources#325

Merged
l50 merged 1 commit into
mainfrom
fix/low-trust-credential-domain-reconciliation
May 17, 2026
Merged

feat: improve credential domain reconciliation for low-trust sources#325
l50 merged 1 commit into
mainfrom
fix/low-trust-credential-domain-reconciliation

Conversation

@l50
Copy link
Copy Markdown
Contributor

@l50 l50 commented May 16, 2026

Key Changes:

  • Added domain correction for credentials from low-trust, realm-inferred sources
  • Updated discovery and parsing logic to reassign domains based on user records
  • Introduced comprehensive tests for new reconciliation behavior

Added:

  • Domain reconciliation for low-trust credential sources - New function
    reconcile_low_trust_credential_domain identifies and corrects domains for
    credentials extracted from sources such as sysvol_script, description_field,
    and similar, using directory-attested user records
  • Helper function is_low_trust_realm_inferred_credential_source to identify
    such sources
  • Unit tests for various reconciliation scenarios, including ambiguous and
    high-trust cases

Changed:

  • Credential processing in both real-time polling and batch extraction now
    attempts to correct domains for credentials from low-trust sources by
    consulting user records before further processing
  • Logging improved to warn when a credential's domain is reassigned, with
    detailed context (username, source, old and new domain)

**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
@l50 l50 enabled auto-merge May 16, 2026 21:00
@codecov
Copy link
Copy Markdown

codecov Bot commented May 16, 2026

Codecov Report

❌ Patch coverage is 83.54430% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.85%. Comparing base (3374f01) to head (987d968).

Files with missing lines Patch % Lines
...rchestrator/result_processing/discovery_polling.rs 0.00% 7 Missing ⚠️
ares-cli/src/orchestrator/result_processing/mod.rs 77.77% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #325   +/-   ##
=======================================
  Coverage   78.85%   78.85%           
=======================================
  Files         438      438           
  Lines      125532   125609   +77     
=======================================
+ Hits        98983    99049   +66     
- Misses      26549    26560   +11     
Files with missing lines Coverage Δ
...es-cli/src/orchestrator/result_processing/tests.rs 100.00% <100.00%> (ø)
ares-cli/src/orchestrator/result_processing/mod.rs 27.08% <77.77%> (+1.37%) ⬆️
...rchestrator/result_processing/discovery_polling.rs 37.66% <0.00%> (-0.84%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@l50 l50 disabled auto-merge May 17, 2026 02:55
@l50 l50 merged commit 9b262a7 into main May 17, 2026
12 checks passed
@l50 l50 deleted the fix/low-trust-credential-domain-reconciliation branch May 17, 2026 02:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant