PLT-89977 Modify Logout Command to use information from idp #11
+123
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description

The SLO logout flow is currently failing due to a service provider signing certificate not being populated.
Historically, the setting used
options.SPOptions
which was only populated during startup here: https://github.com/UiPath/IdentityServer/blob/2c6b2f5348bcef6f26e3b93a3f18aff5b62c7cfb/src/Authentication.Saml2/Saml2ProviderService.cs#L153This initially loaded our static certificate, then our token signing certificates, and after this change, there are no certificates configured at the host level in cloud. Before that change, the SLO flow worked because we used the host level certificates to sign the response.
This PR modifies the logout flow to use the service certificates that are specific to the identity provider (we provide customers the option to choose which certificate they would like us to use and fallback to our token signing certificate if they dont provide any).
Testing
Unit tests are passing:
When debugging locally, there is an unrelated bug in our local development environment where the logout is failing. However, I was able to see the logout call being triggered by this line:
Saml2/Sustainsys.Saml2.AspNetCore2/CommandResultExtensions.cs
Line 84 in dc2d8ea
Additionally, I have uploaded a custom version of my nuget package here: https://uipath.visualstudio.com/Identity/_artifacts/feed/nuget-packages/NuGet/UiPath.Swapnil.Sustainsys.Saml2.AspNetCore2/overview/1.0.11.1. I'll use this version to test in an ETE environment before merging. After merging I'll generate a new version and update the version in identity like the following: https://github.com/UiPath/IdentityServer/pull/10739
For future reference, I used the following commands after changing the project settings
Navigate to the project folder and run
dotnet pack --configuration Release
. This will create the nupkg file in the bin/Release folder.Download nuget.exe here and run
nuget.exe push UiPath.Swapnil.Sustainsys.Saml2.AspNetCore2.1.0.11.1.nupkg -Source nuget-packages -ApiKey VSTS