From 017a23b470c8bf54f64a8e5d99acebc38668c47b Mon Sep 17 00:00:00 2001 From: Jonas Knudsen Date: Tue, 7 Nov 2023 07:12:08 -0800 Subject: [PATCH] fix: eca processing without ca registry --- src/Runtime/ObjectProcessors.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Runtime/ObjectProcessors.cs b/src/Runtime/ObjectProcessors.cs index 7da72ef..2eee51a 100644 --- a/src/Runtime/ObjectProcessors.cs +++ b/src/Runtime/ObjectProcessors.cs @@ -611,6 +611,9 @@ private async Task ProcessEnterpriseCA(ISearchResultEntry entry, R } // Collect properties from CA server registry + bool cASecurityCollected = false; + bool enrollmentAgentRestrictionsCollected = false; + bool isUserSpecifiesSanEnabledCollected = false; var caName = entry.GetProperty(LDAPProperties.Name); var dnsHostName = entry.GetProperty(LDAPProperties.DNSHostName); if ((_methods & ResolvedCollectionMethod.CARegistry) != 0 && caName != null && dnsHostName != null) @@ -627,12 +630,15 @@ private async Task ProcessEnterpriseCA(ISearchResultEntry entry, R CASecurity = await _certAbuseProcessor.ProcessRegistryEnrollmentPermissions(caName, resolvedSearchResult.Domain, dnsHostName, ret.HostingComputer) }; + cASecurityCollected = cARegistryData.CASecurity.Collected; + enrollmentAgentRestrictionsCollected = cARegistryData.EnrollmentAgentRestrictions.Collected; + isUserSpecifiesSanEnabledCollected = cARegistryData.IsUserSpecifiesSanEnabled.Collected; ret.CARegistryData = cARegistryData; } - ret.Properties.Add("casecuritycollected", ret.CARegistryData.CASecurity.Collected); - ret.Properties.Add("enrollmentagentrestrictionscollected", ret.CARegistryData.EnrollmentAgentRestrictions.Collected); - ret.Properties.Add("isuserspecifiessanenabledcollected", ret.CARegistryData.IsUserSpecifiesSanEnabled.Collected); + ret.Properties.Add("casecuritycollected", cASecurityCollected); + ret.Properties.Add("enrollmentagentrestrictionscollected", enrollmentAgentRestrictionsCollected); + ret.Properties.Add("isuserspecifiessanenabledcollected", isUserSpecifiesSanEnabledCollected); return ret; }