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
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ on:
required: false
default: false
type: boolean
forcePublicNugetDestination:
description: When true the NuGet Publish destination will always be set to nuget.org. (Normally, force publishing publishes to the private feed on GitHub.)
required: false
default: false
type: boolean
skipCleanup:
description: When true the pipeline clean-up stage will not be run. For example, the cache used between pipeline stages will be retained.
required: false
default: false
type: boolean

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.sha }}
cancel-in-progress: true

permissions:
Expand All @@ -46,9 +51,10 @@ jobs:
id: prepareEnvVarsAndSecrets
with:
environmentVariablesYaml: |
BUILDVAR_NuGetPublishSource: "${{ startsWith(github.ref, 'refs/tags/') && 'https://api.nuget.org/v3/index.json' || format('https://nuget.pkg.github.com/{0}/index.json', github.repository_owner) }}"
ZF_NUGET_PUBLISH_SOURCE: ${{ (startsWith(github.ref, 'refs/tags/') || github.event.inputs.forcePublicNugetDestination == 'true') && 'https://api.nuget.org/v3/index.json' || format('https://nuget.pkg.github.com/{0}/index.json', github.repository_owner) }}
secretsYaml: |
NUGET_API_KEY: "${{ startsWith(github.ref, 'refs/tags/') && secrets.NUGET_APIKEY || secrets.BUILD_PUBLISHER_PAT }}"
secretsEncryptionKey: ${{ secrets.SHARED_WORKFLOW_KEY }}

