Skip to content

Commit

Permalink
Merge pull request #201 from ITfoxtec/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Revsgaard authored May 31, 2024
2 parents b2b1d5f + c706619 commit 95327a0
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 113 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ The ITfoxtec Identity Saml2 package adds SAML-P support for both Identity Provid
* **Support .NET 8.0**
* **Support .NET 7.0**
* **Support .NET 6.0**
* **Support .NET 5.0**
* **Support .NET Core 3.1**
* **Support .NET Standard 2.1**
* **Support .NET Framework 4.6.1 and 4.7.2**

Expand Down Expand Up @@ -38,4 +36,4 @@ You can read more on [ITfoxtec Identity Saml2 Project Home Page](https://itfoxte
If you have questions please ask them on <a href="https://stackoverflow.com/questions/tagged/itfoxtec-identity-saml2">Stack Overflow</a>. Tag your questions with 'itfoxtec-identity-saml2' and I will answer as soon as possible.

### Open source donations by PayPal
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=QVQN5ZNP2RK4Y)
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate/?hosted_button_id=QVQN5ZNP2RK4Y)
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<PackageTags>SAML SAML 2.0 SAML2.0 SAML2 SAML 2 SAML-P SAMLP SSO Identity Provider (IdP) and Relying Party (RP) Authentication Metadata OIOSAML OIOSAML 2 OIOSAML 3 NemLogin NemLog-in 2 NemLog-in 3 ASP.NET MVC</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageIconUrl>https://itfoxtec.com/favicon.ico</PackageIconUrl>
<AssemblyVersion>4.10.9.2</AssemblyVersion>
<FileVersion>4.10.9.2</FileVersion>
<AssemblyVersion>4.10.9.3</AssemblyVersion>
<FileVersion>4.10.9.3</FileVersion>
<Copyright>Copyright © 2023</Copyright>
<Version>4.10.9-beta2</Version>
<Version>4.10.9-beta3</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>ITfoxtec.SAML2.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;net48;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;net48;net462</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand All @@ -15,8 +15,6 @@
Support .NET 8.0
Support .NET 7.0
Support .NET 6.0
Support .NET 5.0
Support .NET Core 3.1
Support .NET Framework 4.6.2 and 4.8

Support message signing and validation as well as decryption is supported. The package supports SAML 2.0 login, logout, single logout and metadata. Both SP Initiated and IdP Initiated sign on is supported.
Expand All @@ -31,10 +29,10 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<PackageTags>SAML SAML 2.0 SAML2.0 SAML2 SAML 2 SAML-P SAMLP SSO Identity Provider (IdP) Relying Party (RP) Authentication Metadata OIOSAML OIOSAML 2 OIOSAML 3 NemLogin NemLog-in 2 NemLog-in 3 ASP.NET MVC Core</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageIconUrl>https://itfoxtec.com/favicon.ico</PackageIconUrl>
<AssemblyVersion>4.10.9.2</AssemblyVersion>
<FileVersion>4.10.9.2</FileVersion>
<AssemblyVersion>4.10.9.3</AssemblyVersion>
<FileVersion>4.10.9.3</FileVersion>
<Copyright>Copyright © 2023</Copyright>
<Version>4.10.9-beta2</Version>
<Version>4.10.9-beta3</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>ITfoxtec.SAML2.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
Expand Down Expand Up @@ -93,43 +91,6 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net5.0'">
<DefineConstants>NET50;NET</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net5.0|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net5.0|AnyCPU'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.IdentityModel.Tokens.Saml" Version="5.4.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.4.0" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.Security" Version="4.5.3" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>NETCORE31;NETCORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netcoreapp3.1|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp3.1|AnyCPU'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net48' ">
<PackageReference Include="Microsoft.AspNetCore.Authentication.Cookies" Version="2.2.0" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public X509Certificate2 DecryptionCertificate

public string AllowedIssuer { get; set; }

