Skip to content

Commit fba58ac

Browse files
Removed Template Sync Logic
1 parent a742e03 commit fba58ac

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

cscglobal-caplugin/CSCGlobalCAPlugin.cs

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,6 @@ public CSCGlobalCAPlugin()
3535

3636
private ICscGlobalClient CscGlobalClient { get; set; }
3737

38-
public bool EnableTemplateSync { get; set; }
39-
4038
public int SyncFilterDays { get; set; }
4139

4240
public int RenewalWindowDays { get; set; }
@@ -77,22 +75,6 @@ public void Initialize(IAnyCAPluginConfigProvider configProvider, ICertificateDa
7775
Logger.LogTrace("CAConnectionData keys: {Keys}", string.Join(", ", configProvider.CAConnectionData.Keys));
7876
});
7977

80-
flow.Step("ReadTemplateSync", () =>
81-
{
82-
if (configProvider.CAConnectionData.ContainsKey("TemplateSync"))
83-
{
84-
var templateSync = configProvider.CAConnectionData["TemplateSync"]?.ToString();
85-
Logger.LogTrace("TemplateSync raw value: '{Value}'", templateSync ?? "(null)");
86-
if (!string.IsNullOrEmpty(templateSync) && templateSync.ToUpper() == "ON")
87-
EnableTemplateSync = true;
88-
}
89-
else
90-
{
91-
Logger.LogTrace("TemplateSync key not found in CAConnectionData, defaulting to disabled.");
92-
}
93-
Logger.LogTrace("EnableTemplateSync = {Value}", EnableTemplateSync);
94-
}, $"EnableTemplateSync={EnableTemplateSync}");
95-
9678
flow.Step("ReadSyncFilterDays", () =>
9779
{
9880
if (configProvider.CAConnectionData.ContainsKey(Constants.SyncFilterDays))
@@ -337,9 +319,7 @@ private async Task SyncCertificates(BlockingCollection<AnyCAPluginCertificate> b
337319
if (certStatus == Convert.ToInt32(EndEntityStatus.GENERATED) ||
338320
certStatus == Convert.ToInt32(EndEntityStatus.REVOKED))
339321
{
340-
var productId = "CscGlobal";
341-
if (EnableTemplateSync)
342-
productId = currentResponseItem.CertificateType ?? "CscGlobal";
322+
var productId = currentResponseItem.CertificateType ?? "CscGlobal";
343323

344324
Logger.LogTrace("SyncCertificates: UUID={Uuid} qualifies for sync. ProductId='{ProductId}'", currentResponseItem.Uuid, productId);
345325

@@ -947,13 +927,6 @@ public Dictionary<string, PropertyConfigInfo> GetCAConnectorAnnotations()
947927
DefaultValue = "100",
948928
Type = "String"
949929
},
950-
[Constants.TemplateSync] = new()
951-
{
952-
Comments = "Enable template sync.",
953-
Hidden = false,
954-
DefaultValue = "false",
955-
Type = "Bool"
956-
},
957930
[Constants.SyncFilterDays] = new()
958931
{
959932
Comments = "Number of days from today to filter certificates by expiration date during incremental sync.",

cscglobal-caplugin/Constants.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ public class Constants
1313
public static string CscGlobalApiKey = "ApiKey";
1414
public static string BearerToken = "BearerToken";
1515
public static string DefaultPageSize = "DefaultPageSize";
16-
public static string TemplateSync = "TemplateSync";
1716
public static string SyncFilterDays = "SyncFilterDays";
1817
public static string RenewalWindowDays = "RenewalWindowDays";
1918
}

0 commit comments

Comments
 (0)