build:
needs: prepareConfig
Expand All @@ -74,3 +80,4 @@ jobs:
# testPhaseSecrets: ${{ needs.prepareConfig.outputs.RESOLVED_SECRETS }}
# packagePhaseSecrets: ${{ needs.prepareConfig.outputs.RESOLVED_SECRETS }}
publishPhaseSecrets: ${{ needs.prepareConfig.outputs.RESOLVED_SECRETS }}
secretsEncryptionKey: ${{ secrets.SHARED_WORKFLOW_KEY }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -344,4 +344,5 @@ local.settings.json
# Scripted build artifacts
/_codeCoverage
/_packages
*.sbom.*
*.sbom.*
.zf/extensions/
66 changes: 66 additions & 0 deletions .zf/config.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<#
This example demonstrates a software build process using the 'ZeroFailed.Build.DotNet' extension
to provide the features needed when building a .NET solutions.
#>

$zerofailedExtensions = @(
@{
# References the extension from its GitHub repository. If not already installed, use latest version from 'main' will be downloaded.
Name = "ZeroFailed.Build.DotNet"
GitRepository = "https://github.com/zerofailed/ZeroFailed.Build.DotNet"
GitRef = "main"
}
)

# Load the tasks and process
. ZeroFailed.tasks -ZfPath $here/.zf


#
# Build process configuration
#
#
# Build process control options
#
$SkipInit = $false
$SkipVersion = $false
$SkipBuild = $false
$CleanBuild = $Clean
$SkipTest = $false
$SkipTestReport = $false
$SkipAnalysis = $false
$SkipPackage = $false


$SolutionToBuild = (Resolve-Path (Join-Path $here ".\Solutions\Corvus.Identity.sln")).Path
$ProjectsToPublish = @()
$NuSpecFilesToPackage = @()
$NugetPublishSource = property ZF_NUGET_PUBLISH_SOURCE "$here/_local-nuget-feed"
$IncludeAssembliesInCodeCoverage = "Corvus.Identity*"


# Synopsis: Build, Test and Package
task . FullBuild

#
# Build Process Extensibility Points - uncomment and implement as required
#

# task RunFirst {}
# task PreInit {}
# task PostInit {}
# task PreVersion {}
# task PostVersion {}
# task PreBuild {}
# task PostBuild {}
# task PreTest {}
# task PostTest {}
# task PreTestReport {}
# task PostTestReport {}
# task PreAnalysis {}
# task PostAnalysis {}
# task PrePackage {}
# task PostPackage {}
# task PrePublish {}
# task PostPublish {}
# task RunLast {}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.14">
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.18">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions Solutions/Corvus.Identity.Azure/Corvus.Identity.Azure.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@


<ItemGroup>
<PackageReference Include="Azure.Identity" Version="1.13.1" />
<PackageReference Include="Azure.Identity" Version="1.14.0" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" Version="4.7.0" />
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.14">
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.18">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.2" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="[8.0.*,)" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="[8.0.*,)" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ internal static class ClientIdentityConfigurationValidation
{
type = default;

HashSet<ClientIdentitySourceTypes> indicatedSourceTypes = new();
HashSet<ClientIdentitySourceTypes> indicatedSourceTypes = [];

if (configuration is null)
{
Expand Down Expand Up @@ -74,7 +74,7 @@ internal static class ClientIdentityConfigurationValidation
default:
if (configuration.IdentitySourceType.HasValue)
{
string sourceTypes = string.Join(", ", indicatedSourceTypes.Except(new[] { configuration.IdentitySourceType.Value }));
string sourceTypes = string.Join(", ", indicatedSourceTypes.Except([configuration.IdentitySourceType.Value]));
return $"identity type is ambiguous because the IdentitySourceType is {SourceTypeString(configuration.IdentitySourceType)} but the properties set are for {sourceTypes}";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public enum ClientIdentitySourceTypes
/// Visual Studio Code's authentication should be used to determine the identity. (For local
/// development purposes only.)
/// </summary>
[Obsolete("Use AzureCli")]
VisualStudioCode,

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public interface IAzureTokenCredentialSource
/// This method enables the application to obtain updated credentials. It also enables the
/// <see cref="IAzureTokenCredentialSource"/> implementation to know that the credentials
/// in question are no longer valid. Implementations that cache credentials can choose to
/// stop handing out the now-failed cached credentials to any futher calls to
/// stop handing out the now-failed cached credentials to any further calls to
/// <see cref="GetAccessTokenAsync"/>, making those wait until refreshed credentials have
/// become available.
/// </para>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ public async ValueTask<IAzureTokenCredentialSource> CredentialSourceForConfigura
ClientIdentitySourceTypes.AzureIdentityDefaultAzureCredential => new DefaultAzureCredential(),
ClientIdentitySourceTypes.AzureCli => new AzureCliCredential(),
ClientIdentitySourceTypes.VisualStudio => new VisualStudioCredential(),
ClientIdentitySourceTypes.VisualStudioCode => new VisualStudioCodeCredential(),

_ => throw new ArgumentException(
$"Unsupported IdentitySourceType: {identitySourceType}",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<AzureFunctionsVersion>v4</AzureFunctionsVersion>

<IsPackable>false</IsPackable>

<Nullable>enable</Nullable>
</PropertyGroup>

Expand Down Expand Up @@ -36,7 +34,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.14">
<PackageReference Include="Endjin.RecommendedPractices.GitHub" Version="2.1.18">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",

// To use a specific principle as the service identity, do this:
// "AzureServicesAuthConnectionString": "RunAs=App;AppId=<appid>;TenantId=<tenantid>;AppKey=<clientSecret>",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"net8.0": {
"Endjin.RecommendedPractices.GitHub": {
"type": "Direct",
"requested": "[2.1.14, )",
"resolved": "2.1.14",
"contentHash": "87FGP9G88n999p4Xzd0v+V1eigr9RpK08/Ihz7gSvabcss+9+u76IecDokCVHoS5MyR0c6YhVkncKXnKbwYE7g==",
"requested": "[2.1.18, )",
"resolved": "2.1.18",
"contentHash": "5zdIpj3qn+hQKvpkJO77wW74S4w8UKE0l8oDIm6jq70X7O0iNfgD+0FzEKXIYM17JtqnVSVaBd4ZyuDxHqVnLg==",
"dependencies": {
"Endjin.RecommendedPractices": "2.1.14",
"Endjin.RecommendedPractices": "2.1.18",
"Microsoft.SourceLink.GitHub": "1.1.1"
}
},
Expand Down Expand Up @@ -41,9 +41,9 @@
},
"Roslynator.Analyzers": {
"type": "Direct",
"requested": "[4.12.9, )",
"resolved": "4.12.9",
"contentHash": "X6lDpN/D5wuinq37KIx+l3GSUe9No+8bCjGBTI5sEEtxapLztkHg6gzNVhMXpXw8P+/5gFYxTXJ5Pf8O4iNz/w=="
"requested": "[4.13.1, )",
"resolved": "4.13.1",
"contentHash": "KZpLy6ZlCebMk+d/3I5KU2R7AOb4LNJ6tPJqPtvFXmO8bEBHQvCIAvJOnY2tu4C9/aVOROTDYUFADxFqw1gh/g=="
},
"StyleCop.Analyzers": {
"type": "Direct",
Expand All @@ -56,30 +56,23 @@
},
"Azure.Core": {
"type": "Transitive",
"resolved": "1.44.1",
"contentHash": "YyznXLQZCregzHvioip07/BkzjuWNXogJEVz9T5W6TwjNr17ax41YGzYMptlo2G10oLCuVPoyva62y0SIRDixg==",
"resolved": "1.46.1",
"contentHash": "iE5DPOlGsN5kCkF4gN+vasN1RihO0Ypie92oQ5tohQYiokmnrrhLnee+3zcE8n7vB6ZAzhPTfUGAEXX/qHGkYA==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "6.0.0",
"System.ClientModel": "1.1.0",
"System.Diagnostics.DiagnosticSource": "6.0.1",
"System.Memory.Data": "6.0.0",
"System.Numerics.Vectors": "4.5.0",
"System.Text.Encodings.Web": "6.0.0",
"System.Text.Json": "6.0.10",
"System.Threading.Tasks.Extensions": "4.5.4"
"Microsoft.Bcl.AsyncInterfaces": "8.0.0",
"System.ClientModel": "1.4.1",
"System.Memory.Data": "6.0.1"
}
},
"Azure.Identity": {
"type": "Transitive",
"resolved": "1.13.1",
"contentHash": "4eeK9XztjTmvA4WN+qAvlUCSxSv45+LqTMeC8XT2giGGZHKthTMU2IuXcHjAOf5VLH3wE3Bo6EwhIcJxVB8RmQ==",
"resolved": "1.14.0",
"contentHash": "xQ6mpNhifb8W/KG2BclhbJWAupvE3JF8lPEBF8t59Q5sc1yN0Ci+dvS0qXtc6m9auxwYpmc8rhOmK541dcGwmA==",
"dependencies": {
"Azure.Core": "1.44.1",
"Microsoft.Identity.Client": "4.66.1",
"Microsoft.Identity.Client.Extensions.Msal": "4.66.1",
"System.Memory": "4.5.5",
"System.Text.Json": "6.0.10",
"System.Threading.Tasks.Extensions": "4.5.4"
"Azure.Core": "1.46.1",
"Microsoft.Identity.Client": "4.71.1",
"Microsoft.Identity.Client.Extensions.Msal": "4.71.1",
"System.Memory": "4.5.5"
}
},
"Azure.Security.KeyVault.Secrets": {
Expand All @@ -95,8 +88,8 @@
},
"Endjin.RecommendedPractices": {
"type": "Transitive",
"resolved": "2.1.14",
"contentHash": "6I3Gb6CHHzZ6+a6IwzFAw4ffpuSRW25ddMG9cdsfzDZ5FUB9wxlEtLOFWTmQu/IbysOGDFjb+LAAlk2GXTZESg==",
"resolved": "2.1.18",
"contentHash": "AAD5aVVKTdFYsMpdHft4Q4rPdLaBt/IG4K2ozmB0qkotXpIWBhNUDtguBZCkYvTt0o2UXS5fQDP3os86F03lpw==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1"
}
Expand Down Expand Up @@ -379,8 +372,8 @@
},
"Microsoft.Bcl.AsyncInterfaces": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
"resolved": "8.0.0",
"contentHash": "3WA9q9yVqJp222P3x1wYIGDAkpjAku0TMUaaQV22g6L67AI0LdOIrVS7Ht2vJfLHGSPVuqN94vIr15qn+HEkHw=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
Expand Down Expand Up @@ -593,8 +586,8 @@
},
"Microsoft.Extensions.Logging.Abstractions": {
"type": "Transitive",
"resolved": "8.0.2",
"contentHash": "nroMDjS7hNBPtkZqVBbSiQaQjWRDxITI8Y7XnDs97rqG3EbzVTNLZQf7bIeUJcaHOV8bca47s1Uxq94+2oGdxA==",
"resolved": "8.0.3",
"contentHash": "dL0QGToTxggRLMYY4ZYX5AMwBb+byQBd/5dMiZE07Nv73o6I5Are3C7eQTh7K2+A4ct0PVISSr7TZANbiNb2yQ==",
"dependencies": {
"Microsoft.Extensions.DependencyInjection.Abstractions": "8.0.2"
}
Expand Down Expand Up @@ -641,19 +634,19 @@
},
"Microsoft.Identity.Client": {
"type": "Transitive",
"resolved": "4.66.1",
"contentHash": "mE+m3pZ7zSKocSubKXxwZcUrCzLflC86IdLxrVjS8tialy0b1L+aECBqRBC/ykcPlB4y7skg49TaTiA+O2UfDw==",
"resolved": "4.71.1",
"contentHash": "SgvSBcMRvmEEyV10pcvxNVUbwYoShmj/9pxXFVr3AFjE26IUzuwYLtLgt58xkEnT0xJBjfObaXxcol3BMtmEAg==",
"dependencies": {
"Microsoft.IdentityModel.Abstractions": "6.35.0",
"System.Diagnostics.DiagnosticSource": "6.0.1"
}
},
"Microsoft.Identity.Client.Extensions.Msal": {
"type": "Transitive",
"resolved": "4.66.1",
"contentHash": "osgt1J9Rve3LO7wXqpWoFx9UFjl0oeqoUMK/xEru7dvafQ28RgV1A17CoCGCCRSUbgDQ4Arg5FgGK2lQ3lXR4A==",
"resolved": "4.71.1",
"contentHash": "PGOHaoQhKBKnXy1kfW+Gu9/rxStKsqR+UZKeVv4XAsATdzmfj9y9kkUOftIjVFvxP3oh2Sk7v65ylS0K/qYADA==",
"dependencies": {
"Microsoft.Identity.Client": "4.66.1",
"Microsoft.Identity.Client": "4.71.1",
"System.Security.Cryptography.ProtectedData": "4.5.0"
}
},
Expand Down Expand Up @@ -910,11 +903,11 @@
},
"System.ClientModel": {
"type": "Transitive",
"resolved": "1.1.0",
"contentHash": "UocOlCkxLZrG2CKMAAImPcldJTxeesHnHGHwhJ0pNlZEvEXcWKuQvVOER2/NiOkJGRJk978SNdw3j6/7O9H1lg==",
"resolved": "1.4.1",
"contentHash": "MY7eFGKp+Hu7Ciub8wigQ0odGrkml4eTjUy8d5Bu2eGAVvm8Qskkq+YuXiiS5wMJGq7iSvqseV4skd5WxTUdDA==",
"dependencies": {
"System.Memory.Data": "1.0.2",
"System.Text.Json": "6.0.9"
"Microsoft.Extensions.Logging.Abstractions": "8.0.3",
"System.Memory.Data": "6.0.1"
}
},
"System.Collections": {
Expand Down Expand Up @@ -1187,11 +1180,8 @@
},
"System.Memory.Data": {
"type": "Transitive",
"resolved": "6.0.0",
"contentHash": "ntFHArH3I4Lpjf5m4DCXQHJuGwWPNVJPaAvM95Jy/u+2Yzt2ryiyIN04LAogkjP9DeRcEOiviAjQotfmPq/FrQ==",
"dependencies": {
"System.Text.Json": "6.0.0"
}
"resolved": "6.0.1",
"contentHash": "yliDgLh9S9Mcy5hBIdZmX6yphYIW3NH+3HN1kV1m7V1e0s7LNTw/tHNjJP4U9nSMEgl3w1TzYv/KA1Tg9NYy6w=="
},
"System.Net.Http": {
"type": "Transitive",
Expand Down Expand Up @@ -1250,11 +1240,6 @@
"System.Threading.Tasks": "4.3.0"
}
},
"System.Numerics.Vectors": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ=="
},
"System.ObjectModel": {
"type": "Transitive",
"resolved": "4.3.0",
Expand Down Expand Up @@ -1726,11 +1711,11 @@
"corvus.identity.azure": {
"type": "Project",
"dependencies": {
"Azure.Identity": "[1.13.1, )",
"Azure.Identity": "[1.14.0, )",
"Azure.Security.KeyVault.Secrets": "[4.7.0, )",
"Corvus.Identity.Abstractions": "[1.0.0, )",
"Microsoft.Extensions.Caching.Memory": "[8.0.1, )",
"Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )"
"Microsoft.Extensions.Caching.Memory": "[8.0.*, )",
"Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.*, )"
}
},
"corvus.identity.examples.usingazurecore": {
Expand Down
Loading
Loading