Follow

SSO: Populi as Service Provider (SP)

Populi supports SAML 2.0 single sign-on as either a Service Provider (SP) or Identity Provider (IdP). This article covers the SP setup.

  • When functioning as an identity provider, Populi accepts incoming authentication requests and provides a login page. When the user has successfully authenticated, Populi will redirect them back to your external application.
  • When functioning as a service provider, Populi won't store user passwords and will instead redirect users to your SAML 2.0 Identity Provider instead. Once the user has authenticated on your system, they will be redirected back to Populi where we will validate the response and then allow them access.
  • You cannot use Populi as both Identity Provider and Service Provider: it has to be either the authoritative source for user credentials or it has to look to an external system, but not both.
  • To set up SSO, you need to have Account Admin privileges to your school's Populi account.

Populi as a Service Provider (SP)

If you already maintain a SAML 2.0-compliant Identity Provider to authenticate students against your local network (Microsoft Active Directory Federation Services, for example), you can configure Populi to authenticate against your existing system.

  • SSO has no effect on a user's roles/permissions within Populi. It simply offloads to your system the decision about whether a particular login (username and password) is valid.
  • Also, if you block a user in Populi, Populi will deny him access and not even try to authenticate; therefore, you can disable a user's access to Populi without disabling him in your system.
  • The decision to set up Populi as a Service Provider should not be taken lightly. A misconfiguration on your end (in the Identity Provider) could allow anyone to log in to Populi—whether or not they should be able to! It can also block all access to Populi.

Service Provider Setup

This section includes instructions for configuring ADFS so it will be able to interact with Populi.

ADFS Setup

