Skip to content

Commit

Permalink
Merge pull request fixes #16 from PascalBayard/develop/15-Error_more_…
Browse files Browse the repository at this point in the history
…than_one_MFA_configured

Develop/15 error more than one mfa configured
  • Loading branch information
phaupt authored Apr 19, 2023
2 parents f4563e2 + f14d4a9 commit a613932
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Admin/register_midadfs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ $global:WarningPreference = "Continue"
$global:ErrorActionPreference = "Continue"

$shortVersion = "13"
$fullVersion = "1.3.3.0"
$fullVersion = "1.3.4.0"

if ($Args[0] -ne $null) {
$logFile = $Args[0];
Expand Down
4 changes: 3 additions & 1 deletion AuthnAdapter/AdapterPresentation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ private string _buildErrorMessage(int lcid)
return s;
}

private const string loginFormCommonHtml = @"<form method=""post"" id=""midLoginForm""><input id=""context"" type=""hidden"" name=""Context"" value=""%Context%""/>";
private const string loginFormCommonHtml = @"<form method=""post"" id=""midLoginForm"">
<input id=""context"" type=""hidden"" name=""Context"" value=""%Context%""/>
<input id=""authMethod"" type=""hidden"" name=""AuthMethod"" value=""%AuthMethod%""/>";
// The next string is documented as a required field in MSDN, but provokes "duplicated authMethod field" server error response in ADFS 3.5.
// <input id=""authMethod"" type=""hidden"" name=""AuthMethod"" value=""%AuthMethod%""/>"

