Skip to content

Commit ff58681

Browse files
committed
feat: return human-readable product names from GetProductIds
GetProductIds now returns ProductName (e.g. "DV SSL") instead of the numeric ProductCode so the Command UI dropdown shows meaningful labels. EnrollmentParams.ProductCode no longer falls back to the gateway ProductID since names cannot be passed to the CERTInext API — operators must set ProductCode explicitly on every template. Manifest product_ids updated to match the descriptive naming convention.
1 parent 848da99 commit ff58681

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

CERTInext/CERTInextCAPlugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public List<string> GetProductIds()
144144
var profiles = _client.GetProfilesAsync().GetAwaiter().GetResult();
145145
var ids = profiles
146146
.Where(p => p.Active)
147-
.Select(p => p.Id)
147+
.Select(p => p.Name ?? p.Id)
148148
.ToList();
149149

150150
_logger.LogInformation("Retrieved {Count} active certificate profiles from CERTInext.", ids.Count);

CERTInext/Models/EnrollmentParams.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,14 @@ public EnrollmentParams(EnrollmentProductInfo productInfo)
2929
public string ProductId { get; }
3030

3131
/// <summary>
32-
/// The CERTInext product code configured on the template.
33-
/// Falls back to ProfileId for backward compat, then to the ProductID from the gateway.
32+
/// The CERTInext numeric product code configured on the template.
33+
/// Falls back to the deprecated ProfileId parameter for backward compat.
34+
/// Must be a numeric string (e.g. "838") — the gateway ProductID is a human-readable
35+
/// name and cannot be passed to the API.
3436
/// </summary>
3537
public string ProductCode =>
3638
GetString(Constants.EnrollmentParam.ProductCode,
37-
GetString(Constants.EnrollmentParam.ProfileId, ProductId));
39+
GetString(Constants.EnrollmentParam.ProfileId, string.Empty));
3840

3941
/// <summary>Alias for ProductCode — kept for backward compat.</summary>
4042
public string ProfileId => ProductCode;

integration-manifest.json

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,15 @@
1212
"release_project": "CERTInext/CERTInext.csproj",
1313
"about": {
1414
"carest": {
15-
"product_ids": [],
15+
"product_ids": [
16+
"DV SSL",
17+
"DV SSL Wildcard",
18+
"DV SSL Multi-Domain (UCC)",
19+
"OV SSL",
20+
"OV SSL Wildcard",
21+
"OV SSL Multi-Domain (UCC)",
22+
"EV SSL"
23+
],
1624
"ca_plugin_config": [
1725
{
1826
"name": "ApiUrl",

0 commit comments

Comments
 (0)