Skip to content

Client Certificate Auth#318

Merged
HowardvanRooijen merged 26 commits intomainfrom
feature/205-client-cert-auth
Jun 13, 2025
Merged

Client Certificate Auth#318
HowardvanRooijen merged 26 commits intomainfrom
feature/205-client-cert-auth

Conversation

@jesshill99
Copy link
Contributor

No description provided.

@jesshill99 jesshill99 marked this pull request as ready for review March 13, 2024 14:03
Copy link
Contributor

@idg10 idg10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably bump the minor version, since this adds new functionality.

We should also add release notes.

jesshill99 and others added 3 commits March 27, 2024 13:16
- Enhanced `pr-autoflow.json` to include new packages and remove wildcards.
- Modified `dependabot.yml` to exclude certain patterns for updates.
- Updated `auto_release.yml` with a new action version for improved retry logic.
- Introduced `build.yml` for a structured build process with concurrency settings.
- Updated `.gitignore` to ignore `.sbom.*` files in `local.settings.json`.
- Enhanced `config.ps1` with comments and examples for the build process.
- Updated `GitVersion.yml` to include `main` as a source branch and changed the next version to `4.0`.
- Changed target framework from `net6.0` to `net8.0` for several projects.
- Updated package references to newer versions for various libraries.
- Refactored initialization of `HashSet` and `List` in several files for modern syntax.
- Replaced NUnit assertions with `Assert.That` for better readability in tests.
- Refactored token provider classes for improved dependency injection handling.
- Extensively modified `packages.lock.json` for updated dependencies.
- Refactored test files for clarity and maintainability, removing obsolete code.
- Bumped `Endjin.RecommendedPractices.GitHub` to version `2.1.18` in both `Corvus.Identity.Abstractions.csproj` and `Corvus.Identity.Certificates.csproj`.
- Changed target frameworks in `Corvus.Identity.Certificates.csproj` to only support `.NET 8.0`.
- Removed obsolete package references and updated `Microsoft.Extensions.DependencyInjection.Abstractions` to a compatible version range.
- Added `Corvus.Identity.Certificates` as a project dependency in `packages.lock.json`.
- Updated `BouncyCastle.Cryptography` from `2.3.0` to `2.6.1` in `Corvus.Identity.Specs.csproj`.
- Removed obsolete SpecFlow code behind files from `Corvus.Identity.Specs.csproj`.
- Modified `LoadJsonConfiguration` method in `ConfigLoading.cs` to return a nullable type.
@github-actions
Copy link

github-actions bot commented Jun 9, 2025

Test Results

109 tests  +31   108 ✅ +31   1s ⏱️ -1s
  1 suites ± 0     1 💤 ± 0 
  1 files   ± 0     0 ❌ ± 0 

Results for commit ad1558a. ± Comparison against base commit 6ebdcc8.

♻️ This comment has been updated with latest results.

<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[8.0.*,)" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These [,) style version specs turned out to be a mistake. I misunderstood what they did back when I introduced them, and I've been gradually removing them since.

At the time I thought these got written into the NuGet package. Turns out they don't: they get resolved at compile time to a specific version, meaning that the build is no longer deterministic. (If a new version comes out, you'll get that, meaning that the resulting NuGet package is different from what would have been built before that new version came out despite no change in source code.)

This form of package spec really only makes sense in applications (and test suites); in a library, it turns out to be no more useful than hard-coding it, with the added feature of making builds non-repeatable.

Changed version specifications for several Microsoft.Extensions packages from a range format (e.g., `[8.0.*, )`) to a wildcard format (e.g., `8.*`). This update was applied across multiple project files and the `packages.lock.json` file to allow for greater flexibility in package versioning.
@@ -1,5 +1,19 @@
# Release notes for Corvus.Identity v3.

## v3.4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realised that we're already post v4 aren't we? The GitVersion.yml has v4 in it. In which case this should be going into a new Corvus.Identity.v4.md file.

Copy link
Contributor

@idg10 idg10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v3 -> v4 release notes aside, this now LGTM

@HowardvanRooijen HowardvanRooijen merged commit e2d65ab into main Jun 13, 2025
5 checks passed
@HowardvanRooijen HowardvanRooijen deleted the feature/205-client-cert-auth branch June 13, 2025 13:16
@github-actions
Copy link

Code Coverage Summary Report - Linux (No TFM)

Summary
Generated on: 06/13/2025 - 13:16:51
Parser: Cobertura
Assemblies: 4
Classes: 50
Files: 50
Line coverage: 91.1% (1214 of 1332)
Covered lines: 1214
Uncovered lines: 118
Coverable lines: 1332
Total lines: 6701
Branch coverage: 69.9% (114 of 163)
Covered branches: 114
Total branches: 163
Method coverage: Feature is only available for sponsors

Coverage

