Skip to content

Commit

Permalink
BED-3868: Build contains edges from DNs (ADCS)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasBK committed Nov 9, 2023
1 parent fe6c8a8 commit f694291
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Producers/BaseProducer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ protected LDAPData CreateConfigNCData()
{
if ((methods & ResolvedCollectionMethod.Container) != 0)
{
query = query.AddContainers();
query = query.AddContainers().AddCertificateTemplates().AddCertificateAuthorities().AddEnterpriseCertificationAuthorities();
props.AddRange(CommonProperties.ContainerProps);
}

Expand Down
26 changes: 26 additions & 0 deletions src/Runtime/ObjectProcessors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,11 @@ private async Task<RootCA> ProcessRootCA(ISearchResultEntry entry, ResolvedSearc
ret.Properties.Merge(props);
}

if ((_methods & ResolvedCollectionMethod.Container) != 0)
{
ret.ContainedBy = _containerProcessor.GetContainingObject(entry.DistinguishedName);
}

return ret;
}

Expand Down Expand Up @@ -593,6 +598,11 @@ private async Task<AIACA> ProcessAIACA(ISearchResultEntry entry, ResolvedSearchR
ret.Properties.Merge(props);
}

if ((_methods & ResolvedCollectionMethod.Container) != 0)
{
ret.ContainedBy = _containerProcessor.GetContainingObject(entry.DistinguishedName);
}

return ret;
}

Expand Down Expand Up @@ -623,6 +633,11 @@ private async Task<EnterpriseCA> ProcessEnterpriseCA(ISearchResultEntry entry, R
ret.EnabledCertTemplates = _certAbuseProcessor.ProcessCertTemplates(entry.GetArrayProperty(LDAPProperties.CertificateTemplates), resolvedSearchResult.Domain).ToArray();
}

if ((_methods & ResolvedCollectionMethod.Container) != 0)
{
ret.ContainedBy = _containerProcessor.GetContainingObject(entry.DistinguishedName);
}

// Collect properties from CA server registry
bool cASecurityCollected = false;
bool enrollmentAgentRestrictionsCollected = false;
Expand Down Expand Up @@ -688,6 +703,11 @@ private async Task<NTAuthStore> ProcessNTAuthStore(ISearchResultEntry entry, Res
ret.Properties.Merge(props);
}

if ((_methods & ResolvedCollectionMethod.Container) != 0)
{
ret.ContainedBy = _containerProcessor.GetContainingObject(entry.DistinguishedName);
}

return ret;
}

Expand All @@ -714,6 +734,12 @@ private async Task<CertTemplate> ProcessCertTemplate(ISearchResultEntry entry, R
var certTemplatesProps = LDAPPropertyProcessor.ReadCertTemplateProperties(entry);
ret.Properties.Merge(certTemplatesProps);
}

if ((_methods & ResolvedCollectionMethod.Container) != 0)
{
ret.ContainedBy = _containerProcessor.GetContainingObject(entry.DistinguishedName);
}

return ret;
}
}
Expand Down

0 comments on commit f694291

Please sign in to comment.