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
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@ v1.0
Remove retry logic around reissue pickups

1.1.1
Change incremental sync to use GetModifiedOrders API call
Remove retry logic around reissue pickups
Change incremental sync to use GetModifiedOrders API call

1.1.2
Add 30 day window from expiration for doing renewals instead of reissues
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,15 @@ This extension uses the contact information of the GCC Domain point of contact f
GlobalSign supports specific combinations of SAN types with certain GlobalSign products. For example, a Private IP can only be used as a SAN with a `PV_INTRA` Certificate.
Please refer to the GlobalSign documentation for more information on SAN usage: [GlobalSign MSSL API User Guide (Section 2.2.5)](https://www.globalsign.com/en/repository/globalsign-mssl-api-user-guide.pdf)

## Enrollment Fields
## Enrollment

### Required Enrollment Fields
The following fields are required for enrollment on all certificate templates:
- **ContactName**: Set Data Type to 'string' when creating the field. The name of the contact person for the certificate. This is required by the GlobalSign API.

### Renewal vs Reissue
Currently, the gateway determines whether to do a renew or reissue based on the expiration date of the certificate in question. If it is within 30 days of expiration, the gateway will do a renew; otherwise, it will do a reissue.

### PV_INTRA Specific Enrollment Fields
The following fields are available for use in the enrollment of `PV_INTRA` Certificates:
- **PrivateDomain**: Set Data Type to 'string' when creating the field. Set to `true` if enrolling a certificate for a private domain (e.g., `.local`, `.lab`, etc.).
Expand Down
5 changes: 4 additions & 1 deletion docsource/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ GlobalSign supports specific combinations of SAN types with certain GlobalSign p
Please refer to the GlobalSign documentation for more information on SAN usage: [GlobalSign MSSL API User Guide (Section 2.2.5)](https://www.globalsign.com/en/repository/globalsign-mssl-api-user-guide.pdf)


## Enrollment Fields
## Enrollment

### Required Enrollment Fields
The following fields are required for enrollment on all certificate templates:
- **ContactName**: Set Data Type to 'string' when creating the field. The name of the contact person for the certificate. This is required by the GlobalSign API.

### Renewal vs Reissue
Currently, the gateway determines whether to do a renew or reissue based on the expiration date of the certificate in question. If it is within 30 days of expiration, the gateway will do a renew; otherwise, it will do a reissue.

### PV_INTRA Specific Enrollment Fields
The following fields are available for use in the enrollment of `PV_INTRA` Certificates:
- **PrivateDomain**: Set Data Type to 'string' when creating the field. Set to `true` if enrolling a certificate for a private domain (e.g., `.local`, `.lab`, etc.).
Expand Down
2 changes: 1 addition & 1 deletion globalsign-mssl-caplugin/GlobalSignCAPlugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class GlobalSignCAPlugin : IAnyCAPlugin
{
private ICertificateDataReader? _certificateDataReader;
private ILogger Logger;

Check warning on line 24 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Non-nullable field 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

Check warning on line 24 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Non-nullable field 'Logger' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.

private GlobalSignCAConfig Config { get; set; } = new();
private bool _enabled = false;
Expand Down Expand Up @@ -100,7 +100,7 @@
Config.SyncIntervalDays);

bool productFilter = false;
List<string> products = null;

Check warning on line 103 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Converting null literal or possible null value to non-nullable type.

Check warning on line 103 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Converting null literal or possible null value to non-nullable type.
if (!string.IsNullOrEmpty(Config.SyncProducts))
{
products = Config.SyncProducts.Split(',').ToList();
Expand All @@ -113,7 +113,7 @@
if (productFilter)
{
bool prodMatch = false;
if (c.OrderInfo?.ProductCode != null && products.Contains(c.OrderInfo.ProductCode.ToUpper()))

Check warning on line 116 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Dereference of a possibly null reference.

Check warning on line 116 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Dereference of a possibly null reference.
{
prodMatch = true;
}
Expand Down Expand Up @@ -217,12 +217,12 @@
privateDomain = bool.TryParse(prD, out var parsedD) && parsedD;
if (privateDomain)
{
if (!productInfo.ProductParameters.TryGetValue("RequesterEmail", out requesterEmail) || string.IsNullOrWhiteSpace(requesterEmail))

Check warning on line 220 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Converting null literal or possible null value to non-nullable type.

Check warning on line 220 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Converting null literal or possible null value to non-nullable type.
{
Logger.LogWarning("The 'RequesterEmail' parameter is required when 'PrivateDomain' is true but was not provided or is empty.");
requesterEmail = string.Empty;
}
if (!productInfo.ProductParameters.TryGetValue("RequesterTel", out requesterTel) || string.IsNullOrWhiteSpace(requesterTel))

Check warning on line 225 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Converting null literal or possible null value to non-nullable type.

Check warning on line 225 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Converting null literal or possible null value to non-nullable type.
{
Logger.LogWarning("The 'RequesterTel' parameter is required when 'PrivateDomain' is true but was not provided or is empty.");
requesterTel = string.Empty;
Expand Down Expand Up @@ -334,7 +334,7 @@

}
};
domain.MSSLProfileID = fillProfile.MSSLProfileId;

Check warning on line 337 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Dereference of a possibly null reference.

Check warning on line 337 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Dereference of a possibly null reference.
matchedDomains = new List<GetDomainsDomainDetail> { domain };
}

Expand Down Expand Up @@ -419,7 +419,7 @@
case EnrollmentType.RenewOrReissue:
//Determine whether this is a renewal or a reissue:
var renewal = false;
var order_id = await _certificateDataReader.GetRequestIDBySerialNumber(priorSn);

Check warning on line 422 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Dereference of a possibly null reference.

Check warning on line 422 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Dereference of a possibly null reference.
var expirationDate = _certificateDataReader.GetExpirationDateByRequestId(order_id);
if (expirationDate == null)
{
Expand All @@ -427,7 +427,7 @@
expirationDate = localcert.RevocationDate;
}

if (expirationDate < DateTime.Now) renewal = true;
if (expirationDate.Value.AddDays(-30) < DateTime.Now) renewal = true; // 30 day renewal window

Check warning on line 430 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Nullable value type may be null.

Check warning on line 430 in globalsign-mssl-caplugin/GlobalSignCAPlugin.cs

View workflow job for this annotation

GitHub Actions / call-starter-workflow / call-dotnet-build-and-release-workflow / dotnet-build-and-release

Nullable value type may be null.
if (renewal)
{
Logger.LogDebug(
Expand Down
Loading