Corvus.Identity.Abstractions - 100%
Name Line Branch
Corvus.Identity.Abstractions 100% ****
Corvus.Identity.ClientAuthentication.AccessTokenDetail 100%
Corvus.Identity.ClientAuthentication.AccessTokenNotIssuedException 100%
Corvus.Identity.ClientAuthentication.AccessTokenRequest 100%
Corvus.Identity.Azure - 83.7%
Name Line Branch
Corvus.Identity.Azure 83.7% 80.3%
Corvus.Identity.ClientAuthentication.Azure.ClientIdentityConfiguration 100%
Corvus.Identity.ClientAuthentication.Azure.ClientIdentityConfigurationValid
ation
100% 95.6%
Corvus.Identity.ClientAuthentication.Azure.Internal.AccessTokenSourceFromDy
namicConfiguration
100% 50%
Corvus.Identity.ClientAuthentication.Azure.Internal.AzureTokenCredentialAcc
essTokenSource
96.5%
Corvus.Identity.ClientAuthentication.Azure.Internal.AzureTokenCredentialSou
rce
78.5% 50%
Corvus.Identity.ClientAuthentication.Azure.Internal.AzureTokenCredentialSou
rceForSpecificConfiguration
94.4% 100%
Corvus.Identity.ClientAuthentication.Azure.Internal.AzureTokenCredentialSou
rceFromConfiguration
92.2% 81.4%
Corvus.Identity.ClientAuthentication.Azure.Internal.KeyVaultSecretCache 0% 0%
Corvus.Identity.ClientAuthentication.Azure.Internal.KeyVaultSecretClientFac
tory
0%
Corvus.Identity.ClientAuthentication.Azure.Internal.ServiceIdentityAccessTo
kenSource
0%
Corvus.Identity.ClientAuthentication.Azure.Internal.ServiceIdentityAzureTok
enCredentialSource
71.4%
Corvus.Identity.ClientAuthentication.Azure.Internal.TestableClientCertifica
teCredential
100%
Corvus.Identity.ClientAuthentication.Azure.Internal.TestableClientSecretCre
dential
100%
Corvus.Identity.ClientAuthentication.Azure.KeyVaultSecretConfiguration 100%
Corvus.Identity.ClientAuthentication.Azure.LegacyAzureServiceTokenProviderC
onnectionString
92.8% 75%
Corvus.Identity.ClientAuthentication.Azure.LegacyAzureServiceTokenProviderO
ptions
0%
Microsoft.Extensions.DependencyInjection.AzureIdentityServiceCollectionExte
nsions
50% 0%
Corvus.Identity.Certificates - 100%
Name Line Branch
Corvus.Identity.Certificates 100% 100%
Corvus.Identity.Certificates.CertificateNotFoundException 100%
Corvus.Identity.Certificates.ClientCertificateConfiguration 100%
Corvus.Identity.Certificates.Internal.CertificateFromConfiguration 100% 100%
Microsoft.Extensions.DependencyInjection.IdentityCertificateServiceCollecti
onExtensions
100%
Corvus.Identity.Specs - 93.2%
Name Line Branch
Corvus.Identity.Specs 93.2% 48.1%
Corvus.Identity.Azure.AzureTokenCredentialAccessTokenSourceFeature 100%
Corvus.Identity.Azure.AzureTokenCredentialAccessTokenSourceSteps 94% 75%
Corvus.Identity.Azure.AzureTokenCredentialAccessTokenSourceSteps.TestTokenC
redential
85.7%
Corvus.Identity.Azure.AzureTokenCredentialAccessTokenSourceSteps.TestTokenC
redentialSourceFromConfig
100%
Corvus.Identity.Azure.ClientIdentityConfigurationValidationFeature 100%
Corvus.Identity.Azure.KeyVaultBindings 97.3% 50%
Corvus.Identity.Azure.KeyVaultBindings.FakeKeyVaultSecretClientFactory 94.7% 50%
Corvus.Identity.Azure.KeyVaultBindings.FakeKeyVaultSecretClientFactory.Fake
SecretClient
90% 50%
Corvus.Identity.Azure.LegacyAuthConnectionStringsFeature 100%
Corvus.Identity.Azure.LegacyAuthConnectionStringsSteps 100% 100%
Corvus.Identity.Azure.TokenCredentialBindings 90.9% 50%
Corvus.Identity.Azure.TokenCredentialSourceFromDynamicConfiguration.TokenCr
edentialSourceFromDynamicConfigurationADAppWithClientCertificateFeature
100%
Corvus.Identity.Azure.TokenCredentialSourceFromDynamicConfiguration.TokenCr
edentialSourceFromDynamicConfigurationADAppWithSecretInKeyVaultFeature
100%
Corvus.Identity.Azure.TokenCredentialSourceFromDynamicConfiguration.TokenCr
edentialSourceFromDynamicConfigurationCacheInvalidationFeature
100%
Corvus.Identity.Azure.TokenCredentialSourceFromDynamicConfiguration.TokenCr
edentialSourceFromDynamicConfigurationSteps
99.1% 91.6%
Corvus.Identity.Azure.TokenCredentialSourceFromDynamicConfiguration.TokenCr
edentialSourceFromDynamicConfigurationSteps.SecretCacheRow
100%
Corvus.Identity.Azure.TokenCredentialSourceFromDynamicConfiguration.TokenCr
edentialSourceFromDynamicConfigurationSteps.TestCache
100%
Corvus.Identity.Azure.TokenCredentialSourceFromDynamicConfiguration.TokenCr
edentialSourceFromDynamicConfigurationSteps.TestConfiguration
100%
Corvus.Identity.Azure.TokenCredentialSourceFromDynamicConfiguration.TokenCr
edentialSourceFromDynamicConfigurationWithSimpleClientIdentityConfiguration
Feature
88.5%
Corvus.Identity.Certificates.ClientCertificateConfigurationSteps 98% 100%
Corvus.Identity.Certificates.ClientCertificateConfigurationSteps.TestConfig
uration
100%
Corvus.Identity.Certificates.ClientCertificateConfigurationStoreLocationFea
ture
100%
Corvus.Identity.ConfigLoading 100%
Idg.AsyncTest.TaskExtensions.AsyncTestTaskExtensions 0% 0%
Idg.AsyncTest.TaskExtensions.AsyncTestTaskExtensions 0% 0%
Reqnroll_GeneratedTests_NUnitAssemblyHooks 100%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants