Skip to content

Commit 0b1f442

Browse files
authored
removing arm token invocation (#75)
1 parent 8ee4fb5 commit 0b1f442

11 files changed

+33
-27
lines changed

.build/release.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<Product>DarkLoop's Azure Functions Authorization</Product>
99
<IsPreview>true</IsPreview>
1010
<AssemblyVersion>4.0.0.0</AssemblyVersion>
11-
<Version>4.1.4</Version>
11+
<Version>4.2.0</Version>
1212
<FileVersion>$(Version).0</FileVersion>
1313
<RepositoryUrl>https://github.com/dark-loop/functions-authorize</RepositoryUrl>
1414
<License>https://github.com/dark-loop/functions-authorize/blob/master/LICENSE</License>

ChangeLog.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
# Change log
22
Change log stars with version 3.1.3
33

4+
## 4.2.0
5+
- Removing support for STS .NET versions (7.0), as these versions are not supported by Azure Functions runtime.
6+
- Removing ARM authentication support to align with Azure Functions runtime changes.
7+
- Aligning IdentityModel packages versions with versions specified in the *Script.WebHost** project.
8+
9+
## 4.1.3
10+
- Adding support for specifying a scheme in `AddJwtFunctionsBearer` method as an overload. It throws exception if 'Bearer' is used as a scheme name.
11+
412
## 4.1.2
513
- **[Bug Fix]** The main change in this version is ensuring metadata collection middleware is thread safe when no metadata has been built for a specific function. Thanks @dstenroejl for reporting [issue](https://github.com/dark-loop/functions-authorize/issues/62).
614
- Using `FunctionsBearer` scheme in sample application to align with implementation.

sample/SampleInProcFunctions.V4/SampleInProcFunctions.V4.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net6.0</TargetFramework>
3+
<TargetFramework>net8.0</TargetFramework>
44
<AzureFunctionsVersion>v4</AzureFunctionsVersion>
55
<UserSecretsId>51dc0b9d-8e74-45ec-aebc-1d3d6934faf5</UserSecretsId>
66
<IsPackable>false</IsPackable>

src/abstractions/DarkLoop.Azure.Functions.Authorization.Abstractions.csproj

+3-12
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<AssemblyName>DarkLoop.Azure.Functions.Authorization.Abstractions</AssemblyName>
55
<RootNamespace>DarkLoop.Azure.Functions.Authorization</RootNamespace>
6-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
77
<Version>0.0.1-preview</Version>
88
<Description>DarkLoop's Azure Functions authorization extension shared core functionality for InProc and Isolated modules.</Description>
99
<Nullable>enable</Nullable>
@@ -25,23 +25,14 @@
2525

2626
<ItemGroup Condition="'$(TargetFramework)' == 'net6.0'">
2727
<PackageReference Include="Microsoft.AspNetCore.Metadata" Version="6.0.0" />
28-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0" />
28+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.29" />
2929
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="6.0.0" />
30-
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="6.10.0" />
31-
</ItemGroup>
32-
33-
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
34-
<PackageReference Include="Microsoft.AspNetCore.Metadata" Version="7.0.0" />
35-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.0" />
36-
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="7.0.0" />
37-
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="7.0.0" />
3830
</ItemGroup>
3931

4032
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
4133
<PackageReference Include="Microsoft.AspNetCore.Metadata" Version="8.0.0" />
42-
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.0" />
34+
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.4" />
4335
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="8.0.0" />
44-
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.0.0" />
4536
</ItemGroup>
4637

4738
<ItemGroup>

src/in-proc/DarkLoop.Azure.Functions.Authorization.InProcess.csproj

+12-3
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,13 @@
33
<PropertyGroup>
44
<RootNamespace>DarkLoop.Azure.Functions.Authorization</RootNamespace>
55
<AssemblyName>DarkLoop.Azure.Functions.Authorization.InProcess</AssemblyName>
6-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
77
<Version>0.0.1-preview</Version>
88
<UserSecretsId>3472ff41-3859-4101-a2da-6c37d751fd31</UserSecretsId>
99
<Description>Azure Functions V3 and V4 (InProc) extension to enable authentication and authorization on a per function basis based on ASPNET Core frameworks.</Description>
1010
<Nullable>enable</Nullable>
11+
<IdentityDependencyVersion Condition="'$(TargetFramework)' == 'net6.0'">6.35.0</IdentityDependencyVersion>
12+
<IdentityDependencyVersion Condition="'$(TargetFramework)' == 'net8.0'">7.1.2</IdentityDependencyVersion>
1113
</PropertyGroup>
1214

1315
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
@@ -24,11 +26,18 @@
2426
<None Include="..\..\.editorconfig" Link=".editorconfig" />
2527
</ItemGroup>
2628

29+
<ItemGroup>
30+
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="$(IdentityDependencyVersion)" />
31+
</ItemGroup>
32+
2733
<ItemGroup>
2834
<PackageReference Include="Microsoft.Azure.Functions.Extensions" Version="1.1.0" />
2935
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="3.2.0" />
30-
<PackageReference Include="Microsoft.Azure.WebJobs" Version="[3.0.39,)" />
31-
<PackageReference Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="[4.30.0,)">
36+
<PackageReference Include="Microsoft.Azure.WebJobs" Version="[3.0.41,)" />
37+
<PackageReference Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="[4.834.1,)" Condition="'$(TargetFramework)' == 'net6.0'">
38+
<PrivateAssets>all</PrivateAssets>
39+
</PackageReference>
40+
<PackageReference Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="[4.1036.1,)" Condition="'$(TargetFramework)' == 'net8.0'">
3241
<PrivateAssets>all</PrivateAssets>
3342
</PackageReference>
3443
</ItemGroup>

src/in-proc/FunctionAuthorizationException.cs

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ internal FunctionAuthorizationException(HttpStatusCode status)
2121
_statusCode = status;
2222
}
2323

24-
/// <inheritdoc/>
25-
public FunctionAuthorizationException(SerializationInfo info, StreamingContext context) : base(info, context) { }
26-
2724
/// <summary>
2825
/// Gets the status code that was returned to caller.
2926
/// </summary>

src/in-proc/Security/FunctionsAuthenticationServiceCollectionExtensions.cs

-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ private static FunctionsAuthenticationBuilder AddFunctionsAuthentication(
5353
}
5454

5555
authBuilder
56-
.AddArmToken()
5756
.AddScriptAuthLevel()
5857
.AddScriptJwtBearer();
5958

src/isolated/DarkLoop.Azure.Functions.Authorization.Isolated.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<AssemblyName>DarkLoop.Azure.Functions.Authorization.Isolated</AssemblyName>
55
<RootNamespace>DarkLoop.Azure.Functions.Authorization</RootNamespace>
6-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
77
<Version>0.0.1-preview</Version>
88
<Description>Azure Functions V4 in Isolated mode extension to enable authentication and authorization on a per function basis based on ASPNET Core frameworks.</Description>
99
<Nullable>enable</Nullable>
@@ -23,6 +23,8 @@
2323
<FrameworkReference Include="Microsoft.AspNetCore.App" />
2424
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions" Version="1.3.0" />
2525
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" Version="1.3.2" />
26+
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="6.35.0" Condition="'$(TargetFramework)' == 'net6.0'" />
27+
<PackageReference Include="Microsoft.IdentityModel.Protocols.OpenIdConnect" Version="8.1.0" Condition="'$(TargetFramework)' == 'net8.0'" />
2628
</ItemGroup>
2729

2830
<ItemGroup>

test/Abstractions.Tests/Abstractions.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

test/InProc.Tests/InProc.Tests.csproj

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>
@@ -16,7 +16,7 @@
1616
<PackageReference Include="Moq" Version="4.20.70" />
1717
<PackageReference Include="coverlet.collector" Version="3.2.0" />
1818
<PackageReference Include="Microsoft.Azure.WebJobs.Extensions.Http" Version="3.2.0" />
19-
<PackageReference Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="4.30.0" />
19+
<PackageReference Include="Microsoft.Azure.WebJobs.Script.WebHost" Version="4.834.1" />
2020
</ItemGroup>
2121

2222
<ItemGroup>

test/Isolated.Tests/Isolated.Tests.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<IsPackable>false</IsPackable>

0 commit comments

Comments
 (0)