Skip to content

Commit

Permalink
feat: add some missing items for issuance policies (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
rvazarkar authored Mar 26, 2024
1 parent ecfa620 commit 5c9845b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/CommonLib/Enums/DataType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ public static class DataType
public const string NTAuthStores = "ntauthstores";
public const string EnterpriseCAs = "enterprisecas";
public const string CertTemplates = "certtemplates";
public const string IssuancePolicies = "issuancepolicies";
}
}
}
2 changes: 1 addition & 1 deletion src/CommonLib/LDAPQueries/CommonProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public static class CommonProperties
LDAPProperties.PKIEnrollmentFlag, LDAPProperties.DisplayName, LDAPProperties.Name, LDAPProperties.TemplateSchemaVersion, LDAPProperties.CertTemplateOID,
LDAPProperties.PKIOverlappedPeriod, LDAPProperties.PKIExpirationPeriod, LDAPProperties.ExtendedKeyUsage, LDAPProperties.NumSignaturesRequired,
LDAPProperties.CertificateApplicationPolicy, LDAPProperties.IssuancePolicies, LDAPProperties.CrossCertificatePair,
LDAPProperties.ApplicationPolicies, LDAPProperties.PKIPrivateKeyFlag
LDAPProperties.ApplicationPolicies, LDAPProperties.PKIPrivateKeyFlag, LDAPProperties.OIDGroupLink
};
}
}
11 changes: 11 additions & 0 deletions src/CommonLib/LDAPQueries/LDAPFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,17 @@ public LDAPFilter AddEnterpriseCertificationAuthorities(params string[] conditio
return this;
}

/// <summary>
/// Add a filter that will include Issuance Policies
/// </summary>
/// <param name="conditions"></param>
/// <returns></returns>
public LDAPFilter AddIssuancePolicies(params string[] conditions)
{
_filterParts.Add(BuildString("(objectClass=msPKI-Enterprise-Oid)", conditions));
return this;
}

/// <summary>
/// Add a filter that will include schema items
/// </summary>
Expand Down
7 changes: 7 additions & 0 deletions src/CommonLib/OutputTypes/IssuancePolicy.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace SharpHoundCommonLib.OutputTypes
{
public class IssuancePolicy : OutputBase
{
public TypedPrincipal GroupLink { get; set; } = new();
}
}

0 comments on commit 5c9845b

Please sign in to comment.