Skip to content
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 2.1.1
## Fixes
- Addresses an issue where entry parameters are not mapped on inventoried certificates.

# 2.1.0
## Features
- Add a default Contract ID to the certificate store type, allowing for a per-store default with an override provided via the entry parameter. The existing Contract ID entry parameter has been renamed to Contract ID Override and has been made optional. This update is backwards compatible with older versions of the certificate store type.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// Copyright 2026 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using Keyfactor.Orchestrator.Extensions.AkamaiCpsOrchestrator.Models;

namespace akamai_cps_orchestrator.Tests.Builders;

public class AkamaiCertificateInfoBuilder
{
private string _certificate = "";

public AkamaiCertificateInfoBuilder WithCertificate(string certificate)
{
_certificate = certificate;
return this;
}

public CertificateInfo Build()
{
return new CertificateInfo()
{
certificate = _certificate,
};
}
}
76 changes: 76 additions & 0 deletions akamai-cps-orchestrator.Tests/Builders/AkamaiEnrollmentBuilder.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// Copyright 2026 Keyfactor
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

using Keyfactor.Orchestrator.Extensions.AkamaiCpsOrchestrator.Models;

namespace akamai_cps_orchestrator.Tests.Builders;

public class AkamaiEnrollmentBuilder
{
private string _id = "1";
private NetworkConfiguration _networkConfiguration = new ();
private ContactInfo _adminContact = new ();
private ContactInfo _org = new ();
private ContactInfo _techContact = new ();
private EnrollmentCSR _csr = new ();

public AkamaiEnrollmentBuilder WithId(string id)
{
_id = id;
return this;
}

public AkamaiEnrollmentBuilder WithSecureNetwork(string secureNetwork)
{
_networkConfiguration.secureNetwork = secureNetwork;
return this;
}

public AkamaiEnrollmentBuilder WithAdminContact(ContactInfo adminContact)
{
_adminContact = adminContact;
return this;
}

public AkamaiEnrollmentBuilder WithOrgContact(ContactInfo org)
{
_org = org;
return this;
}

public AkamaiEnrollmentBuilder WithTechContact(ContactInfo techContact)
{
_techContact = techContact;
return this;
}

public AkamaiEnrollmentBuilder WithSans(string[] sans)
{
_csr.sans = sans;
return this;
}

public Enrollment Build()
{
return new Enrollment
{
id = _id,
networkConfiguration = _networkConfiguration,
adminContact = _adminContact,
org = _org,
techContact = _techContact,
csr = _csr,
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

using Keyfactor.Orchestrator.Extensions.AkamaiCpsOrchestrator.Models;

namespace akamai_cps_orchestrator.Tests.Builders;

public class ReenrollmentJobPropertiesBuilder
Expand All @@ -21,42 +23,42 @@ public class ReenrollmentJobPropertiesBuilder
["subjectText"] = "CN=test.example.com,O=TestOrg,OU=TestOU,L=TestCity,ST=TestState,C=US",
["keyType"] = "RSA",
["ContractId"] = "contract-123",
["Sans"] = "test.example.com&www.test.example.com",
[Constants.EntryParameters.Sans] = "test.example.com&www.test.example.com",
// admin contact
["admin-addressLineOne"] = "123 Main St",
["admin-addressLineTwo"] = null,
["admin-city"] = "TestCity",
["admin-country"] = "US",
["admin-email"] = "admin@test.com",
["admin-firstName"] = "Admin",
["admin-lastName"] = "User",
["admin-organizationName"] = "TestOrg",
["admin-phone"] = "555-0100",
["admin-postalCode"] = "12345",
["admin-region"] = "TestState",
["admin-title"] = "Admin",
[Constants.EntryParameters.Admin.AddressLineOne] = "123 Main St",
[Constants.EntryParameters.Admin.AddressLineTwo] = null,
[Constants.EntryParameters.Admin.City] = "TestCity",
[Constants.EntryParameters.Admin.Country] = "US",
[Constants.EntryParameters.Admin.Email] = "admin@test.com",
[Constants.EntryParameters.Admin.FirstName] = "Admin",
[Constants.EntryParameters.Admin.LastName] = "User",
[Constants.EntryParameters.Admin.OrganizationName] = "TestOrg",
[Constants.EntryParameters.Admin.Phone] = "555-0100",
[Constants.EntryParameters.Admin.PostalCode] = "12345",
[Constants.EntryParameters.Admin.Region] = "TestState",
[Constants.EntryParameters.Admin.Title] = "Admin",
// org contact
["org-addressLineOne"] = "123 Main St",
["org-addressLineTwo"] = null,
["org-city"] = "TestCity",
["org-country"] = "US",
["org-organizationName"] = "TestOrg",
["org-phone"] = "555-0100",
["org-postalCode"] = "12345",
["org-region"] = "TestState",
[Constants.EntryParameters.Org.AddressLineOne] = "123 Main St",
[Constants.EntryParameters.Org.AddressLineTwo] = null,
[Constants.EntryParameters.Org.City] = "TestCity",
[Constants.EntryParameters.Org.Country] = "US",
[Constants.EntryParameters.Org.OrganizationName] = "TestOrg",
[Constants.EntryParameters.Org.Phone] = "555-0100",
[Constants.EntryParameters.Org.PostalCode] = "12345",
[Constants.EntryParameters.Org.Region] = "TestState",
// tech contact
["tech-addressLineOne"] = "123 Main St",
["tech-addressLineTwo"] = null,
["tech-city"] = "TestCity",
["tech-country"] = "US",
["tech-email"] = "tech@test.com",
["tech-firstName"] = "Tech",
["tech-lastName"] = "User",
["tech-organizationName"] = "TestOrg",
["tech-phone"] = "555-0100",
["tech-postalCode"] = "12345",
["tech-region"] = "TestState",
["tech-title"] = "Tech",
[Constants.EntryParameters.Tech.AddressLineOne] = "123 Main St",
[Constants.EntryParameters.Tech.AddressLineTwo] = null,
[Constants.EntryParameters.Tech.City] = "TestCity",
[Constants.EntryParameters.Tech.Country] = "US",
[Constants.EntryParameters.Tech.Email] = "tech@test.com",
[Constants.EntryParameters.Tech.FirstName] = "Tech",
[Constants.EntryParameters.Tech.LastName] = "User",
[Constants.EntryParameters.Tech.OrganizationName] = "TestOrg",
[Constants.EntryParameters.Tech.Phone] = "555-0100",
[Constants.EntryParameters.Tech.PostalCode] = "12345",
[Constants.EntryParameters.Tech.Region] = "TestState",
[Constants.EntryParameters.Tech.Title] = "Tech",
};

public ReenrollmentJobPropertiesBuilder WithKeyType(string? keyType)
Expand All @@ -69,13 +71,13 @@ public ReenrollmentJobPropertiesBuilder WithKeyType(string? keyType)
// even with null, adds the key so callers can distinguish "absent" from "present but null".
public ReenrollmentJobPropertiesBuilder WithDeploymentNetwork(string? deploymentNetwork)
{
_props["deployment-network"] = deploymentNetwork;
_props[Constants.EntryParameters.DeploymentNetwork] = deploymentNetwork;
return this;
}

public ReenrollmentJobPropertiesBuilder WithEnrollmentId(string? enrollmentId)
{
_props["EnrollmentId"] = enrollmentId;
_props[Constants.EntryParameters.EnrollmentId] = enrollmentId;
return this;
}

Expand Down
Loading
Loading