CONFIGURING SAML FOR WORDPRESS
These steps will guide you through setting up the Single Sign-On functionality between OneLogin and WordPress.
This guide assumes that WordPress is running on a local machine. Before beginning the SAML integration process, we recommend getting WordPress properly installed and configured for ease of testing. More information on installation best practices can be found here in Installing Wordpress.
Setting Up OneLogin
Starting in the OneLogin admin dashboard portal, do the following:
- Go to to Apps > Add Apps.
- Search for WordPress that is a SAML 2.0 connector and select it.
You may edit the Display Name if desired. - Click Save.
- Select the Config uration tab.
- Under Consumer URL, put the full consumer URL of your WordpPress site - this will take the form of http://{prefix}.{your_subdomain}.com/wp-login.php?saml_acs
- Under Logout URL put http://app.onelogin.com/client/apps or if you have configured WordPress for Single Logout you can enter https://{prefix}.{your_subdomain}.com/wp-login.php?saml_sls
- Click Save.
- Select the Parameters tab.
- Ensure that Credentials are Configured by admin and that the mappings are as follows:
Email -> EmailEmail (attribute) -> EmailFirst Name -> First NameLast Name-> Last NameMember Of -> MemberOfUsername -> Username - Note: To bypass sso once configured, use this URL:
http://{prefix}.{your_subdomain}.com/wp-login.php?normal - Click Save.
- Select the SSO tab.
- Copy down the SAML2.0 Endpoint (HTTP) URL.
- Copy down the Issuer URL
- Click View Details.
- Select the Clipboard Icon to copy the entirety of the X.509 Certificate string.
Both URLS and the Certificate will be put into WordPress to confirm the SAML SSO connection.
Now go into your organizations WordpPress admin account.
Now go into your organizations WordpPress admin account.
Setting Up WordPress
In the WordPress admin dashboard, do the following:
- Select the navigation menu and go to Plugins > Add New.
- Search for OneLogin SAML SSO in the search field..
- Select it to add the plugin to the Plugins section in the navigation menu.
- In the navigation menu, go to Settings > SSO/SAML Settings.
- Fill out the Identity Provider Settings section with the following information:
IdP Entity ID: <your_issuer_url>Single Sign On Service URL: <your_http_endpoint_url>Single Log Out Service URL: -blank- OR <http://app.onelogin.com/client/appsX.509 Certificate: <your_x.509_certificate> - Fill out the Attribute Mapping section with the following information:
Username: User.UsernameE-mail: User.emailFirst Name: User.FirstNameLast Name: User.LastNameRole: memberOf - Click Save Changes.
With the configuration complete, OneLogin and WordPress should be connected through SAML!
Troubleshooting Email Mismatch
In some cases, the WordPress account admin email may not match the OneLogin admin email. This can be remedied by doing the following:
- Go to Users > Account_Owner.
- Select the Applications tab.
- Select WordPress to open the Edit Login pane.
Here you may overwrite the default fields for your WordPress login and insert the correct information to match your OneLogin credentials with your WordPress credentials.
Note: WP Engine and similar Wordpress hosts cache plugins and protect the
wp-login.php
view. Contact your Wordpress host to disable the cache for this SAML plugin and to also allow external HTTP POSTs towp-login.php
Tidak ada komentar:
Posting Komentar