Here are the settings required on the ADFS end. Please refer to the ADFS app's documentation for further explanations and instructions.

  • Add a Relying Party Trust Wizard: Enter this information manually
  • Display name: Ditto
  • Select the ADFS Profile (1.0/1.1 do not work with SAML).
  • Check next to Enable support for the SAML 1.0 WebSSO protocol.
    • Copy-paste the URL from your Populi SSO page (e.g. https://yourschool.populiweb.com/router/saml/sp/metadata)
    • Add a Relying Party Trust. This must exactly match what is entered in the Service Provider Entity ID field in Populi (see below). The default is populi.co.
  • In Claims:
    • Send LDAP attributes as Claims: Store: AD > LDAP attribute: E-Mail-Address to Outgoing claim type: E-Mail Address.
    • Transform an Incoming Claim: Incoming type: E-Mail Address to Outgoing Type: NameID. Format: Email
  • In Properties:
    • Monitoring tab: https://yourschool.populiweb.com/router/saml/sp/metadata
      Do not enable Monitor Relying party; Populi metadata is not compatible with monitoring.
    • Identifiers: populi.co.
    • Endpoints > Add a SAML: Type: SAML Assertion Consumer; Binding: POST; SET AS DEFAULT: index 0; URL: https://yourschool.populiweb.com/router/saml/sp/consume
    • SHA-256

Populi Setup

  1. Go to Account > Integrations.
  2. Click Add Integration.
  3. Under Built-in Integrations, select SSO (Identity Provider).
  4. Populi SP metadata: Use https://yourcollege.populiweb.com/router/saml/sp/metadata when your Identity Provider can import Service Provider metadata. Otherwise, use the settings below to configure it manually.
  5. Service Provider Certificates: Populi's default SP certificate serves two purposes:
    • If you enable signed outgoing SAML requests, your Identity Provider uses the public certificate to verify Populi's signatures.
    • If your Identity Provider encrypts assertions, it uses the public certificate to encrypt them. Populi uses the corresponding private key to decrypt the assertions.
    Click Generate Certificate to create a new certificate without changing the current default. Download the default public certificate and upload it to your Identity Provider whenever you use request signing or encrypted assertions. See Updating SAML Certificates in Populi for rotation instructions.
  6. Sign outgoing SAML requests: This is off by default. Enable it to add Populi's signature to outgoing SAML requests. Your Identity Provider must have Populi's default Service Provider certificate so it can verify those signatures.
  7. Signature Algorithm: Choose RSA SHA-1, RSA SHA-256 (default), or RSA SHA-512 for outgoing signed SAML requests.
  8. Identity Provider URL: When a user attempts to log in, Populi redirects the browser to this page, appending a SAML 2.0 <AuthnRequest> element to the URL and including the RelayState parameter set to your instance of Populi. The request is unsigned unless Sign outgoing SAML requests is enabled. This URL varies depending on your Identity Provider; check its documentation.
    • For ADFS, enter https://{adfs dns name}/adfs/ls/idpinitiatedsignon.aspx?logintoRP={trust name you choose in adfs}
  9. Sign-out URL: When a user logs out of Populi, where should we send them? Depending on your setup, this could be a sign-out URL that destroys the session created in your system when the user logged in to Populi.
    • For ADFS, enter https://{adfs dns name}/adfs/ls/?wa=wsignout1.0
  10. Issuer: Enter the SAML entityID you chose when you set up your Identity Provider. If the issuer in its response doesn't match what you've entered in Populi, we won't allow the user to log in.
    • For ADFS, enter https://{adfs dns name}/adfs/services/trust
  11. Identity Provider Certificate: Populi uses this public certificate to verify that authentication responses came from your Identity Provider. Download your Identity Provider's public signing certificate as a PEM-encoded X509 certificate and upload it here. This is distinct from the Service Provider Certificates described above.
    • For ADFS, export the certificate from ADFS > Service > Certificates as a Base-64 encoded X.509; then upload it to Populi.
    • To check the format, view the certificate as a text file. The first line should be -----BEGIN CERTIFICATE----- and the last line should be -----END CERTIFICATE-----.
  12. Service Provider Entity ID: This identifies Populi in requests to your Identity Provider and defaults to populi.co. It must exactly match the relying-party or application identifier configured on the Identity Provider. Some providers, such as Azure, require a URL; in that case you could use a value such as https://populi.co or https://yourschool.populiweb.com. An Entity ID used as an identifier does not have to resolve to a web page.
    • For ADFS, enter the Relying Party Trust you chose when setting up ADFS; it must exactly match.
  13. Identity Provider Display Name: Enter a friendly name for the Identity Provider. If Automatic Login Redirection is disabled, the Populi login page will show Log in using _____, or Log in using SSO if you leave this blank. There is a 15-character limit.
  14. Automatic Login Redirection: Enable this to redirect users to the Identity Provider's login page without first showing the Populi login page. This setting is ignored until SSO is enabled.
  15. Enable Single Sign-on: Before enabling SSO, save your settings so Populi can validate the Identity Provider Certificate and confirm that the other required settings are present.
    • When you enable SSO, all login requests are routed through the configured Identity Provider. Test the setup before enabling it.
    • Disable Populi welcome email for SSO users: Select Yes to disable the Populi-generated welcome email when creating a new SSO user. You can still override this when creating particular users.
    • Login problem message: Customize the notice users see if they have trouble logging in to Populi.

Working with Azure?

We defer to Microsoft's documentation on Azure-related matters. That said, configuring these Azure settings as follows may expedite the setup on that side of the SSO setup.

  • Reply URL: https://yourschool.populiweb.com
  • Identity Provider URL: Login URL
  • Sign-out URL: Logout URL
  • Issuer: Azure AD Identifier
  • Service Provider Entity ID: Application ID (Enterprise application)

Troubleshooting

If you're having trouble, try pasting your raw SAML request into this SAML decoder tool. A common mistake is that the Issuer listed does not match what you have entered into Populi's Single Sign-On (SP) settings.

Important!

  • To aid in testing your SSO setup before you check this box (and possibly lock everyone out of Populi if it's not set up properly!), you can fill in and save the rest of your settings, then visit https://yourcollege.populiweb.com?sso=1. We won't actually allow you to log in until the Enable Single Sign-on box is checked, but we will redirect you to the Identity Provider URL and then show debugging information when you're redirected back to Populi after a successful login. Make sure you try this a few times and confirm that all your settings are correct before enabling SSO.
  • If at any time SSO breaks and you find yourself locked out of Populi, you can visit https://yourcollege.populiweb.com?sso=0 to bypass SSO and log in using your Populi credentials. As an account administrator, you can also reset key users' Populi passwords from their profile even while SSO is enabled. This will allow them to choose a Populi password that can be used to access Populi as described above if SSO breaks for some reason.
  • In order to access the API with Populi set up as a Service Provider, you must:
    1. Create the user account for making API calls in Populi before enabling SSO. If you already have SSO enabled, contact customer support for help in provisioning the user account.
    2. Your endpoint from which you will receive the access key will be https://yourcollege.populiweb.com/api/index.php
    3. This snippet lets you test the connection by issuing a cURL POST: curl --data "username=username%40yourdomain.edu&password=_YOUR_URL_ENCODED_PASSWORD_" https://yourschool.populiweb.com/api/index.php
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Article is closed for comments.