SAML Single Sign-On (SSO) for WordPress using IdentityServer4 as IDP | IdentityServer4 SSO Login
Overview
WordPress SAML Single Sign-On (SSO) plugin to achieve IdentityServer4 SAML SSO for WordPress for secure login into your WordPress using IdentityServer4 as a SAML provider. In this guide, we will go step-by-step to configure IdentityServer4 as IdP (Identity Provider) and WordPress as SP (Service Provider) for SSO login.
You can visit our WordPress SSO plugin to know more about the other features we provide.
Pre-requisites : Download And Installation
To configure IdentityServer4 as SAML IdP with WordPress, you will need to install the miniOrange WP SAML SP SSO plugin.
Read the below steps to setup IdentityServer4 SAML SSO for WordPress (WP)
Step 1: Setup IdentityServer4 as IdP (Identity Provider)
Follow the following steps to Configure IdentityServer4 as IdP:
Note: To add SAML IDP functionality you would require modifications in the Startup.cs file.
- In the ConfigureServices method, your call to AddIdentityServer needs to be updated with the following code:
{
services.AddIdentityServer()
// the rest of registrations (clients, resources, users, etc)
.AddSigningCredential(new X509Certificate2(/*your cert*/))
.AddSamlPlugin(options => {
options.Licensee = "/*your license key org name*/";
options.LicenseKey = "/*your license key*/";
})
.AddInMemoryServiceProviders(new List());
}
- In the configure method, the call to UseIdentityServer needs to be extended with following code:
{
app.UseIdentityServer()
.UseIdentityServerSamlPlugin();
}
Configure IdentityServer4 as Service Provider
- In the Config.cs file create a Client entry.
new Client {
ClientId = "http://localhost:5001/saml",
ClientName = "RSK SAML2P Test Client",
ProtocolType = IdentityServerConstants.ProtocolTypes.Saml2p,
AllowedScopes = { "openid", "profile" }
}
- In the Config.cs configure SAML Specifics using Service Provider object.
ClientId | Provide clientId from Service Provider Metadata tab |
ClientName | Provide Service Provider name |
ProtocolType | IdentityServerConstants.ProtocolTypes.Saml2p |
AllowedScopes | openid, profile |
new ServiceProvider {
EntityId = "http://localhost:5001/saml",
SigningCertificates = {new X509Certificate2("TestClient.cer")},/*Enter the certificate name*/
AssertionConsumerServices = { new Service(SamlConstants.BindingTypes.HttpPost, "http://localhost:5001/signin-saml") }
};
- Note: The Client ID and Entity ID must be Equal.
- You would need the following information from the Service Provider Metadata.
Entity-ID | Provide Entity-Id from Service Provider Metadata tab |
SigningCertificates | Download the Certificate from Service Provider Metadata tab of the plugin and enter Certificate name |
Assertion Consumer Service URL | Provide the required Binding type followed by the ACS URL: HttpPost method: SamlConstants.BindingTypes.HttpPost HttpRedirect method: SamlConstants.BindingTypes.HttpRedirect ACS URL: Provide ACS URL from Service Provider Metadata Tab |
- To configure your Service Provider retrieve IDP Metadata by visiting /saml/metadata URL.
- You will get the endpoints required for the Service Provider configuration.
You have successfully configured IdentityServer4 as SAML IdP ( Identity Provider) for achieving IdentityServer4 SSO login into your WordPress (WP) Site.
Step 2: Configuring WordPress as SP (Service Provider)
- Free
- Standard
- Premium
FAQs
More FAQs ➔How does Single Sign-On (SSO) work?
Multi-Factor Authentication (MFA) is an authentication method that requires the user to authenticate themselves for two or more factors, in order to gain access to company resources, applications, or a VPN (OpenVPN in this case). Enabling Multi-Factor Authentication (MFA) means that users need to provide additional verification factors apart from their username and passwords thus increasing the security of the organization's resources. Checkout more about Multi-Factor Authentication (MFA) here.
What is an SSO Authentication Token?
Multi-Factor Authentication (MFA) is an authentication method that requires the user to authenticate themselves for two or more factors, in order to gain access to company resources, applications, or a VPN (OpenVPN in this case). Enabling Multi-Factor Authentication (MFA) means that users need to provide additional verification factors apart from their username and passwords thus increasing the security of the organization's resources. Checkout more about Multi-Factor Authentication (MFA) here.
What are different Methods of SSO?
Multi-Factor Authentication (MFA) is an authentication method that requires the user to authenticate themselves for two or more factors, in order to gain access to company resources, applications, or a VPN (OpenVPN in this case). Enabling Multi-Factor Authentication (MFA) means that users need to provide additional verification factors apart from their username and passwords thus increasing the security of the organization's resources. Checkout more about Multi-Factor Authentication (MFA) here.
What are the Different Types of Single Sign-On?
Multi-Factor Authentication (MFA) is an authentication method that requires the user to authenticate themselves for two or more factors, in order to gain access to company resources, applications, or a VPN (OpenVPN in this case). Enabling Multi-Factor Authentication (MFA) means that users need to provide additional verification factors apart from their username and passwords thus increasing the security of the organization's resources. Checkout more about Multi-Factor Authentication (MFA) here.