Expand Down
4 changes: 3 additions & 1 deletion AuthnAdapter/AuthenticationAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ private bool isAvailableForUser(Claim identityClaim, IAuthenticationContext ctx)
// Search for the user
try
{
using (DirectoryEntry entry = new DirectoryEntry())
var domain = upn.Split("@".ToCharArray())[1];

using (DirectoryEntry entry = new DirectoryEntry($"LDAP://{domain}"))
{
DirectorySearcher ds = new DirectorySearcher(entry);
ds.SearchScope = SearchScope.Subtree;
Expand Down
6 changes: 3 additions & 3 deletions AuthnAdapter/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Swisscom")]
[assembly: AssemblyProduct("Mobile ID ADFS Adapter")]
[assembly: AssemblyCopyright("Copyright © Swisscom 2015-2021")]
[assembly: AssemblyCopyright("Copyright © Swisscom 2015-2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -33,6 +33,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]
[assembly: AssemblyVersion("1.3.4.0")]
[assembly: AssemblyFileVersion("1.3.4.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]
11 changes: 5 additions & 6 deletions Package/midadfs.iss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#define MyAppShortName "Mobile ID for ADFS"
#define MyAppAbb "MobileIdAdfs"
#define MyAppVersion "1.3"
#define MyAppFullVersion "1.3.3.0"
#define MyAppFullVersion "1.3.4.0"

[Setup]
AppId={{609C382B-1D2D-40F5-B2ED-742C603AD024}
Expand All @@ -14,7 +14,7 @@ AppPublisherURL=https://www.swisscom.com/
AppSupportURL=https://github.com/MobileID-Strong-Authentication/mobileid-enabler-adfs
AppUpdatesURL=https://github.com/MobileID-Strong-Authentication/mobileid-enabler-adfs/tree/main/binaries
; AppUpdatesURL=http://goo.gl/cp1BCU
AppCopyright=(C) 2015-2021, Swisscom Ltd.
AppCopyright=(C) 2015-2023, Swisscom Ltd.
DefaultDirName={pf}\{#MyAppAbb}\v{#MyAppVersion}
DefaultGroupName={#MyAppName}
LicenseFile=..\LICENSE
Expand Down Expand Up @@ -49,7 +49,7 @@ Source: "..\binaries\Microsoft.Diagnostics.Tracing.EventSource.dll"; DestDir: "{
Source: "..\binaries\*.etwManifest.dll"; DestDir: "{app}\lib"; Flags: ignoreversion uninsneveruninstall
Source: "..\binaries\*.etwManifest.man"; DestDir: "{app}\lib"; Flags: ignoreversion uninsneveruninstall
Source: "..\AuthnAdapter\spin.min.js"; DestDir: "{app}\lib"
Source: "..\samples\MobileId.Adfs.AuthnAdapter-template.xml"; DestDir: "{app}"; DestName: "MobileId.Adfs.AuthnAdapter.xml"
Source: "..\samples\myconfig13.xml"; DestDir: "{app}"; DestName: "MobileId.Adfs.AuthnAdapter.xml"
; Source: "..\Admin\*.psm1"; DestDir: "{app}\lib"
; Before this script is compiled by ISCC, ..\Admin\*.psm1 are copied to ..\binaries and then signed.
Source: "..\binaries\*.psm1"; DestDir: "{app}\lib"; Flags: ignoreversion uninsneveruninstall
Expand All @@ -65,9 +65,8 @@ Source: "..\Admin\unregister_midadfs.ps1"; DestDir: "{app}"
Source: "..\Admin\unregister_midadfs.cmd"; DestDir: "{app}"
Source: "..\Admin\unregister_etw.ps1"; DestDir: "{app}"; Flags: ignoreversion uninsneveruninstall
Source: "..\Admin\unregister_etw.cmd"; DestDir: "{app}"; Flags: ignoreversion uninsneveruninstall
Source: "..\certs\mobileid-ca-ssl.crt"; DestDir: "{app}\certs"
Source: "..\certs\codesigning-swisscom.crt"; DestDir: "{app}\certs"
Source: "..\certs\Swisscom_Root_CA_2_der.crt"; DestDir: "{app}\certs"
Source: "..\certs\Swisscom_Root_CA_2.crt"; DestDir: "{app}\certs"
Source: "..\certs\Swisscom_Root_CA_4.crt"; DestDir: "{app}\certs"
Source: "..\3RD_PARTY.md"; DestDir: "{app}\license"
Source: "..\LICENSE"; DestDir: "{app}\license"; DestName: "MobileId_LICENSE.txt"
Source: "install_midadfs.cmd"; DestDir: "{app}"; Flags: deleteafterinstall
Expand Down
2 changes: 1 addition & 1 deletion Package/params.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# hash-ref used to build $TOPDIR/README.md
{
VersionLong => '1.3.3.0',
VersionLong => '1.3.4.0',
VersionShort => '1.3',
VersionAbb => '13',
}
6 changes: 3 additions & 3 deletions Service/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Swisscom")]
[assembly: AssemblyProduct("Mobile ID")]
[assembly: AssemblyCopyright("Copyright © Swisscom 2015-2021")]
[assembly: AssemblyCopyright("Copyright © Swisscom 2015-2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -33,6 +33,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]
[assembly: AssemblyVersion("1.3.4.0")]
[assembly: AssemblyFileVersion("1.3.4.0")]
[assembly: NeutralResourcesLanguageAttribute("en")]
6 changes: 3 additions & 3 deletions ServiceTest/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Swisscom")]
[assembly: AssemblyProduct("ServiceTest")]
[assembly: AssemblyCopyright("Copyright © Swisscom 2015-2021")]
[assembly: AssemblyCopyright("Copyright © Swisscom 2015-2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.3.3.0")]
[assembly: AssemblyFileVersion("1.3.3.0")]
[assembly: AssemblyVersion("1.3.4.0")]
[assembly: AssemblyFileVersion("1.3.4.0")]
Binary file added binaries/midadfs-bin_1.3.4.0.zip
Binary file not shown.
Binary file added binaries/midadfs_setup_1.3.4.0.exe
Binary file not shown.
3 changes: 3 additions & 0 deletions release-notes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
v1.3.4.0 (2023-04-18)
* Inserted hidden field for AuthMethod to support more than one configured MFA methods in ADFS (github issue #15).

v1.3.3.0 (2022-02-09)
* Configuration Parameter "SslRootCaCertDN" removed
* Renamed Configuration Parameter "SslKeystore" to "SslMidClientKeystore"
Expand Down

0 comments on commit a613932

Please sign in to comment.