public List<X509Certificate2> SignatureValidationCertificates { get; protected set; } = new List<X509Certificate2>();
public List<X509Certificate2> SignatureValidationCertificates { get; set; } = new List<X509Certificate2>();
public X509CertificateValidationMode CertificateValidationMode { get; set; } = X509CertificateValidationMode.ChainTrust;
public X509RevocationMode RevocationMode { get; set; } = X509RevocationMode.Online;
public X509CertificateValidator CustomCertificateValidator { get; set; }
Expand All @@ -66,7 +66,7 @@ public X509Certificate2 DecryptionCertificate
public bool DetectReplayedTokens { get; set; } = false;

public bool AudienceRestricted { get; set; } = true;
public List<string> AllowedAudienceUris { get; protected set; } = new List<string>();
public List<string> AllowedAudienceUris { get; set; } = new List<string>();

/// <summary>
/// Sign and validate signed authn requests.
Expand Down
61 changes: 9 additions & 52 deletions src/ITfoxtec.Identity.Saml2/ITfoxtec.Identity.Saml2.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net8.0;net7.0;net6.0;net5.0;netcoreapp3.1;netstandard2.1;net48;net462</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0;netstandard2.1;net48;net462</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
Expand All @@ -15,8 +15,6 @@
Support .NET 8.0
Support .NET 7.0
Support .NET 6.0
Support .NET 5.0
Support .NET Core 3.1
Support .NET Standard 2.1
Support .NET Framework 4.6.2 and 4.8

Expand All @@ -32,10 +30,10 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<PackageTags>SAML SAML 2.0 SAML2.0 SAML2 SAML 2 SAML-P SAMLP SSO Identity Provider (IdP) Relying Party (RP) Authentication Metadata OIOSAML OIOSAML 2 OIOSAML 3 NemLogin NemLog-in 2 NemLog-in 3</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageIconUrl>https://itfoxtec.com/favicon.ico</PackageIconUrl>
<AssemblyVersion>4.10.9.2</AssemblyVersion>
<FileVersion>4.10.9.2</FileVersion>
<AssemblyVersion>4.10.9.3</AssemblyVersion>
<FileVersion>4.10.9.3</FileVersion>
<Copyright>Copyright © 2023</Copyright>
<Version>4.10.9-beta2</Version>
<Version>4.10.9-beta3</Version>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>ITfoxtec.SAML2.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
Expand All @@ -46,7 +44,7 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens.Saml" Version="7.0.3" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.0" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="8.0.0" />
<PackageReference Include="System.ServiceModel.Security" Version="6.0.0" />
</ItemGroup>
Expand All @@ -66,7 +64,7 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<ItemGroup Condition=" '$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens.Saml" Version="7.0.3" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.0.3" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="7.5.0" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="7.0.1" />
<PackageReference Include="System.ServiceModel.Security" Version="6.0.0" />
</ItemGroup>
Expand All @@ -86,7 +84,7 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<ItemGroup Condition=" '$(TargetFramework)' == 'net6.0'">
<PackageReference Include="Microsoft.Extensions.Http" Version="6.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens.Saml" Version="6.28.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.28.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.35.0" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.1" />
<PackageReference Include="System.ServiceModel.Security" Version="4.10.2" />
</ItemGroup>
Expand All @@ -103,52 +101,11 @@ Support the Danish NemLog-in 2 / OIOSAML 2 and NemLog-in 3 / OIOSAML 3.</Descrip
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'net5.0'">
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
<PackageReference Include="Microsoft.IdentityModel.Tokens.Saml" Version="6.28.1" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="6.28.1" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="5.0.0" />
<PackageReference Include="System.ServiceModel.Security" Version="4.10.0" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'net5.0'">
<DefineConstants>NET50;NET</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net5.0|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net5.0|AnyCPU'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.Extensions.Http" Version="3.1.10" />
<PackageReference Include="Microsoft.IdentityModel.Tokens.Saml" Version="5.4.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.4.0" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="4.5.0" />
<PackageReference Include="System.ServiceModel.Security" Version="4.5.3" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1'">
<DefineConstants>NETCORE31;NETCORE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|netcoreapp3.1|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netcoreapp3.1|AnyCPU'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591;1573</NoWarn>
</PropertyGroup>

