Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename EnrollmentService to EnterpriseCA #75

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CommonLib/Enums/DataType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public static class DataType
public const string RootCAs = "rootcas";
public const string AIACAs = "aiacas";
public const string NTAuthStores = "ntauthstores";
public const string EnrollmentServices = "enrollmentservices";
public const string EnterpriseCAs = "enterprisecas";
public const string CertTemplates = "certtemplates";
}
}
2 changes: 1 addition & 1 deletion src/CommonLib/Enums/DirectoryPaths.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
public class DirectoryPaths
{
public const string EnrollmentServiceLocation = "CN=Enrollment Services,CN=Public Key Services,CN=Services,CN=Configuration";
public const string EnterpriseCALocation = "CN=Enrollment Services,CN=Public Key Services,CN=Services,CN=Configuration";
public const string RootCALocation = "CN=Certification Authorities,CN=Public Key Services,CN=Services,CN=Configuration";
public const string AIACALocation = "CN=AIA,CN=Public Key Services,CN=Services,CN=Configuration";
public const string CertTemplateLocation = "CN=Certificate Templates,CN=Public Key Services,CN=Services,CN=Configuration";
Expand Down
2 changes: 1 addition & 1 deletion src/CommonLib/Enums/Labels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public enum Label
CertAuthority,
RootCA,
AIACA,
EnrollmentService,
EnterpriseCA,
NTAuthStore
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace SharpHoundCommonLib.Enums
{
[Flags]
public enum PKIEnrollmentServiceFlags
public enum PKIEnterpriseCAFlags
{
NO_TEMPLATE_SUPPORT = 0x00000001,
SUPPORTS_NT_AUTHENTICATION = 0x00000002,
Expand Down
2 changes: 1 addition & 1 deletion src/CommonLib/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public static Label GetLabel(this SearchResultEntry entry)
else if (objectClasses.Contains(PKICertificateTemplateClass, StringComparer.InvariantCultureIgnoreCase))
objectType = Label.CertTemplate;
else if (objectClasses.Contains(PKIEnrollmentServiceClass, StringComparer.InvariantCultureIgnoreCase))
objectType = Label.EnrollmentService;
objectType = Label.EnterpriseCA;
else if (objectClasses.Contains(CertificationAutorityClass, StringComparer.InvariantCultureIgnoreCase))
{
if (entry.DistinguishedName.Contains(DirectoryPaths.RootCALocation))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace SharpHoundCommonLib.OutputTypes
{
public class EnrollmentService : OutputBase
public class EnterpriseCA : OutputBase
{
public TypedPrincipal[] EnabledCertTemplates { get; set; }
public string HostingComputer { get; set; }
Expand Down
6 changes: 3 additions & 3 deletions src/CommonLib/Processors/ACLProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ static ACLProcessor()
{Label.Container, "bf967a8b-0de6-11d0-a285-00aa003049e2"},
{Label.RootCA, "3fdfee50-47f4-11d1-a9c3-0000f80367c1"},
{Label.AIACA, "3fdfee50-47f4-11d1-a9c3-0000f80367c1"},
{Label.EnrollmentService, "ee4aa692-3bba-11d2-90cc-00c04fd91ab1"},
{Label.EnterpriseCA, "ee4aa692-3bba-11d2-90cc-00c04fd91ab1"},
{Label.NTAuthStore, "3fdfee50-47f4-11d1-a9c3-0000f80367c1"},
{Label.CertTemplate, "e5209ca2-3bba-11d2-90cc-00c04fd91ab1"}
};
Expand Down Expand Up @@ -444,8 +444,8 @@ public IEnumerable<ACE> ProcessACL(byte[] ntSecurityDescriptor, string objectDom
}
}

// Enrollment service rights
if (objectType == Label.EnrollmentService)
// EnterpriseCA rights
if (objectType == Label.EnterpriseCA)
{
if (aceType is ACEGuids.Enroll)
yield return new ACE
Expand Down
4 changes: 2 additions & 2 deletions src/CommonLib/Processors/LDAPPropertyProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -406,10 +406,10 @@ public static Dictionary<string, object> ReadAIACAProperties(ISearchResultEntry
return props;
}

public static Dictionary<string, object> ReadEnrollmentServiceProperties(ISearchResultEntry entry)
public static Dictionary<string, object> ReadEnterpriseCAProperties(ISearchResultEntry entry)
{
var props = GetCommonProps(entry);
if (entry.GetIntProperty("flags", out var flags)) props.Add("flags", (PKIEnrollmentServiceFlags)flags);
if (entry.GetIntProperty("flags", out var flags)) props.Add("flags", (PKIEnterpriseCAFlags)flags);

return props;
}
Expand Down
2 changes: 1 addition & 1 deletion src/CommonLib/SearchResultEntryWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public ResolvedSearchResult ResolveBloodHoundInfo()
case Label.RootCA:
case Label.AIACA:
case Label.NTAuthStore:
case Label.EnrollmentService:
case Label.EnterpriseCA:
case Label.CertTemplate:
res.DisplayName = $"{GetProperty(LDAPProperties.Name)}@{itemDomain}";
break;
Expand Down
Loading