/Saml2/SSO/Callback returns 404 #648
Replies: 1 comment
|
It looks like the wrong SAML role is being used. Duende IdentityServer can act both as an SAML IDP or SP in v8:
The Configuring IdentityServer as a Service ProviderInstead of adding builder.Services.AddIdentityServer(...);
builder.Services.AddAuthentication()
.AddSamlServiceProvider("external-saml-idp", options =>
{
options.SpEntityId = "https://your-identityserver";
options.IdpEntityId = "https://external-idp";
options.SingleSignOnServiceUrl = "https://external-idp/saml/sso";
options.SigningCertificateBase64 = ["base64-encoded signing certificate from the IDP"];
// SP-Initiated SSO will redirect to /ExternalLogin/Callback, so we need to
// store the SAML ClaimsPrincipal using the temporary external cookie scheme:
options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
});The SAML service provider serves its endpoints under the configured
Optional: enabling IDP-Initiated SSOIdentity Providers can also start the login process on their end, called IDP-Initiated SSO. If your external IDP requires this, update the authentication handler configuration: builder.Services.AddAuthentication()
.AddSamlServiceProvider("external-saml-idp", options =>
{
options.SpEntityId = "https://your-identityserver";
options.IdpEntityId = "https://external-idp";
options.SingleSignOnServiceUrl = "https://external-idp/saml/sso";
options.SigningCertificateBase64 = ["base64-encoded signing certificate from the IDP"];
options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
// Enable IDP-initiated SSO
options.AllowUnsolicitedAuthnResponse = true;
// Redirect to the external login callback handler for IDP-Initiated SSO flows
options.IdpInitiatedCallbackUrl = "/ExternalLogin/Callback";
});The IDP may send a Hope this helps! Let us know how it goes. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I've upgraded to v8 in preparation for configuring my IdentityServer instance as an SP connected to an external IdP using SAML. While testing, I'm finding that the /Saml2/SSO/Callback url returns 404 after a redirect from the ACS url. Have I missed a bit of configuration? Currently on v8..0.10 for all packages. Saml is being enabled via default AddSaml(), though I've also tried by explicitly setting Endpoints.SingleSignonCallbackPath.
All reactions