<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1'">
<PackageReference Include="Microsoft.IdentityModel.Tokens.Saml" Version="5.4.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.4.0" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.7.0" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="4.5.0" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="4.7.1" />
<PackageReference Include="System.ServiceModel.Security" Version="4.5.3" />
</ItemGroup>
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1'">
Expand Down
2 changes: 1 addition & 1 deletion src/ITfoxtec.Identity.Saml2/Schemas/IDPEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class IDPEntry

public XElement ToXElement()
{
var envelope = new XElement(Saml2Constants.ProtocolNamespace + elementName);
var envelope = new XElement(Saml2Constants.ProtocolNamespaceX + elementName);

envelope.Add(GetXContent());

Expand Down
4 changes: 2 additions & 2 deletions src/ITfoxtec.Identity.Saml2/Schemas/IDPList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public class IDPList

public XElement ToXElement()
{
var envelope = new XElement(Saml2Constants.ProtocolNamespaceNameX + elementName);
var envelope = new XElement(Saml2Constants.ProtocolNamespaceX + elementName);

envelope.Add(GetXContent());

Expand All @@ -34,7 +34,7 @@ public XElement ToXElement()

protected virtual IEnumerable<XObject> GetXContent()
{
yield return new XAttribute(Saml2Constants.ProtocolNamespaceNameX, Saml2Constants.ProtocolNamespaceNameX);
yield return new XAttribute(Saml2Constants.ProtocolNamespaceNameX, Saml2Constants.ProtocolNamespaceX);

if (GetComplete != null)
{
Expand Down
4 changes: 2 additions & 2 deletions src/ITfoxtec.Identity.Saml2/Schemas/Scoping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class Scoping

public XElement ToXElement()
{
var envelope = new XElement(Saml2Constants.ProtocolNamespaceNameX + elementName);
var envelope = new XElement(Saml2Constants.ProtocolNamespaceX + elementName);

envelope.Add(GetXContent());

Expand All @@ -40,7 +40,7 @@ public XElement ToXElement()

protected virtual IEnumerable<XObject> GetXContent()
{
yield return new XAttribute(Saml2Constants.ProtocolNamespaceNameX, Saml2Constants.ProtocolNamespaceNameX);
yield return new XAttribute(Saml2Constants.ProtocolNamespaceNameX, Saml2Constants.ProtocolNamespaceX);

if (RequesterID != null)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>TestWebAppCoreAzureKeyVault</AssemblyName>
<PackageId>TestWebAppCoreAzureKeyVault</PackageId>
<Version>5.0.0</Version>
<Version>8.0.0</Version>
<Authors>Anders Revsgaard</Authors>
<Company>ITfoxtec</Company>
<Copyright>Copyright © 2019</Copyright>
Expand All @@ -24,9 +24,9 @@

<ItemGroup>
<PackageReference Include="BuildBundlerMinifier" Version="3.2.449" />
<PackageReference Include="ITfoxtec.Identity" Version="2.5.6" />
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.2.0" />
<PackageReference Include="Azure.Identity" Version="1.5.0" />
<PackageReference Include="ITfoxtec.Identity" Version="2.5.45" />
<PackageReference Include="Azure.Security.KeyVault.Certificates" Version="4.6.0" />
<PackageReference Include="Azure.Identity" Version="1.10.4" />
<PackageReference Include="RSAKeyVaultProvider" Version="2.1.1" />
</ItemGroup>
</Project>

0 comments on commit 95327a0

Please sign in to comment.